2007 Jul 27 6:23 AM
Hi All.
I need to create one internal table(it_doc) with reference on another internal table(it_mer).
after that i need to move all records from it_mer to it_doc.
pls refer my code.iam getting error like "it_doc is not an internal table".
DATA: BEGIN OF wa_mer,
lifnr TYPE ekko-lifnr,
ekorg TYPE ekko-ekorg,
verkf TYPE ekko-verkf,
ekgrp_allow TYPE ekko-ekgrp_allow,
ebelp TYPE ekpo-ebelp,
matnr TYPE ekpo-matnr,
werks TYPE ekpo-werks,
bednr TYPE ekpo-bednr,
matkl TYPE ekpo-matkl,
END OF wa_mer.
DATA:it_mer LIKE TABLE OF wa_mer WITH HEADER LINE.
DATA:it_doc like it_mer with header line.
(some process for fetch records from database......)
it_doc_loc_coll[] = it_merge[].
where i done mistake.pls help me.
To be reward all helpfull answers.
Regards.
Jay
2007 Jul 27 6:28 AM
DATA:it_doc like it_mer <b>occurs 0</b> with header line.
regards
shiba dutta
DATA:it_doc like it_mer <b>occurs 0</b> with header line.
regards
shiba dutta
2007 Jul 27 6:27 AM
Hi,
Try now
<b>TYPES:</b> BEGIN OF <b>wa_mer_type</b>,
lifnr TYPE ekko-lifnr,
ekorg TYPE ekko-ekorg,
verkf TYPE ekko-verkf,
ekgrp_allow TYPE ekko-ekgrp_allow,
ebelp TYPE ekpo-ebelp,
matnr TYPE ekpo-matnr,
werks TYPE ekpo-werks,
bednr TYPE ekpo-bednr,
matkl TYPE ekpo-matkl,
END OF wa_mer_type.
DATA:it_mer <b>TYPE TABLE OF wa_mer_type</b> WITH HEADER LINE.
DATA: wa_mer type wa_mer_type.
DATA:it_doc <b>TYPE TABLE OF wa_mer_type</b> WITH HEADER LINE..
(some process for fetch records from database......)
it_doc[] = it_mer[].
Regards,
Sesh
2007 Jul 27 6:28 AM
DATA:it_doc like it_mer <b>occurs 0</b> with header line.
regards
shiba dutta
2007 Jul 27 6:36 AM
Hi Jay,
As u have done it will create only structure it_doc of type wa_mer.
U need to specify either LIKE TABLE OF or OCCURS 0 in addition to declaration of it_doc.
Thanks & Regards
Santhosh
2007 Jul 27 6:40 AM
DATA: BEGIN OF wa_mer,
lifnr TYPE ekko-lifnr,
ekorg TYPE ekko-ekorg,
verkf TYPE ekko-verkf,
<b>ekgrp_allow TYPE ekko-ekgrp,</b>
ebelp TYPE ekpo-ebelp,
matnr TYPE ekpo-matnr,
werks TYPE ekpo-werks,
bednr TYPE ekpo-bednr,
matkl TYPE ekpo-matkl,
END OF wa_mer.
DATA:it_mer LIKE TABLE OF wa_mer WITH HEADER LINE.
<b>DATA:it_doc like table of wa_mer with header line.</b>
*(some process for fetch records from database......)
<b>it_doc[] = it_mer[].</b>
Copy paste the above code, the errors are rectified...
Regards,
Pavan
2007 Jul 27 6:46 AM
Here is the code of your
REPORT ztest.
DATA: BEGIN OF wa_mer,
lifnr TYPE ekko-lifnr,
ekorg TYPE ekko-ekorg,
verkf TYPE ekko-verkf,
ekgrp_allow TYPE ekko-ekgrp_allow,
ebelp TYPE ekpo-ebelp,
matnr TYPE ekpo-matnr,
werks TYPE ekpo-werks,
bednr TYPE ekpo-bednr,
matkl TYPE ekpo-matkl,
END OF wa_mer.
DATA:it_mer LIKE TABLE OF wa_mer WITH HEADER LINE.
DATA:it_doc LIKE TABLE OF wa_mer WITH HEADER LINE.
*(some process for fetch records from database......)
it_doc[] = it_mer[].
append it_doc .reward points if it is usefull ... enjoy the weekend
Girish
2007 Jul 27 6:51 AM
Hi,
Try to declre Types insted of data.
TYPES: BEGIN OF wa_mer_type
Regards
2007 Jul 27 7:32 AM
DATA:it_doc like table of it_mer with header line.
try this and reward if usefull
2007 Jul 27 7:48 AM
used this syntax.
data: it type standard table of kna1
wa type kna1.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |