Application Development 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: 

Call BAPI_INCOMINGINVOICE_PARK park document local amount is always zero

former_member311833
Participant
0 Kudos

Hi All,

I use BAPI : BAPI_INCOMINGINVOICE_PARK to generate IV Park document, but when I execute below program


REPORT ztemp.

DATA: x_in_header LIKE bapi_incinv_create_header,
      i_in_item LIKE bapi_incinv_create_item OCCURS 0 WITH HEADER LINE,
      lc_belnr LIKE bapi_incinv_fld-inv_doc_no,
      lc_gjahr LIKE bapi_incinv_fld-fisc_year,
      i_gl_item like BAPI_INCINV_CREATE_GL_ACCOUNT OCCURS 0 WITH HEADER LINE,
      d_msg(110),
      i_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.

x_in_header-invoice_ind = 'X'.
x_in_header-pstng_date = '20100527'.
x_in_header-doc_date = '20100527'.
x_in_header-ref_doc_no = 'TESTCW201006F'.   "Reference
"x_in_header-header_txt = 'TEXTO XXX'.
x_in_header-comp_code = '1008'.
x_in_header-currency = 'JPY'.
x_in_header-gross_amount = '787500'.
x_in_header-calc_tax_ind = 'X'.
x_in_header-exch_rate = '0.28880'.
i_in_item-invoice_doc_item = '000001'.
i_in_item-po_number = '4500000147'.        "PO No
i_in_item-po_item = '00010'.
i_in_item-REF_DOC = '5000000708'.          "MM Document
i_in_item-REF_DOC_YEAR = '2010'.
i_in_item-REF_DOC_IT = '0001'.
"i_in_item-DE_CRE_IND = 'H'.
i_in_item-tax_code = '11'.
i_in_item-item_amount = '750000'.
i_in_item-quantity = '15'.
i_in_item-po_unit = 'EA'.
APPEND i_in_item.
CLEAR i_in_item.
i_gl_item-invoice_doc_item = '000001'.
i_gl_item-gl_account = '0051541001'.
i_Gl_item-bus_area = '1000'.
i_Gl_item-DB_CR_IND = 'H'.
i_Gl_item-COMP_CODE = '1008'.
APPEND i_gl_item.
CLEAR i_gl_item.

CALL FUNCTION 'BAPI_INCOMINGINVOICE_PARK'
EXPORTING
headerdata = x_in_header
IMPORTING
invoicedocnumber = lc_belnr
fiscalyear = lc_gjahr
TABLES
itemdata = i_in_item
glaccountdata = i_gl_item
return = i_return.

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

When I use me23n to display PO History, the Park document display local amount is zero.

http://farm5.static.flickr.com/4007/4645799139_876ebd034b_o.jpg

But when I use MIR7 re-park this document, the Park document has local amount.

http://farm5.static.flickr.com/4008/4645799209_5c20354743_o.jpg

How should I change my code to make the park document can display local amount data?

-


another question is what value should I input to i_in_item-sheet_no & sheet_item?

Are these two field required?

Best regards,

Eric

1 ACCEPTED SOLUTION

former_member182371
Active Contributor
0 Kudos

Hi,

according to documentation of BAPI_INCOMINGINVOICE_PARK :

You use this method if information on posting an invoice document is missing in the invoice document;

the balance can be a value other than zero.

As in the online transaction, the following updates take place,

for example informative PO history, advance tax return, index for check on duplicate invoices,

open vendor items from parked documents, log of document changes.

according to Help button in MIR7 transaction:

1.- Holding Invoice Documents ->

If you are interrupted while entering or parking an invoice,

you can hold the data you have already entered, such as the list field selections, header data, and item data.

The system creates an invoice document but does not make any checks, updates, or postings.

2.- Parking Invoice Documents ->

The following updates are to take place:

Log of document changes

Informative purchase order history

Data for advance tax returns

Index for checking for duplicate invoices

Vendor open items

Vendor open items for parked documents

3.- Saving Invoice Documents as Complete

The following updates take place at the time of posting:

Document changes

Purchase order history

Data for advance tax returns

Index for checking for duplicate invoices

Vendor open items

Vendor open items in parked documents

Purchase order commitments

Controlling documents

Funds management documents

4.- Posting Invoice Documents ->

The following updates take place at the time of posting:

Document changes

Purchase order history

Data for advance tax returns

Index for checking for duplicate invoices

Vendor open items

Purchase order commitments

Controlling documents

Funds management documents

Accounting documents

Material valuation

Best regards.

Edited by: Pablo Casamayor on May 28, 2010 3:32 PM

2 REPLIES 2

former_member182371
Active Contributor
0 Kudos

Hi,

according to documentation of BAPI_INCOMINGINVOICE_PARK :

You use this method if information on posting an invoice document is missing in the invoice document;

the balance can be a value other than zero.

As in the online transaction, the following updates take place,

for example informative PO history, advance tax return, index for check on duplicate invoices,

open vendor items from parked documents, log of document changes.

according to Help button in MIR7 transaction:

1.- Holding Invoice Documents ->

If you are interrupted while entering or parking an invoice,

you can hold the data you have already entered, such as the list field selections, header data, and item data.

The system creates an invoice document but does not make any checks, updates, or postings.

2.- Parking Invoice Documents ->

The following updates are to take place:

Log of document changes

Informative purchase order history

Data for advance tax returns

Index for checking for duplicate invoices

Vendor open items

Vendor open items for parked documents

3.- Saving Invoice Documents as Complete

The following updates take place at the time of posting:

Document changes

Purchase order history

Data for advance tax returns

Index for checking for duplicate invoices

Vendor open items

Vendor open items in parked documents

Purchase order commitments

Controlling documents

Funds management documents

4.- Posting Invoice Documents ->

The following updates take place at the time of posting:

Document changes

Purchase order history

Data for advance tax returns

Index for checking for duplicate invoices

Vendor open items

Purchase order commitments

Controlling documents

Funds management documents

Accounting documents

Material valuation

Best regards.

Edited by: Pablo Casamayor on May 28, 2010 3:32 PM

0 Kudos

Hi,

this is a continuation of the above answer:

How should I change my code to make the park document can display local amount data?

if you park the document by means of bapi or MIR7 you just update the Informative purchase order history .

if you want to update Purchase order history you have to save the document as complete.

Regarding this:

another question is what value should I input to i_in_item-sheet_no & sheet_item?

Are these two field required?

Have a look at the example (Example: Incoming invoice for a purchase order for external services and service-based invoice verification) in the documentation of fm BAPI_INCOMINGINVOICE_PARK.

Best regards.

Edited by: Pablo Casamayor on May 28, 2010 3:39 PM