How to move the even records of one internal table to other
Answer Posted / n m s m krishna
DATA : BEGIN OF ITAB OCCURS 0,
KUNNR TYPE KUNNR,
END OF ITAB.
DATA : ITAB_EVEN LIKE ITAB OCCURS 0 WITH HEADER LINE.
DATA : ITAB_ODD LIKE ITAB OCCURS 0 WITH HEADER LINE.
SELECT KUNNR FROM KNA1 INTO TABLE ITAB UP TO 20 ROWS.
LOOP AT ITAB.
IF SY-TABIX MOD 2 = 0.
ITAB_EVEN-KUNNR = ITAB-KUNNR.
APPEND ITAB_EVEN.
ELSE.
ITAB_ODD-KUNNR = ITAB-KUNNR.
APPEND ITAB_ODD.
ENDIF.
ENDLOOP.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are the problems in processing batch input sessions?
What is meant by read lock? : sap abap data dictionary
out bound process code for quotation?
What are the data types of internal tables?
where do we store all custom programs in SD module?
Explain what are extracts?
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
Explain the disadvantage of using exec sql statement in abap?
Where do you find info on new developments in SAP?
How to convert the Unit for 'Distance' (The value from one Unit to another).
How can we set the table spaces and extent sizes? : abap data dictionary
In an abap/4 program how do you access data that exists on a presentation server vs on an application server?
How do you find if a logical database exists for your program requrements?
In selection screen I have three fields, plant mat no and material group. If I input plant how do I get the mat no and material group based on plant dynamically?
Explain the different types of screen keywords?