‎2007 May 11 6:40 AM
Hi experts,
I am using ECC6.0. I am craeting a type like: -
TYPES : BEGIN OF gt_t08.
INCLUDE STRUCTURE zsdmmp02. (Ztable)
TYPES : rc(1) TYPE c,
END OF gt_t08.
In SLIN, it is causing a error message :-
The current ABAP command is obsolete
Within classes and interfaces, you can only use "TYPE" to refer to ABAP Dictionary
types (not "LIKE" or "STRUCTURE").
How to remove the error. There is one way in place of include structure i can explicitly write all the fields of zsdmmp02. But later on if the structure of zsdmmp02 gets enhanced, then again i will have to add one field.
Is there any other way to do it?
thanx in advance.
‎2007 May 11 6:55 AM
Hi Sachin,
U can use the statement as given below:
TYPES dtype { {TYPE tabkind OF [REF TO] type}
| {LIKE tabkind OF dobj} }
[WITH key] [INITIAL SIZE n].
If Helpful reward with some points.
Regards,
Pulokesh
‎2007 May 11 6:45 AM
Hi
try to code as follows.
TYPES : BEGIN OF gt_t08.
INCLUDE STRUCTURE zsdmmp02. (Ztable)
Data : rc(1) TYPE c,
END OF gt_t08.
Regards,
Sreeram
‎2007 May 11 6:52 AM
Hi sreeram,
TYPES : BEGIN OF gt_t08.
INCLUDE STRUCTURE zsdmmp02. (Ztable)
Data : rc(1) TYPE c,
END OF gt_t08.
It's not working friend. Syntax error - Between "TYPES BEGIN OF name" and "TYPES END OF name" only TYPES statements are allowed.
regards
‎2007 May 11 6:55 AM
Hi Sachin,
U can use the statement as given below:
TYPES dtype { {TYPE tabkind OF [REF TO] type}
| {LIKE tabkind OF dobj} }
[WITH key] [INITIAL SIZE n].
If Helpful reward with some points.
Regards,
Pulokesh
‎2007 May 11 7:33 AM
Dear Pulokesh,
I have to add one field into internal table(which includes a Z table) like: -
TYPES : BEGIN OF gt_t08.
INCLUDE STRUCTURE zsdmmpp02.
TYPES : rc(1) TYPE c,
END OF gt_t08.
using the below code how can i use?
TYPES dtype { {TYPE tabkind OF [REF TO] type}
| {LIKE tabkind OF dobj} }
[WITH key] [INITIAL SIZE n].
regards
‎2007 May 11 8:07 AM
Dear Sachin,
Currently I am workin on both BW and SRM modules which are on SAP NetWeaver BI 7.0 platform. I tried ur code, but its working fine. Since I donnt have access to ECC6.0, I am uanble to visualize the error. Below i am enclosing a sample code. Please try it out, and do tell me whether it works or not.
TYPES : BEGIN OF GT_T08,
RC(1) TYPE C.
INCLUDE STRUCTURE zsdmmpp02.
TYPES: END OF GT_T08.
or
TYPES : BEGIN OF GT_T08,
RC TYPE CHAR1.
INCLUDE STRUCTURE zsdmmpp02.
TYPES: END OF GT_T08.
OR.
DATA: T_ZTEST TYPE zsdmmpp02.
TYPES : BEGIN OF GT_T08,
RC(1) TYPE C.
INCLUDE STRUCTURE T_ZTEST.
TYPES: END OF GT_T08.
I think the last sample code will surely work properly since it is not showing any SLIN error in my system. Eagerly waiting for your reply. If Helpful then reward points.
Regards,
Pulokesh
Message was edited by:
Pulokesh Karmakar
‎2007 May 11 8:31 AM
Dear Sachin,
Have u tried the sample codes that i have provided to u. The last one should surely work in ECC6.0. If helpful please reward with some points. Eagerly waiting for your reply.
Regards,
Pulokesh
‎2007 May 11 8:42 AM
Dear pulokesh,
Thanks a lot!!!
Below code is working fine: -
DATA: T_ZTEST TYPE zsdmmpp02.
TYPES : BEGIN OF GT_T08,
RC(1) TYPE C.
INCLUDE STRUCTURE T_ZTEST.
TYPES: END OF GT_T08.
Full marks to you!!!
regards,
‎2007 May 11 8:50 AM
Dear Sachin,
Lot of thanks to you for providing points. Hope to share more experience.
Regards,
Pulokesh