Define the table in the ABAP Dictionary:
You can define a table in the ABAP Dictionary using transaction
SE11
. Here you can specify the structure of your table - the fields, data types, lengths, etc.Go to transaction
SE11
. Let's create a table namedZEMPLOYEE
. In the 'Database table' input field, enterZEMPLOYEE
and click 'Create'. Enter a short description, for example, 'Employee table', then define the fields:EMP_ID
(typeNUMC
, length5
)EMP_NAME
(typeCHAR
, length40
)EMP_DEPT
(typeCHAR
, length20
)
Click on 'Save' and then 'Back' to return to the main screen of
SE11
.Activate the table:
Once you've defined your table, you need to activate it. When you activate a table, the system creates a corresponding physical table in the database.
In the ABAP dictionary, when a table is defined but not activated, it means that the definition for the table exists, but the actual physical table in the database doesn't. The table is in a kind of "draft" mode, where it can be edited or deleted without affecting the database.
To activate a table, you'll need to follow these steps:
1.Open the ABAP Dictionary:
Transaction code:
SE11
Go to transaction
SE11
in the SAP GUI.2.Input the table name:
Enter the name of your table in the 'Database table' input field, then press the 'Display' or 'Change' button.
3.Activate the table:
You can activate the table by going to 'Utilities' -> 'Database Object' -> 'Activate', or simply click the activation icon (looks like a lightning bolt) on the toolbar.
Fill the table with data:
Transaction code:
SE16N
To manually enter data into your table, you can use transaction
SE16N
. For larger amounts of data, there are different ways to load data into SAP tables, like BAPIs, IDOCs, or LSMW, but that's beyond the scope of this flow but just giving some heads up here.BAPIs (Business Application Programming Interfaces): BAPIs are standard SAP interfaces that allow you to integrate SAP with other software. You could write a program (either in ABAP or another language) that uses a BAPI to load data into your table.
IDOCs (Intermediate Documents): IDOCs are a standard SAP data structure for electronic data interchange between SAP and other systems. You can set up a process to receive IDOCs from another system and load the data into your table.
LSMW (Legacy System Migration Workbench): LSMW is a tool in SAP that allows you to import data from legacy systems. You can create an LSMW project to load data from a file (like a CSV or Excel file) into your table.
Write an ABAP program to retrieve and manipulate the data:
Transaction code:
SE38
orSE80
You can write an ABAP program to retrieve the data from your table, manipulate it, and then possibly store it back into the database or display it on the screen. You can use transaction
SE38
(ABAP Editor) orSE80
(Object Navigator) to write your ABAP programs.Execute the ABAP program:
Transaction code:
SE38
orSE80
Once your program is written and activated, you can run it. This will fetch the data from the database into your ABAP program, where it can be manipulated as per your program logic.
Starting/stopping an SAP system is not a critical task, but the method that most of us follow to achieve this is sometimes wrong. A common mistake that most of the SAP admins do is, making use of the 'startsap' and 'stopsap' commands for starting/stopping the system. These commands got deprecated in 2015 because the scripts were not being maintained anymore and SAP recommends not to use them as many people have faced errors while executing those scripts. For more info and the bugs in scripts, you can check the sap note 809477. These scripts are not available in kernel version 7.73 and later. So if these are not the correct commands, then how to start/stop the sap system? In this post, we will see how to do it in the correct way. SAP SYSTEM VS INSTANCE In SAP, an instance is a group of resources such as memory, work processes and so on, usually in support of a single application server or database server with...
This info is very helpful for everyone. Keep it up erp customization examples
ReplyDelete