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