<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: BAPI_ACC_DOCUMENT_POST in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/8435963#M1648044</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank for your suggestion ,really it's helped me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Rajmurugan.R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Sep 2014 06:52:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-09-23T06:52:28Z</dc:date>
    <item>
      <title>BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/8435961#M1648042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am using the below code to create a vendor invoice, but I keep getting the error "FI/CO interface: Balance in transaction currency".  Now the vendor and the compnay code are both setup as GBP, and the 2 lines I am posting are simply fro £10, so it all balances correctly.  And if I enter the data manually in FB60 then everything works fine.  I have searched the forums and the code seems to match everythign that I am seeing, so I am stuck as to what is causing the issue.  Any help appreciated..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* fill the header
  s_documentheader-comp_code  = i_company_code.
  s_documentheader-doc_date   = i_invoice_date.
  s_documentheader-pstng_date = i_invoice_date.
  s_documentheader-ref_doc_no = i_invoice_ref.
  s_documentheader-header_txt = i_text.
  s_documentheader-username   = sy-uname.
* added these columns
  s_documentheader-doc_type   = 'KR'.
  s_documentheader-bus_act    = 'RFBU'.
  s_documentheader-obj_type   = 'BKPFF'.
  s_documentheader-obj_key    = '$'.
  s_documentheader-obj_sys    = sy-mandt.

* retrieve GL account no
  select single gl_account from zfi_post_accnts
     into l_account
    where post_type = 'RTI' and posting_key = '40'.

  call function 'CONVERSION_EXIT_ALPHA_INPUT'
    exporting
      input  = l_account
    importing
      output = l_account.

* format the vendor number
  call function 'CONVERSION_EXIT_ALPHA_INPUT'
    exporting
      input         = me-&amp;gt;number
   IMPORTING
     OUTPUT        = s_accountpayable-vendor_no.

* get the currency
  select single waers from t001 into lv_currency
         where bukrs = i_company_code.


**(1) Fill Venodor Line item
  clear: s_accountreceivable, s_currencyamount.
  s_accountpayable-itemno_acc = 1.
  s_accountpayable-vendor_no     = lv_vendor.
  s_accountpayable-item_text     = i_text.
  s_accountpayable-comp_code     = i_company_code.
*  s_ACCOUNTPAYABLE-GL_ACCOUNT    = l_account.
*  s_accountpayable-PYMT_CUR      = 'GBP'.
*  s_accountpayable-PYMT_CUR_ISO  = 'GBP'.
*  s_accountpayable-PYMT_AMT      = i_invoiced_amount.
  append s_accountpayable to it_accountpayable.
*
  s_currencyamount-itemno_acc = 1.
  s_currencyamount-curr_type  = '00'.
  s_currencyamount-amt_doccur = i_invoiced_amount.
  s_currencyamount-currency   = lv_currency.
  s_currencyamount-currency_iso = lv_currency.
  append s_currencyamount to it_currencyamount.

**(2) Fill GL Account Line item.
  s_accountgl-itemno_acc = 2.
  s_accountgl-gl_account = l_account.
  s_accountgl-item_text  = i_text.
  s_accountgl-comp_code  = i_company_code.
*  s_accountgl-profit_ctr =
  append s_accountgl to it_accountgl.
*
  s_currencyamount-itemno_acc = 2.
  s_currencyamount-curr_type  = '00'.
  s_currencyamount-amt_doccur = i_invoiced_amount.
  s_currencyamount-currency   = lv_currency.
  s_currencyamount-currency_iso = lv_currency.
  append s_currencyamount to it_currencyamount.


  call function 'BAPI_ACC_DOCUMENT_POST'
    exporting
      documentheader    = s_documentheader
    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
      return            = it_return
       exceptions
      others            = 1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 16:54:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/8435961#M1648042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-04T16:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/8435962#M1648043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check if possible to pass amount with sign or there is field for debit or credit  indicator is there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nabheet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 17:03:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/8435962#M1648043</guid>
      <dc:creator>nabheetscn</dc:creator>
      <dc:date>2012-01-04T17:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/8435963#M1648044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank for your suggestion ,really it's helped me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Rajmurugan.R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 06:52:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post/m-p/8435963#M1648044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-23T06:52:28Z</dc:date>
    </item>
  </channel>
</rss>

