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

Help with avoid from user to save wrong data in view

Former Member
0 Likes
922

Hi,

i have a view and if user want to delete some specific combination in the table

i throw a error message like : u can't delete this combination,

and to continue the user must push on red X (chancel button) to continue.

but the problem is when the user want after that to push back and leave the view ,

a pop-up with message: Data was changed Save changes first?

if the user choose yes, it open another pop-up for request and he can save the changes ,

i don't want the pop-up window how can i avoid that ?

Best Regards

Michael M

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
820

Hi,

you can do that in moments of change data in table. Look for documentation about customizing change tables or something like that.

In SE11 go to the database table, in menu utilities>"Tab. maint. generator" search for menu enviroment>modification>hours or some like that. Choose a moment and create your code.

6 REPLIES 6
Read only

Former Member
0 Likes
821

Hi,

you can do that in moments of change data in table. Look for documentation about customizing change tables or something like that.

In SE11 go to the database table, in menu utilities>"Tab. maint. generator" search for menu enviroment>modification>hours or some like that. Choose a moment and create your code.

Read only

0 Likes
820

HI Rodrigo,

Thanks,

maybe u have some example that can help with the issue .

Best Regards

Read only

0 Likes
820

Well... I can´t access sap in this moment but i will try to explain more for you...

When u select Enviroment>Modification>Hour, you have to choose a moment for routine to be executed. Click on matchcode and u will see very moments for choose. Ex: before record in database, after record in database, etc... Choosse one and, select a name for your routine and click in icon of source code.

So create the form with validations that u need, with call functions and others.

The internal tables that contain data in database table is "extract" and "total". Pay attention that this internal tables has same structure of database table plus a field "action" that save your action (add data, change, exclude, etc).

In my example, i need to put time and date automatically.

=============================================

FORM preenche_campos.

FIELD-SYMBOLS :

TO total.

MODIFY total.

ENDLOOP.

ENDFORM.

=========================================

Read only

0 Likes
820

HI Rodrigo,

Thanks,

i Watch table extract and there i see the view content ,

i see the field mark and action (if update happen i for some line i see it) ,

the main problem is how to avoid the pop-up message after the user modify the table with wrong data and get

error and when cancel and after do back he get pop-up of open request and save ,it's wrong .

Best Regards

Read only

0 Likes
820

Hi Friends,

i need some idea for this issue,

i want to avoid the pop-up request.

Best Regards

Read only

0 Likes
820

Hi!

I think that you can´t avoid this pop-up.

You should find a user-exit for that.

Or do to exit of transaction in your customization and user restart process. This way will not appear popup if he do wrong.