‎2007 May 10 11:32 AM
Hi,
I have a problem to delete a row from Table control.
I have used this following code :
READ TABLE my_control-cols INTO wa_col WITH KEY screen-input = '1'.
IF SY-SUBRC = 0.
LOOP AT internal_table INTO DEMO_CONN WHERE MARK = 'X'.
DELETE internal_table.
ENDLOOP.
ENDIF.
it's not working, can anyone give me a response.
Thanks in advance.
‎2007 May 10 11:45 AM
Hi Said..use Delete Internal_table from Demo_conn.
See wat happens ???
You should first make sure whether your record is collected in Demo_conn (work area) or not.
I am sure it will solve your query.
Reward points if it does.
Dev.
‎2007 May 10 11:35 AM
where u are calling this Module?
u have to call in PAI
ref: this program
DEMO_DYNPRO_TABCONT_LOOP_AT
‎2007 May 10 11:38 AM
Hi
Hope there are some demo programs by SAP for Table Controls.
Try :
DEMO_DYNPRO_TAB* in se38.
Regards,
Sreeram
‎2007 May 10 11:45 AM
Hi Said..use Delete Internal_table from Demo_conn.
See wat happens ???
You should first make sure whether your record is collected in Demo_conn (work area) or not.
I am sure it will solve your query.
Reward points if it does.
Dev.
‎2007 May 10 11:50 AM
Try this logic
READ TABLE my_control-cols INTO wa_col WITH KEY screen-input = '1'.
clear demo_conn.
IF SY-SUBRC = 0.
DEMO_CONN-MARK = 'X'.
DELETE table internal_table from demo_conn.
ENDIF.
Message was edited by:
Naveena M
‎2007 May 10 11:50 AM
Hi,
when 'DEL_ROW'.
get cursor line sel_line.
if sel_line <> 0.
delete <itab> index sel_line.
endif.
rgds,
bharat.
‎2007 May 10 11:52 AM
TRY TO DECLARE A VARIABLE TYPE C
LET IT BE BOX.
IN LAYOUT OF TABLE CONTROL WE AS A SEL OPTION GIVE THE SAME NAME...BOX.
THEN IN PAI WRITE CODING.....
IF BOX = 'X'.
DELETE <ITAB> WHERE <CONDITION>...
ENDIF.