Skip to Content
avatar image
Former Member

Table Control Validation on SAVE

Custom table control with 4 fields.

In the PAI section inside the loop at itab written the validation for the four fields inside chain endchain statement.

It works perfectly fine while entering data in the TC and on pressing enter if the validation fails, the line in the table control with the error becomes editable and all other fields are disabled.

However the requirement is that the validation take place only at SAVE event and not on pressing enter after filling each line in the TC.

So I added a IF condition in the validation module. - This works fine till the number of records is less than or equal to the table control rows displayed on the screen.

That is if 10 rows are displayed in the table control screen and the number of records are 15 then the validation fails for the last 5 records which are not displayed at that moment.

I hope I am able to explain my issue.

Kindly advice any workaround.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Feb 21, 2017 at 07:09 PM

    The loop in the PAI only works for the 10 displayed lines. So, if you want to validate everything only at SAVE time, you must do it after the loop: you'll loop at all lines in the internal table (containing the lines of the table control). Of course, the effect is that in case of error, all fields will still be in input state, and you'll have to position the cursor yourself on the erroneous line/field (SET CURSOR).

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 22, 2017 at 10:35 PM

    Hi Rohit,

    Use "GET CURSOR LINE" sentence for stablish positions on TC.

    Regards,

    Add comment
    10|10000 characters needed characters exceeded