BAPI_ACC_DOCUMENT_POST with CALCULATE_TAX_FROM_NET_AMOUNT

Hi,
Anyone know how the above works? I need to calculate tax with the Acc_Document_Post bapi and a solution i heard of is by using the CALCULATE_TAX_FROM_NET_AMOUNT FM. Ive passed everything required into the FM and it return the internal table t_mwdat.
I know that the final step is to somehow map that to the E1BPACTX09 tax item...thats where im geting stuck!
With the rest of the program i just passed the header rec, vendor line and expenses line to the corresponding fields in e1bpache09, e1bpacgl09 etc like in the code below...now i need to do something like this with the FM?
Populate header structure.
  MOVE:  c_rfbu TO   e1bpache09-bus_act,
         sy-uname TO  e1bpache09-username,
         l_doctype     TO e1bpache09-doc_type.
  MOVE-CORRESPONDING pi_hdr_rec TO e1bpache09.
  PERFORM populate_idoc_segments TABLES lt_idoc_data
                                 USING c_e1bpache09 l_cnt '01'
                                 e1bpache09 space
                                 CHANGING ls_idoc_data.
Thanks,
David

Hi,
Here is the sample code. check if some thing is missing in ur code.
http://helponabap.blogspot.com/2009/03/help-on-bapiaccdocumentpost-and.html
Reddy

Similar Messages

  • BAPI_ACC_DOCUMENT_POST with TAX posting for FB60 t-code

    Hi Experts,
    I am trying upload the data using BAPI_ACC_DOCUMENT_POST with Tax(ACCOUNTTAX) for the FB60 t-code. But not getting right.
    Any help on this issue greatly appreciated.
    Thanks & Regards,
    Harish

    Hi,
    Check out this-
    FU BAPI_ACC_DOCUMENT_POST
    Short Text
    Accounting: Posting
    Functionality
    Using this method you can create a posing in accounting for certain business transactions.
    Possible ( Business Transactions):
    Postings that generally only affect the general ledger. (RFBU)
    Billing: For billing in Sales and Distribution, accounting is supplied with the relevant billing data. (SD00) Billing Document
    Accounting can use the data of a logistics system that result from an Invoice Receipt. (RMRP)
    Goods Movement are triggered by transactions in Sales and Distribution or by inventory postings. Within logistics, they lead to a change in the warehouse stocks of <DS:GLOS.Inventory Management>Inventory Management. This results in a posting in accounting. This is why accounting is supplied with the relevant data from logistics. (RMWA)
    Example
    Billing document:
    By selling goods in accordance with targets, revenue is generated. The revenue is posted in billing and forwarded to accounting.
    Invoice receipt:
    Raw materials are purchased in accordance with targets. The invoice receipt is posted in a logistics system. The data from the raw materials is forwarded to accounting.
    Goods Movment:
    The use of raw materials leads to a change in stock in inventory managment. The posting of raw material consumption is forwarded to accounting.
    G/L Account Posting:
    Provision posting for an expected warranty service. This can refer to acquisitions or retirements belonging to stocks that are not in subledger accounting relevant to inventory management. This is particularly the case if such materials are not displayed as vendor/customer, materials, loans etc. or cannot be displayed in this way. This can also refer to write-ups or depreciation that contain higher aggregations of values than are maintained in a corresponding subledger that is relevant to inventory management.
    The conversion of foreign currencies for receivables/payables due to large exchange rate changes that should not lead to an update of the accounts payable or accounts receivable accounting. A similar transaction can arise for the revaluation of raw materials if this revaluation takes place at a correspondingly aggreagated level.
    Reclassification of inventory of P&L statement accounts that are only used for reconcilliation purposes in the general ledger (this rearranges values for balance sheet items).
    Balance reclassifications of stocks to receivables with different return times.
    Notes
    If the parameter CurrencyAmount is filled with the currency fields, a complete document check including characteristics and value components of profitability analysis (CO-PA). Otherwise, the account assignment objects are checked.
    Messages are returned in the parameter Return. In the parameter documentation you can find the return values and their meaning.
    Further information
    You can find further information in the SAP Library under "Financials -> Accounting - General (AC) -> Interfaces to Accounting (AC)".
    Parameters
    DOCUMENTHEADER
    CUSTOMERCPD
    CONTRACTHEADER
    OBJ_TYPE
    OBJ_KEY
    OBJ_SYS
    ACCOUNTGL
    ACCOUNTRECEIVABLE
    ACCOUNTPAYABLE
    ACCOUNTTAX
    CURRENCYAMOUNT
    CRITERIA
    VALUEFIELD
    EXTENSION1
    RETURN
    PAYMENTCARD
    CONTRACTITEM
    EXTENSION2
    REALESTATE
    ACCOUNTWT
    Reward if useful!

  • BAPI_ACC_DOCUMENT_POST - With Holding Tax

    Hi All,
       I am able to post vendor invoice along with withholding tax using BAPI_ACC_DOCUMENT_POST and document posted successfully.
    In the cases if a single document is posted for multiple vendors and customers document is getting posted but withholding tax information is not correct. If the vendor is not liable for tax then it should not open the withholding tax information screen for that vendor but in this case the window is opening.
    If the document is posted only for single vendor which is not liable for tax then withholding tax information screen is not opening it is displaying the information only which is correct.
    In the case of multiple vendors I am filling ACCOUNTWT table parameter with corresponding vendor line item number and its withholding tax details , if the vendor is not liable for tax then I am not filling any details for that vendor in this table parameter.
      So can anyone  suggest some solution to post single document for multiple vendors and customers along withholding tax using the above BAPI.
    Thanks & Regards,
    Prakash

    Hi,
    Here is the sample code. check if some thing is missing in ur code.
    http://helponabap.blogspot.com/2009/03/help-on-bapiaccdocumentpost-and.html
    Reddy

  • Post document with BAPI_ACC_DOCUMENT_POST with withholding taxes

    Hi everyone!
    I have to post some documents that I got from an Excel file. At first, they were G/L documents, so I only filled the table parameter ACCOUNTL of BAPI_ACC_DOCUMENT_POST to set the "account data" (without using ACCOUNTRECEIVABLE, ACCOUNTPAYABLE, ACCOUNTTAX or ACCOUNTWT).
    After a few, another Posting Keys were allowed in the lines of the documents obtained from the excel file, so the documents can be G/L documents, receipts, etc.But, I still put every account data in ACCOUNTGL, and the created documents were right (at least nobody complained about them :P ).
    No, 3 fields have been added in the excel file:
    - QSSHB: Withholding Tax Base Amount
    - QSFBT: Withholding Tax-Exempt Amount (in Document Currency)
    - QSSKZ: Withholding Tax Code
    As I understood, this BAPI is ready to allow withholding taxes, and I suppose I should have to fill this fields that I receive into some tables that are used as parameters in the BAPI. For example,
    ACCOUNTWT-WT_CODE = Withholding Tax Code
    ACCOUNTWT-BAS_AMT_LC = Withholding Tax Base Amount (Local Currency)
    I think I should use this table (I don't know where I could "put" the other one). My question is, can I do that without using tables ACCOUNTRECEIVABLE and ACCOUNTPAYABLE? My feeling is that is not completely right not to use these tables if the documents are vendor or customer documents... If that's possible.. is it right to put the 2 fields that I have used in the last example (*) to fill that? Where I should put the third field??
    I hope I have explained myself clearly, thanks in advance,
    Victor

    Dear Sreeraj,
    The situations would be multiple, but to be precise I'll provide you one scenario where this BAPI would be failing to do the posting. The scenario is like this:
    1. If you consider GL posting using F-02 by changing any of the reference fields XREF1, or XREF2, the BAPI has to consider the varying screens of each of the line items which internally depends on Transaction Variants of different screens of the Document, which the BAPI will fail to do so.
    2. Also, if there is a Taxation to be done for each Item, still it should consider the above scenario and fill the WITH tables accordingly.
    Hope this helps,
    Regards,
    -Wahid Hussain.

  • 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

  • Bapi_acc_document_post with VST tax

    I've been using this bapi for some time with US tax codes and now need to make it work with Canadian codes.
    The Canadian tax codes in our system are set as 'Deductible' (T007B-STAZF 'tax not deductible' is left blank).
    I am passing tax information in AccountTax to the bapi and the same line is also in CurrencyAmount.
    There is a place in the code where the tax line is not eliminated from table it_acccr because it is not considered NAV or NVV (stazf is not eq to 'X'). 
    This causes the bapi to think the document is out of balance by the amount of the tax.
    Example:
    AccountGL 
    10   154000 (for the tax)
    20   476000 (for the expense)
    30   113100 (for the offset)
    AccountTax
    10000000  154000  MWVS    VST   V1
    CurrencyAmount
    10       14.89  (the tax)
    20       85.11  (the expense)
    30     -100.00 (the offset)
    10000000 14.89 (for the tax entry)
    If the tax is NAV or NVV the forth line is deleted and 10 - 30 are used to determine balance - no problem. When VST all four lines are used to determine balance and balance is then not zero.
    If feel that I must not understand VST taxes and am doing something wrong in setting up the tables to send to the BAPI.  Can any one shed light?
    I have searched and searched OSS and have not seen anything addressing this.

    There is an entry in AccountTax table
    Itemno_acc  0010000000
    GL_account  0000154000
    Cond_Key    MWVS
    Acct_Key    VST
    Tax_code    V1
    Tax_Rate    175.000
    There is a corresponding entry in CurrencyAmount
    Itemno_acc   0010000000
    Currency     GBP
    Amt_Doccur   14.89
    Amt_base     85.11
    I'm following the exact same format as when the tax acct key is NVV.

  • BAPI_ACC_DOCUMENT_POST    Giving an error while posting

    Hi friends,
    I wanted to post a Document using  bapi BAPI_ACC_DOCUMENT_POST with tax data and jurisdiction code. Getting an error message " E RW 003 No currency information transferred into Accounting" though I have given  the Currency info.    
    Below is the data that passed to the BAPI
    <header> data
    OBJ_TYPE                       BKPFF         
    OBJ_KEY                        $             
    OBJ_SYS                        T90CLNT810    
    BUS_ACT                        RFBU          
    USERNAME                       MNAGOORI      
    HEADER_TXT                      DOCU POST MD 
    COMP_CODE                      3000          
    DOC_DATE                       17.01.2007    
    PSTNG_DATE                     17.01.2007    
    TRANS_DATE                                   
    FISC_YEAR                      2007          
    FIS_PERIOD                     01            
    DOC_TYPE                       WE            
    REF_DOC_NO                                   
    ACCOUNTGL TABLE DATA
    ITEMNO_ACC                  0000000001 
    GL_ACCOUNT                  445000     
    ITEM_TEXT                      TEST FOR MD1
    REF_KEY_3                      40         
    ACCT_KEY                                  
    ACCT_TYPE                      S          
    COMP_CODE                    3000       
    BUS_AREA                       9900       
    ACCOUNTPAYABLE
    ITEMNO_ACC                     0000000002
    VENDOR_NO                      9999      
    GL_ACCOUNT                     191100    
    REF_KEY_1                                
    REF_KEY_2                                
    REF_KEY_3                      50        
    COMP_CODE                      3000      
    BUS_AREA                       9900      
    ITEM_TEXT                        TEST
    AccountTax table
    ITEMNO_ACC                     0000000001
    GL_ACCOUNT                     445000   
    COND_KEY                       JP1I     
    ACCT_KEY                       NVV      
    TAX_CODE                       I1       
    TAX_RATE                          6,000 
    TAX_DATE                                
    TAXJURCODE                     PA0000000
    ITEMNO_ACC                     0000000002
    GL_ACCOUNT                     191100    
    COND_KEY                       JP1I      
    ACCT_KEY                       NVV       
    TAX_CODE                       I1        
    TAX_RATE                          6,000  
    TAX_DATE                                 
    TAXJURCODE                     PA0000000 
    CurrencyAmount table
    ITEMNO_ACC                     0000000001                    
    CURR_TYPE                      00                            
    CURRENCY                       USD                           
    CURRENCY_ISO                   USD                           
    AMT_DOCCUR                                          100,0000 
    EXCH_RATE                                                    
    EXCH_RATE_V                                                  
    AMT_BASE                                            100,0000 
    ITEMNO_ACC                     0000000002                     
    CURR_TYPE                      00                             
    CURRENCY                       USD                            
    CURRENCY_ISO                   USD                            
    AMT_DOCCUR                                          100,0000- 
    EXCH_RATE                                                     
    EXCH_RATE_V                                                   
    AMT_BASE                                            100,0000- 
    I could able to post without tax data.
         I feel some of the feilds are missing the required data. Please any one could help me.
    Thanks
    Md

    Hi Aaron,
                I am testing the BAPI in SE37, the values are given below  which I am trying to post.
    [code]
    ****<header> data
    OBJ_TYPE         BKPFF
    OBJ_KEY           $
    OBJ_SYS           T90CLNT810
    BUS_ACT            RFBU
    USERNAME        MNuser
    HEADER_TXT      DOCU POST MD
    COMP_CODE      3000
    DOC_DATE          17.01.2007
    PSTNG_DATE      17.01.2007
    TRANS_DATE
    FISC_YEAR          2007
    FIS_PERIOD         01
    DOC_TYPE           WE
    REF_DOC_NO
    ACCOUNTGL TABLE DATA
    ITEMNO_ACC             0000000001
    GL_ACCOUNT            445000
    ITEM_TEXT                 TEST FOR MD1
    REF_KEY_3                40
    ACCT_TYPE                S
    COMP_CODE              3000
    BUS_AREA                 9900
    ACCOUNTPAYABLE
    ITEMNO_ACC                0000000002
    VENDOR_NO                9999
    GL_ACCOUNT               191100
    REF_KEY_1
    REF_KEY_2
    REF_KEY_3                   50
    COMP_CODE                3000
    BUS_AREA                    9900
    ITEM_TEXT                     TEST
    AccountTax table
    ITEMNO_ACC               0000000001
    GL_ACCOUNT               445000
    COND_KEY                 JP1I
    ACCT_KEY                  NVV
    TAX_CODE                   I1
    TAX_RATE                   6,000
    TAX_DATE
    TAXJURCODE                PA0000000
    ITEMNO_ACC               0000000002
    GL_ACCOUNT             191100
    COND_KEY                 JP1I
    ACCT_KEY                  NVV
    TAX_CODE                    I1
    TAX_RATE                   6,000
    TAX_DATE
    TAXJURCODE               PA0000000
    CurrencyAmount table
    ITEMNO_ACC            0000000001
    CURR_TYPE             00
    CURRENCY               USD
    CURRENCY_ISO         USD
    AMT_DOCCUR           100,0000
    AMT_BASE               100,0000
    ITEMNO_ACC               0000000002
    CURR_TYPE                00
    CURRENCY                 USD
    CURRENCY_ISO          USD
    AMT_DOCCUR             100,0000-
    AMT_BASE                 100,0000-
    [/code]
    Thanks
    Md

  • Reg: Correction of Wrong  With holding tax  amount  Values Posted via BAPI

    Hello Experts,
    I have posted some invoices using BAPI_ACC_DOCUMENT_POST with With holding tax code and amount now the thing is that ..the document is posted successfully  with Wrong  With hoding tax amount data in TABLE WITH_ITEM due to this while executing t-code F-53 ( Outgoing payments )   its not calculating the with holding tax amount for the invoice .
    Now i wan't to correct ( Negate some values) the values in  WITH_ITEM table.....
    How am i going to do it..!
    Plz..experts help.
    Plz waiting for your input

    Dear All,
    this is not an error but the Standard System Design. Please read the note 611844. Only if You insert manually the WT amounts during the posting You will see them into the WT TAB after the posting. If You make the System to calculate the WT Aamounts automatically, no WT amounts will be reported into MIRO/MIR4. You can see them into the follow on document.
    I hope this helps.
    Mauri

  • How to post asset using BAPI_ACC_DOCUMENT_POST w/o creating custom OBJ_TYPE

    Hi,
    I want to post asset together with expense into one document. The first approach is to use BAPI_ACC_DOCUMENT_POST with custom obj_type, like ZBKPF. But when we post using the custom obj_type, we cannot reverse the document using FB08.
    Is that anyway we can post using BAPI_ACC_DOCUMENT_POST and reverse using FB08?
    Or is that any BAPI that can do this?
    Thanks,
    Tai
    Edited by: Tai Pang Ng on Apr 8, 2011 9:37 PM

    It is because I want to post asset. I tried to post my asset without specified the obj_type and acc_type, then I got an error saying cannot direct post thru my GL account. That's true becuase posting asset, we just use asset number and reconciliation GL.
    Then I tried to put my asset no in GL field, then I got another error saying the GL is not in Chart of Account, and that's true also becuase the asset no is never config in our chart of account.
    Then I found out that I had to specified the acct_type to 'A'. After that, I got another error saying RFBURFBU000000000000 is not define. That's I cannot post this thru obj_type RBFU. After checking that, I had to specified bus_act to RMWE and custom obj_type to some Z value to make it go.
    But after all these, I cannot reverse my posting using FB08 anymore because this is an custom obj_type and not allow to reverse using FB08.
    Please let me know if I made mistake in the above.
    Thanks,
    Tai

  • Extension2 in bapi_acc_document_post

    hi,
    i am posting account documnet in using bapi_acc_document_post with custom feilds on BKPF.
    so i already append custom structure as Z0CUST01 to BKPF table which contains ZA1, ZA2.
    when i tried to post, i got no error , document successfully posted, but no customed filed saved in BKPF table.
    what's wrong? please help me
    DATA: ls_zzz TYPE Z0CUST01.
    CLEAR it_ext2.
    it_ext2-structure = 'Z0CUST01'.
    ls_zzz-za1 = 'AAA'.
    ls_zzz-za2 = 'BBB'.
    MOVE ls_zzz TO it_ext2-valuepart1.
    APPEND it_ext2.
    call function 'BAPI_ACC_DOCUMENT_POST'
    exporting
    documentheader = gd_documentheader
    customercpd = gd_customercpd
    contractheader = gd_fica_hd
    importing
    obj_type = l_type
    obj_key = l_key
    obj_sys = l_sys
    tables
    accountgl = it_accountgl
    accountreceivable = it_accountreceivable
    accountpayable = it_accountpayable
    accounttax = it_accounttax
    currencyamount = it_currencyamount
    criteria = it_criteria
    valuefield = it_valuefield
    extension1 = it_ext
    return = it_return
    paymentcard = it_paymentcard
    contractitem = it_fica_it.
    extension2 = it_ext2
    realestate = it_re.

    Hi,
    have a look at [SAP documentation|http://help.sap.com/saphelp_nw04/helpdata/en/6b/3f6d2b6d0711d396a50004ac96334b/frameset.htm].
    Cheers

  • Exchange rate in BAPI_ACC_DOCUMENT_POST

    Is there any way to post document using BAPI_ACC_DOCUMENT_POST with exchange rate as /1.2

    Hi Thomas,
    I tried the conversion routine to convert from external to internal and vice versa, but it is not able to convert '/' (slash). When we entered slash in the screen, the value captured is in negatinve ( eg screen entry /1,2 , value captured -1.2) and we cannot post with negative exchange rate. Slash is used for dividing exchange rate.

  • Bapi for f-28 while posting with Pmnt advice no

    Hi friends,
                       Is it possible to upload data using bapi BAPI_ACC_DOCUMENT_POST  with payment advice number,
    or is any other bapi exits for it or i hav to use bdc for it.
    Binoy R

    Hello max,
    thanks for your valuable response.
    But as this BAPI can not be used what next can be done?
    Actually i want to create interface between SAP system and Non-SAP system which is using IBIS software.
    Interface is to be done in such way that IBIS report output should get posted directly in SAP system via F-28 on daily basis.
    Report of IBIS contains payments made by customers in a day.
    So definitely there are some open items in SAP that need to clear after posting for particular customer.
    Shall I go for 'Z' BAPI ? or is there any other technique for interface between two?
    Please suggest.
    Thank You.

  • GSBER is empty via BAPI_ACC_DOCUMENT_POST

    Hello!
    Could you help?
    I'm creating the financial document through BAPI_ACC_DOCUMENT_POST with two tax positions.
      PE_DOCUMENTHEADER-BUS_ACT = 'RFBU'.
      PE_DOCUMENTHEADER-USERNAME = SY-UNAME.
      PE_DOCUMENTHEADER-HEADER_TXT = PI_BKTXT.
      PE_DOCUMENTHEADER-COMP_CODE = '40'.
      PE_DOCUMENTHEADER-DOC_DATE = '20080901'.
      PE_DOCUMENTHEADER-PSTNG_DATE = '20080901'.
      PE_DOCUMENTHEADER-FISC_YEAR = '09'.
      PE_DOCUMENTHEADER-FIS_PERIOD = '01'.
      PE_DOCUMENTHEADER-DOC_TYPE = 'SA'.
      PE_DOCUMENTHEADER-REF_DOC_NO = PI_XBLNR.
      LWA_ACCOUNTTAX-ITEMNO_ACC = '0000000001'.
      LWA_ACCOUNTTAX-GL_ACCOUNT = '1420-'.
      LWA_ACCOUNTTAX-TAX_CODE = 'NX'.
      append LWA_ACCOUNTTAX to PET_ACCOUNTTAX.
      LWA_ACCOUNTTAX-ITEMNO_ACC = '0000000002'.
      LWA_ACCOUNTTAX-GL_ACCOUNT = '1420-20'.
      LWA_ACCOUNTTAX-TAX_CODE = 'RT'.
      append LWA_ACCOUNTTAX to PET_ACCOUNTTAX.
      LWA_CURRENCYAMOUNT-ITEMNO_ACC = '0000000001'.
      LWA_CURRENCYAMOUNT-CURRENCY = 'KZT'.
      LWA_CURRENCYAMOUNT-AMT_DOCCUR = '819809,65'.
      LWA_CURRENCYAMOUNT-AMT_BASE = '6306228,10'.
      append LWA_CURRENCYAMOUNT to PET_CURRENCYAMOUNT.
      LWA_CURRENCYAMOUNT-ITEMNO_ACC = '0000000002'.
      LWA_CURRENCYAMOUNT-CURRENCY = 'KZT'.
      LWA_CURRENCYAMOUNT-AMT_DOCCUR = '-819809.65 '.
      LWA_CURRENCYAMOUNT-AMT_BASE = '-6306228.10 '.
      append LWA_CURRENCYAMOUNT to PET_CURRENCYAMOUNT.
      LWA_EXTENSION1-FIELD1+0 (5) = 'ID001'.
      LWA_EXTENSION1-FIELD1+5 (5) = 'DOC02'.
      LWA_EXTENSION1-FIELD1+10 (10) = '0000000001'.
      LWA_EXTENSION1-FIELD1+20 (4) = '4001'.
      LWA_EXTENSION1-FIELD2 = PI_SGTXT.
      append LWA_EXTENSION1 to PET_EXTENSION1.
      LWA_EXTENSION1-FIELD1+0 (5) = 'ID001'.
      LWA_EXTENSION1-FIELD1+5 (5) = 'DOC02'.
      LWA_EXTENSION1-FIELD1+10 (10) = '0000000002'.
      LWA_EXTENSION1-FIELD1+20 (4) = '4001'.
      LWA_EXTENSION1-FIELD2 = PI_SGTXT.
      append LWA_EXTENSION1 to PET_EXTENSION1.
        call function 'BAPI_ACC_DOCUMENT_POST'
          exporting
            DOCUMENTHEADER = PI_DOCUMENTHEADER
          tables
            ACCOUNTTAX = PIT_ACCOUNTTAX
            CURRENCYAMOUNT = PIT_CURRENCYAMOUNT
            EXTENSION1 = PIT_EXTENSION1
            RETURN = PET_RETURN.
        commit work.
    In 'Customer Exit'
      read table EXTENSION index 1.
      case EXTENSION-FIELD1+0 (5).
        when 'ID001.' " ZFIAM_LIZING
            loop at EXTENSION.
      case EXTENSION-FIELD1+5 (5).
        when 'DOC01'.
          read table IT_ACCIT with key POSNR = EXTENSION-FIELD1+10 (10).
          if SY-SUBRC is initial and EXTENSION-FIELD1+20 (2) ne SPACE.
            IT_ACCIT-BSCHL = EXTENSION-FIELD1+20 (2).
          endif.
          modify IT_ACCIT index SY-TABIX.
        when 'DOC02'.
          read table IT_ACCIT with key POSNR = EXTENSION-FIELD1+10 (10).
          if SY-SUBRC is initial.
            if EXTENSION-FIELD1+20 (4) ne SPACE.
              IT_ACCIT-GSBER = EXTENSION-FIELD1+20 (4).
            endif.
            if EXTENSION-FIELD2 is not initial.
              IT_ACCIT-SGTXT = EXTENSION-FIELD2.
            endif.
            modify IT_ACCIT index SY-TABIX.
          endif.
      endcase.
            endloop.
    endcase.
    In Customer exit I put Business Area into IT_ACCIT-GSBER but in the created document Business Area is empty.
    When I create the same document through transaction FB01, Business Area is not empty.

    Hello
    Thank you for your answer but value saved is correct in the table it_accit.
    I tryed to find where GSBER is cleaning and found FM FI_SUBST_GSBER. Lower I wrote piece of code where GSBER is cleaning.
          IF t_accit-taxit = xon AND t_accit-xbilk = xon.
            IF brazil IS INITIAL.   "do not clear for brazil  "note 436374
              CLEAR t_accit-gsber.
              MODIFY t_accit.
            ENDIF.                                            "note 436374
          ENDIF.
    And I don't undestand what I must do so as not to cleaning GSBER
    Edited by: Marat Ashimov on Oct 8, 2008 2:00 PM

  • BTE RWBAPI01 not active

    Hello
    I was trying to use the BTE RWBAPI01 to change some fields on ACC Document Posting, so I did the following:
    1. TCODE BF24 (Customer Products): added the ZFC_IRF customer product:
    PRDKT = ZFC_IRF
    AKTIV = X
    2. TCODE BF44 (Process BTE: Customer Enhancements): added the RWBAPI01 process interface:
    PROCS = RWBAPI01
    APPLK = FI-FI
    FUNCT = Z_FC_BTE_RWBAPI01
    PRDKT = ZFC_IRF
    I placed a break point in the beginning of the FM but nothing happens when I use the posting BAPI (BAPI_ACC_DOCUMENT_POST) with the EXTENSION1 internal table filled.
    Can someone help me with this?
    Best regards,
       Mário Espinheira

    Hi,
      Try to activate your BTE in the below way...
    Go to transaction code u2018FIBFu2019, then go to menu path Settings->Products->.. of a customer. In the next coming screen add one entry with product name and text.
    Next click on back button and follow the menu path Settings->Process Modules->..of a Customer. In the next coming screen enter one process (in this example the process would be u2018RWBAPI01u2019), Custom function module name (where we develop the FM with our own code), and the recently created product.
    Now create custom function module (Copy the function module u2018SAMPLE_INTERFACE_RWBAPI01') with your own code and name as specified in the above step.
    Regards,
    Bujji

  • Question/Problem with BAPI_ACC_DOCUMENT_POST in TAXACCOUNT with TAX_CODE

    Hi all:
    I've got a problem when I use bapi BAPI_ACC_DOCUMENT_POST.
    The vendor accounts with general leader accounts associated are implemented in the position of table ACCOUNTPAYABLE and the general leader accounts go to table GLACCOUNT.
    Refering to positions with vendor number I introduce the Special G/L Indicator and after this i execute bapi.
    It is said I have to put the TAX_CODE in tabla TAXACCOUNT and the field AMT_BASE in table CURRENCYAMOUNT.
    But when I use transaction FB01  to cread fi documents in vendor positions I don't
    have obligation to introduce the TAX_CODE and afterwards I look for the document in table bseg. I can watch the field MWSKZ is blank.
    Another question : I think I can find the amt_base in currency amount with the function: CALCULATE_TAX_FROM_NET_AMOUNT
    Thanks a lot. Points in advance.

    I've resolved the question.
    It depends of the special gl indicator. If it is 8 or H it doesn't need to be introduced the table taxaccount.

Maybe you are looking for