‎2008 Aug 19 11:04 PM
I just read in one of the SAP standards documents that we should avoid using
Incorrect:
Data: BEGIN OF S_MATERIAL.
INCLUDE STRUCTURE MARA.
Data: END OF S_MATERIAL.
Instead the recommended option is as follows
Recommended:
DATA: S_MATERIAL TYPE MARA. Even if the structure has other components, it can be written as
Data: BEGIN OF S_MATERIAL,
ZMARA TYPE MARA,
S_AFSMAT TYPE J_3AMAD,
component2,
END OF S_MATERIAL.
Why is it so? Can anybody please explain?
Thanks for reading.
‎2008 Aug 20 12:44 AM
Data: BEGIN OF S_MATERIAL.
INCLUDE STRUCTURE MARA.
Data: END OF S_MATERIAL.
Answer: Dumps you whole structure of MARA in your program.
Recommended:
DATA: S_MATERIAL TYPE MARA. Even if the structure has other components, it can be written as
Answer: References the whole MARA structure during run mode and good for performance.
‎2008 Aug 20 12:44 AM
Data: BEGIN OF S_MATERIAL.
INCLUDE STRUCTURE MARA.
Data: END OF S_MATERIAL.
Answer: Dumps you whole structure of MARA in your program.
Recommended:
DATA: S_MATERIAL TYPE MARA. Even if the structure has other components, it can be written as
Answer: References the whole MARA structure during run mode and good for performance.