How to move the even records of one internal table to other

Answer Posted / nag

REPORT ztest_report11.
TYPES : BEGIN OF ty_itab ,
kunnr TYPE kunnr,
END OF ty_itab.
DATA : itab_even TYPE TABLE OF ty_itab,
itab_odd TYPE TABLE OF ty_itab,
itab TYPE TABLE OF ty_itab,
wa TYPE itab.

SELECT kunnr FROM kna1 INTO TABLE itab UP TO 20 ROWS.

LOOP AT itab INTO wa.
IF sy-tabix MOD 2 = 0.
APPEND wa TO itab_even.
ELSE.
APPEND wa TO itab_odd.
ENDIF.
ENDLOOP.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an rfc?

595


What are the differences between interactive and drill down reports?

548


How we format the data before before write statement in report ?

556


Give few names of pooled tables in sap ?

1505


What is the difference between table and template?

580






What is database utility?

704


What are the check tables?

561


What is Buffering Concept? When should a Table be buffered?

11800


What are the basic object types? : sap abap hr

629


what are the main technical differences between oracle and sap? it would be more helpful to me if get this answer...

1536


What kind of financial periods exist in sap? What is the relavent table for that?

626


What are the advantages of logical databases?

623


how to update the filed value in SAP in ZAWSYS and create time and date? please tell me the answer

1817


Difference between open sql and native sql? : abap data dictionary

612


How many ways can a sap system be accessed?

684