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

Move statement

Former Member
0 Likes
788

Hi Experts

I use a FM 'RP_FILL_WAGE_TYPE_TABLE_EXT' and fill the table PPBWLA with values.

Now I want to move some values from this table to a string.

First I loop my PPBWLA table.

Then I have a check if it is the right line.

Then I Move the value to my string.

Loop at wa_table.

if wa_table-lgart eq '1003'.

move wa_table-betrg to wa_file+57.

endif.

endloop.

I have the value in wa_table-betrg, but nothing will be moved to wa_file+57.

Anyone who have a solution?

Grateful for your help // Peter B

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
743

Hi Peter Bergkvist

so...

with betrg to wa_file+57 you will insert the data starting form the 57 character, but you must insert also the lenght.

so you must replace wa_file57 with wa_file57(lenght),

for example if move wa_table-betrg has lenght 10 chars you must wa_file+57(10).


Loop at wa_table.
 if wa_table-lgart eq '1003'.
     move wa_table-betrg to wa_file+57(10) .
 endif.
endloop.

reagards

Marco

5 REPLIES 5
Read only

Former Member
0 Likes
743

HI,

What is the size of wa_file?

Read only

Former Member
0 Likes
743

Hi Peter ,

as per code written , the data will be moved to target string wa_file after the 57th position.

Please Double Click on the Variable name and check the data till the full length.

Read only

Former Member
0 Likes
744

Hi Peter Bergkvist

so...

with betrg to wa_file+57 you will insert the data starting form the 57 character, but you must insert also the lenght.

so you must replace wa_file57 with wa_file57(lenght),

for example if move wa_table-betrg has lenght 10 chars you must wa_file+57(10).


Loop at wa_table.
 if wa_table-lgart eq '1003'.
     move wa_table-betrg to wa_file+57(10) .
 endif.
endloop.

reagards

Marco

Read only

umashankar_sahu
Active Participant
0 Likes
743

Dear Peter,

I dont think there is any thing wrong in code written by you.

Please verify data type used for wa_file this should not be string type.

Because "At the write position, you can not use offset and length specification with field of type string or Xstring.

Read only

Former Member
0 Likes
743

Try This

Loop at wa_table.
if wa_table-lgart eq '1003'.
*move wa_table-betrg to wa_file+57.   "Comment
move wa_table-betrg to wa_file+57(length of variable-which you are updating in 57th position) .  "Added
endif.
endloop.

Regards

Vinod