‎2008 Jan 21 1:23 AM
Hi all,
I need to park a document using FB60 tansaction. I need to use BAPI to do the job. Which BAPI can i use to park the document?
When the document is park, how do i know the status? Which database table stored the information that is pass via BAPI?
Please Advice. Thanks
Regards,
Rayden
‎2008 Jan 21 1:37 AM
Hi Rayden,
You can try to do this with the standard BDC program RFBIBL00 - you need a shell program to submit this though. I suggest you read the program documentation within...as far as I remember its well documented.
The other option is to try using BAPIs - BAPI_ACC_DOCUMENT_POST, BAPI_INCOMINGINVOICE_CREATE.
Hope this helps,
Cheers,
Sougata.
‎2008 Jan 21 1:36 AM
Use BAPI_INCOMINGINVOICE_PARK
Import parameters HEADERDATA is mandatory in BAPI_INCOMINGINVOICE_PARK .
Also tables ITEMDATA and RETURN are mandatory.
Check the following sample code
***************************************************************************************
LOOP AT i_ekbe INTO wa_ekbe.
CLEAR: wa_invoice_header,
i_invoice_item,
i_return,
v_inv_doc_no,
v_fisc_year,
wa_return.
REFRESH: i_invoice_item,
i_return.
Appending Invoice header Work Area
wa_invoice_header-invoice_ind = c_x.
wa_invoice_header-doc_date = sy-datum.
wa_invoice_header-pstng_date = wa_ekbe-budat.
wa_invoice_header-comp_code = c_100.
wa_invoice_header-gross_amount =
wa_invoice_header-currency = c_usd.
wa_invoice_header-calc_tax_ind = c_x.
Appending Invoice item data
i_invoice_item-invoice_doc_item = '0001'.
i_invoice_item-po_number = wa_ekbe-ebeln.
i_invoice_item-po_item = wa_ekbe-ebelp.
i_invoice_item-tax_code = ' '.
i_invoice_item-item_amount = '20.00'.
i_invoice_item-quantity = '10.000'.
i_invoice_item-ref_doc = '5600000634'.
i_invoice_item-ref_doc_year = '2006'.
i_invoice_item-ref_doc_it = '10'.
i_invoice_item-po_unit = 'EA'.
i_invoice_item-COND_TYPE = 'VPRS'.
APPEND i_invoice_item.
Calling module BAPI_INCOMINGINVOICE_PARK
CALL FUNCTION 'BAPI_INCOMINGINVOICE_PARK'
EXPORTING
headerdata = wa_invoice_header
ADDRESSDATA =
IMPORTING
invoicedocnumber = v_inv_doc_no
fiscalyear = v_fisc_year
TABLES
itemdata = i_invoice_item
NFMETALLITMS =
ACCOUNTINGDATA =
GLACCOUNTDATA = i_gla
MATERIALDATA = i_mat
TAXDATA =
WITHTAXDATA =
VENDORITEMSPLITDATA =
return = i_return.
READ TABLE i_return INTO wa_return
WITH KEY type = c_e.
IF sy-subrc EQ 0.
ENDIF.
ENDLOOP.
****************************************************************************************
Hope this helps
Vinodh Balakrishnan
‎2008 Jan 22 8:49 AM
Hi Vinodh Balakrishnan,
Thanks for the reply. So after using the BAPI to park the document, where can i find the information stored? Any physical database that store the parking information?
Is there any link or material that i can look at on FB60, like how it work and where all the information is stored?
Regards,
Rayden
‎2008 Jan 21 1:37 AM
Hi Rayden,
You can try to do this with the standard BDC program RFBIBL00 - you need a shell program to submit this though. I suggest you read the program documentation within...as far as I remember its well documented.
The other option is to try using BAPIs - BAPI_ACC_DOCUMENT_POST, BAPI_INCOMINGINVOICE_CREATE.
Hope this helps,
Cheers,
Sougata.
‎2008 Jan 22 8:52 AM
Hi Sougata,
What the different between the BAPIs that you have mention (BAPI_ACC_DOCUMENT_POST & BAPI_INCOMINGINVOICE_CREATE).
By the way, do you have any idea, when i park the invoice, where can i see my parked invoice? Is there any physcial database that store the information of the parked invoice?
Regards,
Rayden
‎2008 Jan 22 10:22 AM
Rayden,
For parked invoices the accounting document will have only the vendor line items and not the other line items (S OR M). Only after posting the invoice you will have those line items populated.
You can get the data from RSEG, RBCO..
Similarly Parked Status can be retrieved from VBSEG and RSEG.
Hope this helps
Vinodh Balakrishnan
‎2013 Dec 10 8:45 AM