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

MIR7 - Error in BAPI or what do I wrong?

Former Member
0 Likes
976

Hi there,

I need a function that allows me to create incoming invoices as parked documents. Now I've the problem that the BAPI brings an error that I cannot understand...

I use the following logic:

- Creating a parked document (without items) with BAPI_INCOMINGINVOICE_PARK.

- Add line for line new positions to the invoice I created the step before with BAPI_INCOMINGINVOICE_CHANGE

So now I have the problem that the second BAPI let me only add a single position to the parked document. In each of the following lines I get the following error:

E Service number entered (0000000000) does not exist

I have to say that the purchase order has the following´entries in the tab "Services":

Pos 10: Service 4711

What is my error? I can't find it

Kind regards

John

2 REPLIES 2
Read only

former_member182371
Active Contributor
0 Likes
618

Hi,

maybe :


CALL FUNCTION 'BAPI_INCOMINGINVOICE_PARK'
.......

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    wait = 'X'.

* invoicedocnumber/fiscalyear are obtained from 
* BAPI_INCOMINGINVOICE_PARK
WHILE l_invoicedocnumber IS INITIAL.
  SELECT SINGLE belnr FROM rbkp INTO l_invoicedocnumber
  WHERE belnr = invoicedocnumber 
  AND      gjahr = fiscalyear.
   WAIT UP TO 1 SECONDS.
ENDWHILE.

*
CALL FUNCTION 'BAPI_INCOMINGINVOICE_CHANGE'
.......

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    wait = 'X'.

Best regards.

Read only

Former Member
0 Likes
618

i have same problem,can you tell me how to handle with it,can you send mail to 550252982@qq.com ?