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 IF_EX_MB_DOCUMENT_BADI~MB_DOCUMENT_BEFORE_UPDATE - MB1A

Former Member
0 Kudos

Hi All,

I am using this BADI - IF_EX_MB_DOCUMENT_BADI~MB_DOCUMENT_BEFORE_UPDATE for TCODE MB1A, While saying the transaction I check if the User is authorized person, if yes the user should be able to save else it should come to the initial screen MB1A.

I tried using Error Message , Information Message and after the message I am calling the transaction MB1A, but its not working,

i.e. - If I use Information message after coming to the initial screen if I click the BACK button the document is getting posted, I tried using POP_UP_TO_CONFIRM and POPUP_TO_INFORM, the first time it is working, if I try performing the 2nd time I am getting a short dump 'Multiple calls to the Update Function Module'.

IF WA_T043-USNAM EQ SY-UNAME.

CALL FUNCTION 'DEQUEUE_ALL'

EXPORTING

_SYNCHRON = 'X'

EXCEPTIONS

OTHERS = 1.

IF SY-SUBRC EQ 0.

    • CALL FUNCTION 'POPUP_TO_INFORM'*

    • EXPORTING*

    • TITEL = 'Inventory Adjustment Control '*

    • TXT1 = 'Not Authorized to Execute this Transaction'(001)*

    • TXT2 = 'MB1A'.*

MESSAGE TEXT-001 TYPE 'I'. " Not authorized to execute this transaction

CALL TRANSACTION 'MB1A'.

endif.

Please let me know how ro handle messages in BADI .

Your timely help would be appreciated.

Thanks

Supriya

2 REPLIES 2

Former Member
0 Kudos

After message, use LEAVE TO SCREEN 0 statement.It may helps you.

0 Kudos

I tried this, but it shud go to MB1A, I tried giving the screen number , but when I am doing the scrapping for the 2nd time I am getting a short dump.