04-11-2014 12:20 PM
Hi,
I'm using the badi ME_PROCESS_PO_CUST to set kostl if the knttp is 'K'. Before the badi runs, in the me21n runs ME_ACCOUNTING_CHECK that check if the kostl field is obligatory, and give an error if its empty. I've got the error before my badi fills the field. How can I skip this check?
This is how i fill the field in the process item method.
SELECT SINGLE saknr kostl INTO (wa_mepoacc-sakto, wa_mepoacc-kostl) FROM zmmt00005 "kostl (ls_item-kostl,
WHERE ambit EQ vl_ambit
AND lgort EQ ls_item-lgort
AND matkl EQ ls_item-matkl.
IF sy-subrc EQ 0.
lw_account-accounting->set_data( wa_mepoacc ).
cl_po ?= clv_header.
IF NOT cl_po->my_recheck_queue IS INITIAL.
CLEAR cl_po->my_recheck_queue.
ENDIF.
ENDIF.
Thanks
Sorry for my bad english
04-11-2014 5:58 PM
Hello,
some suggestions:
try to implement your logic in PROCESS_ITEM( ) instead of PROCESS_ACCOUNT( ). It should be possible to get a reference to the accounting object there.
The error is triggered in FORM REQUIRED_ENTRY_MISSING of function group MECO. If nothing else helps, implement source code plugins there and in function module ME_ACCOUNTING_CHECK (to pass parameters). But be aware you might introduce errors by overriding the customizing like this.
hope this helps,
JNN