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

Invoice Posting MIRO

Former Member
0 Likes
3,644

Hi all,

Through MIRO we are posting Invoice. After entering the data when we click on SAVE button the Invoice gets posted. When can check the document in MIR4 or in

MIRO(Invoice Document->display).

When we display the Invoice Document and click on "follow on document" to goto Accounting Document.

then Accounting entry is displayed for that Invoice.

In the Debit Entry the Reference field will be either Purchase Order Number or Reference Number which we gave during Invoice posting.

Now my requirement is to change the Purchase Order Number or Reference Number with Delivery Note Number.

I found one BADI for that. INVOICE_UPDATE. In this BADI there are 3 methods.

1. ON_SAVE

2. BEFORE_UPDATE

3. DURING_UPDATE.

I tried to changes the value in runtime after the ON_SAVE & BEFORE_UPDATE methods (with out implementing the methods). Its not working.

The Other method DURING_UPDATE is called within the FM (MRM_INVOICE_DOCUMENT_POST)

but this FM is called in the program with UPDATE TASK addition.

Ex: Call Function 'MRM_INVOICE_DOCUMENT_POST' UPDATE TASK.

and in debugging mode the control is not entering into this FM.

Can anybody tell me where i can change the PO/Reference No to Delivery Note Number before posting.

Thanks

Hi all,

Through MIRO we are posting Invoice. After entering the data when we click on SAVE button the Invoice gets posted. When can check the document in MIR4 or in

MIRO(Invoice Document->display).

When we display the Invoice Document and click on "follow on document" to goto Accounting Document.

then Accounting entry is displayed for that Invoice.

In the Debit Entry the Reference field will be either Purchase Order Number or Reference Number which we gave during Invoice posting.

Now my requirement is to change the Purchase Order Number or Reference Number with Delivery Note Number.

I found one BADI for that. INVOICE_UPDATE. In this BADI there are 3 methods.

1. ON_SAVE

2. BEFORE_UPDATE

3. DURING_UPDATE.

I tried to changes the value in runtime after the ON_SAVE & BEFORE_UPDATE methods (with out implementing the methods). Its not working.

The Other method DURING_UPDATE is called within the FM (MRM_INVOICE_DOCUMENT_POST)

but this FM is called in the program with UPDATE TASK addition.

Ex: Call Function 'MRM_INVOICE_DOCUMENT_POST' UPDATE TASK.

and in debugging mode the control is not entering into this FM.

Can anybody tell me where i can change the PO/Reference No to Delivery Note Number before posting.

Thanks

2 REPLIES 2
Read only

mvoros
Active Contributor
0 Likes
1,700

Hi,

unfortunately you can not change any values in BADI INVOICE_UPDATE. Check this OSS note 392342. This paragraph is from that note:

Solution

If the data changed in the BAdI is supposed to be returned to the MIRO, this can only be executed by a program modification of BAdI 'INVOICE_UPDATE' and function module 'MRM_BADI_INVOICE_CHECK'. Contact the remote consulting for this.

So you can try to modify this BADI or try to find a new way of changing your fields using enhacement framework. Try to find a suitable implicit point but you have to be more careful.

Martin

Read only

Former Member
0 Likes
1,700

Hi Martin,

Thanks for the suggestion.

I found another BADI, AC_DOCUMENT. In this Badi there are 2 methods INITIAL_CHANGE and CHANGE_AFTER_CHECK. I tried to change the Ref No to Delivery Note No. But now the system is not able to post the documents. It displaying error message related to controlling area.

I tried to post through 2 methods.

any suggestions....!!!

thanks