Do you Know ?

Table creation in SAP.

Unlike in Oracle,table creation in SAP is not possible with code, only with the screens you can create table in SAP.

With ABAP Dictionary, table creation can be done, to open.provide transaction number SE11 and then select “Database table” option.

Note: In SAP user defined/custom applications names should always start with letter
          ‘Y’ or ‘Z’.
         ‘Y’ generally used for test of application and not passed to development client.
Whereas ‘Z’ is preferred for custom applications and will be transferred for testing and finally into production.

If you trying to create any application with following naming conventions let say program name “Firstprogram.report” then it requires the access key to save the application.


Here I’m giving table name as “Zemployee” as show in picture.

Click on create button to start creating the table.


Provide short description and maintain
Delivery Class : A ( Application table (master and transaction data)
Keep Table View Maint. as Display/Maintenance Allowed

Next click on Fields tab , provide the fields required for the table.

In order to create the data element , provide the name and double-click on the data element then it will ask you ,Save before ..? click Yes to continue.
Then it will ask you the save the table , click on Local Object to save in $tmp.
Then it will ask you whether you want to create data element..? then click Yes/Ok.

Provide short description and give domain name, and also maintain field label
give medium length 20 and field label name : empno. Save.


Double click on zdomain to create ,it will ask you do you what…..? click yes.


Maintain short description say “demo” and provide datatype as “char” ( char supports both int values and character type) you can also give “int1” ,generally char is best option to go with.


Save!


Now important thing to carry on , you need to activate the domain in order to transfer .

You can activate by using command CTRL+F3 or by clicking the icon as shown here.

Once command is issued, it will display a window just click ENTER or Right arrow.

Now at the bottom of the screen you should see message “Objects Activated”.

If it doesn't see the message, it means something has gone wrong L.

 Once the objects got activated and come back to data element screen, you can do it by simply clicking the  or F3.

Now its turn to activate data element ,CTRL+F3 to activate.

Again F3 to move to fields area.


Similarly create other required fields of your wish ,make sure your table has got one primary key ,you can define it by checking the Key  option.

Now  select “Goto” option in the menu bar and select “Technical Settings” as shown below.
APPL0 -  Master data,transparent tables
Size category – 0 (zero)

Save!

Tip: In SAP zero will have dot inside the circle,where as alphabet it won’t.

That’s it you are almost done J.

Activate the table, CTRL+F3 and ENTER.


Now you will see this window just click on “No” to ignore the warnings, this is because you are not saving the program in package.

Now you are done with Table creation.

Go ahead and provide the table entries.


Select “Create Entries” option to provide details.

Similarly create required entries and click on save.

Then  goto “Utilities” => “Table Contents” and select “Display”.

Then click on “F8” to execute the table.


That’s it you are done J.