<?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: Posting Account document in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-account-document/m-p/1149897#M117214</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;If you have to create an account document you have three way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Create BDC program for trx FB01;&lt;/P&gt;&lt;P&gt;- Use batchinput standard RFBIBL00;&lt;/P&gt;&lt;P&gt;- Use the BAPI BAPI_ACC_DOCUMENT_POST;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem is where you want to create the document, if you insert the creation into exit you should make sure your process is ran succesfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Feb 2006 13:36:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-02-02T13:36:53Z</dc:date>
    <item>
      <title>Posting Account document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-account-document/m-p/1149896#M117213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;             Inside a user-exit I have to create a document.First of all is it possible to post document inside an exit ? If possible then here is my requirement.&lt;/P&gt;&lt;P&gt;A document with the following debit/credit details has to be created in BSEG or BSIS.&lt;/P&gt;&lt;P&gt;H(Cr) 101002(G/l acc) 20141434(Doc number) 20(Amt/dmbtr)&lt;/P&gt;&lt;P&gt;S(Dr) 822001(G/l)     20141434(Doc No)     20(Amt/dmbtr)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What function module should I use to create above document in BSEG or BSIS table ? &lt;/P&gt;&lt;P&gt;I have tried with BAPI_ACC_DOCUMENT_POST and BAPI_ACC_DOCUMENT_POST. But of no use.&lt;/P&gt;&lt;P&gt;Please advise me how to post this document inside the exit EXIT_RFEBBU10_001.&lt;/P&gt;&lt;P&gt;thanks for any help.&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2006 13:23:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-account-document/m-p/1149896#M117213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-02T13:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Posting Account document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-account-document/m-p/1149897#M117214</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;If you have to create an account document you have three way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Create BDC program for trx FB01;&lt;/P&gt;&lt;P&gt;- Use batchinput standard RFBIBL00;&lt;/P&gt;&lt;P&gt;- Use the BAPI BAPI_ACC_DOCUMENT_POST;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem is where you want to create the document, if you insert the creation into exit you should make sure your process is ran succesfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2006 13:36:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-account-document/m-p/1149897#M117214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-02T13:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Posting Account document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-account-document/m-p/1149898#M117215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I really don't know if you can do this from within an exit, but you might look at BAPI_ACC_GL_POSTING_POST instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2006 14:59:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-account-document/m-p/1149898#M117215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-02T14:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Posting Account document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-account-document/m-p/1149899#M117216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max,&lt;/P&gt;&lt;P&gt;           Thanks for the valuable suggestion. I could post the document successfully inside the exit with the bapi_acc_document_post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 07:05:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-account-document/m-p/1149899#M117216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T07:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Posting Account document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-account-document/m-p/1149900#M117217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I also wanted to post the FI Transaction by using &lt;/P&gt;&lt;P&gt;the same bapi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could u send a sample program for the same BAPI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ganesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 07:25:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-account-document/m-p/1149900#M117217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T07:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Posting Account document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-account-document/m-p/1149901#M117218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ganesh,&lt;/P&gt;&lt;P&gt;               Please find the following code which I used.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;P&gt;data: v_dmbtr like bsis-dmbtr,&lt;/P&gt;&lt;P&gt;      v_kfmod(10),&lt;/P&gt;&lt;P&gt;      v_amt like bsis-dmbtr,&lt;/P&gt;&lt;P&gt;      febep_amt like bsis-dmbtr,&lt;/P&gt;&lt;P&gt;      bseg_amt like bsis-dmbtr,&lt;/P&gt;&lt;P&gt;      ws_documentheader like bapiache09,&lt;/P&gt;&lt;P&gt;      it_accountgl like table of bapiacgl09 with header line,&lt;/P&gt;&lt;P&gt;      it_currencyamount like table of bapiaccr09 with header line,&lt;/P&gt;&lt;P&gt;      it_return like table of bapiret2 with header line,&lt;/P&gt;&lt;P&gt;      commit_ret like table of bapiret2 with header line,&lt;/P&gt;&lt;P&gt;      l_type like ws_documentheader-obj_type,&lt;/P&gt;&lt;P&gt;      l_key like ws_documentheader-obj_key,&lt;/P&gt;&lt;P&gt;      l_sys like ws_documentheader-obj_sys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if i_febep-vgint eq 'Y699'.&lt;/P&gt;&lt;P&gt;      unpack i_febep-kfmod to v_kfmod.&lt;/P&gt;&lt;P&gt;     select single dmbtr from bsis into v_dmbtr where&lt;/P&gt;&lt;P&gt;         bukrs eq i_febko-bukrs and hkont eq v_kfmod&lt;/P&gt;&lt;P&gt;            and belnr eq i_febep-zuonr.&lt;/P&gt;&lt;P&gt;     if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;        v_amt = abs( i_febep-kwbtr - v_dmbtr ).&lt;/P&gt;&lt;P&gt;          if i_febep-kwbtr &amp;gt; v_dmbtr.&lt;/P&gt;&lt;P&gt;             febep_amt = -1 * v_amt.&lt;/P&gt;&lt;P&gt;             bseg_amt = v_amt.&lt;/P&gt;&lt;P&gt;          elseif v_dmbtr &amp;gt; i_febep-kwbtr.&lt;/P&gt;&lt;P&gt;             bseg_amt = -1 * v_amt.&lt;/P&gt;&lt;P&gt;             febep_amt = v_amt.&lt;/P&gt;&lt;P&gt;          endif.&lt;/P&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;P&gt;     if v_amt ne space.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    posting code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    filling header&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         clear ws_documentheader.&lt;/P&gt;&lt;P&gt;         ws_documentheader-bus_act = 'RFBU'.&lt;/P&gt;&lt;P&gt;         ws_documentheader-username = sy-uname.&lt;/P&gt;&lt;P&gt;         ws_documentheader-header_txt = 'BAPI Test'.&lt;/P&gt;&lt;P&gt;         ws_documentheader-comp_code = i_febko-bukrs.&lt;/P&gt;&lt;P&gt;         ws_documentheader-doc_date = sy-datum.&lt;/P&gt;&lt;P&gt;         ws_documentheader-pstng_date = sy-datum.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    ws_documentheader-fisc_year = '2006'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         ws_documentheader-doc_type = 'ZB'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        filling GL A/c&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         clear it_accountgl.&lt;/P&gt;&lt;P&gt;         it_accountgl-itemno_acc = 1.&lt;/P&gt;&lt;P&gt;         it_accountgl-gl_account = '0000822000'.&lt;/P&gt;&lt;P&gt;         it_accountgl-doc_type = 'ZB'.&lt;/P&gt;&lt;P&gt;         it_accountgl-comp_code = i_febko-bukrs.&lt;/P&gt;&lt;P&gt;         it_accountgl-pstng_date = sy-datum.&lt;/P&gt;&lt;P&gt;         it_accountgl-value_date = sy-datum.&lt;/P&gt;&lt;P&gt;         append it_accountgl.&lt;/P&gt;&lt;P&gt;         clear it_accountgl.&lt;/P&gt;&lt;P&gt;         it_accountgl-itemno_acc = 2.&lt;/P&gt;&lt;P&gt;         it_accountgl-gl_account = v_kfmod.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        it_accountgl-gl_account = '0000101002'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         it_accountgl-doc_type = 'ZB'.&lt;/P&gt;&lt;P&gt;         it_accountgl-comp_code = i_febko-bukrs.&lt;/P&gt;&lt;P&gt;         it_accountgl-pstng_date = sy-datum.&lt;/P&gt;&lt;P&gt;         it_accountgl-value_date = sy-datum.&lt;/P&gt;&lt;P&gt;         append it_accountgl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        fillilng Currency amt&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         clear it_currencyamount.&lt;/P&gt;&lt;P&gt;         it_currencyamount-itemno_acc = 1.&lt;/P&gt;&lt;P&gt;*it_currencyamount-curr_type = '10'.&lt;/P&gt;&lt;P&gt;         it_currencyamount-currency = i_febep-kwaer.&lt;/P&gt;&lt;P&gt;         it_currencyamount-amt_doccur = febep_amt.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;it_currencyamount-amt_base = '0.0000'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;it_currencyamount-disc_base = '0.0000'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;it_currencyamount-disc_amt = '0.0000'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         append it_currencyamount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         clear it_currencyamount.&lt;/P&gt;&lt;P&gt;         it_currencyamount-itemno_acc = 2.&lt;/P&gt;&lt;P&gt;*it_currencyamount-curr_type = '10'.&lt;/P&gt;&lt;P&gt;         it_currencyamount-currency = i_febep-kwaer.&lt;/P&gt;&lt;P&gt;         it_currencyamount-amt_doccur = bseg_amt.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;it_currencyamount-amt_base = '0.0000'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;it_currencyamount-disc_base = '0.0000'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;it_currencyamount-disc_amt = '0.0000'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         append it_currencyamount.&lt;/P&gt;&lt;P&gt;*calling bapi&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 = ws_documentheader&lt;/P&gt;&lt;P&gt;        importing&lt;/P&gt;&lt;P&gt;           obj_type = l_type&lt;/P&gt;&lt;P&gt;           obj_key = l_key&lt;/P&gt;&lt;P&gt;           obj_sys = l_sys&lt;/P&gt;&lt;P&gt;        tables&lt;/P&gt;&lt;P&gt;          accountgl = it_accountgl&lt;/P&gt;&lt;P&gt;          currencyamount = it_currencyamount&lt;/P&gt;&lt;P&gt;        return = it_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     read table it_return with key type = 'S'.&lt;/P&gt;&lt;P&gt;      if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        clear commit_ret.&lt;/P&gt;&lt;P&gt;        refresh commit_ret.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        call function 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;          exporting&lt;/P&gt;&lt;P&gt;            wait = 'X'&lt;/P&gt;&lt;P&gt;          importing&lt;/P&gt;&lt;P&gt;          return = commit_ret.&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;     endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2006 12:29:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-account-document/m-p/1149901#M117218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-07T12:29:46Z</dc:date>
    </item>
  </channel>
</rss>

