‎2007 Aug 21 8:59 PM
Hi SDN,
If I have two internal tables itab_a and Itab_b and I want to copy a subset of itab_a to itab_b using a conditional statement, is it possible and how?
Second, what if I want to append the smaller internal table itab_b to itab_a, how would you do that.
My task is to take some of the rows from a into b, change one field and append back to a. So if a had 100 rows, now it would have 110.
Please help.
Thanks.
Saf.
‎2007 Aug 21 9:19 PM
If I have two internal tables itab_a and Itab_b and I want to copy a subset of itab_a to itab_b using a conditional statement, is it possible and how?
LOOP AT ITAB_A.
IF ITAB_A-SOME_FIELD = SOME_VALUE.
MOVE-CORRESPONDING ITAB_A TO ITAB_B.
APPEND ITAB_B.
ENDIF.
ENDLOOP.
‎2007 Aug 21 9:19 PM
If I have two internal tables itab_a and Itab_b and I want to copy a subset of itab_a to itab_b using a conditional statement, is it possible and how?
LOOP AT ITAB_A.
IF ITAB_A-SOME_FIELD = SOME_VALUE.
MOVE-CORRESPONDING ITAB_A TO ITAB_B.
APPEND ITAB_B.
ENDIF.
ENDLOOP.
‎2007 Aug 21 9:22 PM
"Second, what if I want to append the smaller internal table itab_b to itab_a, how would you do that."
Assuming that both tables have the same fields in them:
APPEND LINES OF ITAB_B[] TO ITAB_A[].
‎2007 Aug 23 4:01 PM