<?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: How to attach custom code after invoice save/modify in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629664#M281113</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx a lot for your quick (and usefull)reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BADI part of the link that u posted is very usefull, so i give u the reward points as promised.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone of u used workflow to implement the subject task o you have used the BADI implementation (definition SD_CIN_LV60AV02)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx a lot again&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Sep 2006 10:41:42 GMT</pubDate>
    <dc:creator>andrea_galluccio2</dc:creator>
    <dc:date>2006-09-20T10:41:42Z</dc:date>
    <item>
      <title>How to attach custom code after invoice save/modify</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629662#M281111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt; i should solve techically this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an invoice document.&lt;/P&gt;&lt;P&gt;After the modify/save of the invoice document, i should start a custom procedure that, line by line, read the invoice document just saved, and save the net value of each position in a custom table.&lt;/P&gt;&lt;P&gt;I cannot simply read the whole net amount of the document, because only positions that fulfill some conditions must be added to the custom table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the second step, i should modify that document and create another invoice document whith the positions that doesen't fulfill the conditions above. The same check (and the same code) must be executed on invoice modify also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exit, BADI, business transaction events, workflow (that i never use), modify standard trx code (but the customer doesen't want).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are the methods that i know. I've already searched for exit, BADI and BTE (event 00001030 for example), but nothing of these seems help me on solve the problem, because they all start before the document is saved on the database (so i don't have the document number and the effective data saved).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any good suggestions/hints/links/solutions etc... will be surely rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx a lot&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Sep 2006 09:25:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629662#M281111</guid>
      <dc:creator>andrea_galluccio2</dc:creator>
      <dc:date>2006-09-20T09:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to attach custom code after invoice save/modify</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629663#M281112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;refer the link &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2401009"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Sep 2006 09:39:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629663#M281112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-20T09:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to attach custom code after invoice save/modify</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629664#M281113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx a lot for your quick (and usefull)reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BADI part of the link that u posted is very usefull, so i give u the reward points as promised.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone of u used workflow to implement the subject task o you have used the BADI implementation (definition SD_CIN_LV60AV02)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx a lot again&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Sep 2006 10:41:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629664#M281113</guid>
      <dc:creator>andrea_galluccio2</dc:creator>
      <dc:date>2006-09-20T10:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to attach custom code after invoice save/modify</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629665#M281114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt; i was quite sure that the problem was solved but .... i was wrong.&lt;/P&gt;&lt;P&gt;The problem is more difficult that what i wrote in the first post.&lt;/P&gt;&lt;P&gt;For this, i need your help/suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i create a document 0000001 with VA01 trx, after the document is saved on db,i have to :&lt;/P&gt;&lt;P&gt; - read positions of 0000001 invoice document&lt;/P&gt;&lt;P&gt; - add the net value of some positions in a custom table&lt;/P&gt;&lt;P&gt; - modify some data of some invoice positions of 0000001 invoice document&lt;/P&gt;&lt;P&gt; - save again the document 0000001&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whith the BADI, i can save the net value of the invoice positions in the custom table. The problem is that the BADI code is executed before the commit work. But i think i can solve this problem using a function module ... in update task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main problem comes after i saved the net value in the custom table, because i have to modify the invoice document just created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before the commit i don't have any values in the db, so how i can modify that values? And with which technique? The BADI doesen't support "PERFORMS" (on commit) and in a function module (in update task) i cannot use instructions like call transaction, call screen, submit etc because they set an implicit commit work --&amp;gt; that means dump during registration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How i colud solve the problem? Workflow?&lt;/P&gt;&lt;P&gt;Thx a lot again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Sep 2006 14:29:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629665#M281114</guid>
      <dc:creator>andrea_galluccio2</dc:creator>
      <dc:date>2006-09-20T14:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to attach custom code after invoice save/modify</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629666#M281115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would use something like(just an example)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define new output type and put some logic into processing program for this output type to collect the data you need OR to just submit a report program starting new task and pass to this report your document number, then in this new task you can call transactions to modify/create any new docs... you can put "wait up to nnn seconds" at the beginnign of your report program to wait till updates are complete and I would check if the document exists and use enqueue to make sure it's not modified by someone else while you are calculating your numbers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Sep 2006 15:07:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629666#M281115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-20T15:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to attach custom code after invoice save/modify</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629667#M281116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;one more thing...&lt;/P&gt;&lt;P&gt;I would modify your invoice before invoice save... and then call this new task to create new invoice, of course if there is no requirement to create invoice initally without changes and change ti after save only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Sep 2006 15:13:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629667#M281116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-20T15:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to attach custom code after invoice save/modify</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629668#M281117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx Siarhei for your reply.&lt;/P&gt;&lt;P&gt; Just one question , because i don't understand the whole answer.&lt;/P&gt;&lt;P&gt;What is an "output type" and where i have to create it?&lt;/P&gt;&lt;P&gt;How does it works?&lt;/P&gt;&lt;P&gt;Sorry if the question seems silly, but i don't know nothing about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx again&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Sep 2006 15:25:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629668#M281117</guid>
      <dc:creator>andrea_galluccio2</dc:creator>
      <dc:date>2006-09-20T15:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to attach custom code after invoice save/modify</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629669#M281118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may have several output types triggered for your invoice. You can check with functional analyst on how to configure output type, or search SAP help for output determination. The advantage of triggering it via output type is that you can enable/disable this functionality directly on the system via condition records and it will not involve any code changes and the document number is known for sure when output is being processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an option - you can actually achieve the same results by submitting your report or FM "starting new task" from any FM which works in update task for your document and which is triggered when the document number is known already.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Sep 2006 16:48:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629669#M281118</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-20T16:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to attach custom code after invoice save/modify</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629670#M281119</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;Are you sure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just used the BTE  00001030: it's triggered before saving the document, but the document number is just assigned, o u can know it here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code should be inserted in a FORM and run in update tusk, so you can sure your data are stored only the document is really created or saved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Sep 2006 16:56:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629670#M281119</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-20T16:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to attach custom code after invoice save/modify</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629671#M281120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thank you both for the usefull replies.&lt;/P&gt;&lt;P&gt;As promiesd, i gave u the right reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a question to Max. I've already tried BTE (as u can read in my first post). I put a break-point in a custom function module created using the example provided by Sap.&lt;/P&gt;&lt;P&gt;But in VF01 / VF02 the break point doesen't work. Seems that the function module is not called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm missing some steps? I read on documentation that i have activate the BTE. But in trx FIBF i don't find any activate function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx again&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2006 07:27:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-attach-custom-code-after-invoice-save-modify/m-p/1629671#M281120</guid>
      <dc:creator>andrea_galluccio2</dc:creator>
      <dc:date>2006-09-21T07:27:07Z</dc:date>
    </item>
  </channel>
</rss>

