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 or User-Exit for MIGO after Printing

Former Member
0 Kudos

Hí;

I need to do the next in Tcode MIGO:

When i create a Good Recipt/Purchase Order, After printing i need to take the account number created from mkpf-mblnr, and with it go to Table FMIFIHD and take the correponding FMBELNR field value.

I've tryied BADI's: MB_DOCUMENT_BADI, MB_DOCUMENT_UPDATE, and MB_MIGO_BADI with not success.


Any help.

Thanks on advance.

David Fúnez

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi;

At first, i want to apologize for the Title of the post, it shouldn't say "AFTER PRINTING".

I solved the problem with an enhancement in MIGO transaction:

1) INCLUDE lmigopai" PAI modules

2) Double click on Method CALL METHOD lcl_migo_frame=>okcode_dispatch( okcode ).

*----------------------------------------------------------------------*

***INCLUDE LMIGOPAI .

*----------------------------------------------------------------------*

*&---------------------------------------------------------------------*

*&      Module  PAI_OKCODE_DISPATCH  INPUT

*&---------------------------------------------------------------------*

MODULE pai_okcode_dispatch INPUT.

   def_info 'PAI Dynpro 0001 end' space.                     "#EC NOTEXT

   CALL METHOD lcl_migo_frame=>process_messages.

   CALL METHOD lcl_migo_frame=>okcode_dispatch( okcode ).

ENDMODULE.                             " PAI_OKCODE_DISPATCH  INPUT


3) So there I've created an enhancement inside the INCLUDE LMIGOFR2


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Clase LCL_MIGO_FRAME, Método OKCODE_DISPATCH, Final                                                                                               A

*$*$-Start: (1)---------------------------------------------------------------------------------$*$*

ENHANCEMENT ZFM_LMIGOFR2.    "active version

Here you can write your code...

ENDENHANCEMENT.

*$*$-End:   (1)---------------------------------------------------------------------------------$*$*




1 REPLY 1

Former Member
0 Kudos

Hi;

At first, i want to apologize for the Title of the post, it shouldn't say "AFTER PRINTING".

I solved the problem with an enhancement in MIGO transaction:

1) INCLUDE lmigopai" PAI modules

2) Double click on Method CALL METHOD lcl_migo_frame=>okcode_dispatch( okcode ).

*----------------------------------------------------------------------*

***INCLUDE LMIGOPAI .

*----------------------------------------------------------------------*

*&---------------------------------------------------------------------*

*&      Module  PAI_OKCODE_DISPATCH  INPUT

*&---------------------------------------------------------------------*

MODULE pai_okcode_dispatch INPUT.

   def_info 'PAI Dynpro 0001 end' space.                     "#EC NOTEXT

   CALL METHOD lcl_migo_frame=>process_messages.

   CALL METHOD lcl_migo_frame=>okcode_dispatch( okcode ).

ENDMODULE.                             " PAI_OKCODE_DISPATCH  INPUT


3) So there I've created an enhancement inside the INCLUDE LMIGOFR2


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Clase LCL_MIGO_FRAME, Método OKCODE_DISPATCH, Final                                                                                               A

*$*$-Start: (1)---------------------------------------------------------------------------------$*$*

ENHANCEMENT ZFM_LMIGOFR2.    "active version

Here you can write your code...

ENDENHANCEMENT.

*$*$-End:   (1)---------------------------------------------------------------------------------$*$*