Data Element vs Domain

download Data Element vs Domain

of 3

description

ABAP Programming

Transcript of Data Element vs Domain

  • Data element Vs Domain Data element tells semantic attributes of a field Domain tells technical attributes of a field Domain A table is composed of fields. To create a field you need a data element. A data element's definition requires a domain. The domain contains the technical characteristics of a field, such as the field length and data type. When you create a new field, you must decide whether to create a new domain or reuse an existing one. To make this decision, determine whether the data type or length of your field should be dependent on an existing SAP field. If your field should be independent, create a new domain. If your field should be dependent, reuse an existing SAP domain. Similarly, you should reuse data elements if your field labels and documentation should change when SAP changes theirs. **********************************8 Data element provides business context. i.e., it provides field labels for the field in the backend, Data type: A data element is an elementary type. It describes the type attributes (data type, field length and possibly the number of decimal places) and screen information (explanatory text or field help) about unstructured data objects (table fields and structure fields or variables). Table fields and structure fields with the same contents should refer to the same data element. This ensures that the attributes of these fields are always consistent. A data element can be referenced in ABAP programs with TYPE. This permits you to define variables that take on the type attributes of the data element in an ABAP program. Domain : A domain describes the technical attributes of a field, such as the data type or the number of positions in a field. The domain defines primarily a value range describing the valid data values for the fields referring to this domain. Different technical fields of the same type can be combined in a domain. Fields referring to the same domain are changed at the same time when a domain is changed. This ensures the consistency of these fields. Additional info about data element 1.Data type, number of places and possibly the decimal places were entered directly. In this case the field is not filled. 2.A data element is assigned to the field. The field then gets its data type, length and possibly decimal places from this data element. The semantic attributes of the element (field help, representation of the field in input templates with keyword text, column headers for list output of the table contents and editing of the output with parameter IDs) are also copied.

  • What is Search Help

    Search Help is an data dictionary object which is used to create a popup window that contains all the data related with your search. It is a input Help which permits the user to display a list of possible values for a screen field. In other words search help is a field help provided to the user whenever he press a Search help button in executing an ABAP progam. It is created by using T.Code SE11.

    There are two types of Search Help

    1. Elementary Search Help is created from a single table.

    2. Collective Search Help is a collection of more than one Search Helps.

    Steps to create Elementary Search Help

    1. Goto T.Code SE11

    2. Select the Search Help radio button and Type the name of the Search Help you want to create for e.g ZSH

    3. Press the Create button.

    4. In the popup selection window choose Elementary Search Help(for creating Search Help from single table)

    5. Press Enter.

    6. Type in "Short description" Elemantry Search Help, "Selection method**" (TSTC in this case) and fields that should be displayed in the Search Help.

    7. Notice that the text table of TSTC has automatically been included as we entered TSTC in the Selection Method.

    - See more at: http://www.saptechies.org/search-help-create-search-help/#sthash.br7dzJiG.dpuf

    8. Now"Save" -> "Check" -> "Activate" -> "Execute". You will see a popup window with all the fields you added. Press F4 on any of them to see how your first Elementary Search Help looks.

    Steps to create Collective Search Help

    1. Go to SE11 -> Select radio button "Search Help" -> enter a name for e.g ZCL_SHL

    2. Select "Collective Search Help" radio button (on the popup)

    3. Press "Enter" 4. Type in "Short description" Collective Search Help and fields that should be displayed in the Search Help in the Definition Tab. (Note that there is no selection method to be entered for a collective search help.) 5. Now go to the "Included Search Helps" tab and enter the names of the Elementary Search Helps you wish to include into your Collective Search Help (ZCL_SHL in this case, Instead of

  • the selection method, we enter the included search helps for the collective search help.). 6. Now select the line which contains your Elementary Search Help and click on "Param. Assignment**". 7. In the next screen, enter the parameter names of the elementary search helps to which the corresponding parameters of the collective search help should be assigned in the field Reference parameter.(We need to assign parameter for each of the search help included). You can select the parameters contained in the included search help using the input help. Create a proposal for the assignment with Proposal. 8. "Save" -> "Check" -> "Activate" -> "Execute". You will see a popup window (as shown below) with all the fields you added. Press F4 on any of them to see how your Collective Search Help looks.

    - See more at: http://www.saptechies.org/search-help-create-search-help/#sthash.br7dzJiG.dpuf