|
|
|
|
|
Written by Rich
|
|
Wednesday, 16 May 2007 |
Data elements are the next step up the tree towards being able to use a domain. Whereas a domain defines a 'class' of information such as material numbers, or customer names, a data element defines an actual use for that domain. For example, you may have a material number. You may also have an alternative material number for use when the main material is out of stock. Both of these share the same characteristics but are subtly different. By creating a domain for these as SAP have done and then assigning the various data elements to that domain you can automatically provide for example header texts for your reports. Data elements are defined again using transaction SE11. Select the radio button labelled Data Type (because that's in essence what they are.....).
 Give the data element a meaningful name within the SAP naming conventions and click the 'create' button. You will be presented with a small dialog box:  Select 'Data Element' and click the tick. The Data Element definition screen will be displayed.  There are three ways to define a data element. - By Reference To A Domain
By Reference To A Built In Data Type By Reference To An Object
By Reference To A Domain By selecting 'Elementary Type' and then 'Domain', you can then enter the domian name that you wish to use in the 'Domain' field. The data element then assumes the characteristics of that domain, modularising to some extent the definition of variables and fields within your system. [b]By Reference To A Built In Data Type[b] There are various primitive data types already built into SAP from which all other domains are derived. By selecting this button you can select from about 23 primitive 'domains' for want of a better description such as CHAR, FLTP (floating Point) etc. By Reference To An Object This enables you to program usijng Object Oriented Techniques. By making reference to an Object, this data element takes on that objects methods and properties. Having selected the domain you wish to use (I've never found a case where I haven't had to create a domain... The built-in types are handy for one off type fields, but when you've got one.... you're going to want another very soon which means either entering a maintenance minefield with a dozen definitions of the same material class floating around.... or you create a domain), to actually get the data element to work all you then need to do is to provide a series of headings in the 'field label' tab. The Field Label tab allows you to enter a series of labels (a short, medium or long label) for use when you create screens, and a column header for output on a report. Having documented your data element you can then activate it and away you go. So, taking the example quoted above, you would define a Domain followed by two data elements referencing that domain. The first data element would have titles such as 'Mat #', 'Material' or 'Material Number'. The second might have titles such as 'Alt Mat', 'Alt Mat #', 'Alternative Material' and so forth. When these are used in reports (as long as you don't specify 'No Standard Page Heading'), then the appropriate (translated) texts will be displayed. The same for your input parameters. And there's more.... Going back to the Data Element Definition Screen there are a few fields that I haven't mentioned. These are: - Parameter ID
Default Component Name Change Document Search Help Name Search Help Parameters
Parameter Id. Parameter Id's are objects that are stored in SAP memory. By specifying a parameter id, a default value can automatically be provided so that when a screen is displayed it is already populated by that value. The parameter id entered in this field associates the data element with that parameter ID. Default Component Name. This field is used within BAPI's and can be used to assign a meaningful english (or german....) name to your data element. Change Document. If this field is checked, then should a table field that is typed as this data element change, changelog entries are generated. You are responsible for designing the change log object that handles these. Search Help. By using these fields, you can define a search help for use by your users when entering data. More about these later. And Lastly. Don't forget to document your data element and then activate it.
Related Items:
|
|
|
|