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: 

Itab Read table

Former Member
0 Kudos

ignore Eriliar post please.

Below is my Exact Query....

OBJCT AUTH FIELD VON BIS

M_MATE_WGR T-D118086200 ACTVT 01

M_MATE_WGR T-D118086200 ACTVT 02

M_MATE_WGR T-D118086200 ACTVT 03

M_MATE_WGR T-D118086200 BEGRU 1001

M_MATE_WGR T-D118086200 BEGRU 2001 2500

M_MATE_WGR T-D118086201 ACTVT 03

M_MATE_WGR T-D118086201 BEGRU 1000 5000

This is my itab

From below combination

Auth = 'T-D118086201' Von = '03' Field = 'ACTVT'

i want to take value of AUTH = 'T-D118086201'

then by using this combination i want to delete below line.

M_MATE_WGR T-D118086201 BEGRU 1000 5000

How to do that.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Follow the logic below.

loop at itab into wa.

read table itab into wa1 with key Auth = 'T-D118086201' Von = '03' Field = 'ACTVT'.

if sy-subrc eq 0.

delete itab from wa1 index sy-tabix.

endif.

endloop.

4 REPLIES 4

Former Member
0 Kudos

Hi,

Follow the logic below.

loop at itab into wa.

read table itab into wa1 with key Auth = 'T-D118086201' Von = '03' Field = 'ACTVT'.

if sy-subrc eq 0.

delete itab from wa1 index sy-tabix.

endif.

endloop.

Former Member
0 Kudos

Hi,

try this..

delete itab where Auth = 'T-D118086201' and

Von = '03' and

Field = 'ACTVT'.

or

loop at itab.

read table itab with key Auth = 'T-D118086201' and

Von = '03' and

Field = 'ACTVT'.

if sy-subrc = 0

delete itab index sy-tabix.

endif.

endloop.

Former Member
0 Kudos

Hi Monica,

Try this :

Delete itab from wa where Auth = 'T-D118086201' 
                                and Von = '03'
                                and Field = 'ACTVT'.

Regards,

Swapna.

Former Member
0 Kudos

delete table itab with table key objct = 'M_MATE_WGR' auth = 'T-D118086201' field = 'BEGRU' von = 1000

bis = 5000.

refer to this link

http://help.sap.com/saphelp_nw04/Helpdata/EN/06/aafd54fc4011d195280000e8353423/content.htm