Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

conversion problem edidd-sdata to corresponding segment structure.

Former Member
0 Likes
1,257

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
721

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

3 REPLIES 3
Read only

h_senden2
Active Contributor
0 Likes
721

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

Read only

Former Member
0 Likes
721

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

Read only

Former Member
0 Likes
722

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