Anda di halaman 1dari 2

v: Read items & Update header

This question is answered


Hi there!
During MIRO after pressing save...
I search for an user-exit or BAdI, to READ ITEM DATA and UPDATE HEADER DATA (XBLNR)
after SAVE but before UPDATE.
I have searched this forum, but with no luck. Many more then me seem to have the same problem.
The most common answer have been to try BAdI INVOICE_UPDATE, but that BAdI only give READ
access and NO UPDATE, so no luck there..
To summarize all my searching here and findings... I list all exits I have tested...
User-Exits
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
BADI - When saving in MIRO the following BAdI were passed...
PPA_CUST_BADI
/CCIS/FICLRDC_ENH
INVOICE_UPDATE << only read no update
ME_DP_CLEARING
AC_DOCUMENT
FI_LIMIT_PROCESS
AC_QUANTITY_GET
FMRE_BUS_PROCESS
EXIT_XFMPRI_001
CO_DOCUMENT_INFO
INVOICE_UPDATE (method change_before_update ) << only read no update
MRM_RANSACT_DEFAULT
MRM_HEADER_DEFAULT
Other BAdI's
MRM_HEADER_CHECK - Bara ingående värden för kontroll
MRM_HEADER_DEFAULT - Tyvärr sätter bara XBLNR precis när man går in i MIRO...dvs för tidigt.
MRM_ERS_HDAT_MODIFY - EJ anropad...
Would be greatful for any ideas on this matter...
Best regards
Henrik

Former Member
February 15, 2016 at 18:22 PM
1 Likes
Correct Answer

Vishnu Tallapragada replied


January 22, 2012 at 22:17 PM
Hello Henrik,
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.
We can't use CHANGE_BEFORE_UPDATE and CHANGE_IN_UPDATE methods as they are called
after INSERT / UPDATE statements are executed and before COMMIT.
You can update RBKP-XBLNR through INVOICE_UPDATE~CHANGE_AT_SAVE method using call
stack technique like below. You can replace 'VALUE' in the below code with the value based on your
calculation using other variables like s_rbkp_new, ti_rseg_new etc.
Copy Code

1. method IF_EX_INVOICE_UPDATE~CHANGE_AT_SAVE.
2. DATA: lv_name_xblnr(30) TYPE c VALUE '(SAPLMRMP)RBKPV'.
3. FIELD-SYMBOLS: <fs_rbkpv> TYPE mrm_rbkpv.
4.
5. ASSIGN (lv_name_xblnr) TO <fs_rbkpv>.
6. IF <fs_rbkpv> IS ASSIGNED.
7. <fs_rbkpv>-xblnr = 'VALUE'.
8. ENDIF.
9. endmethod.

Best regards,
Vishnu Tallapragada