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

how to clear data in Table Control.

Former Member
0 Likes
2,223

hi! all

How to clear the data in table control.

i have a Table control which displays column A data from the previous screen and allows to enter column B and column C and i have a button CLEAR, when i click CLEAR button the Data displaying in table control has to be cleared. how to do it.

Regards,

Nagulan

hi! all

How to clear the data in table control.

i have a Table control which displays column A data from the previous screen and allows to enter column B and column C and i have a button CLEAR, when i click CLEAR button the Data displaying in table control has to be cleared. how to do it.

Regards,

Nagulan

12 REPLIES 12
Read only

Former Member
0 Likes
1,604

Delete all the data in the itab that u r passing to table control............

Read only

0 Likes
1,604

hi! jose

i tried it but its not working can you give me other options plz,

i tried my loop . . . too its not working.

Read only

0 Likes
1,604

In a module in ur screen's PAI write like below..

case sy-ucomm.

when 'Func code for clear button'.

refresh itab. (itab is the int table u r passing to table control.)

endcase.

Cheers,

jose.

Read only

Former Member
0 Likes
1,604

Hi,

Loop over the internal table of table control & clear data from table control.


loop at tctab.
clear tctab.
modify tctab.
endloop.

Best regards,

Prashant

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,604

just refresh the itab assigned to the table contriol

Read only

Former Member
0 Likes
1,604

try this.

REFRESH CONTROL ctrlname FROM SCREEN scr.

Read only

0 Likes
1,604

hi! Kamini Rawat

Thanks for your reply,

Read only

0 Likes
1,604

hi! Kamini Rawat

Thanks for your reply, but that syntax is to clear the variable not for Table control.

can you give me other option.

Read only

0 Likes
1,604

it can initialize ur table control.

before this stmt.

free ur internal table used to pass data to table control.

u can also refer to f1 help abt refresh.

Read only

Former Member
0 Likes
1,604

delete all the data in itab you are passing to tab ctrl in the pai module of the screen and check whether it is again updated by some select querry in any module called after the module for CLEAR push button in PAI or any module in PBO.

It mioght be that it again gets updated in PBO modules as PBO is always called after PAI

Read only

Former Member
0 Likes
1,604

Hi,

use refresh

refresh it_tab.

Plzz reward points if it helps.

Read only

Former Member
0 Likes
1,604

HI.

before clear ,we should select which row we need to delete.so

assign name for selection cell as "sel".

if sel = 'X'.

write delete logic here.

endif.

REgards.

JNJ