Application Development 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: 

Table control problem

Former Member
0 Kudos
122

Hi All,

I've a table control and I've four records in it. Out of the four records ,only the first record is right and rest three are invalid POs.

Am looping my table control and checking the validations, if its invalid then am giving error message .if they click delete button then am deleting the record which is invalid PO by placing the curson on that line in table control,then it

comes to third record since this is also invalid PO, its giving same error mesage and shows all the four POs without deleting the second one..

What I need is once the secod record is deleted it should show the rest three records..Again if user wants to delete third record then it should delte and show first 7 fourth record.

How can I do this...

Points for sure.

Thanks,

Ponraj.s.

4 REPLIES 4

Former Member
0 Kudos
89

Hi,

Just try before the validation for invalid POs.

CHECK SY-UCOMM NE 'DELE'.

Only then you need to validate. Validation should not happen when user selecting delete. So that you skip validation when you want to delete a record.

Please check.

Cordially

Shankar Narayanan.

0 Kudos
89

Hi Shankar,

Thanks for your reply, but deleting & validation is coming in loop endloop of table control..

So once it deleted the second record and check the validation for third record , gives error message and displays all four records..

Is there anyother way???

Thanks,

Ponraj.s.

0 Kudos
89

Hi Ponraj,

When deletion happens Validation should not occur. So before validation part, please put the check on sy-ucomm for deletion. so that when you delete the line the validation code is not executed.

Please paste the code (that part) i will check it if my suggestion not helping.

Thanks.

Cordially

Shankar Narayanan.

Former Member
0 Kudos
89

clear sy-ucomm(ok_code) after deleting the record.