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: 

problem in writing code in table event

Former Member
0 Kudos

hi all,

i have the requirement to display an error message when creating,changing a wrong entry..for this i have written code in table event 01 and 05.....the error message is displayed but the record in sm30 becomes disabled ie it is not ready for inpu..everytime due to this i have to come to the initial screen of sm30...

i know this can be overcome if display error message in chain endchain in pai of table control but problem is every time the table maintenance generator is regenerated this code will disappear and i have to write the code again...

Can anyone give a solution to overcome this problem?

2 REPLIES 2

Former Member
0 Kudos

Hi,

Try declaring a global variable ex---> VAR type i. (with an intial value of 0).

Now whenever you have to display the error change the Value of the VAR to 1 (in PAI).

Put a condtion that if VAR eq 0 then only the control must enter to the PBO.

Now the fields must remain editable after the Error is displayed.

Try this and let me know if have doubts.

Regards,

Amit.

0 Kudos

hi,

i know that if i write in pai i will achieve the result...but my question was not this..i asked that the code in pai will disppear if the table maintenenace gnerator is regenerated...so can i write this code in table event so that it does not disappear ?