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: 

BADI MB_MIGO_BADI

Former Member
0 Kudos
172

Hello Everyone,

I am using MB_MIGO_BADI , im using metho item_modify for checking data at item level, and displaying error message when ever the check condition fails.

When ever the required conditions fail, i am displaying a pop-up message.

This is all what i did so far.

Now my problem is, when my conditions fail, i want to exit the program and my message should be displayed. But now it is just displaying the message as warning. It should be a error message.

I am using 'POPUP_TO_INFORM' function module for POP UP.

Thanks in adavance.

Regards

Ravi

5 REPLIES 5

Former Member
0 Kudos
77

Hi Ravi,

use leave to screen sy-dynnr

sample code..

IF sy-subrc <> 0.

CALL FUNCTION 'POPUP_TO_INFORM'

EXPORTING

titel = 'Authorisation'(007)

txt1 = 'You are not authorised or'(008)

txt2 = 'Check your password'(009).

LEAVE TO SCREEN sy-dynnr.

ENDIF.

else.

CALL FUNCTION 'POPUP_TO_INFORM'

EXPORTING

titel = 'Password Check'(010)

txt1 = 'Password is Blank or'(011)

txt2 = 'Check your password'(009).

LEAVE TO SCREEN sy-dynnr.

endif.

ENDIF.

endif.

Regards

Kiran Sure

0 Kudos
77

Hiii Kiran,

It says an error " SET SCREEN NOT ALLOWED IN SUB SCREENS ".

this errors came after my pop up is displayed.

Regards

Ravi

0 Kudos
77

Hi,

You can look at the examples.

Transaction: ABAPDOCU

-->ABAP User Dialogs

--->Complex Screen Elements

-


>Subscreens

Regards

Kiran Sure

ritesh_dugad2
Active Participant
0 Kudos
77

POPUP_TO_INFORM is a function module to display information and this is normally done using a popup window. If you want to display information as error message try using command message e(XXX) directly in the code of the Implementation.

Former Member
0 Kudos
77

My problem is solved.

solution is:

I had passed a parameter from item_change method to check_item method in MIGO_BAdi.

there by using that parameter i had created an error msg in check_item method.

Thanks for ur help

Regards

sunil