How to move the even records of one internal table to other
Answer Posted / raju
TABLES:ZKNA11,ZKNA12.
DATA:it TYPE TABLE OF zkna11,
it1 TYPE TABLE OF zkna12.
data:wa like LINE OF it,
wa1 like LINE OF it1.
data: LN type I VALUE 2.
data: LN1 type I .
data: LO type I VALUE 1.
SELECT * FROM ZKNA11 INTO TABLE IT UP TO 4 ROWS.
LOOP AT IT INTO WA.
IF SY-TABIX = LO.
wa1-kunnr1 = wa-kunnr.
wa1-NAME11 = wa-name1.
wa1-LAND11 = wa-LAND1.
APPEND WA1 TO IT1.
LO = LO + 2.
ENDIF.
IF SY-TABIX = LN.
wa1-kunnr2 = wa-kunnr.
wa1-NAME12 = wa-name1.
wa1-LAND12 = wa-LAND1.
LN1 = LN - 1.
MODIFY IT1 FROM WA1 INDEX LN1 TRANSPORTING KUNNR2 NAME12 LAND12.
LN = LN + 2.
ENDIF.
ENDLOOP.
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
where do we store all custom programs in SD module?
Why is pretty printer user in abap?
What is payroll area
Explain Catch Command in ABAP?
What is a multiple line field? : abap bdc
What is sap abap tables?
What will happen when we use fully buffered in abap?
What are the merits of its?-
What are the system fields you have worked with? Explain?
What is meant by stacked list?
How to combine multiple billing into one RV document ( Step by Step)?
What are the 3 types of function modules in sap?
I need the coding for BDC program to upload Purchase orders of known vendor (ME21) in Material Management
What is value table? : abap data dictionary
Different types of luws. What are they?