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

former_member227596
Participant
0 Likes
405

Dear Abapers,

How I work with screen I want to handle Attributes of the Screen Fields. Thr programming I can handle Attributes.

I want to delete a row from Table Control, When I select a row & click on Delete push button. Before deleteing I want to know which Record it is deleting. To my surprise, that is not the record which i want to delete , but the last record of the screen.

Pl. help me.

regards

Vikas

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
386

HI Vikas,

To delete a record from table control, you have to write the coding at PAI. After loop end loop you will get the internal table containing the indicator showing which row is selected. then at user command you can case for the function code of your delete button, inside the logic of delete button u can loop the itab and find the record with select indicator x and delete the corresponding entry from the itab.

Hope this will help you

Regards

Sarath

4 REPLIES 4
Read only

Former Member
0 Likes
387

HI Vikas,

To delete a record from table control, you have to write the coding at PAI. After loop end loop you will get the internal table containing the indicator showing which row is selected. then at user command you can case for the function code of your delete button, inside the logic of delete button u can loop the itab and find the record with select indicator x and delete the corresponding entry from the itab.

Hope this will help you

Regards

Sarath

Read only

former_member611006
Active Participant
Read only

former_member611006
Active Participant
0 Likes
386

... and here :

Greetz,

David

Read only

former_member196299
Active Contributor
0 Likes
386

HI Vikas ,

I'll tell you the reason first why it is happening and then the answer .

Reason : the reason is you might not have refreshed your internal table containing the data of the table control and thats y its taking the last record ..

Solution : I hope you have a column for selecting the rows of the table control and lets say the variable name you have given is SEL .

Now , in PAI , loop at the table control itab on condition where SEL = 'X', and collect that particular record .

Delete that record from the itab in the user-command codule.

Then in the PBO module pass on the rest of the values of tab_con_itab back to the table control for display.

This will surely solve your problem ...

Regards,

Ranjita