‎2009 Apr 17 7:13 AM
Hi all ,
I need to do some validations in SM30. I am using event 21 for this. I am facing the following problem.
Like say for ZTABLE-field1 = 'S' is entered by the user. I do some validation for this and throwing an error message. Next time the user changes it to 'C' , but I am not able to see this updated value (C) in any of
TOTAL/EXTRACT/<TABLE1>/<TABLE2>/ my custom table. It is still 'S' only everywhere. Thus , the latest entry entered by the user is not getting updated in any of these.
Can anyone please tell me where the current table line is stored when event 21 is used .
Regards,
Deepthi
‎2009 Apr 22 9:24 AM
‎2009 Apr 17 9:57 AM
hi,
Create a module inside the loop at extract - endloop in PAI.
Write your field validation code in your module...
regards
padma
‎2009 Apr 17 10:02 AM
Hi ,
Thanks for your reply.
I do not want to modify the standard code generated as it will get wiped out when the maintainence is regenerated. Thats why trying to do it in events only. Any pointers ?
Regards,
Deepthi
‎2009 Apr 17 10:16 AM
Hi,
Eventually you will end with new include only, which will contain the logic for validation.
But using standard events will ensure that the include is called at right moment.
Events can be found at following location:
On Generate table maintenance screen
Go to Environment Tab ->Modification -> Events
Here a new entry can be created by selecting the required event like: 01 for before saving into database. Provide some name for the subroutine. Then click on editor option there make the necessary coding.
Hope this answers your query.
Regards,
Brajvir
‎2009 Apr 20 8:41 AM
‎2009 Apr 22 9:24 AM
‎2009 Apr 22 9:38 AM
Hi Dinesh ,
I had looked into the link before ; I don't want to make changes in the generated code at all as there is every possibility that the table maintainence will be regenerated in the future. If I create a new custom include in events , it doesn't get erased during regeneration.
As of now , I have used Event 01 instead of event 21. It doesn't fully satisfy my purpose , but its ok .
Regards,
Deepthi
‎2009 Apr 22 10:02 AM
Hi divya,
I didn't understand how event 21 is going to help in this case..
If ur creating a new include, how can we make sure that it is called at the point where we want it to..
that is why we create events right...
About the regeneration part..yes we got to be carefull with the backup..
Edited by: dinesh kumar on Apr 22, 2009 2:39 PM
Edited by: dinesh kumar on Apr 22, 2009 2:39 PM
‎2009 Apr 22 10:19 AM
Hi Dinesh ,
I meant the same thing . While creating events , we need to do the coding right ? That part is retained everytime you regenerate.
I wanted to validate and give an error message each time the user presses Enter . For this I was using event 21. But the current record was not getting updated anywhere. So , I am using event 01 now and using TOTAL and EXTRACT.
Regards,
Deepthi