Problems in Posting an Accounting Document using BAPI_ACC_DOCUMENT_POST

Hi All,
I am facing a problem when I try to post an accounting document using the BAPI "BAPI_ACC_DOCUMENT_POST".
While passing data to the structure "ACCOUNTTAX", I get the errors "Required field AMT_BASE was not transferred in parameter CURRENCYAMOUNT" and "Required field TAX_CODE was not transferred in parameter ACCOUNTTAX".
Till now I was not passing the ACCOUNTTAX structure to the BAPI and posting was happening fine.
Any pointers / solutions in this direction will be most helpful.
Thanks in advance.
Regards,
Keerthi

Hi
  As u told earlier it was fine , so it may there is some config. change done by func. so this error is coming.
  For minimum required fields fo BAPI , u can go to SE37 and click on Function Module Documentation on Application tool bar.
here u will find good help.
Regards
Sachin

Similar Messages

  • Problem in creating an account document using BAPI_ACC_DOCUMENT_POST

    Hi Experts,
    I have a porblem while creating an account document from BAPI_ACC_DOCUMENT_POST.
    The problem is acc document is geeting posted and I am getting an document number for that bapi, but its not getting saved to data base and I am getting the following error message
    "Document 1900004327 3000 does not exist in fiscal year 2005
    Message no. F5A397
    System Response
    The required document either does not exist in the fiscal year or is still being posted.
    When the document is read, archived documents are also considered."
    Please sugggest...
    We are using ECC 6.0
    Thanks,
    Suma.

    Hi,
    this means that the posting is not open...
    try with 2008...
    or else ask ur financial consultatto check, whether the 2005 is open or not.
    u also try posting manually using FB01 with same entries u r using for this BAPI...so that u can track the error.
    Also use BAPI_TRAACTION_COMMIT after bapi post.
    check ur subsystem which u r passing for the BAPI..
    wa_general-assetsubno = '0000'. Is it 3000 or 0000
    Try using 0...
    Edited by: Sumi Vasu on May 14, 2008 8:13 AM

  • 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,
    Chaitanya

    Hi,
    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

  • Posting an accounting document with material using BAPI (ver 4.6c)

    Hello!
    Can anyone help me out with this one please?
    I need to post an accounting document using BAPI.  Since the customer's SAP is 4.6c, the BAPI I found closest is BAPI_ACC_GL_POSTING_POST.
    The posting has 2 specific requirements:
    1.  For the Vendor item, the tax needs to be calculated; and
    2.  For the G/L items, the corresponding material/quantity needs to be entered
    So, my questions are:
    1.  How do you enable the "Calculate Tax" option, which is the Calculate Tax checkbox in F-02?
    2.  How do you enter the material and quantity for the G/L items?
    Thanks a lot!

    Hi,
    Before posting your document please check first whether this is reversal or not.
    please use BAPI_ACC_DOCUMENT_REV_CHECK to check reversal document
    Have a Nice Day,
    Regards,
    Sujeet

  • Validation of a reference field when posting accounting document using FB50

    Hi all,
    We hada requirement to restrict the users from entering japanese caharaceters in the reference field of a accounting document. The validation for this was done using the transaction OB28. when the user posts the accounting document using transaction FB01 or changes the accounting document using transaction FB02, the validation provided in OB28 does work(it throws an error restricting the user from entering japanese characters if he has done so). But whenthe user pots the accounting document using the transaction FB50, the same error message comes as information message although the coding is for giving an error message.
    This however does not happen when the user logs on in English. In English logon the error mesage does appear.
    When the user logs on in Japanese the message comes as an information message but at the same time does not allow posting of the document.
    Debugging this revealed that the OSS note 197329 has been applied to the standard SAP program SAPMF05A.
    Any pointers to how this can be rectifiied would be appreciated.
    Thanks in advance.

    I think it would be best if you opened an OSS message on this.
    Rob

  • Problem while Posting a Document Using BAPI_ACC_DOCUMENT_POST

    Hi All,
    When i try to post my General Ledger Document using BAPI_ACC_DOCUMENT_POST, i face a situation due to the exchange rate. The field EXCH_RATE in CURRENCYAMOUNT table accepts only 5 decimals. But according to my scenario it should accept more than 5 decimals. Is there any BAPI or other way to solve this issue.
    Thanks & Regards,
    Venkatesh. R

    We restricted our entry to five decimals and solved the issue.

  • Problem while posting to accounts.posting period  002 2010 not open

    Hi experts,
    Im facing problem while posting to accounting.
    I ran the live payroll run and  while posting im got the incorrect document.
    System is showing the error message that  ""Posting period 002 2010 is not open"""
    How we have to open the periods.
    Please advice.
    Vi Sai.,

    Hi vicky,
    Goto t-code OB52.
    Variant :Posting Period variant, Account Type : +, From Account : space, To Account : ZZZ..Z, From Period : 2,Year :2010, To Period :2, Year : 2010
    Save.
    Regards,
    Dilek

  • Urgent !!! How to change Accounting document using Billing document numb

    Hi experts,
    I have one requirement where I have to modify the accounting document using report. User will enter billing document no and I have to find out respective accounting document and change header data of it.
    I am very new to these modules so please give me solution.
    Thanks
    Sameer

    Hi
    Go to VF03- Display Billing document. From here you should be able to find the corresponding accounting document. Do note that there are only limited field such as text that is allowed to be changed once posted.
    Rgds
    Nadini

  • Reg:how to post the parked documents using BDC

    Duplicate message in General deleted.  Please do not post the same question in more than one forum.
    Hi
    I am creating parked Documents using FV50. I am able to check them using FBV0, I am able to select and post the documents using the same transaction. Its working fine. However I want to post the selected parked documents using BDC. I am having problems as the output in FBV0 is in ALV report format. HAving problems selcting the parked documents to be posted. As there any way to post the selected parked documents using BDC.
    Please suggest me a solution for this.
    Thanks,
    Satish
    Edited by: Matt on Dec 3, 2008 7:40 PM

    Hi Rob,
    Thank you for ur reply, can u send that code how u post the parked documents using BDC for FBV0 transaction.  Please send the code.
    Thanks,
    Satish

  • The user exit on the sap post the account document

    Dear all.
       I use the t-code mb01 or migo to receipt goods for purchase order.When I execute post or save,the sap generate the material document and the account document.The account documents have two item with account 12110000 and account 12010000.And I know this two account was configure in the t-code omwb.
       Now my company have a new requirement:
       When the sap generate the account documents,I need to write some code to do some judgement and change the account 12110000 to account 35510000 or other account.The logic of the code was complex and it's impossible to do in sap standard configure.So I want to find the user exit on the sap post the account document.In the user exit I would write some code to do some judgement and change the account 12110000 to account 35510000 or other account.
      But I can't found the user exit.So I need the experts to give me some reference.
    Regard
    Yoda

    Hi,
    You may use ZXF48U01 of EXIT_SAPLF048_001 of enhancement F180A001 for the same.
    Please note that control comes here for no of transactions hence you need to specifically check for sy-tcode, for which your 'exit' logic needs o be executed.
    I hope this helps,
    Regards
    Raju Chitale

  • Urgent !!! How to change Accounting document using Billing document number

    Hi experts,
    I have one requirement where I have to modify the accounting document using report. User will enter billing document no and I have to find out respective accounting document and I have to change header data..
    I am very new to these modules so please give me solution.
    Thanks
    Sameer

    Hi,
    Get a record from BKPF where
    AWTYP = 'VBRK' & AWKEY = VBRK-VBELN .Once you get the accounting header document you can always fetch item level records from BSEG where bukrs =bkpf-bukrs
    BELNR = BKPF-BELNR & GJAHR = BKPF-GJAHR.
    I hope this helps,
    Regards
    Raju chiatle

  • Excise value posting to account document

    Hello,
    I have an invoice type ZDWR ( Sales return without reference Invoice) in which I want the excise component (Condition Type) to be automatically get posted to Accounting Document when I save the invoice. I had made the changes in pricing control  where statistic is check marked and account key is "EXC". Is there any other changes in config  ???
    Pls advise ...
    Thanks in advance
    Regds,
    Dinesh Sawant

    Hello,
    This is already assigned (EXC) :
    ZDWRLR     100     0     ZWRR     WITHOUT REF PRICE                             
    ZDWRLR     109     0     ZMRP     MRP mat./batch wise                             
    ZDWRLR     110     0     UTXJ     Tax Jurisdict.Code                             
    ZDWRLR     120     0     JMOD     IN A/R BED                             
    ZDWRLR     130     0     JCES     IN A/R CESS                             
    ZDWRLR     131     0     JEX2     IN A/R BED     EXC     ED & Cess deflation     EXC
    ZDWRLR     132     0     JECX     IN A/R ECESS     EXC     ED & Cess deflation     EXC
    ZDWRLR     150     0     ZCRR     COPY BASIC PRICE                             
    ZDWRLR     160     0     ZWNV     SUB TOTAL VALUE 1     
    Regds,
    Dinesh Sawant

  • Problem when post G/L Document via BAPI_ACC_GL_POSTING_POST

    What I am doing is to post new G/L Accounting Document on each successfully paid transaction, each successfully reversed transaction, each rejected transaction for bank XXX, and each payment transaction for bank YYY in 3 Events respectively. And I am using the BAPI BAPI_ACC_GL_POSTING_POST to post.
    but in the return table there are error messages, the sample code is as follows:
    *& Get the OBJ_KEY of DOCUMENTHEADER *
    get the current fiscal year
       l_fiscyear = sy-datum(4).
    select the Number Range NO. out from T003
       select single numkr
          from t003
           into l_numkr
        where blart = 'SY'.
      if sy-subrc <> 0.
        message .
      endif.
    call FM to get the Accounting Doc. No.
      call function 'NUMBER_GET_NEXT'
        exporting
           nr_range_nr = l_numkr
               object      = ‘RF_BELEG’
          subobject      = ‘HKHK’
              toyear      = l_fiscyear
          importing
              number = p_belnr
          exceptions
            interval_not_found = 1
            number_range_not_intern = 2
            object_not_found = 3
            quantity_is_0 = 4
            quantity_is_not_1 = 5
            interval_overflow = 6
            buffer_overflow = 7
            others = 8.
    if sy-subrc <> 0.
    message
    endif.
    concatenate the Accountint Doc. No, the company code and the
    fiscal year together as the OBJ_KEY
    concatenate p_belnr ‘HKHK' l_fiscyear into lx_docheader-obj_key.
    &--Get OBJ_KEY end--
    get the OBJ_SYS
      select single logsys
                  from t000
                  into lx_docheader-obj_sys
                where mandt = sy-mandt.
    if sy-subrc <> 0.
    message
    endif.
    fill the structure parameter DOCUMENTHEADER of the BAPI
    lx_docheader-obj_type = 'BKPFF'.
    lx_docheader-username = sy-uname.
    lx_docheader-comp_code = 'HKHK'.
    lx_docheader-ac_doc_no = p_belnr.
    lx_docheader-fisc_year = l_fiscyear.
    lx_docheader-doc_date = p_doc_date.
    lx_docheader-pstng_date = p_post_date.
    lx_docheader-doc_type = ‘SY’.
    fill the table parameter ACCOUNTGL of the BAPI
    lwa_tabaccgl-itemno_acc = 1.
    lwa_tabaccgl-gl_account = ‘0000050107’ .
    lwa_tabaccgl-comp_code = ‘HKHK’.
    lwa_tabaccgl-pstng_date = p_post_date.
    lwa_tabaccgl-doc_type = ‘SY’.
    lwa_tabaccgl-ac_doc_no = p_belnr.
    lwa_tabaccgl-fisc_year = l_fiscyear.
    append lwa_tabaccgl to li_tabaccgl.
    clear lwa_tabaccgl.
    lwa_tabaccgl-itemno_acc = 2.
    lwa_tabaccgl-gl_account = ‘0000082910’.
    lwa_tabaccgl-comp_code = ‘HKHK’.
    lwa_tabaccgl-pstng_date = p_post_date.
    lwa_tabaccgl-doc_type = ‘SY’.
    lwa_tabaccgl-ac_doc_no = p_belnr.
    lwa_tabaccgl-fisc_year = l_fiscyear.
    lwa_tabaccgl-costcenter = ‘0000011401’.
    append lwa_tabaccgl to li_tabaccgl.
    clear lwa_tabaccgl.
    fill the table parameter CURRENCYAMOUNT of the BAPI
    lwa_tabcurramt-itemno_acc = 1.
    lwa_tabcurramt-currency = ‘HKD’.
    lwa_tabcurramt-amt_doccur = ‘1.5-’.
    append lwa_tabcurramt to li_tabcurramt.
    clear lwa_tabcurramt.
    lwa_tabcurramt-itemno_acc = 2.
    lwa_tabcurramt-currency = ‘HKD’.
    lwa_tabcurramt-amt_doccur = ‘1.5’.
    append lwa_tabcurramt to li_tabcurramt.
    clear lwa_tabcurramt.
    Call BAPI to post the FI-GL Document
      call function 'BAPI_ACC_GL_POSTING_POST'
          exporting
          documentheader = lx_docheader
          tables
          accountgl = li_tabaccgl
          currencyamount = li_tabcurramt
          return = li_tabreturn.
    The return table says:
    Error in document: BKPFF 1200000068HKCG2007 UD1CLNT120
    Field Value date is a required field for G/L account HKCG 50107
    would you experts please tell me what's the problem is?? it's emergency, thanks in a million advance.

    Hi
    U haven't to transfer the reference data to the BAPI, the document number is picked up automatically:
    * fill the structure parameter DOCUMENTHEADER of the BAPI
    *    LX_DOCHEADER-OBJ_TYPE = 'BKPFF'.
        LX_DOCHEADER-USERNAME = SY-UNAME.
        LX_DOCHEADER-COMP_CODE = 'HKHK'.
    *    LX_DOCHEADER-AC_DOC_NO = P_BELNR.
    *    LX_DOCHEADER-FISC_YEAR = L_FISCYEAR.
        LX_DOCHEADER-DOC_DATE = P_DOC_DATE.
        LX_DOCHEADER-PSTNG_DATE = P_POST_DATE.
        LX_DOCHEADER-DOC_TYPE = ‘SY’.
    * fill the table parameter ACCOUNTGL of the BAPI
        LWA_TABACCGL-ITEMNO_ACC = 1.
        LWA_TABACCGL-GL_ACCOUNT = ‘0000050107’ .
        LWA_TABACCGL-COMP_CODE = ‘HKHK’.
        LWA_TABACCGL-PSTNG_DATE = P_POST_DATE.
        LWA_TABACCGL-DOC_TYPE = ‘SY’.
    *    LWA_TABACCGL-AC_DOC_NO = P_BELNR.
    *    LWA_TABACCGL-FISC_YEAR = L_FISCYEAR.
        APPEND LWA_TABACCGL TO LI_TABACCGL.
        CLEAR LWA_TABACCGL.
        LWA_TABACCGL-ITEMNO_ACC = 2.
        LWA_TABACCGL-GL_ACCOUNT = ‘0000082910’.
        LWA_TABACCGL-COMP_CODE = ‘HKHK’.
        LWA_TABACCGL-PSTNG_DATE = P_POST_DATE.
        LWA_TABACCGL-DOC_TYPE = ‘SY’.
    *    LWA_TABACCGL-AC_DOC_NO = P_BELNR.
    *    LWA_TABACCGL-FISC_YEAR = L_FISCYEAR.
        LWA_TABACCGL-COSTCENTER = ‘0000011401’.
        APPEND LWA_TABACCGL TO LI_TABACCGL.
        CLEAR LWA_TABACCGL.
    Max

  • Posting to Accounts Receivable using WPUBON, when WPUBON contains tenders

    Hi all!
    My client has some special requirements when invoicing specific customers in SAP ERP using WPUBON from POS DM.
    They want accounts receivable to be involved, even though the WPUBON idoc have all tenders/means of payment that is required to pay for the sales in same POS transaction. (Balanced invoice with as much tenders as sales).
    What seems to be SAP standard, is that a WPUBON without tenders, will post to accounts receivable.
    If the WPUBON idoc includes some tenders, but not sufficiently to pay for all sales in same idoc, the tender amount will post to a balance account, while the remaining sales amount (after deducting the available tenders) are posted to the accounts receivable.
    If the WPUBON idoc includes all tenders sufficient to pay for all sales in same idoc, the tender amount will post to balance accounts, and NO postings are done to the accounts receivable.
    This might be logical, but for my client and its vendors it prevents them from printing the account receivable statement periodically to check it against the vendors own accounting. (The account receivable postings will be missing for sales that are paid in full in store).
    For comparison: When using Payment Card processing in SAP ERP, we create sales orders that are invoiced, and when the credit cards amounts are captured, we get a financial document that posts the invoice just as we want it for WPUBON. First the invoice is posted against accounts receivable (AR), and then we get a "counter-posting" against same AR account when credit card amount is captured and clearing account/balance account for credit card company is posted.
    When involving credit card as tender in WPUBON, we get postings to clearing account/balance account for credit card company , but not to AR account as we do for the sales order/invoice in SAP.
    Are there customzing settings that can be done in SAP ERP to make it similar for WPUBON idocs as for sales order/invoice in SAP ERP?
    Are there user exits that can "force" SAP ERP to post to AR?
    Thankful for any advice!
    Regards,
    Oeystein Emhjellen
    tlf +4795 29 25 58

    Hello ,
    We are also struggling with the similar problem of reconciling the AR and i would seek your help here.
    I believe you have figured out all the SQL queries used to get the AR recon done so i would request if you can share the SQL queries with me as it will help us to do our piece of activity in reconciling the AR.

  • Posting a particular Ledger using BAPI_ACC_DOCUMENT_POST

    Is it possible to post to a specific ledger using the BAPI_ACC_DOCUMENT_POST.
    Currently we use a BDC on FB01L and would like to convert this into a BAPI, Can this be done ?

    Hi,
    You can try with Posting Interface, please try with the following posting interface.
    POSTING_INTERFACE_CLEARING     Post with clearing (FB05) using internal posting interface
    POSTING_INTERFACE_DOCUMENT     Post document using the internal posting interface
    POSTING_INTERFACE_END
    POSTING_INTERFACE_RESET_CLEAR  Reset clearing via posting interface
    POSTING_INTERFACE_REVERSE_DOC  Cancel document via posting interface
    POSTING_INTERFACE_START        Initial information for internal accounting interface
    Regards
    Pugazhenthi.P

Maybe you are looking for