‎2010 Aug 06 7:58 AM
Dear all
I have to park a FI Document . For that I found a BAPI PRELIMINARY_POSTING_FB01 . But i am not able topark the document successfully. Can anyone gimme the MANDATORY inputs for that BAPI.
Or is there anyother BAPI for parking the FI Document??
Help me to solve this issue.
Thanks and Regards
Karthikeyan
‎2010 Aug 06 8:10 AM
Hello ,
try to make use of FM POSTING_INTERFACE_DOCUMENT and see its documentation to know how to use it.
regards
Prabhu
‎2010 Aug 06 8:12 AM
Try to use the Function module "PRELIMINARY_POSTING_FB01" to just park the doc as of FB01.
‎2010 Aug 06 8:42 AM
Hi Venkat
Can u temme the input for the FM ?
Give me the mandatory parameters .
Thanks and Regards
Karthik
‎2010 Aug 06 9:13 AM
‎2010 Aug 06 9:57 AM
Hi,
A sample code
CALL FUNCTION 'PRELIMINARY_POSTING_FB01'
EXPORTING
text_update = text_xupd
text_item_update = i_item_texts
i_uf05a = i_uf05a
i_xcmpl = i_xcmpl
fs006_fb01 = i_fs006
i_tcode = t020-tcode
i_tcode_int = tcode
i_pargb = i_pargb
IMPORTING i_belnr = wa_doculist-belnr
TABLES: t_bkpf = xbkpf
t_bseg = xbseg
t_bsec = xbsec
t_bset = xbset
t_bsez = xbsez
t_bkorm = xbkorm.
inwhich only the table fields
TABLES: t_bkpf = xbkpf
t_bseg = xbseg
t_bsec = xbsec
t_bset = xbset
t_bsez = xbsez
are mandatory and by default the tcode will be 'FB01'. If you are facing any specific issue, then just point out that with the code so that we can provide you the exact solution.
Regards,
Selva K.
‎2010 Aug 07 6:36 AM
Hi Selva Kumar
Only for the BKPF and BSEG tables , We are passing the values. But when i execute the BAPI , we r getting the error as
'' Atleast sending company code must have one line item".
If you send me the exact inputs you are passing to get the parked document , it will be very useful.
Thanks
Karthik
‎2010 Aug 09 11:15 AM
‎2011 May 25 2:22 PM
Hi Selvan,
Even after passing all the mandatory fields in BKPF & BSEG, we are facing the error
"at least one line item from the sending company code"
We are passing the entry Debit vendoor , Credit Vendor using t-code F-63 for transferring the vendor balances ,.
please help.
regadrs
Jaya
‎2010 Aug 06 9:21 AM
Hi Karthikeyan,
Check the BAPI
BAPI_INCOMINGINVOICE_PARK
I wanted to update this thread with some helpful information for others that are facing or migh come across a similar scenario in the future.
I found that the BAPIs for posting and parking invoices do not change based upon whether the invoice has a PO or not.
The same BAPIs are used for posting and parking invoices regardless of whether there is a PO or not.
BAPI_INCOMINGINVOICE_PARK and BAPI_INCOMINGINVOICE_POST are the two BAPIs to use in both PO and non-PO scenarios.
If you examine them you will notice that they are very "deep" and can be used for even some fairly complex and advanced purposes in this context.
Ofcourse, in both scenarios (PO, Non-PO), the tables/fields of the function modules that need to filled when invoking the BAPI differ.
At the minimum: in the case of POs, you need to fill out the Header and the Item Details tables and in the case of non-PO you need to fill out the Header and GL Account tables.
Ofcourse, you can look into the structures behind these tables in the FM and ascertain which fields are mandatory and which aren't.
In some cases, you can even park an invoice with only Header data by using the FM 'BAPI_INCOMINGINVOICE_PARK'.
To do this though you need to refer to OSS Note# 579939.or
Use BAPI_ACC_GL_POSTING_POST
or userexit EXIT_SAPLACC4_001.
In table T_ACCIT, you can set BSTAT to 'V'.Possible values for BSTAT:
Normal document
A Clearing Document
B Reset clearing document
D Recurring entry document
M Sample document
S Noted items
V Parked document
W Parked document with change of document ID
Z Parked document which was deletedEdited by: Raj on Aug 6, 2010 2:23 PM
Edited by: Raj on Aug 6, 2010 2:24 PM
‎2010 Aug 09 11:15 AM
‎2010 Sep 08 3:20 AM
Hello, I have the similar problem, "At least one line item of the sending company code must exist".
Can you please teach me how to solve this problem?
Thanks.
‎2010 Sep 08 7:22 AM
Header-username = sy-uname.
Header-comp code = '1000'.
Header-fisc_year = sy-datum+0(4).
Header-doc_date = sy-datum.
Header-pstng_date = sy-datum.
Header-fis_period = sy-datum+4(2).
Header-doc_type = 'SA'.
accountgl-itemno_acc = '1'.
accountgl-gl_account = '0000115510' .
accountgl-comp_code = '1000'.
accountgl-pstng_date = sy-datum.
accountgl-doc_type = 'SA'.
accountgl-fisc_year = sy-datum+0(4).
accountgl-fis_period = sy-datum+4(2).
APPEND accountgl.
CLEAR accountgl.
loc_cnt = 1.
loc_cnt = loc_cnt + 1.
accountgl-itemno_acc = loc_cnt.
accountgl-gl_account = '0000601900' .
accountgl-comp_code = '1000'.
accountgl-pstng_date = sy-datum.
accountgl-doc_type = 'SA'.
accountgl-fisc_year = sy-datum+0(4).
accountgl-fis_period = sy-datum+4(2).
accountgl-costcenter = u201813100u2019.
APPEND accountgl.
CLEAR accountgl.
currencyamount-itemno_acc = u20181u2019.
currencyamount-currency = 'USD'.
currencyamount-amt_doccur = loc_amt. ( For Debit / u2018Su2019)
APPEND currencyamount.
CLEAR currencyamount.
currencyamount-itemno_acc = u20182u2019.
currencyamount-currency = 'USD'.
currencyamount-amt_doccur = ( -1 ) * ( loc_amt ). ( For credit /u2018Hu2019)
APPEND currencyamount.
CLEAR currencyamount.
extension1-field1 = 'BAPI-PARK'.
extension1-field2 = '1'.
APPEND extension1.
CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'
EXPORTING
documentheader = header
IMPORTING
obj_key = obj_key
TABLES
accountgl = accountgl
currencyamount = currencyamount
return = return
extension1 = extension1
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
Implement Customer Exit (CMOD) ACBAPI01, with Include Program ZXACCU15 of Component EXIT_SAPLACC4_001.
READ TABLE extension INDEX 1.
IF sy-subrc = 0 AND extension-field1 = 'BAPI-PARK'.
MOVE 2 TO t_acchd-status_new. " Park Document
Endif.
Regards
Karthik