Skip to Content
0
Former Member
Mar 06, 2009 at 08:40 AM

BADI IF_EX_MB_DOCUMENT_BADI~MB_DOCUMENT_BEFORE_UPDATE - MB1A

185 Views

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