Problem in Document parking through BAPI_ACC_DOCUMENT_POST
Hi,
I am trying to park the document using FM BAPI_ACC_DOCUMENT_POST or FM BAPI_ACC_GL_POSTING_POST.
Here I am making use of the BADI ACC_DOCUMENT to pass the value '2' to C_ACCHD-STATUS_NEW ( C_ACCHD-STATUS_NEW = '2') by which it should actually park the document.The process is successfull where i am getting the message like "document posted successfully " and document number generated but I could not see the document through FBV1 or FB01. Can anyone please through some light on this. Thanks in Advance.
Hi Sarath,
I have done this let me tell you the approach.
Step 1: you should implement the BTE RWBAPI01.
Step 2: Pass value '2' to DOCUMENT_HEADER-STATUS_NEW of the changing parameter of BTE. Now the document will get parked successfully. Please find the sample code.
TABLES: bsik.
DATA: w_doc_header TYPE bapiache09,
t_accountreceivable TYPE TABLE OF bapiacar09,
w_accountreceivable TYPE bapiacar09,
t_accountpayable TYPE TABLE OF bapiacap09,
w_accountpayable TYPE bapiacap09,
t_accounttax TYPE TABLE OF bapiactx09,
w_accounttax TYPE bapiactx09,
t_currencyamount TYPE TABLE OF bapiaccr09,
w_currencyamount TYPE bapiaccr09,
t_extension2 TYPE TABLE OF bapiparex,
w_extension2 TYPE bapiparex,
t_extension1 TYPE TABLE OF bapiacextc,
w_extension1 TYPE bapiacextc,
t_accountgl TYPE TABLE OF bapiacgl09,
w_accountgl TYPE bapiacgl09,
w_accountgl_1 TYPE bapiacgl09,
t_return TYPE TABLE OF bapiret2,
w_lineitems TYPE zst_vendor_items,
w_return TYPE bapiret2,
l_amount TYPE char18,
t_bsik TYPE TABLE OF bsik,
w_bsik TYPE bsik,
l_dmbtrp TYPE bapidmbtr,
* l_result TYPE bapidmbtr,
l_dmbtrn TYPE bapidmbtr,
l_result TYPE bapidmbtr,
lv_type TYPE bapiache09-obj_type,
lv_key TYPE bapiache09-obj_key,
lv_sys TYPE bapiache09-obj_sys,
l_fiyrs TYPE budat,
l_fiyrt TYPE allgstid,
l_index TYPE sy-index,
l_belnr TYPE belnr_d,
l_datum TYPE bapi3007-key_date,
l_message TYPE char20,
l_postingdate TYPE budat,
l_docdate TYPE budat,
l_glacno TYPE hkont,
lv_pos TYPE posnr_acc,
l_lifnr TYPE lifnr VALUE '10089',
l_counter TYPE posnr_acc VALUE '0000000001',
l_costcenter TYPE kostl,
l_date TYPE char2,
l_month TYPE char2,
l_year TYPE char4.
*---Fill GL details-----*
CLEAR: w_accountgl,w_doc_header,w_accountpayable,
w_currencyamount, l_dmbtrp,l_dmbtrn,lv_type,lv_key,lv_sys,
e_message,w_lineitems,l_year,l_month,l_date.
REFRESH: t_accountgl[],t_accountpayable[],t_currencyamount[],
t_extension1[],t_return[].
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = i_vendor
IMPORTING
output = l_lifnr.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_lineitems-glacno
IMPORTING
output = l_glacno.
SPLIT i_postingdate AT '-' INTO l_year l_month l_date.
CONCATENATE l_year l_month l_date INTO l_postingdate.
* l_postingdate = i_postingdate.
CLEAR: l_year,l_month,l_date.
SPLIT i_docdate AT '-' INTO l_year l_month l_date.
CONCATENATE l_year l_month l_date INTO l_docdate.
* l_docdate = i_docdate.
*---Fill Header details-----*
w_doc_header-bus_act = 'RFBU'."'RMRP'.
w_doc_header-obj_type = 'BKPFF'."'REACI'."'VBRK'.
w_doc_header-obj_key = '$'.
w_doc_header-obj_sys = 'T90CLNT090'.
w_doc_header-username = sy-uname.
w_doc_header-header_txt = i_hdrtext."'Vendor Invoice '.
w_doc_header-comp_code = i_compcode."'3000'."p_bukrs.
w_doc_header-doc_date = l_docdate.
w_doc_header-pstng_date = l_postingdate." l_postingdate.
w_doc_header-doc_type = i_doctype."'KR'.
w_doc_header-ref_doc_no = i_reference."'KR'.
*---Fill Vendor details---------*
w_accountpayable-itemno_acc = '0000000001'.
w_accountpayable-vendor_no = l_lifnr.
w_accountpayable-comp_code = i_compcode."'3000'."p_bukrs.
w_accountpayable-pymt_meth = i_payment_method."'T'.
w_accountpayable-pmnttrms = '0002'.
APPEND w_accountpayable TO t_accountpayable.
*------Segregating Positive and Negative Amounts---------------------*
w_currencyamount-itemno_acc = '0000000001'. " gl accou +ve 40
w_currencyamount-currency_iso = i_currency."'USD'.
w_currencyamount-amt_doccur = i_amount * -1."500.
APPEND w_currencyamount TO t_currencyamount.
w_extension1-field1 = '000000000131'. "gl psokey
APPEND w_extension1 TO t_extension1.
LOOP AT t_lineitems INTO w_lineitems.
CLEAR: w_accountgl,w_accountgl_1,l_costcenter.
l_counter = l_counter + 1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_lineitems-glacno
IMPORTING
output = l_glacno.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_lineitems-costcenter
IMPORTING
output = l_costcenter.
w_accountgl-itemno_acc = l_counter."'0000000001'.
w_accountgl-gl_account = l_glacno."'0000113100'.
w_accountgl-item_text = i_hdrtext."'Test'.
w_accountgl-comp_code = i_compcode."'3000'."p_bukrs.
w_accountgl-value_date = l_postingdate.
w_accountgl-pstng_date = l_postingdate.
w_accountgl-doc_type = i_doctype."'KR'.
w_accountgl-segment = w_lineitems-segment."'SERV'.
w_accountgl-partner_segment = w_lineitems-partnerseg.
w_accountgl-cs_trans_t = w_lineitems-transtype.
w_accountgl-costcenter = l_costcenter."'0000000328'.
w_accountgl-fis_period = l_postingdate+4(2).
w_accountgl-fisc_year = l_postingdate+0(4).
APPEND w_accountgl TO t_accountgl.
IF w_lineitems-credit = 'H'.
w_currencyamount-itemno_acc = l_counter."'0000000002'.
w_currencyamount-currency_iso = i_currency."'USD'.
w_currencyamount-amt_doccur = -1 * w_lineitems-amount. "500. " vendor -ve 31
APPEND w_currencyamount TO t_currencyamount.
CONCATENATE l_counter '50' INTO w_extension1-field1 .
APPEND w_extension1 TO t_extension1.
ELSE.
w_currencyamount-itemno_acc = l_counter."'0000000002'.
w_currencyamount-currency_iso = i_currency."'USD'.
w_currencyamount-amt_doccur = 1 * w_lineitems-amount. "500. " vendor -ve 31
APPEND w_currencyamount TO t_currencyamount.
CONCATENATE l_counter '40' INTO w_extension1-field1 .
APPEND w_extension1 TO t_extension1.
ENDIF.
CLEAR : w_currencyamount,w_lineitems,w_accountgl.
ENDLOOP.
* w_extension1-field1 = 'PARK' .
* APPEND w_extension1 TO t_extension1.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
EXPORTING
documentheader = w_doc_header
TABLES
accountgl = t_accountgl
accountpayable = t_accountpayable
currencyamount = t_currencyamount
extension1 = t_extension1
return = t_return.
REFRESH: t_return[].
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = w_doc_header
IMPORTING
obj_type = lv_type
obj_key = lv_key
obj_sys = lv_sys
TABLES
accountgl = t_accountgl
accountpayable = t_accountpayable
currencyamount = t_currencyamount
extension1 = t_extension1
return = t_return.
READ TABLE t_return INTO w_return WITH KEY type = 'E'.
IF sy-subrc <> 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
CLEAR: l_message.
CONCATENATE 'Vendor Invoice' lv_key+0(10) 'Created' INTO e_message
SEPARATED BY ''.
ELSE.
READ TABLE t_return INTO w_return INDEX 2.
e_message = w_return-message.
ENDIF.
Similar Messages
-
How to do collective/mass posting of documents parked through T-code: MIR7
Hello,
I just want to know if we can do collective posting of documents parked through T-code: MIR7 (Invoice Verification)? If yes, please give me the T-code and teach me how to do it. Right now, we can do mass posting for the direct FI documents only (T-code: FBV0). I tried it several times for documents parked through T-code: MIR7, but the system always prompts an error message saying that "Document cannot be posted since
document balance is not zero". But when I display and post the document one by one the system allows me to do so. Then I thought that maybe because it was created in logistics, mass/collective posting should be done under logistics also.
Thanks & Best Regards,
OdetteI could not see any such mechanism in MIR7. It is not possible to post them in mass. (logistic invoices)
Whereas FI as you said can be done in FBV0. You can even create batch and post through SM35.
Regards,
Ravi -
Documents parking through Enjoy FV60
Hi,
I have to park some documents through Enjoy transaction FV60, and some through FBV1. As I'm using IDOC INVOIC for this interface, I figured out that this IDOC is usingBAtch-Input on FBV0 and with help of implicit enhancement, just before posting, I changed vbkpf-tcode from FBV1 to FV60 for some documents.
This really has influence on documents, and is just what I needed, that some documents are parked through enjoy transaction. I know this is not SAP standard way, and I shouldn't do it this way, but is only way I could find. What is your opinion? What exactly is the difference between FBV0 and FV60 and how can I make FV60 able for interfaceing?
br
marioPlease note that FV60 is for the Park vendor invoice, whereas the FBV1 is general park document t-code. Thus FV60 will not allow to park any document involving customer line items, where as through FBV1 you can park any combination of line items.
The difference is the same as F-43 and F-02.
Also note that FBV0 is for posting the parked documents.
Ideally, if you are trying to park only the vendor invoice, use t-code FV60 or F-63
Regards,
Mamta Sarda -
Non PO documents parked in FV60 cannot be posted through FBV0.
Hi,
I am trying to post a document parked through FV60 in FBV0 Tcode, but the system says that the document is already posted in that compnay code even though it is in parked condition.. I tried posting some other parked documents but the system is showing the same error. It is only happening to documents parked through FV60. The documents parked though FV50 can be posted.
Can anybody help me solve this issue.
Thanks,
Vardhana Reddy.Please check the database of deriving the actual state of the document.
Check the table VBKPF and VBSEG whether the entry is there in the database of not.
Unless and until we get to know the state of document at the data base level , it would be difficult to comment.
Cheers,
Dewang -
Problem with document type on WF for parking document
Hello
Iu2019m actually working on the SAP workflow dealing with the FIPP object and the event u201Ccreatedu201D (FI park document transaction (FV60)).
The problem is that the WF is launched for all document types wich is not the need of the customer. Iu2019m looking for a solution to launch the WF for some specific document types.
Iu2019ve already tried to use the workflow variant, approval groups, paths and procedure with no success. (SPRO -> financial accouting-> accounts receivable and accounts payable -> business transaction -> incoming credit invoice memo -> make and check setting for document parking)
Thank you for help.
SLHere is the solution I have eventually found :
1- Application of the OSS note 559276 which enables the customizing of the workflow variant (the transaction OBWD becomes here effective)
2- Assignment of the documents types, workflow variants and release approval groups with the transaction OBWD.
Therefore, the document types that are not defined in the transaction OBWD will not require validation (no workflow will be launched).
SL -
Error in Posting the Entry, Parked through F-02
In our company we are using dual concept of Parking and Posting.
When We are parking a document in F-02 and Posting it through FBV0 (OR) FV60 error message coming.
I tried in F-43 also
We are trying to park and post for a Vendor to Vendor Transfer. We have used the P.Keys 25 and 38 for this.
ERROR MESSAGE IS : FIELD BSEG-SKFBT does not exist in the screen SAPMF05A0302
But if directly post the same transaction (i.e. without parking) posting is happening. No error message.
I cannot able to understand this. I referred the same to some of my friends in other companies. But they are saying that - in their systems they can able to park and post the entries.
Can any body help me in the matter. I will be grateful to them.
Thanks in Advance
RegardsYes It is possible. After entering all the line items you need to select the Document - Park. With this It can be parked.
To post the same you have to use FBV0. There you can select the document and post.
In my case system allowed direct postings in F-02. It is also allowing when I am parking the same line items. But when I want to post it through FBV0 it is throughing an error. This is because the mismatch of Filed Status Group of Vendor Recon Account and the Posting Keys(i.e. 27 & 38). I made them correct and now I can able to solve the problem.
Hope I clarified your doubt. If not please revert back. -
Error in documents parking and posting
Hello,
After I parked the document of vendor payment using F-65 , While I validate and post the documents using FBV0 I met a error as following:
" Formatting error in the field BSEG-PRCTR; see next message
Message no. 00298
Diagnosis
During batch input or when executing CALL TRANSACTION... USING a screen field was filled with an invalid input format.
System Response
Processing was terminated.
Procedure
The screen field has the technical name BSEG-PRCTR . The cause of the error is described in the following message.
Correct the appropriate BDC data."
How can i add the field profit center in F-65 of in FBV0 while posting the parked document ?
ThanksHi Tarek
at first please check field status transaction with OB14, OB41.
Please also check in transaction OBC4 for the relevant field status variant and the relevant field status group in "Additional account assignments" that "Profit center is not set as required.
do you have an asset line inside the document ?
When a classicaly parked document or a document parked by the complex posting via ENJOY is posted, a CALL TRANSACTION USING is run through. It can be compared with a batch-input session in the background.
If a document is parked with an asset line, it might be that in the asset line account assignments were derived by parking the document, although they are not open for entry. For making sure, that the CALL TRANSACTION USING is not failing for such lines, the settings of the asset accounting have to be disregarded and the fields have to be opend.
Then only the fieldstatus of posting key and G/L account are regarded. Since the fieldstatus of PRCTR is defined as required, the posting fails. If it was optional, everything would have worked properly.
Kindly revise your field status customizing
Kind Regards
davide -
Problem on Posting Parked Invoices during MIRO
Hi SAP Gurus!
Good day! I'm experiencing a problem during posting Parked Invoices thru MIRO. First I've parked invoices thru MIR7, then when I go to MIRO to post the invoices, the Parked Invoices are not reflected in the "Worklist". What is the possible problem here?
Hope you can help! Thank you.
MikHi Gurus!
Thanks for the input, but I want the parked documents to be reflected in the posting of invoices (MIRO).
Actually, in both DEV and QAS servers, the parked invoices are reflected, but in PROD server it is not reflected. I don't know what happened. Can you please help.
Thank you.
Mik -
Issue in posting a accounting document using BAPI BAPI_ACC_DOCUMENT_POST
Hi All,
I 'm able to post a document using BAPI ' BAPI_ACC_DOCUMENT_POST ' but the problem i face is the header text is not getting updated for the document that is getting posted. Even though i'm populating the header text in the parameters i'm passing to the BAPI.
Any pointers to this would be highly appreciated.
Regards,
ChaitanyaHi,
put a break in subroutine FORM fill_acchd
and execute the bapi.
Here you have:
CLEAR gs_acchd.
MOVE-CORRESPONDING gs_aw TO gs_acchd.
gs_acchd-usnam = gs_bapi_acchd-username.
gs_acchd-awsys = gs_bapi_acchd-obj_sys.
gs_acchd-bktxt = gs_bapi_acchd-header_txt."---->¡¡¡CHECK THIS!!!
gs_acchd-glvor = gs_bapi_acchd-bus_act.
gs_acchd-tcode = sy-tcode.
gs_acchd-acc_principle = gs_bapi_acchd-acc_principle.
Check if there is something wrong there.
Best regards -
Problem in creating IR through BAPI_INCOMINGINVOICE_create BAPI
Hi,
Some problem in creating IR through the BAPI BAPI_INCOMINGINVOICE_create. I am able to see the IR number after executing the BAPI but unable to see the IR number in the table. The IR number is not getting updated in the database table even though we are doing the commit work after executing the BAPI. Could anyone help me out with this error.
Regards,
RamFirst of all I am assuming that you did not get any error in the BAPI return structure (even though you see document number populated).
Secondly, I guess you tested the BAPI with SE37 and did not get any error (functionally there are a number of BAPIs available to post an invoice and it is important to figure out the correct BAPI - e.g. PO, non-PO invoice, invoice as a GL entry only, etc.).
If that is not true (there is some error in posting), since during the BAPI call the next document number is obtained as a first step, you will see the document number but subsequently if for some reason it is not posted, you will see the result as you mentioned (no data in the database).
If you are using correct BAPI and have no errors, then in ABAP program make sure to call 'BAPI_TRANSACTION_COMMIT' after the BAPI call to post invoice.
For non-SAP external system, you need not have to call the commit BAPI but just closing the connection to SAP will help. -
Issue with Document Parking - Uplaod program
Dear All,
We need to develop a program to enter FI documents in parked status as a bulk upload.
We have two problems that we are unable to address
1We have activated five COPA fields which does not get captured in the standard BAPI.- how can we populate these fields?
2 The standard BAPI for document parking does not validate the required fields. However, the requirement is to validate and park a complete document. we are trying to do a validation by checking with the Standard Filed Status group , for which we were not able to find the table for fields that are assigned to the field status group.
Please help us and do let us know if there is any other way that we can validate and populate all required fields.
Thank you
WarunaHi,
Please refer this link :
How to interpret T004F field status assignments
& revert back.
Regards,
Pramitha. -
Dear All,
I have problem adding an invoice through DI API with the total amount of 50,000 including VAT. The system is SBO 2005B, PL42; Document Setting is as following:
- Rounding Method = By Document
- Rounding Rule for Tax = Round Down
- Round Tax Amount in Rows = False
The following VBA code is used to add an invoice:
Dim boInv As SAPbobsCOM.Documents
Dim boCom As SAPbobsCOM.Company
Set boCom = GetSboCompany() 'this function returns SBO company
Set boInv = boCom.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
boInv.CardCode = "Customer1"
boInv.DocDate = #9/1/2008#
boInv.DocType = dDocument_Items
boInv.DocCurrency = "JPY"
'Now add a invoice line
'boInv.Lines.Add - No need for the first line
boInv.Lines.ItemCode = "item1"
boInv.Lines.VatGroup = "S01" 'VAT rate for Japan is 5%
boInv.Lines.PriceAfterVAT = 50000
boInv.Add 'add the invoice
What I get is an invoice with:
Gross Price = 50000 (in a line)
Total (LC) = 47619 (in a line)
Tax Amount = 2380.952381 (in a line)
and
Total Before Discount = 47619 (in a header)
Tax = 2380 (in a header; fractional part was round down because of the Document Setting)
Total = 49999 (in a header; which is different from Gross Price by 1 yen)
However, if I enter this invoice directly from the screen, then there will be no difference between Gross Price (Price after VAT) and Total, so, the invoice will be created correctly.
My question is how to add an invoice with the total amount of 50000? (Of course, 50000 is not the only "difficult" number, for example, 40000 also poses the same problem). I tried to use boInv.Lines.NetTaxAmount property to directly assign the tax amount (which is possible from the SBO screen), but in PL42 there's an error saying that this property is not yet implemented.Verner, thank you for advice. I also tried that way, but wasn't helpful. OK, I found a solution that is I think acceptible. I will describe it in short, for those who face such problem. Basic idea is to use XML to create an invoice. Here's the code:
Dim boInv As SAPbobsCOM.Documents
Dim boCom As SAPbobsCOM.Company
Dim strXML As String
Set boCom = GetSboCompany() 'this function returns SBO company
'XML data will be supplied as string variable, not an external file
gboCom.XMLAsString = True
'Here you will create your XML stream. Important tags are <DocTotal> for the invoice header, and
'<Quantity>, <PriceAfVAT> tags for invoice lines. If <DocTotal> is specified then you will get invoice with
'this exact total amount. If sum of <Quantity> x <PriceAfVAT> is equal to '<DocTotal>, then
'document level discount will be zero.
strXML = "<BOM> ... </BOM>" 'building XML here
Set boInv = gboCom.GetBusinessObjectFromXML(strXML, 0) 'Create an invoice object from XML
boInv.Add 'add the invoice
Edited by: Jandos Khalik on Sep 2, 2008 10:17 AM
Edited by: Jandos Khalik on Sep 2, 2008 10:18 AM
Edited by: Jandos Khalik on Sep 2, 2008 10:20 AM -
Bussiness Place (BUPLA) in documents posted through REFX
Dear All,
The bussiness place is not getting updated in documents posted through REFX, even though their is a option to assign Section Code (SECCO) in Bussiness Entity Master data (from T.Code REBDBE) their is no feild available to assing the bussiness place. So do anybody have any solution to populate the bussiness place in documents while posting through REFX.
Regards
JKT.Hi,
Business place has to field by manually. But if you want you can restrict through Validation and substitutions. here what we are doing maintaing both section code and business place. what substitution we are created so far here when section code this one then business place is this. like that we are created.
Depend upon configuration you might be create any validation.
Hope this is clear, if yes assign points. Any problem revert me.
Regards,
Sankar -
When I try to send a document out through my e-mail, it does not open for me to send e-mail. This was never a problem it seems until last Pages update. What do you recommend?
We are not mind readers.
What version of Pages (don't say latest), and version of OS X? -
Problem with documents on iCloud.
I have a problem with documents on iCloud, I can`t use it with Pages on Mac and iOS too, Pages not view any documents and can not approach to save documents and not save new documents to iCloud. Any idea?
Thank you for help.Hello,
Winston and Shayari,
I have also faced this problem with document on iCloud, I couldn't saved the documents to iCloud,
But I found this article problem posted by Hindi love Shayari San and I found the solution this way:
I signed out, then singed in again renabled the iCloud and it works.
I could do this with the instructions of Winston told to Shayari.
Well, a big thanks from my side.
Veena
Maybe you are looking for
-
Itunes files won't show up in the menu
to import music into a movie, i found out that the dropdown menu only shows me as available, the preinstalled Apple audio effects and short audio files in iMovie. How do i make other forlders and itunes files available to imovie? imovie 11 mac osx 10
-
Accessing My Old Page With iWeb
I have put up a website using iWeb on a .mac account:: web.mac.com/jupiterspaceport But I a while back had to clear my disk and re-install the whole system. Ever since then I cannot get back to my page using iWeb. For when I start it up the program a
-
I used to be able to put a memory stick in (USB), it wouldj show up on my desktop and then I could drag pictures onto it and save them. Now....when I put a stick in, it just shows up in finder as a device and I can't drag anything to it. What have
-
Hi, I'm on a fully updated (inc. latest systemd), networkmanager based, Arch-X86-64/KDE system. The system is connected to the router via eth1 (r8169). After boot, I have no net connection (see below), yet, I do get connected, once I issue the "ip li
-
How to install Safari 3.2 to replace Safari 4?
In an effort to regain URL Snapback, I've tried to reinstall Safari 3.2 on both my Leopard MBP and my wife's Tiger MBP, but when I get to the location page, my internal drive is disallowed. I tried putting Safari 4 in the trash, along with all of its