‎2006 Jul 25 11:38 AM
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?
‎2006 Jul 25 11:43 AM
the key must be the field of that table.
thats why it is not working.
‎2006 Jul 25 11:45 AM
‎2006 Jul 25 11:45 AM
You mean that the statement :
"With Key" should not have screen-input as the condition?
‎2006 Jul 25 11:51 AM
HI
U need to specify index with MODIFY like-
modify g_t_p9146 index sy-tabix.
hope this helps,
Regards,
seema