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 is mean be On Change of in Control Break statement
How are the function code handles in flow logic?
What is the difference between Check and Continue?
What is netweaver???what is the relationship with ABAP?
Can multiple abap systems connect to abap database?
Did you create secondary index?
How will you transfer data into a file in application server?
10) How to get Item Header in Sales Order?
How do you work with semi colon se[arated files in BDC ?
what are the two methods of modifying sap standard tables? : abap data dictionary
What are the merits of its?-
What is the use of at new statement ?
What is the max. No. Of structures that can be included in a table or structure? : abap data dictionary
What is exception class and test class. How to use it?
How many tables are there in sap?