Application Development and Automation 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: 
Read only

SM30 Validation

Former Member
0 Likes
2,610

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,583

Hi,

please chk the following link..

I answered a similar query, please chk my replies in this and relate it with ur prob..

revert if its not of nay help..

regards,

Dinesh.

8 REPLIES 8
Read only

Former Member
0 Likes
1,583

hi,

Create a module inside the loop at extract - endloop in PAI.

Write your field validation code in your module...

regards

padma

Read only

0 Likes
1,583

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

Read only

0 Likes
1,583

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

Read only

Former Member
0 Likes
1,583

Check the header line of EXTRACT.

Read only

Former Member
0 Likes
1,584

Hi,

please chk the following link..

I answered a similar query, please chk my replies in this and relate it with ur prob..

revert if its not of nay help..

regards,

Dinesh.

Read only

0 Likes
1,583

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

Read only

0 Likes
1,583

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

Read only

0 Likes
1,583

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