During MIRO after pressing save, to READ ITEM DATA and UPDATE HEADER DATA (XBLNR) after SAVE but before UPDATE.
Solution:
In BADI INVOICE_UPDATE there are 3 methods CHANGE_AT_SAVE, CHANGE_BEFORE_UPDATE and CHANGE_IN_UPDATE.
Of these CHANGE_AT_SAVE is called before INSERT / UPDATE statements are executed. We can use this to update RBKP-XBLNR.
Can't use CHANGE_BEFORE_UPDATE and CHANGE_IN_UPDATE methods as they are called after INSERT / UPDATE statements are executed and before COMMIT.
Update RBKP-XBLNR through INVOICE_UPDATE~CHANGE_AT_SAVE method using call stack technique like below.
Replace 'VALUE' in the below code with the value based on your calculation using other variables like s_rbkp_new, ti_rseg_new etc.
method IF_EX_INVOICE_UPDATE~CHANGE_AT_SAVE.
DATA: lv_name_xblnr(30) TYPE c VALUE '(SAPLMRMP)RBKPV'.
FIELD-SYMBOLS: <fs_rbkpv> TYPE mrm_rbkpv.
ASSIGN (lv_name_xblnr) TO <fs_rbkpv>.
IF <fs_rbkpv> IS ASSIGNED.
<fs_rbkpv>-xblnr = 'VALUE'.
ENDIF.
endmethod.
INVOICE_UPDATE
AC_DOCUMENT
Enhancements:
LMR1M001 User exits in Logistics Invoice Verification
LMR1M002 Account grouping for GR/IR account maintenance
LMR1M003 Number assignment in Logistics Invoice Verification
LMR1M004 Logistics Invoice Verification: item text for follow-on docs
LMR1M005 Logistics Inv. Verification: Release Parked Doc. for Posting
LMR1M006 Logistics Invoice Verification: Process XML Invoice
MRMH0001 Logistics Invoice Verification: ERS procedure
MRMH0002 Logistics Invoice Verification: EDI inbound
MRMH0003 Logistics Invoice Verification: Revaluation/RAP
MRMN0001 Message output and creation: Logistics Invoice Verification
User exits are:
EXIT_SAPLMR1M_001 - MM08R002 - User exit for tolerance checks
EXIT_SAPLMR1M_002 - LMR1M001 - User exits in Logistics Invoice Verification
EXIT_SAPLMR1M_003 - LMR1M001 - User exits in Logistics Invoice Verification
BADI's are:
BADI_ENJ_ALT_ADR - Go to alternative vendor/customer data
MR_CIN_LMR1MI2G_SEL - BAdi in LIV for determining line selection
MR_CIN_LMR1MI2G - BAdI for India Version exit in include LMR1MI2G
No comments :
Post a Comment