<?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 BAPI_ACC_INVOICE_RECEIPT_POST error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-invoice-receipt-post-error/m-p/7012183#M1496850</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm using BAPI_ACC_INVOICE_RECEIPT_POST to automate posting of invoices but I'm stuck.&lt;/P&gt;&lt;P&gt;I just tried to use the BAPI in my program with test-data but I get the error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Fehler im Beleg: BKPFF&lt;/P&gt;&lt;P&gt; Kreditor 17770 ist im Buchungskreis 0025 nicht vorgesehen."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in english:&lt;/P&gt;&lt;P&gt;"Error in Invoice: BKPFF&lt;/P&gt;&lt;P&gt; Vendor 17770 is not in company code 0025"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when I post my Invoice direcly via Transaction FV60 wit exactly that vendor and company code the Invoice is posted without error messages!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Code:&lt;/P&gt;&lt;P&gt;        &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;documentheader-obj_type = 'BKPFF'.
        documentheader-obj_key = sy-uzeit.
        documentheader-comp_code = '0025'.
        documentheader-obj_sys = sy-sysid.
        documentheader-doc_date = sy-datum.
        documentheader-pstng_date = sy-datum.
        documentheader-fis_period = sy-datum+4(2).
        documentheader-doc_type = 'KR'.
        documentheader-ref_doc_no = 'Rechnungsnummer'.
        documentheader-header_txt = 'Verwendungszweck'.
        documentheader-username = sy-uname.

        wa_accountpayable-VENDOR_NO = '17770'.
        wa_accountpayable-ITEMNO_ACC = '1'.
        APPEND wa_accountpayable TO accountpayable.

        wa_accountgl-GL_ACCOUNT = '0000152100'.
        wa_accountgl-ITEMNO_ACC = '2'.
        wa_accountgl-TAX_CODE = 'V1'.
        wa_accountgl-FISC_YEAR = '2001'.
        wa_accountgl-FIS_PERIOD = sy-datum+4(2).
        APPEND wa_accountgl TO accountgl.

        wa_accounttax-TAX_CODE = 'V1'.
        wa_accounttax-gl_account = '0000152100'.
        wa_accounttax-ITEMNO_ACC = '3'.
        wa_accounttax-ACCT_KEY = 'VST'.
        APPEND wa_accounttax TO accounttax.

        wa_currencyamount-ITEMNO_ACC = '1'.
        wa_currencyamount-amt_base = '1031'.
        wa_currencyamount-CURRENCY = 'USD'.
        APPEND wa_currencyamount TO currencyamount.

        CLEAR wa_currencyamount.

        wa_currencyamount-ITEMNO_ACC = '2'.
        wa_currencyamount-amt_base = '1031'.
        wa_currencyamount-CURRENCY = 'USD'.
        APPEND wa_currencyamount TO currencyamount.

        CLEAR wa_currencyamount.

        wa_currencyamount-ITEMNO_ACC = '3'.
        wa_currencyamount-amt_base = '1031'.
        wa_currencyamount-CURRENCY = 'USD'.
        APPEND wa_currencyamount TO currencyamount.

        CALL FUNCTION 'BAPI_ACC_INVOICE_RECEIPT_POST'
          EXPORTING
            DOCUMENTHEADER = documentheader
          TABLES
            ACCOUNTPAYABLE = accountpayable
            ACCOUNTGL      = accountgl
            ACCOUNTTAX     = accounttax
            CURRENCYAMOUNT = currencyamount
            RETURN         = return.

*        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
*          EXPORTING
*            WAIT = 'X'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;jaf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jun 2010 15:00:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-06-22T15:00:42Z</dc:date>
    <item>
      <title>BAPI_ACC_INVOICE_RECEIPT_POST error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-invoice-receipt-post-error/m-p/7012183#M1496850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm using BAPI_ACC_INVOICE_RECEIPT_POST to automate posting of invoices but I'm stuck.&lt;/P&gt;&lt;P&gt;I just tried to use the BAPI in my program with test-data but I get the error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Fehler im Beleg: BKPFF&lt;/P&gt;&lt;P&gt; Kreditor 17770 ist im Buchungskreis 0025 nicht vorgesehen."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in english:&lt;/P&gt;&lt;P&gt;"Error in Invoice: BKPFF&lt;/P&gt;&lt;P&gt; Vendor 17770 is not in company code 0025"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when I post my Invoice direcly via Transaction FV60 wit exactly that vendor and company code the Invoice is posted without error messages!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Code:&lt;/P&gt;&lt;P&gt;        &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;documentheader-obj_type = 'BKPFF'.
        documentheader-obj_key = sy-uzeit.
        documentheader-comp_code = '0025'.
        documentheader-obj_sys = sy-sysid.
        documentheader-doc_date = sy-datum.
        documentheader-pstng_date = sy-datum.
        documentheader-fis_period = sy-datum+4(2).
        documentheader-doc_type = 'KR'.
        documentheader-ref_doc_no = 'Rechnungsnummer'.
        documentheader-header_txt = 'Verwendungszweck'.
        documentheader-username = sy-uname.

        wa_accountpayable-VENDOR_NO = '17770'.
        wa_accountpayable-ITEMNO_ACC = '1'.
        APPEND wa_accountpayable TO accountpayable.

        wa_accountgl-GL_ACCOUNT = '0000152100'.
        wa_accountgl-ITEMNO_ACC = '2'.
        wa_accountgl-TAX_CODE = 'V1'.
        wa_accountgl-FISC_YEAR = '2001'.
        wa_accountgl-FIS_PERIOD = sy-datum+4(2).
        APPEND wa_accountgl TO accountgl.

        wa_accounttax-TAX_CODE = 'V1'.
        wa_accounttax-gl_account = '0000152100'.
        wa_accounttax-ITEMNO_ACC = '3'.
        wa_accounttax-ACCT_KEY = 'VST'.
        APPEND wa_accounttax TO accounttax.

        wa_currencyamount-ITEMNO_ACC = '1'.
        wa_currencyamount-amt_base = '1031'.
        wa_currencyamount-CURRENCY = 'USD'.
        APPEND wa_currencyamount TO currencyamount.

        CLEAR wa_currencyamount.

        wa_currencyamount-ITEMNO_ACC = '2'.
        wa_currencyamount-amt_base = '1031'.
        wa_currencyamount-CURRENCY = 'USD'.
        APPEND wa_currencyamount TO currencyamount.

        CLEAR wa_currencyamount.

        wa_currencyamount-ITEMNO_ACC = '3'.
        wa_currencyamount-amt_base = '1031'.
        wa_currencyamount-CURRENCY = 'USD'.
        APPEND wa_currencyamount TO currencyamount.

        CALL FUNCTION 'BAPI_ACC_INVOICE_RECEIPT_POST'
          EXPORTING
            DOCUMENTHEADER = documentheader
          TABLES
            ACCOUNTPAYABLE = accountpayable
            ACCOUNTGL      = accountgl
            ACCOUNTTAX     = accounttax
            CURRENCYAMOUNT = currencyamount
            RETURN         = return.

*        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
*          EXPORTING
*            WAIT = 'X'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;jaf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jun 2010 15:00:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-invoice-receipt-post-error/m-p/7012183#M1496850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-22T15:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_INVOICE_RECEIPT_POST error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-invoice-receipt-post-error/m-p/7012184#M1496851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;solved...I just had to use 0000017770 instead of 17770 only for the vendor &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jun 2010 15:11:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-invoice-receipt-post-error/m-p/7012184#M1496851</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-22T15:11:52Z</dc:date>
    </item>
  </channel>
</rss>

