<?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 Help on how to use BAPI_ACC_DOCUMENT_POST... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-how-to-use-bapi-acc-document-post/m-p/1614365#M275271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me on how to use the BAPI BAPI_ACC_DOCUMENT_POST. I dont have the time to&lt;/P&gt;&lt;P&gt;record via SHDB and do BDC and I would like to try out the said BAPI. I think this will be faster&lt;/P&gt;&lt;P&gt;I need to fill in the header, line items, etc. Any detailed examples will be highly appreciated. &lt;/P&gt;&lt;P&gt;Thanks a lot guys and take care!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Oct 2006 06:57:54 GMT</pubDate>
    <dc:creator>aris_hidalgo</dc:creator>
    <dc:date>2006-10-03T06:57:54Z</dc:date>
    <item>
      <title>Help on how to use BAPI_ACC_DOCUMENT_POST...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-how-to-use-bapi-acc-document-post/m-p/1614365#M275271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me on how to use the BAPI BAPI_ACC_DOCUMENT_POST. I dont have the time to&lt;/P&gt;&lt;P&gt;record via SHDB and do BDC and I would like to try out the said BAPI. I think this will be faster&lt;/P&gt;&lt;P&gt;I need to fill in the header, line items, etc. Any detailed examples will be highly appreciated. &lt;/P&gt;&lt;P&gt;Thanks a lot guys and take care!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2006 06:57:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-how-to-use-bapi-acc-document-post/m-p/1614365#M275271</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-10-03T06:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help on how to use BAPI_ACC_DOCUMENT_POST...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-how-to-use-bapi-acc-document-post/m-p/1614366#M275272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a look at the following code :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* IF GL ACCOUNT

*       Accountgl / Compte générale
        ws_accountgl-itemno_acc   = w_compt.
        ws_accountgl-comp_code    = p_bukrs.
        ws_accountgl-pstng_date   = ws_reformat-datecpt.
        ws_accountgl-fisc_year    = ws_reformat-datecpt(4).
        ws_accountgl-fis_period   = ws_reformat-datecpt+4(2).
        ws_accountgl-doc_type     = p_blart.
        ws_accountgl-item_text    = ws_reformat-libel.

        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = ws_reformat-cptclf
          IMPORTING
            output = ws_accountgl-gl_account.

        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = ws_reformat-kostl
          IMPORTING
            output = ws_accountgl-costcenter.

      ELSE. " ACC. PAYABLE

*       Account Payable /  Compte fournisseur
        ws_accountpayable-itemno_acc   = w_compt.
        ws_accountpayable-comp_code    = p_bukrs.
        ws_accountpayable-item_text    = ws_reformat-libel.

        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = ws_reformat-cptclf
          IMPORTING
            output = ws_accountpayable-vendor_no.
        APPEND ws_accountpayable TO accountpayable.

      ENDIF.

*     Currencyamount Struct.
      ws_currencyamount-itemno_acc = w_compt.
      ws_currencyamount-currency = 'EUR'.
*     ws_currencyamount-curr_type = '00'.
      IF ws_reformat-sign EQ 'C'.
        ws_reformat-wrbtr_c = ws_reformat-wrbtr_c * ( - 1 ).
      ENDIF.
      ws_currencyamount-amt_doccur = ws_reformat-wrbtr_c.
      APPEND ws_currencyamount TO currencyamount.


* BAPI
    CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
      EXPORTING
        documentheader = documentheader
      TABLES
        accountgl      = accountgl
        accountpayable = accountpayable
        currencyamount = currencyamount
        return         = t_return.

    IF sy-subrc &amp;lt;&amp;gt; 0.
      MESSAGE e999(re) WITH 'Problem occured'.
    ELSE.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    ENDIF.
&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>Tue, 03 Oct 2006 07:12:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-how-to-use-bapi-acc-document-post/m-p/1614366#M275272</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-03T07:12:28Z</dc:date>
    </item>
  </channel>
</rss>

