2023 Dec 14 1:07 PM
There is customer exit ZXMBCU02 which is currently in use in MIGO transaction. However , I want it to be triggered only when
I select GOODS RECEIPT AND PURCHASE ORDER in the MIGO transaction. In other cases it should not go through ZXMBCU02.
Or is there any way out (like sy-tcode = 'MIGO' ) where I can make piece of code executable inside the ZXMBCU02 ,possible only when
GR and PO are selected in the MIGO as shown in pic below.
In other words how can I make system understand that it should work (ZXMBCU02 to be executed ) only when GR and PO is selected.
I have placed validation inside ZXMBCU02 .
Now I want the validation to be executed only when GOODS RECEIPT AND PURCHASE ORDER is selected but not in any other combinations.
Thanks in advance.
2023 Dec 14 1:24 PM
Hello
ZXMBCU02 is not a user-exit, but an include with which EXIT_SAPMM07M_001 is implemented:
FUNCTION EXIT_SAPMM07M_001.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_MSEG) LIKE MSEG STRUCTURE MSEG
*" VALUE(I_VM07M) LIKE VM07M STRUCTURE VM07M
*" VALUE(I_DM07M) LIKE DM07M STRUCTURE DM07M
*" VALUE(I_MKPF) LIKE MKPF STRUCTURE MKPF
*" EXPORTING
*" VALUE(E_SGTXT) LIKE MSEG-SGTXT
*"----------------------------------------------------------------------
INCLUDE ZXMBCU02.
ENDFUNCTION.<br>
In case of GR posting against a purchase order you should get I_MSEG-BWART = 101 and I_MSEG-KZBEW = B
BWART contains material movement type. The 101 movement type is a standard one to post GR for purchase or production orders.
KZBEW contains the movement indicator, e.g.
Best regards
Dominik Tylczynski
2023 Dec 14 1:24 PM
Hello
ZXMBCU02 is not a user-exit, but an include with which EXIT_SAPMM07M_001 is implemented:
FUNCTION EXIT_SAPMM07M_001.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_MSEG) LIKE MSEG STRUCTURE MSEG
*" VALUE(I_VM07M) LIKE VM07M STRUCTURE VM07M
*" VALUE(I_DM07M) LIKE DM07M STRUCTURE DM07M
*" VALUE(I_MKPF) LIKE MKPF STRUCTURE MKPF
*" EXPORTING
*" VALUE(E_SGTXT) LIKE MSEG-SGTXT
*"----------------------------------------------------------------------
INCLUDE ZXMBCU02.
ENDFUNCTION.<br>
In case of GR posting against a purchase order you should get I_MSEG-BWART = 101 and I_MSEG-KZBEW = B
BWART contains material movement type. The 101 movement type is a standard one to post GR for purchase or production orders.
KZBEW contains the movement indicator, e.g.
Best regards
Dominik Tylczynski