<?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: User Exit for 'BAPI_ACC_DOCUMENT_POST' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-for-bapi-acc-document-post/m-p/7848631#M1591725</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;  Better you use the badi 'BADI_ACC_DOCUMENT'. I did in that way only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For passing the posting key you need to use the extention structure of BAPI_ACC_DOCUMENT_POST and then use BADI ACC_DOCUMENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with the other parameters you have to populate the extension table of bapi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : it_ bapiparex type table of bapiparex,&lt;/P&gt;&lt;P&gt;         wa_bapiparex  type bapiparex&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Populate the Extension table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      wa_bapiparex-structure  = 'POSTING_KEY'.&lt;/P&gt;&lt;P&gt;      wa_bapiparex-valuepart1 = '10'.            " Item number&lt;/P&gt;&lt;P&gt;      wa_bapiparex-valuepart2 = '40'.            " Posting Key&lt;/P&gt;&lt;P&gt;      APPEND wa_bapiparex TO it_bapiparex.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Call the Bapi to post the document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        documentheader          = wa_docheader&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        accountgl                    = it_bapiacgl09&lt;/P&gt;&lt;P&gt;        accountpayable           = it_bapiacap09&lt;/P&gt;&lt;P&gt;        currencyamount          = it_bapiaccr09&lt;/P&gt;&lt;P&gt;        return                         = it_bapiret2&lt;/P&gt;&lt;P&gt;        extension2                  = it_bapiparex&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now create an implementation of BADI ACC_DOCUMENT in SE19 and&lt;/P&gt;&lt;P&gt;write the following code in method CHANGE of BADI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:  wa_extension  TYPE  bapiparex,&lt;/P&gt;&lt;P&gt;              wa_accit      TYPE  accit.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  LOOP AT c_extension2 INTO wa_extension.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Extend BAPI to have Posting Keys defined by user&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF wa_extension-structure = 'POSTING_KEY'.&lt;/P&gt;&lt;P&gt;      CLEAR wa_accit.&lt;/P&gt;&lt;P&gt;      READ TABLE c_accit INTO wa_accit&lt;/P&gt;&lt;P&gt;                         WITH KEY posnr = wa_extension-valuepart1.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        wa_accit-bschl = wa_extension-valuepart2.&lt;/P&gt;&lt;P&gt;        MODIFY c_accit FROM wa_accit INDEX sy-tabix TRANSPORTING bschl.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhina...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 May 2011 05:45:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-05-18T05:45:51Z</dc:date>
    <item>
      <title>User Exit for 'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-for-bapi-acc-document-post/m-p/7848630#M1591724</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;I am using BAPI_ACC_DOCUMENT_POST for posting document. In that BAPI i cannot update posting key directly so i used extension1 parameter of this BAPI. I create new project in CMOD, use Enhancement 'ACBAPI01' containg component 'EXIT_SAPLACC4_001'. I make code in that. I also hardcode 'BREAK-POINT' syntax in that exit and activate all steps.&lt;/P&gt;&lt;P&gt;But when i go through post document, Document posted sucessfully and it is not stopped at user exit where i want to do some modification. So any idea to solve this problem...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 05:30:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-for-bapi-acc-document-post/m-p/7848630#M1591724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-18T05:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: User Exit for 'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-for-bapi-acc-document-post/m-p/7848631#M1591725</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;  Better you use the badi 'BADI_ACC_DOCUMENT'. I did in that way only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For passing the posting key you need to use the extention structure of BAPI_ACC_DOCUMENT_POST and then use BADI ACC_DOCUMENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with the other parameters you have to populate the extension table of bapi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : it_ bapiparex type table of bapiparex,&lt;/P&gt;&lt;P&gt;         wa_bapiparex  type bapiparex&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Populate the Extension table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      wa_bapiparex-structure  = 'POSTING_KEY'.&lt;/P&gt;&lt;P&gt;      wa_bapiparex-valuepart1 = '10'.            " Item number&lt;/P&gt;&lt;P&gt;      wa_bapiparex-valuepart2 = '40'.            " Posting Key&lt;/P&gt;&lt;P&gt;      APPEND wa_bapiparex TO it_bapiparex.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Call the Bapi to post the document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        documentheader          = wa_docheader&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        accountgl                    = it_bapiacgl09&lt;/P&gt;&lt;P&gt;        accountpayable           = it_bapiacap09&lt;/P&gt;&lt;P&gt;        currencyamount          = it_bapiaccr09&lt;/P&gt;&lt;P&gt;        return                         = it_bapiret2&lt;/P&gt;&lt;P&gt;        extension2                  = it_bapiparex&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now create an implementation of BADI ACC_DOCUMENT in SE19 and&lt;/P&gt;&lt;P&gt;write the following code in method CHANGE of BADI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:  wa_extension  TYPE  bapiparex,&lt;/P&gt;&lt;P&gt;              wa_accit      TYPE  accit.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  LOOP AT c_extension2 INTO wa_extension.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Extend BAPI to have Posting Keys defined by user&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF wa_extension-structure = 'POSTING_KEY'.&lt;/P&gt;&lt;P&gt;      CLEAR wa_accit.&lt;/P&gt;&lt;P&gt;      READ TABLE c_accit INTO wa_accit&lt;/P&gt;&lt;P&gt;                         WITH KEY posnr = wa_extension-valuepart1.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        wa_accit-bschl = wa_extension-valuepart2.&lt;/P&gt;&lt;P&gt;        MODIFY c_accit FROM wa_accit INDEX sy-tabix TRANSPORTING bschl.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhina...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 05:45:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-for-bapi-acc-document-post/m-p/7848631#M1591725</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-18T05:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: User Exit for 'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-for-bapi-acc-document-post/m-p/7848632#M1591726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dhina..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I go through with ur instruction..In SE19 filter type AWTYP is used..so which REFRENCE TRANSACT. i used for that..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 07:22:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-for-bapi-acc-document-post/m-p/7848632#M1591726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-18T07:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: User Exit for 'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-for-bapi-acc-document-post/m-p/7848633#M1591727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dhina...Problem Solved..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 08:24:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-for-bapi-acc-document-post/m-p/7848633#M1591727</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-18T08:24:38Z</dc:date>
    </item>
  </channel>
</rss>

