‎2008 Jun 30 10:13 AM
Hi,
Can anyone thro w some light on "include structure *$a>" ?
These are used in very old versions of SAP.
Answers would be rewarded.
thnx and regrds
Sudipta Das
‎2008 Jun 30 10:17 AM
Hi,
INCLUDE Structures:
Include Structure is used to include the structure to a Custom Table.
The same Structure can be Included in any number of Custom Tables.
To Include it in the Custom Table Provide .INCLUDE as field name and Structure name as Field Type.
APPEND Structures:
Append Structure is used to append to the Standard Tables.
The Same Append Structure cannot be appended in more then one Standard DB Table.
We need to create the Append Structure by opening the Table in Display mode and by clicking on the Append Structure button.
Check this SAP help
on append structure and Include Structure
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb54446011d189700000e8322d00/frameset.htm
Regards,
Shiva Kumar
‎2008 Jun 30 10:27 AM
If I got what your asking right,
the include structure statement creates the same structure the object you are referring to in the variable you are declaring.
Example:
Consider you have the following structure in your program:
DATA: BEGIN OF struct1,
f1 TYPE c,
f2 TYPE i,
f3 TYPE d,
END OF struct1.Now let's imagine you needed another one, comprised of the very same f1, f2 and f3 fields above, plus two other fields:
DATA: BEGIN OF struct2,
f1 TYPE c,
f2 TYPE i,
f3 TYPE d,
f4 TYPE c,
f5 TYPE c,
END OF struct2.The same would be accomplished if you coded
DATA: BEGIN OF struct2,
include structure struct1.
DATA: f4 TYPE c,
f5 type c,
END OF struct2.It applies to internal tables as well.
Avraham
Edited by: Avraham Kahana on Jun 30, 2008 12:27 PM