‎2007 Jan 18 11:14 AM
Hi experts,
Need your input/s.
Loop i_tab into wa_tab.
read table i_tab2 into wa_tab2 with key...
if sy-subrc eq 0.
<b> Modify the i_tab2 entry found by marking its QMSM-FOUND with 'X'.</b> endif.
endloop.
How can I code this line:
<b>Modify the i_tab2 entry found by marking its QMSM-FOUND with 'X'.</b>
Thanks.
‎2007 Jan 18 11:22 AM
refer below -
Loop at i_tab into wa_tab.
read table i_tab2 into wa_tab2 with key...
if sy-subrc eq 0.
wa_tab2-found = 'X'.
Modify i_tab2 from wa_tab2.
endif.
endloop.
‎2007 Jan 18 11:22 AM
Hi marc you can hard code the values for the internal table you want to modify after the sy-subrc ... it will definately work...
Regards,
Jayant Sahu
Message was edited by:
JAYANT KUMAR
‎2007 Jan 18 11:22 AM
refer below -
Loop at i_tab into wa_tab.
read table i_tab2 into wa_tab2 with key...
if sy-subrc eq 0.
wa_tab2-found = 'X'.
Modify i_tab2 from wa_tab2.
endif.
endloop.
‎2007 Jan 18 11:24 AM
Hello,
You could do like this...
Loop i_tab into wa_tab.
read table i_tab2 into wa_tab2 with key...
if sy-subrc eq 0.
<b>wa_tab2-QMSM = 'X'.
modify itab2 from wa_tab2.</b>
endif.
endloop.
Regards,
Vasanth
‎2007 Jan 18 11:25 AM
CODE LIKE THIS
Loop at i_tab into wa_tab.
read table i_tab2 into wa_tab2 with key f1 = wa_tab-f1."<common field between *i_tab1 and i_tab2>
if sy-subrc eq 0.
wa_tab2-found = 'X'.
Modify i_tab2 from wa_tab2 index sy-tabix.
clear wa_tab2.
endif.
endloop.
here your i_tab2 must contain found like QMSM-FOUND
regards
shiba dutta
‎2007 Jan 18 11:27 AM
Hi Marc ,
You can use the command
modify <table> from <wa>... transporting <field name>
so what it does is it just modifies the values in the fields mentioned after transporting.
Regards
Arun
‎2007 Jan 18 11:29 AM
Code can be...
loop at itab2 into wa_itab2.
read table itab1 into wa_itab1 with key .... binary search.
if sy-subrc = 0.
itab2-found = 'X'.
Modify itab2 transporting found.
endif.
endloop.
Still you have to declare 'Found' in the itab2 and please check the data in both the internal tables before writing the statement.... beacude you will be knowing that which table to loop and which internal table to read...
‎2007 Jan 18 11:41 AM
Hi experts,
Need another input/s.
Loop i_tab into wa_tab.
Read table i_tab2 into wa_tab2 with key...
if sy-subrc eq 0.
<b> delete the current i_tab entry.</b>
endif.
Endloop.
How can I cide this line.
<b> delete the current i_tab entry.</b>
Thanks.
‎2007 Jan 18 11:46 AM
Hi Marc,
I dont think there is a way you can hide a piece of code , what i suggest is in the internal table add another filed called FLAG and when ever the conditiion is satisfied for a perticular record set the flag as 'X' and modify the table and in further processing use only those records where the value of flag is initial.
Regards
ARUN