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 rules to create a BAPI?
What is meant by hide area?
What are the client dependant objects in abap / sap?
What are logical data bases used in hr module? : abap hr
What happens if a function module runs in an update task? : abap modularization
What are matchcodes?
Can we create an abap program without using y or z?
What are the requirements a dialog program must fulfill?
What is filter dependent BADI?
What is database view ? : sap abap data dictionary
What are smart forms?
What is going life actually? What is the role of a functional consultant in it? : sap abap hr
What is sql trace? : abap data dictionary
how to track records from data dictionary?
What is the difference between upload and ws_upload ? : abap bdc