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: 

Data getting saved after error message in the table maintenance generator

Former Member
3,098

Hi ,

I have TMG and maintenance view FOR Z TABLE.

I would like like to validate the user entered values with database saved values.

I am using event 01 before save ,and successfully raising error message based on the condition.

The issue is after error message, data getting saved.

please suggest me how to stop.

Below code have written,

MESSAGE ' SHOUL BE NOT LIES BETWEEN' TYPE  'S' DISPLAY LIKE 'E'.

           vim_abort_saving = 'X'.

           sy-subrc = 4.

           EXIT.

suggest me what else need to take care for stop the saving .

Thank you.

Regards,

Shivaji.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
798

Thanks for your support.

Issue resolved by adding module at PAI of screen .

6 REPLIES 6

Sandra_Rossi
Active Contributor
0 Kudos
798

Use MESSAGE ' SHOUL BE NOT LIES BETWEEN' TYPE 'E'.

0 Kudos
798

Hi Rossi,

Thanks for your replay.

When use this statement control comes out of the table maintenance generator.

I want control should be there as error data can be edit by user.

Thank you.

Regards,

Shivaji

0 Kudos
798

Well, in that case try to display error like type 'I' or 'S' or 'W'.

MESSAGE ' SHOUL BE NOT LIES BETWEEN' TYPE  'E' DISPLAY LIKE 'W'.

0 Kudos
798

Sorry, my answer was too fast, I just reacted to the fact you were using message type 'S' for stopping the PAI, which of course can't work.

The saving happens after the CALL SCREEN is finished; so it's too late.

You need to modify the screen flow logic as with classic dynpros. Be careful when you regenerate the dialog, think to re-apply your changes!

former_member196213
Active Participant
0 Kudos
798

I believe what you have done is correct. That's all it need. I just checked previous code I have done same and it is working fine.

Now why yours is not working ??

in ST05 put a SQL trace, to check where the update is happening.

once found...keep a breakpoints in both the places...

debug and check some manual code may be drilling it away.

Best Regards,

Vishal

Former Member
0 Kudos
799

Thanks for your support.

Issue resolved by adding module at PAI of screen .