Skip to Content

Want to find a user exit after created material document for Good Receipt of a PO using MIGO

Hi experts,

I need to find a user exit after created a material document for Good Receipt of a PO using MIGO tcode. that user exit should have after commit database updates.

Thanks.

Add comment
10|10000 characters needed characters exceeded

  • Former Member

    If I wanted to send an e-mail in response to the creation of a document in SAP, my first thought would be to use output control rather than a user exit or a BADI. Have you considered that already?

  • Get RSS Feed

8 Answers

  • May 09, 2017 at 11:45 AM

    I doubt that you'll find one since the whole idea of user exits/badi's is to allow customer manipulation of data before it is saved on the database.

    I would suggest encapsulating Migo in a custom transaction and then carrying on with your processing after the CALL TRANSACTION to MIGo ends.

    Rich

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 12, 2017 at 11:26 AM

    If I had to generate an e-mail in response to the creation of any document in SAP, my first thought would be to use output control rather than a user exit or a BADI. Have you considered that, yet?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 09, 2017 at 11:21 AM
    -1

    Hi,

    Please Check : - MB_DOCUMENT_BADI

    Method:MB_DOCUMENT_BEFORE_UPDATE

    MB_DOCUMENT_UPDATE

    Regards,

    NCC

    Add comment
    10|10000 characters needed characters exceeded

  • May 12, 2017 at 05:18 AM
    -1

    I have never used BADI before. Can anyone tell me how to use it??

    Actually I want to send a mail after generated the material document...

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      You may get some idea on this BAID by referring its example class and reading documentation

      1. Example implementation class CL_EXM_IM_MB_MIGO_BADI

      2. Read documentation

      Thanks and Regards,

  • avatar image
    Former Member
    May 09, 2017 at 11:04 AM

    Hi,

    perhaps BADI: ME_PROCESS_PO_CUST Method CLOSE

    can help. USE SE18/SE19.

    Regards, Dieter

    Add comment
    10|10000 characters needed characters exceeded

  • May 09, 2017 at 11:32 AM

    What exactly you are trying to achieve as you mentioned "user exit should have after commit database updates"

    Add comment
    10|10000 characters needed characters exceeded

  • May 10, 2017 at 09:27 AM

    Did you try with MB_MIGO_BADI. In method POST_DOCUMENT the document number is already available, but database is not yet commited, so you could use a CALL FUNCTION IN BACKGROUND TASK/UNIT so it will be executed after the database commit, if you don't need any commit, you could also use A CALL FUNCTION IN UPDATE TASK. In first case use a RFC FM wrapper (with some BAPI call and COMMIT WORK) in second case an UPDATE V2 FM wrapper (only some OPEN SQL statements)

    Add comment
    10|10000 characters needed characters exceeded

  • May 23, 2017 at 06:37 AM

    I tried MB_DOCUMENT_BADI but it also triggered before commit work.

    So again I tried enhancement MB_CF001 and EXIT_SAPLMBMB_001 . In that INCLUDE ZXMBCU01 I added a break point but it not triggered. Do u have any idea???

    Add comment
    10|10000 characters needed characters exceeded

    • Raymond, I noticed your answer and finally thought to create a background job. As I found I cannot use standard options of 'Output Determination' Customizing because in our case email has to sent when doing Good Receipts using 103 movement type only for NHPP materials.