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


Please Help Members By Posting Answers For Below Questions

What is difference between dialog program and a report?

595


Name the function module used to convert logical file names to physical file names in abap/4 programs?

593


What is meant by hide area?

658


What is img? : sap abap hr

704


What is bdc? : abap bdc

613






can anyone do BDC or BAPI for F-02 and F-04 transactions.If it LSMW also.Kindly let me know.

3041


Explain the structure of a bdc sessions?

557


how to Create reports in SD module such as sales order report, which covers all organization levels, delivery status, invoice status, shipping details and partner function details. The data will be extracted from VBAP, VBPA, VBAK, VBUP, VBFA, KNA1, LIPS, VBRP, MARA, VBEP and KONV tables. plz mention the detail coding Tahnks, Rahul

2873


Explain what is runtime analysis?

565


What is the functionality of BIZTALK and how it handles the IDOC’s and how u will transfer the IDOCS to the BIZTALK ?

2238


What is is a match code? : abap data dictionary

683


What is a transport?

626


What is the maximum number of structures that can be included in a table or structure : abap data dictionary

808


what is difference between user exit, customer exit and badi?

4087


What will you code in start-of-selection & end-of-selection ?

595