1. Normal structures (Which are nothing but include structure that start with '.INCLUDE')
2. APPEND STRUCTURES (FOR STANDARD TABLES) (START WITH ".APPEND")
3. customizing includes(FOR STANDARD TABLES) (".CI", THESE ARE DONE BY END USERS NOT BY US ).
STRUCTURE IS A COLLECTION OF FIELDS.
COMING TO THE DIFFERENCE BETWEEN INCLUDE STRUCTURES AND APPEND STRUCTURES.
INCLUDE STRUCTURES CAN USED BY US TO ADD FIELDS INTO ANY ZTABLES. BECAUSE, IN A ZTABLE, WE CAN ADD FIELDS WHER EVER WE WANT.
APPEND STRUCTURES ARE USED ONLY TO ENHANCE STANDARD TABLES. 只用于增强标准table?
STANDARD TABLES MAY HAVE INCLUDE STRUCTURES ALREADY CREATED , BUT IF WE WANT TO ADD SOME MORE FIELDS
TO THE STANDARD TABLES, WE NEED TO GO FOR APPEND STRUCTURES.
APPEND STRUCTURES SHOULD BE ADDED AT THE END OF A STANDARD TABLE. THIS IS A MUST. BECAUSE WE SHOULD NOT CHANGE THE ORIGINAL STANDARD TABLE IN THE MIDDLE.
SOME STANDARD TABLES FOR WHICH THERE ARE LONG DATA TYPE FIELDS cannot be enhanced because, LONG TYPE FIELDS SHOULD ALWAYS BE AT THE END AND APPEND STRUCTURES SHOULD ALSO BE AT THE END, SO THERE WILL BE A CONFLICT
上面讲的不知所云,找了几个地方说法都不一样。下面靠谱一点。有时间再测一测。
An APPEND belongs to one and only one table (1:1 relation). An INCLUDE can be included in many tables (and structures) and APPENDs.
I prefer the following approach:
(1) Create APPEND for my target table (2) Create one ore many INCLUDE structures (which group different kinds of fields, .e.g. address fields, accouting fields, etc.) (3) Include the INCLUDE structures in the single APPEND structure
So, to summarize the usage:
- you want to add your own fields to a SAP table/structure: use append structure
- you want to define a structure consisting of a logically related group of fields, and you want to be able to refer to this structure in any table or structure of your own: use an include structure
总结一下,就是当需要重用性的时候,用include。