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

Modal dialog box error

Former Member
0 Likes
682

Hi,

i have created a modal dialog box to warn the user about the stock and the quantities she entered for the delivery.

In a badi, i call a fm and in this fm i have created the modal dialog screen.

My problem is that this screen is just for warning and when clicked ok or exit, it should return to the delivery screen, should not save the delivery. Just leave the modal dialog screen.

how can i do that?

3 REPLIES 3
Read only

Former Member
0 Likes
533

Hi ,

the standard sap functionality is such a way that if Warning or Success Message is reaised the below statements are executed.

If you raise the error message the Process is stopped until it is correct.

so there is a way you can handle.

after a warning message create a flag and mark as X .

before save if Flag is X try to exit with out saving.

Prbhudas

Read only

0 Likes
533

Thanks Das,

by warning i mean just info.

No warning message, just displaying the correct some data and then should return to the main screen of the transaction, vl01n,

as if nothing happened.

Is that possible, to display a modal dialog screen and then disappering it without chanhing the flow logic?

Display and then be at the same screen. the core is that:)

Thanks.

Read only

0 Likes
533

Hello hakaramakara,

If you have used the correct badi (PROCESS_AT_SAVE) or something like that the error message statement should be the right solution as it keeps the user on the transaction and only puts the error message on the left under corner of the screen.

For this you can use statament MESSAGE

example :

DATA: mid TYPE sy-msgid VALUE 'SABAPDOCU',

mtype TYPE sy-msgty VALUE 'I',

num TYPE sy-msgno VALUE '014'.

MESSAGE ID mid TYPE mtype NUMBER num.

OR even better

MESSAGE e014(SABAPDOCU)

Best regards,

Remind points if helpfull.