<?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: Passing Reason Code by using bapi BAPI_ACC_DOCUMENT_POST in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-reason-code-by-using-bapi-bapi-acc-document-post/m-p/11033140#M1898828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Soumyajit for you help, i will update you once i go through your instructions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually i am using &lt;SPAN style="color: #333333; font-size: 12px; background-color: #f8f8f8;"&gt;BAPI_ACC_DOCUMENT_POST &lt;/SPAN&gt; Bapi in .net language (not ABAP), if any suggestion or example in .net it will help me a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Rajendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jun 2015 14:15:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-06-12T14:15:33Z</dc:date>
    <item>
      <title>Passing Reason Code by using bapi BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-reason-code-by-using-bapi-bapi-acc-document-post/m-p/11033137#M1898825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;I am using BAPI_ACC_DOCUMENT_POST, i am getting below error &lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;STRONG&gt; Field Reason code is a required field for G/L account &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;i googled the same error may time and every on suggest to use BADI ACC_DOCUMENT and&amp;nbsp; Create and pass the structure&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;please guide me how can i pass the same using &lt;SPAN style="color: #333333; font-size: 12px;"&gt;BAPI_ACC_DOCUMENT_POST&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;I need to pass an additional value REASON CODE (RSTGR) in BSEG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Please guide me step by step on how I can pass entered value in table EXTENSION2 into BSEG.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Many Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 13:24:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-reason-code-by-using-bapi-bapi-acc-document-post/m-p/11033137#M1898825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-06T13:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Reason Code by using bapi BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-reason-code-by-using-bapi-bapi-acc-document-post/m-p/11033138#M1898826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 13:42:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-reason-code-by-using-bapi-bapi-acc-document-post/m-p/11033138#M1898826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-06T13:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Reason Code by using bapi BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-reason-code-by-using-bapi-bapi-acc-document-post/m-p/11033139#M1898827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am assuming that due to the config of the GL account, it is asking for reason code otherwise reason code is not mandatory for this BAPI. Anyawy, to achieve what you are looking for, you have to first implement this BTE "&lt;SPAN style="color: #333333; font-size: 12px;"&gt;BTE RWBAPI01". There are a lot of instructions on net on how to implement this BTE so you can figure it out from there, I will stick to the BAPI.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To pass the reason code, in your program you have to create a table for extension just like the tables for vendor, accountgl etc. Then you must concatenate and append the item number and reason code to "Field1" field of extension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: CONCATENATE lv_item_num 'XXX' INTO ls_extension-field1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; APPEND lls_extension TO lt_extension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when you run the BAPI using this table, the data will be captured in the Z function module you would have created for implementing the BTE. There you have to write the second piece of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: LOOP AT lt_extension INTO wa_extension.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; READ it_accit WITH KEY POSNR = wa_extension+0(2).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; it_accit-rstgr = wa_extension+2(3).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MODIFY it_accit INDEX sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should get the job done. Please note that the code snippet above is a pseudo code. Check all the fields and variables carefully and work accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Soumyajit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 May 2015 17:51:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-reason-code-by-using-bapi-bapi-acc-document-post/m-p/11033139#M1898827</guid>
      <dc:creator>former_member333937</dc:creator>
      <dc:date>2015-05-31T17:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Reason Code by using bapi BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-reason-code-by-using-bapi-bapi-acc-document-post/m-p/11033140#M1898828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Soumyajit for you help, i will update you once i go through your instructions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually i am using &lt;SPAN style="color: #333333; font-size: 12px; background-color: #f8f8f8;"&gt;BAPI_ACC_DOCUMENT_POST &lt;/SPAN&gt; Bapi in .net language (not ABAP), if any suggestion or example in .net it will help me a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Rajendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 14:15:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-reason-code-by-using-bapi-bapi-acc-document-post/m-p/11033140#M1898828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-12T14:15:33Z</dc:date>
    </item>
  </channel>
</rss>

