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
what are the critical issues u face in ur project?
Explain sap abap 3-tier architecture?
Power is interrupted while transferring data from internal table to application server. How will you determine many records are transferred in session method and call transaction method? : abap bdc
What are the modes in lock objects? : sap abap data dictionary
What is pakey structure, pshd1 structure and what type of fields it contains? : abap hr
How do you display a data in a detail list?
What does the extract statement do in extract datasets? : abap modularization
Mention what is alv programming in abap?
1)can any body tell the transport request number concept and 2)there are 3 screens in one screen u have uploaded the resume and second screen also u have done the same thing but when u are uploading the resume in third screen u got some error in somewhere else but whatever u have uploaded the resume in 1 and 2 should not
Can we use write statements in screen fields?if not how is data transferred from field data to screen fields?
What is the difference between commit-work and rollback-work tasks?
Differentiate between the uline and write: sy-uline statements if any?
What are the two ways for restricting the value range for a domain? : abap data dictionary
How to upload more than 2GB file from External Source to SAP?
What are the differences between sap memory and abap memory?