<?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 - User Exit is not working in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864870#M364781</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ricky and Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rick is right: You can use userexit wherever they are provided. Many BAPIs as i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]BAPI_ACC_DOCUMENT_POST         &lt;/P&gt;&lt;P&gt;BAPI_ACC_DOCUMENT_CHECK&lt;/P&gt;&lt;P&gt;BAPI_ACC_GL_POSTING_POST       &lt;/P&gt;&lt;P&gt;BAPI_ACC_GL_POSTING_CHECK&lt;/P&gt;&lt;P&gt;BAPI_ACC_BILLING_POST          &lt;/P&gt;&lt;P&gt;BAPI_ACC_BILLING_CHECK&lt;/P&gt;&lt;P&gt;BAPI_ACC_INVOICE_RECEIPT_POST &lt;/P&gt;&lt;P&gt;BAPI_ACC_INVOICE_RECEIPT_CHECK&lt;/P&gt;&lt;P&gt;BAPI_ACC_GOODS_MOVEMENT_POST   &lt;/P&gt;&lt;P&gt;BAPI_ACC_GOODS_MOVEMENT_CHECK&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;are implemented including userexit (to be seen as CALL CUSTOMER-FUNCTION in coding). Only the most impotant and regularily used fields are part of the BAPI interface. If the customer makes an append to any table or structure, the handling of the additional fields does not always happen automatically in the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We created a User exit for BAPI BAPI_ACC_GL_POSTING_POST because the customer made extensions to the posting block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The additional parameter values are passed in the BAPI extension table which is a genereric character table. In include ZXACCU15 we do the transfer of values passed via extension table to table t_accit which is part of the interface of the ueserexit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If then BAPI is executed but it does not trigger the userexit, then you can put a breakpoint at the statement before CALL CUSTOMER-FUNCTION and see if you get there. If CALL CUSTOMER-FUNCTION is not executed, then try do de-activate the CMOD project and activate it again. This usually helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the document header I can provide you just anaother example which works for us:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]  ls_documentheader-obj_type              = 'BKPFF'.&lt;/P&gt;&lt;P&gt;  ls_documentheader-obj_sys               = lv_logsys.&lt;/P&gt;&lt;P&gt;  ls_documentheader-obj_key               = '$'.&lt;/P&gt;&lt;P&gt;  ls_documentheader-username              = sy-uname.&lt;/P&gt;&lt;P&gt;  ls_documentheader-header_txt            = 'Investment Notes reconciliation'(026).&lt;/P&gt;&lt;P&gt;  ls_documentheader-comp_code             = ps_alv_display-bukrs.&lt;/P&gt;&lt;P&gt;  ls_documentheader-doc_date              = p_bldat.&lt;/P&gt;&lt;P&gt;  ls_documentheader-fisc_year             = p_gjahr.&lt;/P&gt;&lt;P&gt;  ls_documentheader-pstng_date            = p_budat.&lt;/P&gt;&lt;P&gt;  ls_documentheader-fis_period            = p_bper .&lt;/P&gt;&lt;P&gt;  ls_documentheader-doc_type              = p_blart.&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jan 2007 10:36:48 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2007-01-12T10:36:48Z</dc:date>
    <item>
      <title>BAPI_ACC_DOCUMENT_POST - User Exit is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864865#M364776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to perform a posting and pass in some field into the extension table. I have follow the sap note recomendation and created a project in CMOD using ACBAPI01 as the component. I then added the coded into the user exit. When I tried to debug it doesn't not execute the code inside the user exit. Also BAPI_ACC_DOCUMENT_POST was executed w/o any error. However when I check the system, there's no document posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also please correct me if I'm wrong. I'm not so sure what to populate for the following field in the header. Is the following correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  gt_docheader-obj_type   = 'IDOC'.&lt;/P&gt;&lt;P&gt;  gt_docheader-obj_key    = '$'.&lt;/P&gt;&lt;P&gt;  gt_docheader-obj_sys    = 'BGS1'.&lt;/P&gt;&lt;P&gt;  gt_docheader-bus_act    = 'RFBU'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ricky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 08:49:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864865#M364776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-12T08:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST - User Exit is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864866#M364777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Ricky!&lt;/P&gt;&lt;P&gt;I don't understand the connection between your user-exit and a BAPI. Calling a BAPI and expecting that it will trigger user-exit? I didn't try, but it doesn't seem logical to me. I believe user-exits are triggered only after running transactions, not on BAPIs. But maybe I didn't understand your idea. Please explain more what are you actually doing. &lt;/P&gt;&lt;P&gt;As for the document not being created, you need to commit after posting (the function BAPI_TRANSACTION_COMMIT if you are calling BAPI on different destination, or statement COMMIT WORK. if you are on the same system).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had my header like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;s_doc_header-DOC_DATE     = v_bldat.
s_doc_header-PSTNG_DATE   = v_budat.
s_doc_header-DOC_TYPE     = v_blart.
s_doc_header-USERNAME     = sy-uname.
s_doc_header-BUS_ACT      = 'RFBU'.
s_doc_header-COMP_CODE    = &amp;lt;output&amp;gt;-bukrs.
s_doc_header-REF_DOC_NO   = &amp;lt;output&amp;gt;-contract_nr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I know that these variables mean nothing to you, but at least you can see that I didn't use many constants.&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 09:35:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864866#M364777</guid>
      <dc:creator>former_member185943</dc:creator>
      <dc:date>2007-01-12T09:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST - User Exit is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864867#M364778</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;Maybe I had used the wrong terminolgy. It should be customer exit (if i'm not mistaken). Anyway I follow what that had been recommended by SAP in notes 487722.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ricky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 09:48:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864867#M364778</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-12T09:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST - User Exit is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864868#M364779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ricky,&lt;/P&gt;&lt;P&gt;I still don't know what are you trying to do. Please explain.&lt;/P&gt;&lt;P&gt;Did you try BAPI_TRANSACTION_COMMIT? Did my header example help you?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 10:08:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864868#M364779</guid>
      <dc:creator>former_member185943</dc:creator>
      <dc:date>2007-01-12T10:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST - User Exit is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864869#M364780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to perform a posting. At the same time would like to control the posting key myself instead of letting the system to determine it. So I would like to put the posting key into the extension structure. And based on the sap note. I need to go cmod and create a project. then put my code in an exit. Then this will intercept the execution before posting. During that point, I can then read the posting key and modify it before posting. This will hopefully made a posting based on the posting key that i want. But somehow after following each of the recomended steps it still does not work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ricky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 10:14:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864869#M364780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-12T10:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST - User Exit is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864870#M364781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ricky and Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rick is right: You can use userexit wherever they are provided. Many BAPIs as i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]BAPI_ACC_DOCUMENT_POST         &lt;/P&gt;&lt;P&gt;BAPI_ACC_DOCUMENT_CHECK&lt;/P&gt;&lt;P&gt;BAPI_ACC_GL_POSTING_POST       &lt;/P&gt;&lt;P&gt;BAPI_ACC_GL_POSTING_CHECK&lt;/P&gt;&lt;P&gt;BAPI_ACC_BILLING_POST          &lt;/P&gt;&lt;P&gt;BAPI_ACC_BILLING_CHECK&lt;/P&gt;&lt;P&gt;BAPI_ACC_INVOICE_RECEIPT_POST &lt;/P&gt;&lt;P&gt;BAPI_ACC_INVOICE_RECEIPT_CHECK&lt;/P&gt;&lt;P&gt;BAPI_ACC_GOODS_MOVEMENT_POST   &lt;/P&gt;&lt;P&gt;BAPI_ACC_GOODS_MOVEMENT_CHECK&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;are implemented including userexit (to be seen as CALL CUSTOMER-FUNCTION in coding). Only the most impotant and regularily used fields are part of the BAPI interface. If the customer makes an append to any table or structure, the handling of the additional fields does not always happen automatically in the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We created a User exit for BAPI BAPI_ACC_GL_POSTING_POST because the customer made extensions to the posting block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The additional parameter values are passed in the BAPI extension table which is a genereric character table. In include ZXACCU15 we do the transfer of values passed via extension table to table t_accit which is part of the interface of the ueserexit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If then BAPI is executed but it does not trigger the userexit, then you can put a breakpoint at the statement before CALL CUSTOMER-FUNCTION and see if you get there. If CALL CUSTOMER-FUNCTION is not executed, then try do de-activate the CMOD project and activate it again. This usually helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the document header I can provide you just anaother example which works for us:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]  ls_documentheader-obj_type              = 'BKPFF'.&lt;/P&gt;&lt;P&gt;  ls_documentheader-obj_sys               = lv_logsys.&lt;/P&gt;&lt;P&gt;  ls_documentheader-obj_key               = '$'.&lt;/P&gt;&lt;P&gt;  ls_documentheader-username              = sy-uname.&lt;/P&gt;&lt;P&gt;  ls_documentheader-header_txt            = 'Investment Notes reconciliation'(026).&lt;/P&gt;&lt;P&gt;  ls_documentheader-comp_code             = ps_alv_display-bukrs.&lt;/P&gt;&lt;P&gt;  ls_documentheader-doc_date              = p_bldat.&lt;/P&gt;&lt;P&gt;  ls_documentheader-fisc_year             = p_gjahr.&lt;/P&gt;&lt;P&gt;  ls_documentheader-pstng_date            = p_budat.&lt;/P&gt;&lt;P&gt;  ls_documentheader-fis_period            = p_bper .&lt;/P&gt;&lt;P&gt;  ls_documentheader-doc_type              = p_blart.&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 10:36:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864870#M364781</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-01-12T10:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST - User Exit is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864871#M364782</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 tried to debug and I can't find the point when they call the customer exit. I'm using BAPI_ACC_DOCUMENT_POST. What's the different between this and the rest? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I manage to post now but the customer exit is still not working. Also, I'm using obj_type = IDOC. I tried BKPFF but it returns me an error. Not so sure why. Maybe you can shed some light.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ricky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 10:48:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864871#M364782</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-12T10:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST - User Exit is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864872#M364783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ricky,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i had the same problem, which was solved by doing what is in the note you mentionned, namely:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Implementing the Business Transaction Event (BTE, also OPEN FI) RWBAPI01 with enhancement structure EXTENSION1 at BAPI_ACC_DOCUMENT_POST &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deactivate user exit, implement BTE in 4 steps ( be sure to activate the product in step 4, not in step 1), activate user exit, set breakpoint in user exit and try out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rolf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 15:30:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864872#M364783</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-12T15:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST - User Exit is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864873#M364784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rolf,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Millions thanks. It solved all my problem. Just one last question, how do I transport those settings (BTE) to another system?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;Thanks. Really appreaciate that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ricky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jan 2007 06:50:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-user-exit-is-not-working/m-p/1864873#M364784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-13T06:50:14Z</dc:date>
    </item>
  </channel>
</rss>

