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

Similar Messages

  • 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

  • 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

  • Vendor invoice creation using BAPI BAPI_ACC_DOCUMENT_POST

    Hi,
    I am trying to create vendor invoice(FB60) using BAPI_ACC_DOCUMENT_POST.
    Could anyone please let me know what all mandatory fields we have to pass in vendor item and header to create this ?
    Regards,
    Anubhuti Pandey

    Hi,
    Please call the FM BAPI_ACC_DOCUMENT_POST and try with the following parameters:
    Function module to post the accounting document
          CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'           
    "      EXPORTING
              documentheader    = w_documentheader                                          
    "      TABLES
              accountgl               = i_accountgl
              accountreceivable = i_accountreceivable
              accountpayable     = i_accountpayable
              currencyamount    = i_currencyamount
              return                     = i_return
              contractitem           = i_contractitem.
    The required fields in the header document:
        w_documentheader-bus_act    
        w_documentheader-username    = sy-uname.                                             "Username
        w_documentheader-header_txt 
        w_documentheader-comp_code 
        w_documentheader-doc_date  
        w_documentheader-pstng_date  = sy-datum. 
        w_documentheader-trans_date                                 " Transaction date value as per document date
        w_documentheader-fisc_year   = sy-datum(4).      
        w_documentheader-doc_type      
    Pass the necessary information in the account GL and accounts payable.
    I hope this helps you in some way.

  • Account document post using BAPI BAPI_ACC_DOCUMENT_POST

    Hi,
    I am using the BAPI BAPI_ACC_DOCUMENT_POST to post account doument. It is working fine.
    Here I need to pass contrac number to item.
    We have one parameter REALESTATE to pass cotract number.
    Because it is a realestate, it taking contract type as 9 by default.
    But I need to pass other contract number of diffrent type.
    How we can pass the other than realestate contract number using BAPI BAPI_ACC_DOCUMENT_POST ?
    Thanks in advance.
    Sadasiva.

    I am already did the same thing, it is creating document but it is not adding the contract number to item.
    I am also filling the parameter REALESTATE with contract number, it is adding properly and contract type is taking as 9(means realestate).
    But I need to add other contract types also, for that I tried with other parameter what you mentioned.
    Thank you for your reply.
    Sadasiva.
    Edited by: Sadasiva Rao Athota on Dec 9, 2008 2:38 PM

  • Unable to transfer post the document using BAPI "BAPI_GOODSMVT_CREATE"

    Hi Experts,
    I am unable to post the document using BAPI "BAPI_GOODSMVT_CREATE", getting error "_Sales order stock --- does not exist_"
    details are stated below:
    GM_CODE : 04, it is working fine for the scenario with same saleorder number and line item, but when i give same sale order number and different line item, then i am getting the above error.
    Example : Posting from Saleorder A with line item 100 to saleorder A with lineitem 100 its working fine, but when we are posting
                    from Saleorder A with lineitem 100 to saleorder A with line item 200 it is not working.
    Also When I trying to do with the transaction MB1B manually, it is working fine. kindly suggest me.
    Needed Urgently....
    Appreciate for you early response.
    Regards,
    Sathya.
    Edited by: Sathyanarayana Raghavendra on May 6, 2010 1:00 PM

    Hi,
    Hi Did you call Function BAPI_TRANSACTION_COMMIT' after calling the BAPI.    ?
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = c_x.
    Regards,
    Jovito.

  • GL Posting using BAPI BAPI_ACC_DOCUMENT_POST but not updating in table BSEG

    Hi Experts,
    Hope all are doing greatu2026
    I need you help to resolve the below issue.
    We have on Z-Tcode to GL Posting the document using BAPI u2018BAPI_ACC_DOCUMENT_POST' and this program is successfully posted from the source file and documnet # also created successully.
    We have entries in BKPF, but the table BSEG not updating and we do not have entries.
    Please help me on this regards,
    Thanks in Advance.
    Amjad

    Hi Srikant,
    Thanks for your reply...
    As you suggest, i have checked the structure ACCOUNTGL and below values are passing.
    ACCOUNTGL -ITEMNO_ACC
    ACCOUNTGL -GL_ACCOUNT
    ACCOUNTGL- ITEM_TEXT
    ACCOUNTGL- COMP_CODE
    ACCOUNTGL- COSTCENTER
    ACCOUNTGL- CS_TRANS_T
    Could you please suggest me if there are any  changes needs to do.
    Thanks & Regards,
    Amjad Hussain

  • How to update Assignment field in Accounting Document through BAPI ?

    I need to change Assignment field in already posted accounting document through bapi or some other automatic method. Please tell me exactly which bapi I should use and how can I pass the changed assignment field?

    Hey,
    I couldnt find any BAPIs which update an accounting document. I think the safest way is to record FB02 and use BDC/Call Transaction.
    -Kiran
    *Please reward useful answers

  • Create Excise invoice(J1IIN) document while creating billing document using bapi BAPI_BILLINGDOC_CREATEMULTIPLE

    Dear Experts,
    My scenario is:
    We have batch split scenario, where the parent line item of billing document has 0 quantity and its subsequent item (item with batch number) holds actual quantity data.
    When we create billing document using VF01 against delivery document, system creates billing document along with excise invoice document (J1IIN Document). And in excise document contain same number of line items that of billing document. Please see the below attachment: 
    Biiling document screen shot:
    While creating billing document, the J1IIN Document created automatically. Below is the screen-shot for the same.
    Now the issue is:
    When we create billing document using BAPI: BAPI_BILLINGDOC_CREATEMULTIPLE system creating only billing document and not creating excise invoice document.
    When we create excise document manually using J1IIN the zero quantity line items are excluded in excise invoice document.
    Please see the below screen-shot for the same; The z quantity line items are missing.
    We want excise document to be created while creating billing document using BAPI BAPI_BILLINGDOC_CREATEMULTIPLE. Or is there any other BAPI for the same purpose.
    Customization is also maintained for creating excise invoice document automatically.
    Regards,
    Rajesh Sadula.

    HI
      Pricing will be carried basing on the pricing
    procedure.
    Case1: Prices will be carried out automatically if
    necessary condition records are maintained for the
    condition type.
      For this you can go to Sales Order-> Item Conditions
    In the screen you can click on command button Analysis,
    which gives you the list of condition types associated
    to the pricing procedure. By clicking on the condition
    type you can know the action that has taken place.
    Case2: Manually forcing prices for Items.
      To do this, you have to populate ORDER_CONDITIONS_IN &
    ORDER_CONDITIONS_INX. Also note to identify the item
    numbers, you manually pass the item number for each item
    in the sales order, use the same item number for
    populating conditions.
      Parameters required:
    ORDER_CONDITIONS_IN:
      ITM_NUMBER, COND_TYPE, COND_VALUE, CURRENCY
    ORDER_CONDITIONS_INX:
      ITM_NUMBER, COND_TYPE, UPDATEFLAG, COND_VALUE,CURRENCY.
       Hope the above info helps you. Do revert back if you
    need more info.
    Kind Regards
    Eswar

  • 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

  • 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

  • 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

  • Creating a sales document using BAPI in web dynpro by uploading a file

    Hi ALL,
    Can some one help me how to create a sales document using  BAPI by uploading a file as input...Can someone  provide me a sample program....
    Thanks n Regards,
    Praveenn.
    Edited by: praveenn on Aug 23, 2011 12:42 PM

    Hi Sri,
    Thx for the response...
    Here is the code that i followed for creating a BAPI_SALESORDER_CREATE1 by uploading a text file as input.
    Just create a Attribute  in the VIEW CONTEXT of type String.
    method ONACTIONCREATE_SO .
    types : Begin of ty_data,
             sales_org  type vkorg,
             doc_type   type AUART,
             DISTR_CHAN type VTWEG,
             DIVISION   type spart,
             material   type matnr,
             partn_role type PARVW,
             PARTN_NUMB type kunnr,
           end of ty_data.
      DATA  :it_table TYPE  TABLE OF ty_data,
             i_data   TYPE  TABLE OF string,
             l_string TYPE string,
             wa_table TYPE ty_Data,
             l_xstring TYPE xstring,
             fields TYPE string_table,
             lv_field TYPE string.
    DATA: wa_order_header_in TYPE BAPISDHD1,
          it_order_items_in  TYPE TABLE OF BAPISDITM,
          wa_order_items_in  TYPE BAPISDITM,
          it_order_partners  TYPE TABLE OF BAPIPARNR,
          wa_order_partners  TYPE BAPIPARNR,
          it_return TYPE TABLE OF BAPIRET2,
          wa_return TYPE BAPIRET2.
    DATA : sales_doc type bapivbeln-vbeln.
    DATA:
       node_zfinal_node  TYPE REF TO if_wd_context_node,
       elem_zfinal_node  TYPE REF TO if_wd_context_element,
       stru_zfinal_node  TYPE if_main_view=>element_zfinal_node .
    get single attribute
      wd_context->get_attribute(
      EXPORTING
      name =  'DATASOURCE'
      IMPORTING
      value = l_xstring ).
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
          in_xstring = l_xstring
        IMPORTING
          out_string = l_string.
    SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE i_data.
      LOOP AT i_data INTO l_string.
       SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
        READ TABLE fields INTO lv_field INDEX 1.
        wa_table-sales_org = lv_field.
        READ TABLE fields INTO lv_field INDEX 2.
        wa_table-doc_type = lv_field.
        READ TABLE fields INTO lv_field INDEX 3.
        wa_table-DISTR_CHAN = lv_field.
        READ TABLE fields INTO lv_field INDEX 4.
        wa_table-DIVISION = lv_field.
        READ TABLE fields INTO lv_field INDEX 5.
        wa_table-material  = lv_field.
        READ TABLE fields INTO lv_field INDEX 6.
        wa_table-partn_role  = lv_field.
        READ TABLE fields INTO lv_field INDEX 7.
        wa_table-partn_numb  = lv_field.
    APPEND wa_table TO it_table.
      ENDLOOP.
    loop at it_table into wa_table.
    clear : wa_order_header_in.
    wa_order_header_in-sales_org   = wa_table-sales_org.
    wa_order_header_in-doc_type    = wa_table-doc_type.
    wa_order_header_in-distr_chan  = wa_table-distr_chan.
    wa_order_header_in-division    = wa_table-division.
    clear : wa_order_items_in.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input         = wa_table-material
    IMPORTING
       OUTPUT        = wa_order_items_in-material.
    *wa_order_items_in-req_qty  = wa_table-req_qty.
    append wa_order_items_in to it_order_items_in.
    clear : wa_order_partners.
    wa_order_partners-partn_role = wa_table-partn_role.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input         = wa_table-partn_numb
    IMPORTING
       OUTPUT        = wa_order_partners-partn_numb
    *wa_order_partners-partn_numb = wa_table-partn_numb.
    append wa_order_partners to it_order_partners.
    endloop.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
      EXPORTING
      SALESDOCUMENTIN               =
        order_header_in               = wa_order_header_in
      ORDER_HEADER_INX              =
      SENDER                        =
      BINARY_RELATIONSHIPTYPE       =
      INT_NUMBER_ASSIGNMENT         =
      BEHAVE_WHEN_ERROR             =
      LOGIC_SWITCH                  =
      TESTRUN                       =
      CONVERT                       = ' '
    IMPORTING
       SALESDOCUMENT                 = sales_doc
      tables
       RETURN                        = it_return
       ORDER_ITEMS_IN                = it_order_items_in
      ORDER_ITEMS_INX               =
        order_partners                = it_order_partners.
      ORDER_SCHEDULES_IN            =
    get message manager
    DATA: l_current_controller TYPE REF TO if_wd_controller,
           l_message_manager    TYPE REF TO if_wd_message_manager.
           l_current_controller ?= wd_this->wd_get_api( ).
    DATA:  v_message_text TYPE string.
    When Sales Order is created commit the data
    IF NOT sales_doc IS INITIAL.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
       EXPORTING wait = 'X'.
      CONCATENATE 'Sales Document' sales_doc 'has been created.' INTO v_message_text SEPARATED BY space.
    Report Success message
      CALL METHOD l_message_manager->report_success
      EXPORTING
      message_text = v_message_text.
      ELSE.
      v_message_text = 'Error Creating Sales Order'.
    Report Error message
    CALL METHOD l_message_manager->report_error_message
    EXPORTING
    message_text = v_message_text.
    ENDIF.
    endmethod.
    Edited by: praveenn on Aug 30, 2011 2:41 PM

Maybe you are looking for

  • Creating SNP planned order using ''BAPI_MOSRVAPS_SAVEMULTI3'

    Hi Experts,                   I am new to SAP-APO, kindly clarify my question. I am using 'BAPI_MOSRVAPS_SAVEMULTI3' with source of supply PDS for creating SNP planned order by passing 'EE' in the  table parameters 'ORDER_HEAD-MASTER_ATPCAT'. It is c

  • ISP Internet Tracking?

    I was looking online for software programs based on internet privacy and protection, such as Firewalls, Intego's Content Barrier, etc and became increasingly alarmed about how easy it seems that someone can get ahold of personal information. Mainly p

  • Repeating Network@etp... message Help please

    I can seem to get blackberry to quit sending me this email: This message is used to carry data between the BlackBerry handheld and an associated server. Please do not delete, move or respond to this message - it will be processed by the server. BEGIN

  • SAFARI NON SI APRE PIU'!!!!     HELP!!!!!!!!!!!!!!!!!!!!!!!

    SAFARI NON SI APRE PIU' ED ESCE QUESTO MESSAGGIO: Process:         Safari [2433] Path:            /Applications/Safari.app/Contents/MacOS/Safari Identifier:      com.apple.Safari Version:         7.0.3 (9537.75.14) Build Info:      WebBrowser-7537075

  • Workarounds for project crashing when exporting?

    I have developed a project in captivate 6 which is now crashing captivate when I export it.   I can preview it in 'Web Browser' and 'HTML 5 output'.  But when I export it as a SCORM package it crashes.  I was able to do that yesterday but today it's