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

BAPI for post held invoice ?

Peter_Inotai
Active Contributor
0 Likes
2,173

Hi,

Is there a BAPI for posting held invoices?

I have to post held invoices in background....I hope there is other option, then CALL TRANSACTION.

I'm on release R/3 4.70x200, but it seems for BUS2081/IncomingInvoice there is no relevant BAPI.

Method Edit was also implemented via transaction MIR4.

OSS note 381593 mention that batch input problems with invoice related transactions. MIR4 is only mentioned as keyword, however I might have problems with it later on.

Any comment?

Can anyone on higher release check if there is relevant BAPI for this?

Thanks in advance,

Peter

1 ACCEPTED SOLUTION
Read only

Peter_Inotai
Active Contributor
0 Likes
1,860

Based on some documentation, as of SAP ECC 6.0 (SAP_APPL 600) BAPI_INCOMINGINVOICE_CHANGE is available, and probable it would meet with my requirements.

I couldn't find any info about downporting:-(

Peter

14 REPLIES 14
Read only

Peter_Inotai
Active Contributor
0 Likes
1,861

Based on some documentation, as of SAP ECC 6.0 (SAP_APPL 600) BAPI_INCOMINGINVOICE_CHANGE is available, and probable it would meet with my requirements.

I couldn't find any info about downporting:-(

Peter

Read only

0 Likes
1,860

Can anyone send me the source code of BAPI_INCOMINGINVOICE_CHANGE (having an myERP 600 rampup system)?

Any suggestion how to get SAP downport this BAPI?

Maybe I'll open an OSS message to ask them...

Thanks,

Peter

Read only

0 Likes
1,860

hi,

<b>BAPI_INCOMINGINVOICE_SAVE</b> try this it may help you.

read the fm documentation...

regards

vijay

Read only

0 Likes
1,860

Hi Vijay,

Thanks for the hint.

Unfortunately for BAPI_INCOMINGINVOICE_SAVE the document number and fiscal year are export parameters, not import.

However when the invoice is held, it has already the document number and fiscal year;-(

Regards,

Peter

Read only

0 Likes
1,860

Hi Peter,

I was looking at this fm MRM_INVOICE_CREATE and it appears from the code that you can use this fm even for invoice change. I think you have to pass I_RBKPV and other data and then set importing parameter I_CHANGE_DOCUMENT = 'X'.

I did a where-used list on the fm and one call is from

MRM_PARKED_INVOICE_POST which I believe deals with existing invoices.

Hope this helps..

Sri

Read only

0 Likes
1,860

Hi Sri,

Thanks a lot for your help.

I think I_CHANGE_DOCUMENT parameter in FM MRM_INVOICE_CREATE has another purpose .... I'm not sure.

However MRM_PARKED_INVOICE_POST looks promising, I'll try to figure out how it works.

Thanks again!

Peter

Read only

0 Likes
1,860

Hi Sri,

Any idea how to handle errors in MRM_PARKED_INVOICE_POST?

Based on my test, it's not possible to collect them, they terminate the process immediately.

Thanks,

Peter

Read only

0 Likes
1,860

Hi Peter,

Looking at the FM, as it has no exceptions defined, i don't think it is possible to do error handling in this case.

However, the possible values for the importing parameter,

E_MRM_ZLSPR are,

A Automatically blocked due to existence of blocking reasons

S Stochastically blocked

M Manual payment block set in header - no blocking reasons

W Automatically blocked due to entry via Web Invoice

Probably you can use for some purpose.

Regards,

Ravi

Read only

0 Likes
1,860

Hi Ravi,

Thanks for your help.

Unfortunately it has to be within an RFC enabled FM, so I have to handle error messages. I think I have to use call transaction MIR4.

Regards,

Peter

Read only

0 Likes
1,860

Hi Peter,

You can use the following addition in the fm MRM_PARKED_INVOICE_POST call..

CALL FUNCTION 'MRM_PARKED_INVOICE_POST'

.....

.....

EXCEPTIONS

error_message = 1.

IF sy-subrc NE 0.

****Use syst message variables here..

ENDIF.

This will catch the error messages that terminate the process..

Hope this helps..

Sri

Read only

0 Likes
1,860

Hi Sri,

Thanks a lot your help. I was not familiar with this option, but checking the help and make some test it works fine.

Regards,

Peter

PS: I'll try to implement this way and if everything is fine, I'll close this thread.

Read only

0 Likes
1,860

I have no idea why, but the option "Very helpful answer" is greyed out:-(

Read only

0 Likes
1,860

I set it "Solved Problem (10)" as I think this way it will work...I'm still waiting for test data for this part.

Anyway in case of problems I'll open an other thread.

Thanks again for everyone, who helped me on this one.

Peter

Read only

0 Likes
1,860

MRM_PARKED_INVOICE_POST worked fine. It's also necessary to use COMMIT WORK. after the FM call.

Peter