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 the modification assistant?
What is an Open Item in SAP? How will you find an Open Item in SAP?
Which bdc you prefer? : abap bdc
What is the collect statement?
hi,i worked mostly in core abap.know iam assigned to XI utility project.can u experts let me know what r the basic things i need to learn to work in XI utility project.i already searched in forum.thanks in advance.
What is update task
How many ways can a sap system be accessed?
What are the dynapro keywords?
Can we display a list in a pop-up screen other than full-size stacked list?
What is amdp (abap managed data procedures)?
Why do we declare a method of a class final? What can be the purpose? Give a scenario.
If I want to execute a program only in background not in foreground is there any option for this? : abap bdc
Explain the difference between float and packed data type?
Write an abap program for creation of customer enquiry using BAPI 'BAPI_INQUIRY_CREATEFROMDATA'.
What is the maximum No. Of structures that can be included in a table or structure. : abap data dictionary