<?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 Special cases cross company code BAPI_ACC_DOCUMENT_POST - Parking in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/special-cases-cross-company-code-bapi-acc-document-post-parking/m-p/325252#M5139</link>
    <description>&lt;P&gt;Hi Experts - I am working on ABAP program to Park vendor invoices without -PO.&lt;/P&gt;&lt;P&gt;I have implemented BADI - ACC_DOCUMENT to Pass the status = '2' and using BAPI -BAPI_ACC_DOCUMENT_POST &lt;/P&gt;&lt;P&gt;This logic is failing when I pass the records with cross company code. Below is the structure I am using. &lt;/P&gt;&lt;P&gt;Could please anyone try to take a look to see if anything is missing  in the structures, I am only stuck in the cross company code scenarios.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Header -&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ls_hdr-comp_code = 1000&lt;BR /&gt;
 ls_hdr-doc_date = 02.02.2016&lt;BR /&gt;
 ls_hdr-pstng_date = 02.02.2016&lt;BR /&gt;
* ls_hdr-fis_period = 02&lt;BR /&gt;
 ls_hdr-doc_type = KR&lt;BR /&gt;
 ls_hdr-ref_doc_no = 'some text'&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Vendor &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;lw_acc_vr-itemno_acc = 0000000010&lt;/P&gt;&lt;P&gt;
 lw_acc_vr-vendor_no = 201010&lt;BR /&gt;
 lw_acc_vr-item_text = Vendor text&lt;BR /&gt;
 lw_acc_vr-comp_code = 1000&lt;/P&gt;&lt;P&gt;------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GL-account&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;w_acc_gl-itemno_acc = '0000000020'.&lt;BR /&gt;
*lw_acc_gl-gl_account = '0000406260'.&lt;BR /&gt;
*lw_acc_gl-item_text = 'BAPI_success_park'.&lt;BR /&gt;
*lw_acc_gl-doc_type = 'KR'.&lt;BR /&gt;
*lw_acc_gl-comp_code = '1000'.&lt;BR /&gt;
*lw_acc_gl-tax_code = 'V1'.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Gl-account&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;w_acc_gl-itemno_acc = '0000000030'.&lt;BR /&gt;*lw_acc_gl-gl_account = '0000406260'.&lt;BR /&gt;*lw_acc_gl-item_text = 'BAPI_success_park'.&lt;BR /&gt;*lw_acc_gl-doc_type = 'KR'.&lt;BR /&gt;*lw_acc_gl-comp_code = '1500'.&lt;BR /&gt;*lw_acc_gl-tax_code = 'V1'.&lt;/P&gt;&lt;P&gt;----------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;currency lines&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;lw_curr_amt-itemno_acc = '0000000010'.&lt;/P&gt;&lt;P&gt;lw_curr_amt-curr_type = '00'.&lt;/P&gt;&lt;P&gt;lw_curr_amt-currency = 'GBP'.&lt;BR /&gt;lw_curr_amt-currency_iso = 'GBP'.&lt;BR /&gt;lw_curr_amt-amt_doccur = '2400.00-'.&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------&lt;/P&gt;&lt;P&gt;lw_curr_amt-itemno_acc = '0000000020'.&lt;/P&gt;&lt;P&gt;lw_curr_amt-curr_type = '00'.&lt;/P&gt;&lt;P&gt;lw_curr_amt-currency = 'GBP'.&lt;BR /&gt;lw_curr_amt-currency_iso = 'GBP'.&lt;BR /&gt;lw_curr_amt-amt_doccur = '1000.00'.&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------&lt;/P&gt;&lt;P&gt;lw_curr_amt-itemno_acc = '0000000030'.&lt;/P&gt;&lt;P&gt;lw_curr_amt-curr_type = '00'.&lt;/P&gt;&lt;P&gt;lw_curr_amt-currency = 'GBP'.&lt;BR /&gt;lw_curr_amt-currency_iso = 'GBP'.&lt;BR /&gt;lw_curr_amt-amt_doccur = '1000.00'.&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;lw_extension2-valuepart1 = 'X'.&lt;BR /&gt;APPEND lw_extension2 TO lt_extension2.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'&lt;BR /&gt; EXPORTING&lt;BR /&gt; documentheader = ls_hdr&lt;BR /&gt;IMPORTING&lt;BR /&gt;
* obj_type = lv_objtype&lt;BR /&gt;
*obj_key = lv_objkey&lt;BR /&gt;
* obj_sys = lv_objsys&lt;BR /&gt;TABLES&lt;BR /&gt; accountgl = lt_acc_gl&lt;BR /&gt; accountpayable = lt_acc_vr&lt;BR /&gt;currencyamount = lt_curr_amt&lt;BR /&gt;extension2 = lt_extension2&lt;/P&gt;&lt;P&gt;return = lt_bapiret&lt;/P&gt;</description>
    <pubDate>Fri, 02 Dec 2016 16:56:17 GMT</pubDate>
    <dc:creator>former_member214084</dc:creator>
    <dc:date>2016-12-02T16:56:17Z</dc:date>
    <item>
      <title>Special cases cross company code BAPI_ACC_DOCUMENT_POST - Parking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/special-cases-cross-company-code-bapi-acc-document-post-parking/m-p/325252#M5139</link>
      <description>&lt;P&gt;Hi Experts - I am working on ABAP program to Park vendor invoices without -PO.&lt;/P&gt;&lt;P&gt;I have implemented BADI - ACC_DOCUMENT to Pass the status = '2' and using BAPI -BAPI_ACC_DOCUMENT_POST &lt;/P&gt;&lt;P&gt;This logic is failing when I pass the records with cross company code. Below is the structure I am using. &lt;/P&gt;&lt;P&gt;Could please anyone try to take a look to see if anything is missing  in the structures, I am only stuck in the cross company code scenarios.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Header -&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ls_hdr-comp_code = 1000&lt;BR /&gt;
 ls_hdr-doc_date = 02.02.2016&lt;BR /&gt;
 ls_hdr-pstng_date = 02.02.2016&lt;BR /&gt;
* ls_hdr-fis_period = 02&lt;BR /&gt;
 ls_hdr-doc_type = KR&lt;BR /&gt;
 ls_hdr-ref_doc_no = 'some text'&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Vendor &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;lw_acc_vr-itemno_acc = 0000000010&lt;/P&gt;&lt;P&gt;
 lw_acc_vr-vendor_no = 201010&lt;BR /&gt;
 lw_acc_vr-item_text = Vendor text&lt;BR /&gt;
 lw_acc_vr-comp_code = 1000&lt;/P&gt;&lt;P&gt;------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GL-account&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;w_acc_gl-itemno_acc = '0000000020'.&lt;BR /&gt;
*lw_acc_gl-gl_account = '0000406260'.&lt;BR /&gt;
*lw_acc_gl-item_text = 'BAPI_success_park'.&lt;BR /&gt;
*lw_acc_gl-doc_type = 'KR'.&lt;BR /&gt;
*lw_acc_gl-comp_code = '1000'.&lt;BR /&gt;
*lw_acc_gl-tax_code = 'V1'.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Gl-account&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;w_acc_gl-itemno_acc = '0000000030'.&lt;BR /&gt;*lw_acc_gl-gl_account = '0000406260'.&lt;BR /&gt;*lw_acc_gl-item_text = 'BAPI_success_park'.&lt;BR /&gt;*lw_acc_gl-doc_type = 'KR'.&lt;BR /&gt;*lw_acc_gl-comp_code = '1500'.&lt;BR /&gt;*lw_acc_gl-tax_code = 'V1'.&lt;/P&gt;&lt;P&gt;----------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;currency lines&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;lw_curr_amt-itemno_acc = '0000000010'.&lt;/P&gt;&lt;P&gt;lw_curr_amt-curr_type = '00'.&lt;/P&gt;&lt;P&gt;lw_curr_amt-currency = 'GBP'.&lt;BR /&gt;lw_curr_amt-currency_iso = 'GBP'.&lt;BR /&gt;lw_curr_amt-amt_doccur = '2400.00-'.&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------&lt;/P&gt;&lt;P&gt;lw_curr_amt-itemno_acc = '0000000020'.&lt;/P&gt;&lt;P&gt;lw_curr_amt-curr_type = '00'.&lt;/P&gt;&lt;P&gt;lw_curr_amt-currency = 'GBP'.&lt;BR /&gt;lw_curr_amt-currency_iso = 'GBP'.&lt;BR /&gt;lw_curr_amt-amt_doccur = '1000.00'.&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------&lt;/P&gt;&lt;P&gt;lw_curr_amt-itemno_acc = '0000000030'.&lt;/P&gt;&lt;P&gt;lw_curr_amt-curr_type = '00'.&lt;/P&gt;&lt;P&gt;lw_curr_amt-currency = 'GBP'.&lt;BR /&gt;lw_curr_amt-currency_iso = 'GBP'.&lt;BR /&gt;lw_curr_amt-amt_doccur = '1000.00'.&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;lw_extension2-valuepart1 = 'X'.&lt;BR /&gt;APPEND lw_extension2 TO lt_extension2.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'&lt;BR /&gt; EXPORTING&lt;BR /&gt; documentheader = ls_hdr&lt;BR /&gt;IMPORTING&lt;BR /&gt;
* obj_type = lv_objtype&lt;BR /&gt;
*obj_key = lv_objkey&lt;BR /&gt;
* obj_sys = lv_objsys&lt;BR /&gt;TABLES&lt;BR /&gt; accountgl = lt_acc_gl&lt;BR /&gt; accountpayable = lt_acc_vr&lt;BR /&gt;currencyamount = lt_curr_amt&lt;BR /&gt;extension2 = lt_extension2&lt;/P&gt;&lt;P&gt;return = lt_bapiret&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 16:56:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/special-cases-cross-company-code-bapi-acc-document-post-parking/m-p/325252#M5139</guid>
      <dc:creator>former_member214084</dc:creator>
      <dc:date>2016-12-02T16:56:17Z</dc:date>
    </item>
  </channel>
</rss>

