Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BADI 'invoice_update'

Former Member
0 Likes
3,442

Hello,

I am using BADI 'Invoice_Update' and written some coding for check in 'CHANGE_AT_SAVE'.

I have put a break-point in the code to check. When I am doing transaction in MIRO, and when i 'SIMULATE' it goes the break-point and does the check and relevent error message is generated. But when I directly press "SAVE' in MIRO, it does not go to the break-point and the check is not happening.

What can be th reason.

RR

Hello,

I am using BADI 'Invoice_Update' and written some coding for check in 'CHANGE_AT_SAVE'.

I have put a break-point in the code to check. When I am doing transaction in MIRO, and when i 'SIMULATE' it goes the break-point and does the check and relevent error message is generated. But when I directly press "SAVE' in MIRO, it does not go to the break-point and the check is not happening.

What can be th reason.

RR

3 REPLIES 3
Read only

former_member182371
Active Contributor
0 Likes
1,822

Hi,

when you say:

I directly press "SAVE' in MIRO

are you holding RBKP-RBSTAT = ' ',

parking RBKP-RBSTAT = 'A',

or saving as complete RBKP-RBSTAT = ' B'

the document?

According to SAP Note 1156325 - BAdIs in the Logistics Invoice Verification environment:

Definition name: INVOICE_UPDATE

Usage

The BAdI 'INVOICE_UPDATE' was only designed to execute checks during

document entry or document posting in transaction MIRO.

According to SAP Note 392342 - MIRO: No data change through Bussiness Add In

Symptom

In the logistics invoice verification MIRO, you cannot change data using

Business Add In 'INVOICE_UPDATE'.

Additional key words

BAdI, SE18, MRM_BADI_INVOICE_CHECK,

Cause and prerequisites

This system behavior is correct.

BAdI 'INVOICE_UPDATE' was only designed to execute checks during the

document entry or document posting in Transaction MIRO. Therefore, it has

only import parameters. There are no export parameters. This means that the

data changed in the BAdI is not processed further in standard program MIRO.

Best regards.

Edited by: Pablo Casamayor on May 11, 2010 4:56 PM

Read only

0 Likes
1,822

Here 'SAVE' i mean that when I simulate, then the check happens and when i directly post bu pressing 'SAVE' button with simulate, then the check does note happen.

Read only

0 Likes
1,822

Hi,

when i post the document from simulation subscreen the badi gets called in:

Program SAPLMRMP

include LMRMPU01

fm MRM_INVOICE_POST


IF i_simulation NE 'Y'.
 BAdI Invoice_update (at_save)
  CALL FUNCTION 'MRM_BADI_INVOICE_CHECK'
    EXPORTING
      i_rbkpv  = rbkpv
      i_xupda  = 'I'
    TABLES
      ti_drseg = t_drseg.
ENDIF.

Best regards.