<?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 problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-problem/m-p/1977373#M400253</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think passing the gl account number with zeros is gud..use conversion_alpha routine. And  I am not sure if you can use the asset no. for gl account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Award points if it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Feb 2007 18:00:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-13T18:00:53Z</dc:date>
    <item>
      <title>BAPI_ACC_DOCUMENT_POST problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-problem/m-p/1977370#M400250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am posting a JV with respective to ASSET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linr item 1: which i was passing ASSET in place of GL number with posting key ANL. 70( debit).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line item 2: I am passing normal GL number with posting key A00 40 (credit).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here i am getting the problem is it is giving me the error that for 1st line item which i was passing the ASSET number 'GL number was not defined in chart of accounts'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me with sample code or any idea.&lt;/P&gt;&lt;P&gt;Unable to come out of this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Deepak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2007 16:35:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-problem/m-p/1977370#M400250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-13T16:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-problem/m-p/1977371#M400251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you do a conversion_alpha routine ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        input  = i_indata-t_glacnt&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        output = l_glacnt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now use l_glacnt. Declare this as the bapi gl acnt type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps. Award points if it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2007 16:56:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-problem/m-p/1977371#M400251</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-13T16:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-problem/m-p/1977372#M400252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already took care of this.&lt;/P&gt;&lt;P&gt;Actually my problem is with posting key while passing to BAPI. I think so.&lt;/P&gt;&lt;P&gt;And in place of GL number i am passing the Asset number for a line item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please any suggestions reg this.&lt;/P&gt;&lt;P&gt;********************************************************&lt;/P&gt;&lt;P&gt;       on change of it_polin-recpid.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         write it_po-budat to date yymmdd.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          clear jv_po. "&lt;/P&gt;&lt;P&gt;          line_item = 0.&lt;/P&gt;&lt;P&gt;          clear v_bktxt.&lt;/P&gt;&lt;P&gt;          concatenate it_polin-recpid it_polin-bukrs&lt;/P&gt;&lt;P&gt;                      it_po-budat(04) into v_bktxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                 Header Data               " Sending comp code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            it_hdr-comp_code  = it_polin-bukrs.&lt;/P&gt;&lt;P&gt;            it_hdr-doc_date   = it_po-budat.&lt;/P&gt;&lt;P&gt;            it_hdr-pstng_date = sy-datum.&lt;/P&gt;&lt;P&gt;            it_hdr-doc_type   = v_blart.&lt;/P&gt;&lt;P&gt;            it_hdr-ref_doc_no = it_polin-recpid.&lt;/P&gt;&lt;P&gt;            it_hdr-BUS_ACT    = 'RMWA'.&lt;/P&gt;&lt;P&gt;            it_hdr-USERNAME   = sy-uname.&lt;/P&gt;&lt;P&gt;            it_hdr-header_txt = v_bktxt.&lt;/P&gt;&lt;P&gt;          append it_hdr.&lt;/P&gt;&lt;P&gt;          move: it_polin-recpid to jv_po-mblnr,&lt;/P&gt;&lt;P&gt;                it_polin-bukrs to jv_po-bukrs,&lt;/P&gt;&lt;P&gt;                it_polin-ebeln to jv_po-ebeln,&lt;/P&gt;&lt;P&gt;                it_amr-anln1 to jv_po-anln1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       endon.&lt;/P&gt;&lt;P&gt;          line_item = line_item + 1.&lt;/P&gt;&lt;P&gt;          if not it_sactno-aufnr is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              clear: v_sgtxt.&lt;/P&gt;&lt;P&gt;              concatenate it_sactno-recpid '/' it_sactno-rclno into v_sgtxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                First Item&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                Account number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                it_gl-itemno_acc  = line_item.&lt;/P&gt;&lt;P&gt;                it_gl-gl_account  = '0000020002'. "credit GL#&lt;/P&gt;&lt;P&gt;                it_gl-ASSET_NO    = it_amr-anln1.&lt;/P&gt;&lt;P&gt;                it_gl-item_text   = v_sgtxt.&lt;/P&gt;&lt;P&gt;                it_gl-COSTCENTER  = it_sactno-kostl.&lt;/P&gt;&lt;P&gt;                it_gl-ACCT_TYPE   = 'S'.&lt;/P&gt;&lt;P&gt;                it_gl-PSTNG_DATE  = sy-datum.&lt;/P&gt;&lt;P&gt;                it_gl-acct_key    = 'A00'.&lt;/P&gt;&lt;P&gt;                it_gl-CS_TRANS_T  = '100'.&lt;/P&gt;&lt;P&gt;                append it_gl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                Set amount&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                it_curr-itemno_acc = line_item.&lt;/P&gt;&lt;P&gt;                it_curr-currency   = it_polin-waers.&lt;/P&gt;&lt;P&gt;                it_curr-amt_doccur = it_polin-wrbtr.&lt;/P&gt;&lt;P&gt;                it_curr-amt_doccur = it_curr-amt_doccur * -1.&lt;/P&gt;&lt;P&gt;                append it_curr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   **********Balancing the line item amnt&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                line_item = line_item + 1.&lt;/P&gt;&lt;P&gt;                clear it_gl.&lt;/P&gt;&lt;P&gt;                it_gl-itemno_acc   = line_item.&lt;/P&gt;&lt;P&gt;                it_gl-gl_account   = it_amr-anln1+2(10). "Asset #&lt;/P&gt;&lt;P&gt;                it_gl-ASSET_NO     = it_amr-anln1.&lt;/P&gt;&lt;P&gt;                it_gl-item_text    = v_sgtxt.&lt;/P&gt;&lt;P&gt;                it_gl-COSTCENTER   = it_sactno-kostl.&lt;/P&gt;&lt;P&gt;                it_gl-ACCT_TYPE    = 'A'.&lt;/P&gt;&lt;P&gt;                it_gl-PSTNG_DATE   = sy-datum.&lt;/P&gt;&lt;P&gt;                it_gl-acct_key     = 'ANL'.&lt;/P&gt;&lt;P&gt;                it_gl-CS_TRANS_T   = '100'.&lt;/P&gt;&lt;P&gt;                append it_gl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                Set amount&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                clear it_curr.&lt;/P&gt;&lt;P&gt;                it_curr-itemno_acc = line_item.&lt;/P&gt;&lt;P&gt;                it_curr-currency   = it_polin-waers.&lt;/P&gt;&lt;P&gt;                it_curr-amt_doccur = it_polin-wrbtr.&lt;/P&gt;&lt;P&gt;                append it_curr.&lt;/P&gt;&lt;P&gt;          endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          if it_sactno-aufnr = space.&lt;/P&gt;&lt;P&gt;              clear: v_sgtxt.&lt;/P&gt;&lt;P&gt;              concatenate it_polin-recpid '/' it_polin-rclno into v_sgtxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                First Item&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                Account number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                it_gl-itemno_acc = line_item.&lt;/P&gt;&lt;P&gt;                it_gl-gl_account = it_sactno-genlg.&lt;/P&gt;&lt;P&gt;                it_gl-item_text  = v_sgtxt.&lt;/P&gt;&lt;P&gt;                it_gl-COSTCENTER = it_sactno-kostl.&lt;/P&gt;&lt;P&gt;                it_gl-ACCT_TYPE  = 'S'.&lt;/P&gt;&lt;P&gt;                it_gl-PSTNG_DATE = sy-datum.&lt;/P&gt;&lt;P&gt;                it_gl-acct_key = 'A00'.&lt;/P&gt;&lt;P&gt;                append it_gl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                Set amount&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                it_curr-itemno_acc = line_item.&lt;/P&gt;&lt;P&gt;                it_curr-currency   = it_polin-waers.&lt;/P&gt;&lt;P&gt;                it_curr-amt_doccur = it_polin-wrbtr.&lt;/P&gt;&lt;P&gt;                append it_curr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   **********Balancing the line item amnt&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                clear it_gl.&lt;/P&gt;&lt;P&gt;                line_item        = line_item + 1.&lt;/P&gt;&lt;P&gt;                it_gl-itemno_acc = line_item.&lt;/P&gt;&lt;P&gt;                it_gl-gl_account = '0000020002'. "credit&lt;/P&gt;&lt;P&gt;                it_gl-item_text  = v_sgtxt.&lt;/P&gt;&lt;P&gt;                it_gl-COSTCENTER = it_sactno-kostl.&lt;/P&gt;&lt;P&gt;                it_gl-ACCT_TYPE  = 'S'.&lt;/P&gt;&lt;P&gt;                it_gl-PSTNG_DATE = sy-datum.&lt;/P&gt;&lt;P&gt;                it_gl-acct_key   = 'A00'.&lt;/P&gt;&lt;P&gt;                append it_gl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                Set amount&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                clear it_curr.&lt;/P&gt;&lt;P&gt;                it_curr-itemno_acc = line_item.&lt;/P&gt;&lt;P&gt;                it_curr-currency   = it_polin-waers.&lt;/P&gt;&lt;P&gt;                it_curr-amt_doccur = it_polin-wrbtr.&lt;/P&gt;&lt;P&gt;                it_curr-amt_doccur = it_curr-amt_doccur * -1.&lt;/P&gt;&lt;P&gt;                append it_curr.&lt;/P&gt;&lt;P&gt;          endif.&lt;/P&gt;&lt;P&gt;          at end of recpid.&lt;/P&gt;&lt;P&gt;                refresh t_result. clear t_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                call function 'BAPI_ACC_DOCUMENT_CHECK'&lt;/P&gt;&lt;P&gt;                     exporting&lt;/P&gt;&lt;P&gt;                          documentheader = it_hdr&lt;/P&gt;&lt;P&gt;                     tables&lt;/P&gt;&lt;P&gt;                          accountgl      = it_gl&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                         ACCOUNTPAYABLE    = act_pay&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                          currencyamount = it_curr&lt;/P&gt;&lt;P&gt;                          return         = t_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                loop at t_result where ( type = 'E' or&lt;/P&gt;&lt;P&gt;                                         type = 'A' ).&lt;/P&gt;&lt;P&gt;                  exit.&lt;/P&gt;&lt;P&gt;                endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;                  refresh t_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                  call function 'BAPI_ACC_DOCUMENT_POST'&lt;/P&gt;&lt;P&gt;                       exporting&lt;/P&gt;&lt;P&gt;                            documentheader  = it_hdr&lt;/P&gt;&lt;P&gt;                       tables&lt;/P&gt;&lt;P&gt;                            accountgl       = it_gl&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                           ACCOUNTPAYABLE    = act_pay&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                            currencyamount  = it_curr&lt;/P&gt;&lt;P&gt;                            return          = t_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;                  call function 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;                endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Deepak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2007 17:02:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-problem/m-p/1977372#M400252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-13T17:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-problem/m-p/1977373#M400253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think passing the gl account number with zeros is gud..use conversion_alpha routine. And  I am not sure if you can use the asset no. for gl account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Award points if it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2007 18:00:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-problem/m-p/1977373#M400253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-13T18:00:53Z</dc:date>
    </item>
  </channel>
</rss>

