Application Development and Automation 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: 
Read only

Table Control - Deleting rows

Former Member
0 Likes
501

Hi all,

How do i delete rows from Table Control. The logic which i have now doesnt work.

I have defined one field in the table control attributes as check and i have declared this in internal table also...

NOW when i select a row and click on the delete Button:

The following module will be executed:

<b>Module DEL_REC.

READ TABLE tabc-cols INTO cols WITH KEY screen-input = '1'.

IF sy-subrc = 0.

LOOP AT g_t_p9146.

If g_t_p9146-check eq 'X'.

DELETE pa9146 from g_t_p9146.

modify g_t_p9146.

ENDIF.

ENDLOOP.

ENDIF.

END MODULE.</b>

The first point is: the tabc-cols is having 5 fields:

PERNR, BEGDA,ENDDA,ZZORHD,ZZPERCENT.

here when i debug this... the screen-input is not 1.

So it doesnt go in...

Even if it Does, the Check should be 1.

But it is not...

Can anyone Help me in this?

4 REPLIES 4
Read only

sushant_singh
Participant
0 Likes
419

the key must be the field of that table.

thats why it is not working.

Read only

0 Likes
419

Check this out

For Inserting a Row

For Deletion of a Row

Read only

0 Likes
419

You mean that the statement :

"With Key" should not have screen-input as the condition?

Read only

Former Member
0 Likes
419

HI

U need to specify index with MODIFY like-

modify g_t_p9146 index sy-tabix.

hope this helps,

Regards,

seema