‎2010 Apr 12 8:24 AM
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
‎2010 Apr 12 8:36 AM
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
‎2010 Apr 12 8:34 AM
‎2010 Apr 12 8:34 AM
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.
‎2010 Apr 12 8:36 AM
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
‎2010 Apr 12 8:44 AM
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.
‎2010 Apr 12 8:47 AM
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