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

Similar Messages

  • Problem with "Tax Code" and "Calculate tax automatically" fields

    Hi again.
    I have made a program which posts account documents through the BAPI_ACC_DOCUMENT_POST function module, and, since there were some fields which weren't available for me to fill having the FM by itslef, I have implemented the AC_DOCUMENT BAdI.
    All document data is provided by means of an SAP XI interface, through a Z IDoc.
    When I create the Account Receivable (and/or Payable) structure, I fill, through the BAdI, the BKPF-XMWST (Calculate tax automatically) and BSEG-MWSKZ (Tax code) fields. However, even the resulting posted document does have the Tax Information fields completed (the ones in the BSET table), the BAPI doesn't create the tax position automatically (just like the FB01 or FB60 transactions do). Note that the amounts are sent in their gross value by the interface (that's why the debit and credit sides remain consistent and the document is posted correctly).
    How can I have that position created? Is there a function module which I can call or something?
    Thanks a lot in advance.

    Hi
    I only use the fm CALCULATE_TAX_FROM_NET_AMOUNT or CALCULATE_TAX_FROM_GROSSAMOUNT in order to get all information I need to transfer to the BAPI. Both fms return the data by table parameter T_MWDAT.
    U can read this table and get all information u need, these code is from my old program, I hope it can help you:
    - Calculate tax data:
    CALL FUNCTION 'CALCULATE_TAX_FROM_NET_AMOUNT'
            EXPORTING
              I_BUKRS           = BUK_TO
              I_MWSKZ           = T_BASE-MWSKZ_OUT
              I_WAERS           = _BKPF-WAERS
              I_WRBTR           = T_BASE-WRBTR
            TABLES
              T_MWDAT           = T_MWDAT
           EXCPTIONS.
          IF SY-SUBRC <> 0.
          ELSE.
    * Load tax item
            LOOP AT T_MWDAT.
              CLEAR W_GL_ITEM.
              W_GL_ITEM-HKONT   = T_MWDAT-HKONT.
              W_GL_ITEM-MWSKZ   = T_BASE-MWSKZ_OUT.
              IF T_BASE-KBETR = T_MWDAT-KBETR.
                W_GL_ITEM-WRBTR   = T_BASE-FWSTE.
              ELSE.
                W_GL_ITEM-WRBTR   = T_MWDAT-WMWST.
              ENDIF.
              W_GL_ITEM-IVA   = 'X'.
              W_GL_ITEM-KTOSL = T_MWDAT-KTOSL.
              W_GL_ITEM-TXJCD = T_MWDAT-TXJCD.
              W_GL_ITEM-KSCHL = T_MWDAT-KSCHL.
              W_GL_ITEM-TXJCD_DEEP = T_MWDAT-TXJCD_DEEP.
              W_GL_ITEM-TXJLV = T_MWDAT-TXJLV.
              W_GL_ITEM-BASE  = T_BASE-WRBTR.
              COLLECT W_GL_ITEM INTO GL_ITEM.
    - Append GL or Tax item for the BAPI
    LOOP AT GL_ITEM INTO W_GL_ITEM .
        ITEMNO_ACC = ITEMNO_ACC + 1.
        IF W_GL_ITEM-IVA = SPACE.
    * GL item
        ELSE.
    * Tax item
          ACCOUNTTAX-ITEMNO_ACC = ITEMNO_ACC.
          ACCOUNTTAX-TAX_CODE   = W_GL_ITEM-MWSKZ.
          ACCOUNTTAX-ACCT_KEY   = W_GL_ITEM-KOSTL.
          ACCOUNTTAX-COND_KEY   = W_GL_ITEM-KSCHL.
          ACCOUNTTAX-TAXJURCODE = W_GL_ITEM-TXJCD.
          ACCOUNTTAX-TAXJURCODE_DEEP  = W_GL_ITEM-TXJCD_DEEP.
          ACCOUNTTAX-TAXJURCODE_LEVEL = W_GL_ITEM-TXJLV.
          APPEND ACCOUNTTAX.
          PERFORM FILL_AMOUNT USING W_GL_ITEM-WRBTR W_GL_ITEM-BASE.
        ENDIF.
      ENDLOOP.
    Max
    Edited by: max bianchi on Nov 25, 2009 7:43 PM

  • 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

  • Table quiry...Field name KDAUF

    Hi folks!
    I want to display sales order no. against each PO line item field name which I want to display against each po line item is KDAUF.
    Best regards

    VBAK and VBAP for sales order header and item
    EKKN has the accouting information to a purchase order, e.g. the sales order number.
    EKKO and EKPO are purchase order header and item.

  • BAPI_ACC_DOCUMENT_POST - How to generate tax items

    Hi,
    I am trying to implement the posting of accounting documents via BAPI_ACC_DOCUMENT_POST, and struggling to get the tax postings to work properly. 
    The process requires me to produce the same outcome as a user manually posting the document via FB01 where tax items are automatically generated.  So I need to confirm how to calculate and post the tax items.
    I need more information on how to retrieve the data to pass to the ACCOUNTTAX parameter of the bapi and the mapping of the data to the ACCOUNTAX fields.  And also the corresponding CURRENCYAMOUNT parameter, I am interested to know if I have to populate the base amount fields as well as the document amount field.

    Murray,
    I have solved your problem in your other question.
    Please, try to ask question only in one forum. For this type of question, the ABAP forum is the right one. This is becuase ABAP coding is involved.
    See: BAPI_ACC_DOCUMENT_POST How to fill ACCOUNTTAX
    Best regards, Johan

  • Problem with tax calculate tax in BAPI_ACC_DOCUMENT_POST

    Hi ,
    I am using BAPI_ACC_DOCUMENT_POST to  post financial details to G/L accounts .
    The BAPi has created the acoounting document with the data I have passed,but I am
    unable to calculate tax(i.e.When i click Calculate tax check box in FB01 ,a tax line item gets created,)
    but the same is not happening when i use the BAPI.
    Can any one throw light on the data that needs to be passed to the TABLE ACCOUNTTAX and how the
    corresponding changes that needs to be done to TABLE CURRENCYAMOUNT inorder to create this new line item.
    i have also had a look at the OSS notes but still am facing issue .
    Pl help!!I

    Hi
    This is my code to fill ACCOUNTTAX:
    LOOP AT GL_ITEM INTO W_GL_ITEM .
        ITEMNO_ACC = ITEMNO_ACC + 1.
        IF W_GL_ITEM-VAT = SPACE.
          ACCOUNTGL-ITEMNO_ACC = ITEMNO_ACC.
          ACCOUNTGL-GL_ACCOUNT = W_GL_ITEM-HKONT.
          ACCOUNTGL-BUS_AREA   = W_GL_ITEM-GSBER.
          ACCOUNTGL-TAX_CODE   = W_GL_ITEM-MWSKZ.
          ACCOUNTGL-PROFIT_CTR = W_GL_ITEM-PRCTR.
          ACCOUNTGL-COSTCENTER = W_GL_ITEM-KOSTL.
          ACCOUNTGL-REF_KEY_2  = W_GL_ITEM-XREF2.
          ACCOUNTGL-REF_KEY_3  = W_GL_ITEM-XREF3.
          APPEND ACCOUNTGL.
          PERFORM FILL_AMOUNT USING W_GL_ITEM-WRBTR 0.
          CLEAR ZSDFI_BAPI_EXTENSION.
          ZSDFI_BAPI_EXTENSION-ITEMNO_ACC = ITEMNO_ACC.
          ZSDFI_BAPI_EXTENSION-ZLIFNR     = W_GL_ITEM-ZLIFNR.
          ZSDFI_BAPI_EXTENSION-CANALE     = W_GL_ITEM-ZJ_3AKVGR6.
          MOVE ZSDFI_BAPI_EXTENSION TO EXTENSIONS.
          APPEND EXTENSIONS.
        ELSE.
          ACCOUNTTAX-ITEMNO_ACC = ITEMNO_ACC.
          ACCOUNTTAX-TAX_CODE   = W_GL_ITEM-MWSKZ.
          ACCOUNTTAX-ACCT_KEY   = W_GL_ITEM-KOSTL.
          ACCOUNTTAX-COND_KEY   = W_GL_ITEM-KSCHL.
          ACCOUNTTAX-TAXJURCODE = W_GL_ITEM-TXJCD.
          ACCOUNTTAX-TAXJURCODE_DEEP  = W_GL_ITEM-TXJCD_DEEP.
          ACCOUNTTAX-TAXJURCODE_LEVEL = W_GL_ITEM-TXJLV.
          APPEND ACCOUNTTAX.
          PERFORM FILL_AMOUNT USING W_GL_ITEM-WRBTR W_GL_ITEM-BASE.
        ENDIF.
      ENDLOOP.
    FORM FILL_AMOUNT USING    P_AMOUNT P_BASE.
      CURRENCYAMOUNT-ITEMNO_ACC = ITEMNO_ACC.
      CURRENCYAMOUNT-CURR_TYPE  = '00'.
      CURRENCYAMOUNT-CURRENCY   = T001-WAERS.
      CURRENCYAMOUNT-AMT_DOCCUR = - P_AMOUNT.
      CURRENCYAMOUNT-AMT_BASE   = - P_BASE.
      APPEND CURRENCYAMOUNT.
    ENDFORM.                    " FILL_AMOUNT
    The tax data are picked by fm CALCULATE_TAX_FROM_NET_AMOUNT
    REFRESH T_MWDAT.
          CALL FUNCTION 'CALCULATE_TAX_FROM_NET_AMOUNT'
               EXPORTING
                    I_BUKRS           = BUK_TO
                    I_MWSKZ           = T_BASE-MWSKZ_OUT
                    I_WAERS           = _BKPF-WAERS
                    I_WRBTR           = T_BASE-WRBTR
               TABLES
                    T_MWDAT           = T_MWDAT
               EXCEPTIONS
                    BUKRS_NOT_FOUND   = 1
                    COUNTRY_NOT_FOUND = 2
                    MWSKZ_NOT_DEFINED = 3
                    MWSKZ_NOT_VALID   = 4
                    KTOSL_NOT_FOUND   = 5
                    KALSM_NOT_FOUND   = 6
                    PARAMETER_ERROR   = 7
                    KNUMH_NOT_FOUND   = 8
                    KSCHL_NOT_FOUND   = 9
                    UNKNOWN_ERROR     = 10
                    ACCOUNT_NOT_FOUND = 11
                    TXJCD_NOT_VALID   = 12
                    OTHERS            = 13.
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ELSE.
            LOOP AT T_MWDAT.
              CLEAR W_GL_ITEM.
              W_GL_ITEM-HKONT   = T_MWDAT-HKONT.
              W_GL_ITEM-MWSKZ   = T_BASE-MWSKZ_OUT.
              IF T_BASE-KBETR = T_MWDAT-KBETR.
                W_GL_ITEM-WRBTR   = T_BASE-FWSTE.
              ELSE.
                W_GL_ITEM-WRBTR   = T_MWDAT-WMWST.
              ENDIF.
              W_GL_ITEM-VAT   = 'X'.
              W_GL_ITEM-KTOSL = T_MWDAT-KTOSL.
              W_GL_ITEM-TXJCD = T_MWDAT-TXJCD.
              W_GL_ITEM-KSCHL = T_MWDAT-KSCHL.
              W_GL_ITEM-TXJCD_DEEP = T_MWDAT-TXJCD_DEEP.
              W_GL_ITEM-TXJLV = T_MWDAT-TXJLV.
              W_GL_ITEM-BASE  = T_BASE-WRBTR.
    I hope it can help you
    Max

  • Tax Form: HR_F_MMREF_1_MD 'RV' Record 'Source Field Names'

    Hi,
    Without "Save" of the original (delivered) definition of the subject "Tax Form", the form was updated and customized by mistake or stupidity. (We are ECC 6.0 HR Rel 600 Level 0022 Payroll.)
    If anyone can browse his or her "Tax Form Definition" via SPRO=>U S Payroll=>Tax Reporter=>Tax Form Definition=>Define Original Tax Form=> Select "HR_F_MMREF_1_MD" and RV Record..
    Please let me know the Source Field Names of the following locations:
    RV 088
    RV 149
    RV 185
    RV 209
    RV 233
    RV 269
    RV 297
    RV 312
    RV 320....
    Thanks.
    Ben

    Hi Arthi,
    Thanks for the reply ,  for TAX form Group W2M1, W2M2, W2M3  , while configuring Evaluation of tax form
    the following items required to select
    Evaluation of tax forms (Employee info required)
    Time ranges , in which data will be stored
    Reporting of retro calculation
    Please let me know how to configure these evaluation forms ?? and Does  any wagetypes needed to be assigned to these tax form groups ??
    Note:
    The customers has to use manual entries options in PU19 and use the below TFG to populate the respective fields accordingly.
    W2M1 MW508-Employer Total Tax Exempt Credits
    W2M2 MW508-Overpayment to be credited
    W2M3 MW508-Overpayment to be refunded

  • 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.

  • Calculate  PO item level tax

    Hi,
    I need to calculate PO item level tax. I need some help in this.
    Regards,
    Nikita

    >
    Gautham Vangaveti wrote:

    > if you want tax related tables you have so many posts available in SCN if you search.
    Hi Gautham,
    I dont want tax related tables only. I want the whole procedure and the relation between different fields that appear in the transaction ME22N. (for tax tabs).
    I have already searched in all the previous posts and then only have put the post . But even then , thanks alot for the suggestion.
    Regards,
    Nikita

  • Field name of free item in ME21N

    Hi All,
    I have a small issue hear in ME21N I wan the table and the field which will be updated when the we check the check box for free item in the line items, I tried to find that using CDHDR, CDPOS, using ST05 and other methods but I was unable to do that can any of u please help me in finding that field along with table mane which will be updated and to give further information the screen field name is UMSON
    Regards,
    Antony

    Hello Antony,
    The 'Free Item' indicator is only used to facilitate the switching off of the 'Inv.Receipt' flag. 
    The flag UMSON is not contained in any table, only in structures.  
    But there is a correlation between the flag UMSON and the field EKPO-REPOS. So if you flag field EKPO-REPOS (an invoice is expected) the flag UMSON will be cleared and the other way around.
    For further information about this flag: You will not be able to enter any conditions in your purchase order item (not even the delivery costs) once the flag for 'Free item' has been set.
    In case the 'Inv.Receipt' flag is unticked, the system will not allow you to maintain any conditions in the purchase order, not even the delivery costs. In ME21N you can see that even the condition tab disappears as soon as you set the 'Free item'  indicator or as soon as you de-select the 'Inv.Receipt' flag.                                                                               
    Whenever the 'Inv.Receipt' flag is not set, we are indicating to the system that all the goods are to be delivered free of charge. In other words, there can be no delivery costs associated with the PO. Also, no delivery costs are allowed without an invoice receipt.                 
    I hope this helps.
    Esther.

  • Add Fields from table ADRC (Fields Name 1 to 4) for Open Item Processing

    Hi SAP Expert:
    Our client requires vendor/customer name to be displayed in the open item processing line layout for transaction code f-58, so they can double check if the vendor name is complete as intended. 
    We intend to add fields from table ADRC instead of REGUH since the characters in maintaining vendor/customer name is 40 characters and REGUH - ZNME1s are only 35 characters. 
    We have managed to add fields from ADRC and change the SAPDF05X program and were able to display the names in open item layout, except that the program seems to "automatically" create a generic table which only carries 30 characters of the vendor/customer name.  The source table should be RFOPS_DK but the program automatically looks up from table RFOPS_GEN for the particular fields - Name 1 to 4.  Is there a way to "instruct" the program to use RFOPS_DK instead of RFOPS_GEN?
    Hope this will merit somebody's attention... Thanks !!!

    Thanks,  i have assigned the layout via o7v3,  it is the program that i have a problem with,  actually another program that we change is the program MF05BFPO where it generates data to be displayed in the FBZ4 screen,  though we add a field with 40 characters (ADRC Name 1 to 4)  what the program dispalys is a 30 character Name1 to 4 from structure RFOPS_GEN. 
    My question is can i extend/change the structure RFOP_GEN to 40 characters,  is there any SAP standard program that will aftected if i do so?  thank very much...
    Lorena

  • How to show the field Item foreign name in Inventory Audit Report

    Hi
    I can't find the field Item foreign name showing in Inventory Audit Report.I want to link with the table OITM in PDL in order to show Item foreign name in paper report,but whatever I do, it seems doesn't work.
    plz tell me how  to do .thx.
    Edited by: Kam on Mar 13, 2009 10:37 AM

    ALD - Advance Layout Designer
    QLD - Query Print Layout Designer
    You could search the forum for the links to those two tools.
    Thanks,
    Gordon

  • 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

  • What is the field name for item serial number

    hi all
    i am doing dispatch report .... i need field name and table name for [item serial number (min) from batch number of that delivery material,item serial number (max) from batch number of that delivery material] ... actually this was the exact term given in the spec. can any one help me out
    regards
    aswin

    some more tables :
    SER00 .. SER08 , or type SER* in SE11 and press F4, you will get some more.
    and <a href="http://www.erpgenie.com/sap/sapfunc/serialnumbers.htm">Check this</a>

  • BAPI Structure populating using field name and field value frm internal tbl

    Hi Experts,
                     Need your help, my requirement is to populate BAPI import structure using its field name and filed value  stored in a internal table.  Please advise the best approach.
    Regards
    Ram.

    Hi, in an ABAP program you can make use of FIELD-SYMBOLS and the ASSIGN statement for filling the BAPI fields based on the fieldname found in the internal table. Hopes it answer your question. Succes

Maybe you are looking for