Tuesday 6 August 2013

AUGUST 6


ABAP data dictionary :
ABAP data dictionary is used to create and manage data definitions (mete data). ABAP Dictionary is used to create Tables, Data Elements, Domains, Views, Lock Objects etc.
Data elements and Domains:
While creating a table in data dictionary each table field is assigned to a data element. Each data element is in turn assigned to a domain.
  • Domain describes the technical attributes such as data type and length of a table field.
  • Data Element gives the field labels and documentation for the table field.
Creating Domains:
  • To create a domain go to t-code SE11.
  • Select the Domain radio button, enter the the name of the domain that we want to create and then press create.
  • provide short description for the domain that we want to create.now place the cursor in the data type and press F4 to get the list of SAP data types.
  • In the popup window select the correct data type.
  • now enter the number of characters as required. Enter the decimal places if it applicable to data type that we have selected. 
  • Save and activate the domain.
Creating Data Elements:
  • To create a data element go to t-code SE11.
  • Select the Data type radio button, enter the name of the data element and press create.

  • Enter short description. Assign a domain to the data element. Press field label tab to maintain the field labels for the data element.

  • Enter the field labels.

  •  Save and activate the data element.
Creating SAP table:
Every table has a unique name and consists of rows and columns. The number of columns in a table is fixed but can have any number of rows.
  •  Go to ABAP dictionary (SE11) to create a SAP table. Enter the name of the table to be created and press enter.
  • Enter a proper short description for the table and maintain delivery class as ‘A’(Application Table).
  •  Now press on Fields tab to maintain the fields of the table.
  • Enter the fields of the table and maintain the proper data elements for the table fields. We can use the standard data elements or  can create our own data elements.
  • Maintain the primary key and press save. To maintain the technical attributes of table like tablespace, size etc. press the Technical attributes button on application toolbar.
  • Enter Data class as APPL0, Size category as 0 and then click  Save.
  • Now press back, save and activate the table.
Maintaining Test Data in SAP table:
After creating a table we can test it by maintaining a couple of entries in the table.The below mentioned procedure is used to maintain entries in the table.
 This procedure must be used only in testing or development environment not in production environment.

  • Display the table in ABAP Dictionary(SE11). Use the menu path Utilities->Table Contents->Create Entries.
  • If this menu path is disabled then go to Delivery and Maintenance tab and enter “Display/Maintenance Allowed” in “Data Browser/Table View Maint.” listbox.
  • Save and activate the table. Then go back to menu path Utilities->Table Contents->Create Entries.
  • Enter some test values in the fields and press save.
  • Observe the message in the status bar. 
  • To display the values in the table go to Utilities->Table Contents->Display
  • In the selection screen enter the selection criteria if you want to filter the records you want to display and press execute.
  • All the records in the table will be displayed if no selection criteria specified in the selection screen.