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
Program lines for the radio button selection and unabling some input variables in section screen
There is a delivery that is being created through the ABAP code and in the middle it says delivery created but someone is modifying , how would you rectify this issue
Program for Prime numbers and Matrix plz explain me the procedural method with steps
What should be declared explicitly in the corresponding abap/4 statements to access internal tables without header lines & why?
Application Category?
How do you write manual bdc session method? : abap bdc
How to split one Invoice into Multiple ( Step by Step)?
What is the difference between table and template?
Hello All, Requesting to all user of this site. Please post your Questions in Proper sub Category of chosen category. Some users post the questions in common category whether sub category for that is available ..like some users still post the SAP Script & ALE Related questions in common ABAP Category. Due to this it becomes very difficult to find the topic wise Questions. Please cooperate with the site & to other users. Thanks & Regards Tamseel
What is the use of 'table index'?
Can you print decimals in type n? What is difference between float and packed data type?
wat is the difference between A-gate & W-gate?where are they used?
What is the function of the correction system? : abap data dictionary
What is the difference between sy-tabix and sy-index? Where it is used?
How do you use structures in the abap programs?