0% found this document useful (0 votes)
27 views

Step by Step Guide To Creating Structures in Abap

Structures allow fields to be reused across multiple tables. There are two ways to implement structures: include structures and append structures. Include structures can be reused and are used for custom tables, while append structures are not reusable and are used for standard SAP tables. An example is provided where an include structure is created and included in a custom table 'zstru', and an append structure is created and appended to the standard SAP table LFA1 to add a new 'MANME' field.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Step by Step Guide To Creating Structures in Abap

Structures allow fields to be reused across multiple tables. There are two ways to implement structures: include structures and append structures. Include structures can be reused and are used for custom tables, while append structures are not reusable and are used for standard SAP tables. An example is provided where an include structure is created and included in a custom table 'zstru', and an append structure is created and appended to the standard SAP table LFA1 to add a new 'MANME' field.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 10

STRUCTURES

It is a DATA BASE object, which is a group of fields which can be used in multiple tables.
The advantage of structure is REUSABILITY of same structure in multiple tables.
The difference between the table and structure is , structure can hold single record only where as a table can hold multiple
record.
Structure can implemented in two ways.
1) Include structure.
2) Append structure.

Include Structure
This option is used only for Custom Tables (i. e. the name starting with Z or Y).
These include structure can be reusable.

Steps to create Include Structure: -

Go to SE11 select Data type give a name as zinclude_str .click on create.

Select Structure press enter .

Give short description as include structure.


Define the fields as below.

save and activate.

By the above steps a structure is created and can be reusable.

Icluding structure in a table: Go to SE11 give the table name zstru click on change.

Give the field name as .include.


Give the data element name as structure name. (ZINCLUDE_STR)
Press enter. All the fields can be automatically copied.
To display the fields click on the symbol or Icon shown below.

To hide the fields click on the icon shown below.

APPEND STRUCTURE: This option used only with STANDARD SAP TABLES.
The Append Structures are not reusable.

Steps to create Append Structures: BUSINESS REQUIREMENT


Add an extra field by the name MANME (middle name) to the table LFA1.
Go to SE11 give the table name as LFA1. Click on Append Structure button.

A pop up is raised click on create icon as shown below.

Give the append name as ZAPP_STR_MNAME. Press enter.

Give the short description as Append structure.


Give the field name as MANME.
Give the Data element name a NAME3_GP.
Press enter. Save and activate it.

Inter view Question is:


1) What is the difference between Include structure and Append structure.
2) How many fields you have added using append structure (only 1 or 2)

You might also like