Passing field "BSCHL"  to bapi BAPI_ACC_DOCUMENT_POST.

Hi developers,
             I've just searched the forum, but I can't find the solution to the following problem:
I need to use bapi BAPI_ACC_DOCUMENT_POST to simulate FB01 transaction. I need to pass to the bapi the field "BSEG-BSCHL" for each record I have to process, but I can't find where passing it to the bapi.
Thanks a lot

Hi,
The BAPI_ACC_DOCUMENT_POST does not have a BSCHL field. Usually, the documents posted with this FM will automatically have the BSEG-BSCHL as '01 or 11' for Customer documents, and '40 or 50' for G/L Postings. Similar pair exists for Vendor postings, though I can't remember.
Generally, these Posting Keys should be acceptable to most. If you have special requirements for the docs to post in other posting keys, you may have to use custom BDC recordings or standard load programs like RFBIBL00.
If this helps, please remember to award points before closing the thread.
Good luck,
Bhanu

Similar Messages

  • Calculate tax item field name in bapi .. bapi_acc_document_post

    Hello Friends,
    Im using Bapi>> Bapi_acc_document_post to post vendor and customer invoices, im not getting mapping field for the "calculate tax item(checkbox)" technical name is xmwst in any of the bapi strucuture.
    please tell me in which bapi structure we have to pass this field so that the tax amount should get calculated automatically.
    regards,
    Sunny

    You can try the Financial Posting Interface (FIPI).
    *=======================================================================
    CONSTANTS:
    *=======================================================================
                c_typehead  TYPE stype_pi VALUE 'K',
                c_typepos   TYPE stype_pi VALUE 'P',
                c_waers     TYPE waers    VALUE 'EUR',
                c_blart     TYPE blart    VALUE 'ZN',
                c_debit     TYPE bschl    VALUE  '40',
                c_credit    TYPE bschl    VALUE  '50',
                c_inddebit  TYPE shkzg    VALUE  'S',
                c_indcredit TYPE shkzg    VALUE  'H'.
    *===================================================================
    FORM append_ftpost
    *===================================================================
                      USING    p_stype   TYPE stype_pi
                               p_count   TYPE count_pi
                               p_fnam    TYPE bdc_fnam
                               p_fval    TYPE any
                      CHANGING pt_ftpost TYPE tt_ftpost.
      DATA: ls_ftpost LIKE LINE OF pt_ftpost.
      CLEAR ls_ftpost.
      ls_ftpost-stype = p_stype.
      ls_ftpost-count = p_count.
      ls_ftpost-fnam  = p_fnam.
      ls_ftpost-fval  = p_fval.
      APPEND ls_ftpost TO pt_ftpost.
    ENDFORM.                    "append_ftpost
    *===================================================================
    FORM post_document
    *===================================================================
                        USING    p_bukrs   TYPE bukrs
                                 p_gjahr   TYPE gjahr
                                 p_monat   TYPE monat
                                 p_tip     TYPE zga_nomtipcont
                                 p_saknr   TYPE saknr
                                 p_bktxt   TYPE bktxt
                                 pt_pos    TYPE tt_pos.
      DATA: lt_blntab TYPE tt_blntab,
            lt_ftpost TYPE tt_ftpost,
            lt_fttax  TYPE tt_fttax,
            ls_blntab LIKE LINE OF lt_blntab.
      REFRESH: lt_blntab,
               lt_ftpost,
               lt_fttax.
      CALL FUNCTION 'ENQUEUE_EZGA_NOMLOG'
        EXPORTING
          bukrs          = p_bukrs
          gjahr          = p_gjahr
          monat          = p_monat
          tipcont        = p_tip
          _wait          = 'X'
        EXCEPTIONS
          foreign_lock   = 1
          system_failure = 2
          OTHERS         = 3.
      IF sy-subrc IS NOT INITIAL.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      PERFORM fill_bkpf USING    p_bukrs p_gjahr
                                 p_monat p_bktxt
                        CHANGING lt_ftpost.
      PERFORM fill_bseg USING    p_saknr p_bktxt
                        CHANGING pt_pos lt_ftpost.
      CALL FUNCTION 'POSTING_INTERFACE_START'
        EXPORTING
          i_function = 'C'
          i_mode     = 'N'
          i_update   = 'S'.
      CALL FUNCTION 'POSTING_INTERFACE_DOCUMENT'
        EXPORTING
          i_tcode  = 'FB01'
        IMPORTING
          e_msgid  = sy-msgid
          e_msgno  = sy-msgno
          e_msgty  = sy-msgty
          e_msgv1  = sy-msgv1
          e_msgv2  = sy-msgv2
          e_msgv3  = sy-msgv3
          e_msgv4  = sy-msgv4
          e_subrc  = sy-subrc
        TABLES
          t_blntab = lt_blntab
          t_ftpost = lt_ftpost
          t_fttax  = lt_fttax.
      IF sy-subrc IS NOT INITIAL.
        MESSAGE i021(zga_nom).
      ELSE.
    *  Grabación en tabla de log y mensaje
        READ TABLE lt_blntab INTO ls_blntab INDEX 1.
        IF sy-subrc        IS INITIAL AND
           ls_blntab-belnr IS NOT INITIAL.
          PERFORM insert_log USING p_bukrs
                                   p_gjahr
                                   p_monat
                                   p_tip
                                   ls_blntab-belnr.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ELSE.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
      CALL FUNCTION 'POSTING_INTERFACE_END'
        EXCEPTIONS
          session_not_processable = 1
          OTHERS                  = 2.
      CALL FUNCTION 'DEQUEUE_EZGA_NOMLOG'
        EXPORTING
          bukrs   = p_bukrs
          gjahr   = p_gjahr
          monat   = p_monat
          tipcont = p_tip.
    ENDFORM.                    " post_document
    *===================================================================
    FORM insert_log
    *===================================================================
                    USING p_bukrs TYPE bukrs
                          p_gjahr TYPE gjahr
                          p_monat TYPE monat
                          p_tip   TYPE zga_nomtipcont
                          p_belnr TYPE belnr_d.
      DATA: lv_belnr TYPE belnr_d,
            ls_log   TYPE zga_nomlog.
      CLEAR: lv_belnr, ls_log.
      ls_log-bukrs   = p_bukrs.
      ls_log-gjahr   = p_gjahr.
      ls_log-monat   = p_monat.
      ls_log-tipcont = p_tip.
      ls_log-belnr   = p_belnr.
      SELECT SINGLE belnr INTO lv_belnr
        FROM zga_nomlog
        WHERE bukrs   = p_bukrs AND
              gjahr   = p_gjahr AND
              monat   = p_monat AND
              tipcont = p_tip.
      IF sy-subrc IS INITIAL.
        UPDATE zga_nomlog FROM ls_log.
      ELSE.
        INSERT zga_nomlog FROM ls_log.
      ENDIF.
    ENDFORM.                    "insert_log
    *===================================================================
    FORM get_posting_date
    *===================================================================
                          USING    p_gjahr TYPE gjahr
                                   p_monat TYPE monat
                          CHANGING p_date  TYPE dats.
      DATA: lv_date TYPE dats,
            lv_month TYPE tfmatage.
      IF p_monat <= '12'.
        CONCATENATE p_gjahr p_monat '01' INTO lv_date.
        CALL FUNCTION 'FIMA_END_OF_PERIOD_DETERMINE'
          EXPORTING
            i_date               = lv_date
            i_months             = '1'
          IMPORTING
            e_date_end_of_period = p_date.
      ELSE.
        CONCATENATE p_gjahr '1231' INTO p_date.
      ENDIF.
    ENDFORM.                    "get_posting_date
    *======================================================================
    FORM fill_bkpf
    *======================================================================
                     USING    p_bukrs   TYPE bukrs
                              p_gjahr   TYPE gjahr
                              p_monat   TYPE monat
                              p_bktxt   TYPE bktxt
                     CHANGING pt_ftpost TYPE tt_ftpost.
      DATA: lv_posting_date TYPE dats,
            lv_dats TYPE char10.
      PERFORM get_posting_date USING    p_gjahr p_monat
                               CHANGING lv_posting_date.
      WRITE lv_posting_date TO lv_dats.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BUKRS' p_bukrs
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-MONAT' p_monat
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BLART' c_blart
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BUDAT' lv_dats
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BLDAT' lv_dats
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-WAERS' c_waers
                            CHANGING pt_ftpost.
      *PERFORM append_ftpost USING    c_typehead '1'*
                                     *'BKPF-XMWST'  'X'*
                            *CHANGING pt_ftpost.*
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BKTXT' p_bktxt
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-XBLNR' p_bktxt+0(16)
                            CHANGING pt_ftpost.
    ENDFORM.                    "fill_bkpf
    *===================================================================
    FORM fill_bseg
    *===================================================================
                          USING  p_saknr   TYPE saknr
                                 p_bktxt   TYPE bktxt
                        CHANGING pt_pos    TYPE tt_pos
                                 pt_ftpost TYPE tt_ftpost.
      DATA: ls_pos      LIKE LINE OF pt_pos,
            ls_ftpost   LIKE LINE OF pt_ftpost,
            lv_item     TYPE buzei,
            lv_wrbtr    TYPE wrbtr,
            lv_saknr    TYPE saknr,
            lv_bschl    TYPE bschl,
            lt_poscont  TYPE TABLE OF zga_nompospost,
            ls_poscont  LIKE LINE OF lt_poscont,
            ls_poscontaux LIKE LINE OF lt_poscont.
      CLEAR: ls_pos, ls_ftpost.
      REFRESH lt_poscont.
      LOOP AT pt_pos INTO ls_pos.
        MOVE-CORRESPONDING ls_pos TO ls_poscont.
        APPEND ls_poscont TO lt_poscont.
      ENDLOOP.
      SORT lt_poscont BY saknr.
      lv_item = '002'.
      LOOP AT lt_poscont INTO ls_poscontaux.
        ls_poscont = ls_poscontaux.
        AT NEW saknr.
          CLEAR: lv_wrbtr,
                 lv_saknr,
                 lv_bschl.
        ENDAT.
        CASE ls_poscont-shkzg.
          WHEN c_inddebit.
            lv_bschl = c_debit.
          WHEN c_indcredit.
            lv_bschl = c_credit.
        ENDCASE.
        IF ls_poscont-saknr IS INITIAL.
          lv_saknr = p_saknr.
        ELSE.
          lv_saknr = ls_poscont-saknr.
        ENDIF.
        IF ls_poscont-indhkont = abap_true.
          lv_wrbtr = lv_wrbtr + ls_poscont-wrbtr.
        ELSE.
          PERFORM fill_bsegpos USING   lv_bschl lv_saknr
                                       ls_poscont-wrbtr p_bktxt
                                       ls_poscont-kostl ls_poscont-prctr
                                       lv_item
                              CHANGING pt_ftpost.
          CLEAR: lv_wrbtr,
                 lv_saknr,
                 lv_bschl.
          lv_item = lv_item + 1.
        ENDIF.
        AT END OF saknr.
          IF ls_poscont-indhkont = abap_true.
            PERFORM fill_bsegpos USING   lv_bschl lv_saknr
                                         lv_wrbtr p_bktxt
                                         ls_poscont-kostl ls_poscont-prctr
                                         lv_item
                                CHANGING pt_ftpost.
            lv_item = lv_item + 1.
          ENDIF.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    "fill_bseg
    *===================================================================
    FORM fill_bsegpos
    *===================================================================
                        USING    p_bschl   TYPE bschl
                                 p_saknr   TYPE saknr
                                 p_wrbtr   TYPE wrbtr
                                 p_bktxt   TYPE bktxt
                                 p_kostl   TYPE kostl
                                 p_prctr   TYPE prctr
                                 p_pos     TYPE buzei
                        CHANGING pt_ftpost TYPE tt_ftpost.
      DATA: lv_wrbtrstr TYPE char16.
      WRITE  p_wrbtr TO lv_wrbtrstr
                    CURRENCY c_waers NO-SIGN.
      PERFORM append_ftpost USING    c_typepos p_pos
                               'BSEG-BSCHL' p_bschl
                      CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typepos p_pos
                                     'BSEG-HKONT' p_saknr
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typepos p_pos
                                     'BSEG-WRBTR' lv_wrbtrstr
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typepos p_pos
                                     'BSEG-SGTXT' p_bktxt
                            CHANGING pt_ftpost.
      IF p_kostl IS NOT INITIAL.
        PERFORM append_ftpost USING    c_typepos p_pos
                                      'COBL-KOSTL' p_kostl
                             CHANGING pt_ftpost.
      ENDIF.
      IF p_prctr IS NOT INITIAL.
        PERFORM append_ftpost USING    c_typepos p_pos
                                      'COBL-PRCTR' p_prctr
                             CHANGING pt_ftpost.
      ENDIF.
    ENDFORM.                    "fill_bsegpos
    Edited by: Javier Meavilla Olivas on Feb 25, 2010 1:25 PM

  • Problem using BAPI BAPI_ACC_DOCUMENT_POST with vendor field XZEMP

    Hi, I'm using the bapi BAPI_ACC_DOCUMENT_POST, when i fill the table ACCOUNTPAYABLE and execute it, if i use a vendor that doesn't have an 'X' in the field XZEMP (Indicator: Alternative payee in document allowed ?) of the table LFA1 the bapi returns an error.
    I haven't found any place in the bapi tables to override this.
    Is there something that should be parameterized so that this error doesn't happen?
    Thanks!

    Hi,
    Refer
    https://wiki.sdn.sap.com/wiki/display/Snippets/VendorInvoicePostingusingBAPI
    Re: BAPI_ACC_DOCUMENT_POST

  • Wht is similar field of BDC's BBKPF-BVORG in BAPI-BAPI_ACC_DOCUMENT_POST?

    Hi Experts,
    We can post GL acct docs via BDC and BAPI (BAPI_ACC_DOCUMENT_POST).
    In BDC, there is a filed w/ name BBKPF-BVORG-->Number of Cross-Company Code Posting Transaction, so, I am lookig for the same field/any other similar to BVPRG, in BAPI structure - BAPIACHE09, but I did not find any one?
    So, pls. let me know that, How can I fix it? any other alternative field? How can I populate my_value via BAPI for this field?
    thanq

    You should not be setting this field in your BAPI (or BDC as far as I know).  SAP will set this field at the time of posting.  It is used to determine cross-company postings or not.

  • Field Posting Key in BAPI_ACC_DOCUMENT_POST ?

    Hi
    I need to post documents like FB01 , i'm already using BAPI_ACC_DOCUMENT_POST  and it works so i can now create documents with the header and itmes positions  , filling the tables header, accountreceivable items and currency items.
    I already found the most of fields for execute the BAPI and create the documents, but i can not find three fields, some of one (BSCHL) the most important:
    Posting Key (BSCHL)
    Special G/L Indicator  (NEWUM)
    Calculate Tax Automatically (XMWST) .
    I think but i'm not sure  the Posting Key (BSCHL) is placed in the EXTENSION2 table, but this table ask for some STRUCTURE name and i don't know what should i place in this field or how fill this parameter table.
    Does somebody can help me  about where can i place these 3 fields in the BAPI or where can i find help documentation for do this ?
    Regards
    Frank

    Frank,
    you should use the Extension2 structure for passing the Posting Keys and you should implement the BADI for posting the documents with the Keys what you have supplied.
    The Enhancement Spots are BADI_ACC_DOCUMENT and IF_EX_ACC_DOCUMENT.
    I've used the BADI_ACC_DOCUMENT and now i'm able to post the documents using the keys which i've supplied to the BAPI.
    Otherwise the BAPI is going to decide the posting keys based on tha amount .
    Hope this will help you.
    Thanks,
    Adi.

  • Can we use BAPI BAPI_ACC_DOCUMENT_POST to upload the vendor invoice?

    Hi,
    Can anybody tell me, can we use bapi BAPI_ACC_DOCUMENT_POST to upload the vender invoice?
    If yes, then which parameters we have to pass, and if no, then which is the other BAPI which is used for
    this purpose?
    Regards,
    Mrunal

    Hi Mrunal,
    Yes you can use BAPI_ACC_DOCUMENT_POST to upload vendor invoices.
    Parameters which are required to be passed are :
    Import tab :
    DOCUMENTHEADER: Mandatory fields for this specififed in documentation for this.
    Table tab:
    ACCOUNTGL: Enteries aganist GL account will be populated in this(check documentation for mandatory fields)
    ACCOUNTPAYABLE: Enteries aganist vendors will be populated in this(check documentation for mandatory fields)
    CURRENCYAMOUNT: in this currency amount aganist GL and vendor entries will specified.
    ITEMNO_ACC field will act as identifier as to amount belongs to which GL or vendor enteries.
    This much parameter are required to post vendor invoices.
    Regards,
    Brajvir

  • Error FI/CO interface: Balance in transaction currency from BAPI BAPI_ACC_DOCUMENT_POST

    Hi All,
    We are facing error FI/CO interface: Balance in transaction currency from BAPI BAPI_ACC_DOCUMENT_POST.
    This error we are getting only in case of passing tax data.
    Can anyone help me on this.
    Below is the code :
       *fill header
    gd_documentheader-username   =  sy-uname.
    gd_documentheader-header_txt = 'Test'.
    gd_documentheader-comp_code  = p_ccode.   "SQ
    gd_documentheader-doc_date   =  sy-datum.
    gd_documentheader-pstng_date =  sy-datum.
    gd_documentheader-doc_type   = 'KR'.
    gd_documentheader-ref_doc_no = p_xblnr. "SQ
    *gd_documentheader-bus_act = 'RMWE'.
    city = p_city.
    state = p_state.
    zipcode = p_zip.
    *get tax juridisction code
    IF NOT ( city     IS INITIAL ) AND
       NOT ( state    IS INITIAL ) AND
       NOT ( zipcode IS INITIAL ).
      SELECT SINGLE rfcdest INTO ttxd-rfcdest FROM ttxd
       WHERE kalsm = 'TAXUSX'.
      CLEAR x_com_jur.
      REFRESH t_com_jur.
      x_com_jur-city     =  city.
      x_com_jur-state    =  state.
      IF zipcode+5(4) EQ space.
        zipcode+5(4) = '0000'.
      ENDIF.
      CONCATENATE zipcode+0(5) '-' zipcode+5(4)
             INTO x_com_jur-zipcode.
      x_com_jur-country  = 'US'.
      CALL FUNCTION 'RFC_DETERMINE_JURISDICTION'
        DESTINATION ttxd-rfcdest
        EXPORTING
          location_data    = x_com_jur
        IMPORTING
          location_err     = x_com_err
        TABLES
          location_results = t_com_jur.
      IF sy-subrc = 0.
        READ TABLE t_com_jur INTO x_com_jur INDEX 1.
        it_accountgl-taxjurcode =  x_com_jur-txjcd.
      ENDIF.
    ENDIF.
    *fill AP (line 1) - vendor related data
    SELECT SINGLE zterm FROM lfb1 INTO p_zterm WHERE lifnr = p_lifnr.
    it_accountpayable-itemno_acc = 1.
    it_accountpayable-tax_code = p_txcd.
    it_accountpayable-pmnttrms   = p_zterm. "SQ
    it_accountpayable-vendor_no  = p_lifnr. "SQ
    *it_accountpayable-item_text = 'S2P Testing in UDR1'. - SQ
    it_accountpayable-pymt_meth = p_pmet. "- SQ
    APPEND it_accountpayable.
    *fill GL (line 2)
    it_accountgl-itemno_acc      =  2.
    *item_text - sq
    IF p_asset IS NOT INITIAL.
      TABLES : anlz,
               anla.
      SELECT SINGLE * FROM anlz  WHERE anln1 = p_asset.
      SELECT SINGLE * FROM anla WHERE anln1 = p_asset.
    *concatenate '00' anla-KTOGR into it_accountgl-gl_account .
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = anla-ktogr
        IMPORTING
          output = it_accountgl-gl_account.
      it_accountgl-asset_no = p_asset.
      it_accountgl-sub_number = '0000'.
      it_accountgl-cs_trans_t = '105'.
      it_accountgl-acct_type = 'A'.
    ELSE.
      it_accountgl-gl_account      = p_gl.
      it_accountgl-costcenter      = p_cc.
      it_accountgl-wbs_element     = p_posid.
    ENDIF.
    it_accountgl-comp_code       = p_ccode.
    it_accountgl-tax_code = p_txcd.  "SQ
    it_accountgl-pstng_date      =  sy-datum.
    it_accountgl-fisc_year       =  sy-datum(4).
    APPEND it_accountgl.
    CLEAR it_currencyamount.
    *fill currency ammounts for lines 1 & 2
    it_currencyamount-currency    = p_waers.  "SQ
    it_currencyamount-itemno_acc  = 1.
    *it_currencyamount-amt_base =  -1.
    it_currencyamount-amt_doccur  = - 116. "p_totamt.
    it_currencyamount-CURRENCY_ISO = 'USD'.
    it_currencyamount-tax_amt  = - 16.
    APPEND it_currencyamount.
    CLEAR it_currencyamount.
    it_currencyamount-itemno_acc  = 2.
    it_currencyamount-currency    = p_waers.  "SQ
    it_currencyamount-amt_doccur  = 100.
    it_currencyamount-CURRENCY_ISO = 'USD'.
    *it_currencyamount-amt_base =  100.
    *it_currencyamount-TAX_AMT =  -10.
    APPEND it_currencyamount.
    *tax data
    it_accounttax-itemno_acc = 3.
    it_accounttax-tax_code = p_txcd.
    it_accounttax-gl_account = '0023110000'.
    *it_accounttax-gl_account = p_gl.
    it_accounttax-TAXJURCODE = x_com_jur-txjcd.
    it_accounttax-acct_key = 'NVV'.
    it_accounttax-cond_key = 'XP2I'.
    **it_accounttax-direct_tax = 'X'.
    APPEND it_accounttax.
    CLEAR it_currencyamount.
    it_currencyamount-itemno_acc  = 3.
    it_currencyamount-currency    = p_waers.  "SQ
    it_currencyamount-amt_doccur  = 16.
    it_currencyamount-CURRENCY_ISO = 'USD'.
    it_currencyamount-amt_base =  100.
    it_currencyamount-TAX_AMT =  - 16  .
    APPEND it_currencyamount.
       CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
      EXPORTING
        documentheader          = gd_documentheader
    IMPORTING
       obj_key                 = wa_obj_key
      TABLES
       accountgl               = it_accountgl
    *   ACCOUNTRECEIVABLE       =
       accountpayable          = it_accountpayable
       accounttax              = it_accounttax
        currencyamount          = it_currencyamount
    *   CRITERIA                =
    *   VALUEFIELD              =
    *   EXTENSION1              =
        return                  =  it_return
    COMMIT WORK.
    Regards,
    Priyaranjan

    Hi,
    Reason 1:
    An revenue-recognition-relevant item has several active conditions whose values cancel themselves so that a net item value of 0 results. The conditions have both the same revenue account (SAKN1) and the same clearing account (SAKN2).
    For these conditions, the system writes a line with value 0 into the temporary FI/CO interface (internal tables: CACCIT, CACCCR). If table VBREVK does not contain control lines for this line, no further processing occurs and the line remains in the temporary FI/CO interface. Then the system reads this line for the creation of the next billing item which conatins a net value and generates a posting line with value 0. As a result, there is a balance in the FI/CO interface, and the billing document cannot be transferred.
    Reason 2:
    The billing document contains at least one item with an item category for which there is a setting stipulating that the values of this item should not be transferred to the header total of the document.
    That is, in the maintenance of the item categories, this item category has the characteristic 'X' or 'Y' in 'Statistical value' field.
    Reason 3:
    Case: Billing document contains items without pricing conditions.
    Then, on release to accounting, error RW022 occurs.
    regards,
    Saju.S

  • Pass ship-to-ctry to BAPI_ACC_DOCUMENT_POST

    Hello,
    I have a requirement to pass ship-to-country to BAPI_ACC_DOCUMENT_POST.  I do not see ship-to-country in any of the tables, nor in the table provided for update by the user exit.  Does anyone know how to do this?
    Thanks in advance for your help.
    Joy

    On that field, if you do a F1 and then look for the technical info, it should give you a table/structure and field name. Can you please let us know what that is? There is a import structure CUSTOMERCPD for this BAPI in which there is a country field. But this is for one-time customers only. Is this you situation, they do this for one-time customers?
    If it is a COPA characteristic, then it should go into CRITERIA and VALUEFIELD table parameters.

  • Issue with creating a G/L account using the BAPI "BAPI_ACC_DOCUMENT_POST"

    Hi All,
    I am trying to create a G/L account (FB50) using the BAPI "BAPI_ACC_DOCUMENT_POST". Can somebody help in populating values to the following parameters :
    1) OBJ_TYPE
    2) OBJ_KEY
    3) BUS_ACT
    I tried passing BKPF & BKPFF to the Object type but i am getting error saying that "Incorrect Entry".
    Please let me where to find the values for the fields.
    Any Help is much appreciated.
    Thanks in Advance.

    Hi Ram,
    Thanks for your input. The BAPI is working fine now, but one small change, i am passing REACI for the object type instead of BKPFF.
    Here's the values that i am passing to the BAPI.
    OBJ_TYPE                       REACI
    OBJ_KEY                        TEST
    OBJ_SYS                        ECSCLNT010
    BUS_ACT                        RFBU
    USERNAME                       KKUMAR
    HEADER_TXT                     TEST_BAPI
    Thanks Once agian.

  • 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

  • Bapi 'bapi_acc_document_post'.

    hi all,
    i'm creating credit memo request thru bapi 'bapi_acc_document_post'.
    i'm getting success message for creation of cmr(it is also updating the table bkpf) but
    i'm not able to get the document number for created document.
    can ne 1 suggest me how to get document number thru bapi in this case.
    thanx in advance
    Manish

    Hi,
    Please try with this:
    Declare a variable like this:
    V_OBJ_KEY type AWKEY.
    Pass this to OBJ_KEY.
    AWKEY (OBJ_KEY) Reference key
    Source document number
    The reference key is made up of:
    u2022     AWREF Reference document number (10 digits)
    Source document number
    u2022     AWORG Reference organizational unit (10 digits)
    Number range ID (if required)
    When the document is being processed, the system checks whether a reference document number (first part of the reference key) has been transferred.
    If an accounting document is posted via the interface in Accounting, the sending application transfers a unique reference. It consists of object key and object type. The object key consists of a reference document number and a reference organizational unit.
    Example: 1000007899 00011996
    Reference Reference organizational unit
    document no. client and fiscal year
    The object type contains a note on storing the original document.
    u2022     AWTYP (OBJ_TYPE) Reference transaction
    Sender ID
    Regards,
    Neenu Jose.

  • Creating Vendor Credit Memo Using BAPI  BAPI_ACC_DOCUMENT_POST

    Hi,
    I want to create a vendor credit memo using the bapi BAPI_ACC_DOCUMENT_POST but with posting keys as 21 and 50.Is it possible to do so.I tested the bapi passing the data to the accountgl table.Do i have to pass data to another table ?

    hi Eric,
    I even tried passing the data to the accounts receivable and accounts payable tables passing the GL account no in these tables.Still teh document get posted with keys 40 and 50.Also the credit entries should be assigned to COPA segment of sales order/item.
    The vendor credit memo should look as follows look as follows:
    Dr Vendor (PK = 21) $ 35,000
    Cr Freight expense account (PK = 50) $ 10,000……….assigned to COPA segment of sales order/ item 20000397/10
    Cr Freight expense account (PK = 50) $ 5,000……….assigned to COPA segment of sales order/ item 20000397/20
    Cr Freight expense account (PK = 50) $ 20,000……….assigned to COPA segment of sales order/ item 20000398/10

  • 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

  • Passing Material text to BAPI BAPI_SALESORDER_CREATEFROMDATE2

    Hi all,
    I am making use of BAPI_SALESORDERCREATE_FROMDAT2 for creating a sales order.
    for some orders i need to pass even the material text.
    I am not able to find the field in the BAPI structures to pass the material text.
    PLease help me solving this issue.
    Thanks in advance.
    Regards,
    Sunny.

    Hi Termi,
    just found this 5-year+ old snippet, might help:
    form prepare_item_text
       using    pv_text1      type xxxxxxxxxxxx_order_item-text1
                pv_text2      type xxxxxxxxxxorder_item-text2
                pv_kschl      type kschl
                pv_material   type matnr
                pv_itm_number type posnr
                ps_bapisdhd1  type bapisdhd1
       changing pt_order_text type ty_t_bapisdtext.
      data:
        lv_langu      type sylangu,
        ls_bapisdtext type line of ty_t_bapisdtext.
      perform get_order_text_language
        changing lv_langu.
      perform get_1st_item_text_id_4_item
        using    ps_bapisdhd1 pv_material
        changing ls_bapisdtext-text_id.
      check not ls_bapisdtext-text_id is initial.
      ls_bapisdtext-langu      = lv_langu.
      ls_bapisdtext-format_col = '*'.
      ls_bapisdtext-itm_number = pv_itm_number.
    *** Top: Material short text
    **  PERFORM get_maktx
    **    USING    pv_material lv_langu
    **    CHANGING ls_bapisdtext-text_line.
    **  APPEND ls_bapisdtext TO pt_order_text.
    *** Space line
    **  CLEAR: ls_bapisdtext-text_line.
    **  APPEND ls_bapisdtext TO pt_order_text.
      if not pv_kschl is initial.
    * In case of 'misc surcharge' item: Add condition text
        perform get_vtext_4_kschl using pv_kschl lv_langu
          changing ls_bapisdtext-text_line.
        append ls_bapisdtext to pt_order_text.
      else.
    * In case of normal item: Add IDOC item text
        ls_bapisdtext-text_line  = pv_text1.
        if not pv_text1 is initial.
          append ls_bapisdtext to pt_order_text.
          ls_bapisdtext-format_col = '='.
        endif." not pv_text1 is initial.
        ls_bapisdtext-text_line = pv_text2.
        if not pv_text2 is initial.
          append ls_bapisdtext to pt_order_text.
        endif." not pv_text2 is initial.
      endif.
    endform.                    " prepare_item_text
    xxxx had customer-related information...
    Regards,
    Clemens

  • How can I pass field value betwen view in ICWC?

    Hi experts,
    I am new to this BSP programming. I have some requirements to modify standard ICWC in CRM 5.0
    Hope can get some advices and helps here.
    I have added a new field called <status> to context note SEARCHCUSTOMER in BupaSearchB2B view and also the same field name to context note CUSTOMER in BupaCreate view.
    I have added the field into both the HTM views and able to execute thru WebClient. However, I have one problem in passing the <status> value from BupaSearchB2B view  to the BupaCreate view when I click on the 'create' button.
    I do search and saw this thread How can I pass field value beetwen view in IC Web Client? , but i cant figure out how it works.
    Do I need to create the field <status> to context note CUSTOMER in BupaSearchB2B? Currently the context note does not have any attributes.
    Really appreciate for any help.
    Edited by: mervyn tay on Apr 7, 2009 11:42 AM

    solved by myself...
    code in the CREATE_ACCOUNT method.
            ev_entity->set_property( iv_attr_name = 'ZZICNO'
                                     iv_value = lv_icnum1 ).

Maybe you are looking for

  • SSO userid for a partner application

    Hi, We have one application deployed on WebLogic Application Server this is registred as Partner application over SSO server. On application side we have installed Oracle HTTP Server as webserver and configured mod_osso. Now when user attempt to acce

  • How do I deauthorize a computer I can no longer access?

    I have five machines authorized on my account, but I only have two of the computers still. I will be getting a new one in the next couple of weeks, and will want to authorize that one. HOw can I deauthorize the ones I don't have any more? They are wi

  • Alternate for reader extension

    I want to use the capability of loading some input fields of my form at time of rendering either via web service or from database, it's required only for one of the form. Is there any alternate solution for reader extention to achieve this?

  • Fail to backup iphone

    my ios is 4.1, iphone. My Windows PC was down and I purchased new PC with new installed iTunes. fail to upgrade to the latest ios via iTune now fail to backup iphone at iTune

  • Playing a song on youtube while surfing the web (on safari)

    is this possible? IOS 7 and ipod 5.