2008 Sep 24 9:13 PM
Hello,
I have a internal table I_TAB[] as follows:
ID--VALUE---ATTRIBUTE
P1--36--
D
P3--34--
Y
P9--32--
J
I want to do a mass change in the ID value of this internal table such that, all the IDs get changed
to 'PA' as follows. I don't want to loop at the internal table, pas value to work area and then one by one from peformcne standpoint.
ID--VALUE---ATTRIBUTE
PA--36--
D
PA--34--
Y
PA--32--
J
Regards,
Rajesh.
2008 Sep 24 9:20 PM
You need to use work area as follows... otherwise i guess its not possible.. Do F1 on Modify and explore
Try this...
DATA: WA_ITAB TYPE ITAB.
WA_ITAB-ID = 'PA'.
MODIFY ITAB FROM WA_ITAB TRANSPORTING ID.
Thanks,
SKJ
There no single statement which can do this as the data in each row will be different and will have to be changed individually. The best way I can think of is using field symbols
Loop at itab assigning <fs>.
****Statement
endloop.
~ As found in forum
2008 Sep 24 9:20 PM
You need to use work area as follows... otherwise i guess its not possible.. Do F1 on Modify and explore
Try this...
DATA: WA_ITAB TYPE ITAB.
WA_ITAB-ID = 'PA'.
MODIFY ITAB FROM WA_ITAB TRANSPORTING ID.
Thanks,
SKJ
2008 Sep 24 9:22 PM
There no single statement which can do this as the data in each row will be different and will have to be changed individually. The best way I can think of is using field symbols
Loop at itab assigning <fs>.
****Statement
endloop.
~ As found in forum
2008 Sep 24 9:23 PM
Try this code:
w_tab-id = 'PA'.
modify i_tab from w_tab transporting id
where id NE 'PA'.
Edited by: Joyjit Ghosh on Sep 24, 2008 10:24 PM
2008 Sep 24 10:10 PM
2008 Sep 24 10:35 PM
I will vote for
LOOP AT I_TAB[] ASSIGNING <FS>.
<FS>-ID = 'PA'.
ENDLOOP.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |