‎2007 Mar 21 9:32 AM
I have to copy the segment data from an idoc to segment structure.I tried moving the data in following way.
MOVE gs_edidd-sdata TO gs_segment_structure.
I heard that move statement does an internal conversion to move the data.
I cannot use MOVE CORRESPONDING
...
But i am getting an syntax error that the <b>gs_segment_structure</b> cannot be converted to <b>gs_edidd-sdata</b>.
Its urgent, Thanks in advance
‎2007 Mar 21 9:38 AM
Hi!
If gs_edidd-sdata and gs_segment_structure are not exactly the same length, they cannot be moved to each other.
You might use a MOVE field-by-field.
MOVE gs_edidd-sdata+5(10) TO gs_segment_structure-fielda.
MOVE gs_edidd-sdata+15(30) TO gs_segment_structure-fieldb.
And so on...
Or gs_edidd-sdata is 1000 long, and gs_segment_structure is only 500 long, you might try the following:
MOVE gs_edidd-sdata(500) TO gs_segment_structure.
Regards
Tamás
Message was edited by:
Tamás Nyisztor
‎2007 Mar 21 9:37 AM
what is the type of gs_segment_structure ?
For instance, when gs_edidd-sdate is the data from segment E1EDKA1, then the gs_segment_structure should be defined as type e1edk1a :
DATA: gs_segment_structure type e1edka1.
regards,
Hans
‎2007 Mar 21 9:38 AM
Hi,
What is the structure of the gs_structure?
edidd-sdata is a 1000 char field.
YOu should probably use offset concept to move the sdata to smaller fields of gs_structure.
regards,
Ravi
‎2007 Mar 21 9:38 AM
Hi!
If gs_edidd-sdata and gs_segment_structure are not exactly the same length, they cannot be moved to each other.
You might use a MOVE field-by-field.
MOVE gs_edidd-sdata+5(10) TO gs_segment_structure-fielda.
MOVE gs_edidd-sdata+15(30) TO gs_segment_structure-fieldb.
And so on...
Or gs_edidd-sdata is 1000 long, and gs_segment_structure is only 500 long, you might try the following:
MOVE gs_edidd-sdata(500) TO gs_segment_structure.
Regards
Tamás
Message was edited by:
Tamás Nyisztor