2006 Mar 10 8:27 AM
Hi , I want to define a new TYPE as :
Begin og ty_data.
Include strcuture x,
include strcuture y,
include structyre z,
end of ty_data.
now MANDT is defined in all three dcitionary structures x,y nd z,so it gives error.How can I overcome this,since I need to consider all fields from these three 3 stuctures which counts to arnd 300 fields nd maually hard coding those is not possible.
any way to sole this.
2006 Mar 10 8:47 AM
Hi
Use in this way
TYPES: BEGIN OF person,
geschlecht(1) TYPE X.
INCLUDE TYPE name AS pname.
TYPES: alter TYPE I,
gewicht TYPE P,
END OF person.
regards
vinod
Hi , I want to define a new TYPE as :
Begin og ty_data.
Include strcuture x,
include strcuture y,
include structyre z,
end of ty_data.
now MANDT is defined in all three dcitionary structures x,y nd z,so it gives error.How can I overcome this,since I need to consider all fields from these three 3 stuctures which counts to arnd 300 fields nd maually hard coding those is not possible.
any way to sole this.
2006 Mar 10 8:33 AM
HI Rajesh,
copy two of these structures in SE11 to some new structure and delete the MANDT field from those two..
activate it and use those two structures..
regards
satesh
2006 Mar 10 8:36 AM
Hi,
You can define your internal table like.
DATA: BEGIN OF itab OCCURS 0,
f1 LIKE struct1,
f2 LIKE struct2,
f3 LIKE struct3,
END OF itab.This would remove your problem. But you must refer your variables like...
itab-f1-var1
itab-f2-var1
etc...
Regards,
Wenceslaus.
2006 Mar 10 8:40 AM
Hi rajesh,
1. Simple
2. use like this
DATA : BEGIN OF itab OCCURS 0,
t001 LIKE t001,
mara LIKE mara,
END OF itab.
3. then use fields like this.
itab-t001-mandt
itab-mara-mandt
regards,
amit m.
2006 Mar 10 8:45 AM
i think what wenseslaus g suggested is nice
or u can use like this
DATA BEGIN OF ITAB.
INCLUDE STRUCTURE1 AS STRUCT1 RENAMING WITH SUFFIX _STRUCT
INCLUDE STRUCTURE2 AS STRUCT2 RENAMING WITH SUFFIX_STRUCT2 .
INCLUDE STRUCTURE3 AS STRUCT3 RENAMING WITH SUFFIX _STRUCT3.
...
DATA END OF ITAB
Message was edited by: Hymavathi Oruganti
2006 Mar 10 8:47 AM
Hi
Use in this way
TYPES: BEGIN OF person,
geschlecht(1) TYPE X.
INCLUDE TYPE name AS pname.
TYPES: alter TYPE I,
gewicht TYPE P,
END OF person.
regards
vinod
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |