12-28-2007 6:29 AM
Hi all,
What is the exact syntactical declaration for the types with Include structure ?
I have the below existing types as
TYPES: BEGIN OF exceplist_inv.
INCLUDE STRUCTURE erdod.
TYPES: END OF exceplist_inv
I need to add a new field to this TYPE, the field being username like CDHDR-USERNAME.
The below change to the declaration gives error.
TYPES: BEGIN OF exceplist_inv.
INCLUDE STRUCTURE erdod,
username like CDHDR-USERNAME,
TYPES: END OF exceplist_inv
Moreover I have tried placing the commas and the fullstops at many places but the syntax error still appears.
Need help for the exact syntax for the above.
Regards,
Stock
12-28-2007 6:33 AM
Hi,
Do it in this way
TYPES: BEGIN OF exceplist_inv.
erdd type(or) like erdod,
username like CDHDR-USERNAME,
END OF exceplist_inv.
data: itab type exceplist_inv.
u can access the values as
itab-erdd-field1 = ....
itab-username = ......
12-28-2007 6:36 AM
Hi Stock ,
Declare it this way
TYPES: BEGIN OF exceplist_inv,
username like CDHDR-USERNAME.
INCLUDE STRUCTURE erdod.
TYPES: END OF exceplist_inv
because i dont think you can include elements after you have included a structure.
Regards,
Arun
*Assign points if helpful
12-28-2007 6:36 AM
Hi stock sys,
Please do so...
TYPES: BEGIN OF exceplist_inv.
INCLUDE STRUCTURE erdod.
Types: username type cdhdr-username.
TYPES: END OF exceplist_inv.
Reward points if found useful
12-28-2007 6:40 AM
Try it in the following way
TYPES: BEGIN OF exceplist_inv.
INCLUDE STRUCTURE erdod.
types :username like CDHDR-USERNAME,
TYPES: END OF exceplist_inv.
12-28-2007 6:52 AM
Hi,
If 'erdod' is a standard structure, please try the below given code:
TYPES BEGIN OF exceplist_inv.
TYPES: username LIKE cdhdr-username.
INCLUDE STRUCTURE erdod.
TYPES END OF exceplist_inv.
(OR)
If 'erdod' is a structure defined by you, then try the following code:
data: t_erdod type erdod.
TYPES BEGIN OF exceplist_inv.
TYPES: username LIKE cdhdr-username.
INCLUDE STRUCTURE t_erdod.
TYPES END OF exceplist_inv.
Please award points if it is helpful.
Regards,
Renjith Michael.