‎2009 Dec 21 11:02 AM
Hi guys,
I have a problem with table control.
I am displaying fields on a table control from an internal table. I am selecting few fields on the table control and when i click submit fields will be updated to the corresponding database table. If there is any error, an Error Message will be displayed.
When error message is displayed i am unable to select fields on the table control. I used chain endchain for I/O fields to solve this but it is not accepting a table control in it.
Can anyone tell me how to enable table control after an error message.
regards
ramakanth
‎2009 Dec 21 11:12 AM
Hi Ramakanth,
cHAIN and ENDCHAIN should be in LOOP & ENDLOOP of PAI module.. then only these fields would be editable.s
Other solution..
Use
Message Ixxx DISPLAY LIKE 'E'.
Hope this helps,
Nag
‎2009 Dec 21 11:25 AM
‎2009 Dec 22 4:09 AM
Hi Ramakanth,
If you use CHAIN...ENDCHAIN within screen flow logic of the PAI table control loop, the validations which you have implemented for the table control fields would be executed. In case of any error message, ONLY that line in the table control will be visible for change. Suppose your user fills 10 lines and submits and let us say 3rd and 5th line fail validations, first 3rd line would be available for editing / correction. Once 3rd line is corrected and that line passes validation, 5th line error message will appear and so on...
But if you want to enable ALL lines in the table control, for any validation failure, you CAN NOT issue error message. In this case you can use message type I or S and display it LIKE 'E' as suggested above. This also applies to the error raised in a subsequent PAI module which is outside the table control loop - say for example updating database table, etc.
So you have only two options:
1. Raise an error message and you get ONLY one line in the table control for correction at a time.
2. Raise non-error message and let user edit the entire table control. In this case, please note that the system will execute all subsequent PAI modules and PBO before letting user do any correction. This may present undesirable side-effects.
Cheers
Suresh