Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

INTERNAL TABLE

Former Member
0 Kudos

Hi ,

based on some condion on one internal table i have to delete records in another internal table so how it is possible pls tellme.

if one record is i can use READ but i have to check with multiple records.

pls help me

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

Loop (internal table2 which has many records)

read each record coming inside the loop for the condition to satisfy in the other internal table1

if sy-subrc = 0.

delete the content of the internal table1 .

endif.

endloop.

regards,

karthik

5 REPLIES 5

Former Member
0 Kudos

hi,

ex : consider ITAB & ITAB1 having a field PERNR.

if u want to delete the ITAB1-Pernr, who are all there in ITAB..

<b> Loop at ITAB.

DELETE ITAB1 WHERE PERNR EQ ITAB-PERNR.

Endloop.</b>

With Rgds,

S.Barani

Former Member
0 Kudos

hi,

Loop (internal table2 which has many records)

read each record coming inside the loop for the condition to satisfy in the other internal table1

if sy-subrc = 0.

delete the content of the internal table1 .

endif.

endloop.

regards,

karthik

Former Member
0 Kudos

Hi,

Loop at itab1 where <condn>. ( if condn exists, it will come inside the inner

loop).

Loop at itab2.

delete itab2 where <cond> = <itab1->.

endloop.

endloop.

Regards,

Vani.

Former Member
0 Kudos

try this.

loop at itab1.

if (ur condition in itab1).

delete itab2[] where (ur condition).

endif.

endloop.

hope this gives some idea.

former_member386202
Active Contributor
0 Kudos

Hi,

Do like this.

Loop at itab1 itno wa1.

read tbale itab2 into wa2 with key <conditions>

if sy-subrc eq 0 .

delete itab1 from wa1.

endif.

endloop.

Regards,

Prashant