Difference between revisions of "SAP MM PURCHASING"
From SapWiki
Line 1: | Line 1: | ||
==USER EXIT/BADI en Orden de Compra , Solicitud de Pedido== | ==USER EXIT/BADI en Orden de Compra , Solicitud de Pedido== | ||
− | For verifications do not use field exits but enhancement MM06E005 (Purchase order) or MEREQ001 (PReq). Here, extensive user exits are available. | + | *For verifications do not use field exits but enhancement MM06E005 (Purchase order) or MEREQ001 (PReq). Here, extensive user exits are available. The changing of default fields via field-exits is no longer supported in Transactions ME21N, ME22N, ME51N and ME52N. Enhancement in transaction SMOD => transaction CMOD |
− | + | *What enhancements are available for the user exits in purchasing? | |
− | |||
− | |||
− | |||
− | What enhancements are available for the user exits in purchasing? | ||
Response: | Response: | ||
See Note 320601. | See Note 320601. | ||
See Notes 313925 and 456127 for EDI user exits. | See Notes 313925 and 456127 for EDI user exits. | ||
− | What user exits are available for import data? | + | *What user exits are available for import data? |
Response: | Response: | ||
See Note 118573. | See Note 118573. | ||
+ | |||
+ | ===BAdi MEPO_PROCESS_PO_CUST=== | ||
+ | The BAdi MEPO_PROCESS_PO_CUST is ultimately used to integrate your custom data into the process flow of the purchase order to execute, for example, input checks and to integrate other function modules from your function group. | ||
+ | |||
+ | Methods: | ||
+ | |||
+ | *INITIALIZE From this method, you call the Initialize function module of your function group when you start your transaction. | ||
+ | *OPEN This method runs as soon as a purchase order is opened. Then you call the Open function module to make custom data available. | ||
+ | *PROCESS_ACCOUNT You can check inputs for account assignments. | ||
+ | *CHECK This method allows you to check the document completely. | ||
+ | *PROCESS_ITEM You can check inputs at item level. | ||
+ | *PROCESS_HEADER You can check inputs at header level. | ||
+ | *PROCESS_SCHEDULE You can check inputs on schedules. | ||
+ | * | ||
+ | example: | ||
+ | |||
+ | <nowiki>method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM . | ||
+ | * begin of insert SYDAB01 | ||
+ | DATA: ls_mepoitem TYPE mepoitem. | ||
+ | data lt_account type PURCHASE_ORDER_ACCOUNTINGS. | ||
+ | data lt_EXKN type MEPOACCOUNTING. | ||
+ | data wa_account like line of lt_account. | ||
+ | data wa_zceco type zceco. | ||
+ | data wa_zmatclase type zmatclase. | ||
+ | ls_mepoitem = im_item->get_data( ). | ||
+ | lt_account = im_item->GET_ACCOUNTINGS( ). | ||
+ | SELECT SINGLE KOSTL INTO wa_zceco-kostl FROM ZCECO | ||
+ | WHERE KOSTL = ls_mepoitem-BEDNR. | ||
+ | IF SY-SUBRC = 0. | ||
+ | SELECT SINGLE SAKTO INTO wa_zmatclase-sakto | ||
+ | FROM ZMATCLASE | ||
+ | WHERE MATNR = ls_mepoitem-MATNR. | ||
+ | if sy-subrc = 0. | ||
+ | loop at lt_account into wa_account. | ||
+ | lt_exkn = wa_account-ACCOUNTING->get_data( ). | ||
+ | endloop. | ||
+ | lt_exkn-sakto = wa_zmatclase-sakto. | ||
+ | call method wa_account-ACCOUNTING->set_data( lt_exkn ). | ||
+ | endif. | ||
+ | endif. | ||
+ | * endof insert | ||
+ | endmethod.</nowiki> | ||
==Programa impresión O/C== | ==Programa impresión O/C== | ||
SAPFM06P y formulario MEDRUCK | SAPFM06P y formulario MEDRUCK |
Revision as of 21:40, 12 April 2020
USER EXIT/BADI en Orden de Compra , Solicitud de Pedido
- For verifications do not use field exits but enhancement MM06E005 (Purchase order) or MEREQ001 (PReq). Here, extensive user exits are available. The changing of default fields via field-exits is no longer supported in Transactions ME21N, ME22N, ME51N and ME52N. Enhancement in transaction SMOD => transaction CMOD
- What enhancements are available for the user exits in purchasing?
Response: See Note 320601. See Notes 313925 and 456127 for EDI user exits.
- What user exits are available for import data?
Response: See Note 118573.
BAdi MEPO_PROCESS_PO_CUST
The BAdi MEPO_PROCESS_PO_CUST is ultimately used to integrate your custom data into the process flow of the purchase order to execute, for example, input checks and to integrate other function modules from your function group.
Methods:
- INITIALIZE From this method, you call the Initialize function module of your function group when you start your transaction.
- OPEN This method runs as soon as a purchase order is opened. Then you call the Open function module to make custom data available.
- PROCESS_ACCOUNT You can check inputs for account assignments.
- CHECK This method allows you to check the document completely.
- PROCESS_ITEM You can check inputs at item level.
- PROCESS_HEADER You can check inputs at header level.
- PROCESS_SCHEDULE You can check inputs on schedules.
example:
method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM . * begin of insert SYDAB01 DATA: ls_mepoitem TYPE mepoitem. data lt_account type PURCHASE_ORDER_ACCOUNTINGS. data lt_EXKN type MEPOACCOUNTING. data wa_account like line of lt_account. data wa_zceco type zceco. data wa_zmatclase type zmatclase. ls_mepoitem = im_item->get_data( ). lt_account = im_item->GET_ACCOUNTINGS( ). SELECT SINGLE KOSTL INTO wa_zceco-kostl FROM ZCECO WHERE KOSTL = ls_mepoitem-BEDNR. IF SY-SUBRC = 0. SELECT SINGLE SAKTO INTO wa_zmatclase-sakto FROM ZMATCLASE WHERE MATNR = ls_mepoitem-MATNR. if sy-subrc = 0. loop at lt_account into wa_account. lt_exkn = wa_account-ACCOUNTING->get_data( ). endloop. lt_exkn-sakto = wa_zmatclase-sakto. call method wa_account-ACCOUNTING->set_data( lt_exkn ). endif. endif. * endof insert endmethod.
Programa impresión O/C
SAPFM06P y formulario MEDRUCK