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

deleting a record intable control

Former Member
0 Likes
736

Hi

is it possible to delete a record in a table control then how to write a code for deleted recodr and refreshing the data again

thanks,

kiran

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
709

Check this out

For Inserting a Row

For Deletion of a Row

Hi

is it possible to delete a record in a table control then how to write a code for deleted recodr and refreshing the data again

thanks,

kiran

4 REPLIES 4
Read only

Former Member
0 Likes
710

Check this out

For Inserting a Row

For Deletion of a Row

Read only

Former Member
0 Likes
709

hi,

MODULE modify INPUT.

IF v_check = 'X'.

it_knbk-chk = 'X'.

MODIFY it_knbk index tc1-current_line.

ELSE.

CLEAR it_knbk-chk .

ENDIF.

ENDMODULE.

MODULE user_command_ INPUT.

v_ucomm = sy-ucomm.

CASE v_ucomm.

WHEN 'DELE'.

DELETE it_knbk where chk eq 'X'.

DESCRIBE TABLE it_knbk LINES tc1-lines.

endcase.

ENDMODULE. " USER_COMMAND_ INPUT

hope this helps,

do reward if it helps,

priya.

Read only

Former Member
0 Likes
709

Hi,

Check the Demo Programs...

<b>DEMO_DYNPRO_TABCONT_LOOP_AT

RSDEMO_TABLE_CONTROL</b>

Regards

vijay

Read only

Former Member
0 Likes
709

Hi,

You only need to delete record from your Internal table.

Here the code:


  LOOP AT IT_CONTROL.
    IF IT_CONTROL-ZCHECK = 'X'.
      DELETE IT_CONTROL.
    ENDIF.
  ENDLOOP.

Notes:

  • IT_CONTROL your Internal Table for Table Control.

  • ZCHECK = Line Selection in your Table Control.

Regards,