1.19 SAP ABAP - Structures

«« Previous
Next »»

Structure is a data object that is made up of components of any data type stored one after the other in the memory.

SAP ABAP - Structures

Structures are useful for painting screen fields, and for manipulating data that has a consistent format defined by a discrete number of fields.

A structure may have only a single record at run-time, but a table can have many records.

Creating a Structure


Step 1 − Go to transaction SE11.

Step 2 − Click on the ‘Data type’ option on the screen. Enter the name 'ZSTR_CUSTOMER1' and click on Create button.

Step 3 − Select the option 'Structure' in the next screen and press Enter. You can see 'Maintain / Change Structure' wizard.

Step 4 − Enter the Short Description as shown in the following snapshot.

SAP ABAP - Structures

Step 5 − Enter the Component (Field Name) and Component Type (Data Element).

Note &minu; Here the component names start with Z as per the SAP recommendation. Let's use data elements that we have already created in the database table.

Step 6 − You need to Save, Check and Activate after providing all the components and component types.

The following screen appears

SAP ABAP - Structures

Step 7 − As this 'ZSTR_CUSTOMER1' is highlighted, click the green tick button. This window disappears and the status bar will display the message ‘Active’.

The structure is now activated as shown in the following snapshot 

SAP ABAP - Structures

«« Previous
Next »»

No comments:

Post a Comment