<?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 UPDATE TASK and STARTING NEW TASK in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-task-and-starting-new-task/m-p/8177533#M1623895</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the challenge.&lt;/P&gt;&lt;P&gt;When posting a document, I want to run a program that prints a layout for that document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prerequesite #1: I want to use a program to be used outside this, therefore all data should be read from database&lt;/P&gt;&lt;P&gt;Prerequesite #2: Canceling printing should not cancel the posting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution #1: Database reading whlie posting can be done with update task, or perform on commit.&lt;/P&gt;&lt;P&gt;Solution #2: Printing interface can the independent with starting new task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem: How do I maintain these two?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using update task inside starting new task, does not work since there is no COMMIT WORK in the update task code.&lt;/P&gt;&lt;P&gt;Using starting new task inside update task, causes errors with some abap commands and interface as far as I checked.&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>Tue, 30 Aug 2011 10:51:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-08-30T10:51:53Z</dc:date>
    <item>
      <title>UPDATE TASK and STARTING NEW TASK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-task-and-starting-new-task/m-p/8177533#M1623895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the challenge.&lt;/P&gt;&lt;P&gt;When posting a document, I want to run a program that prints a layout for that document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prerequesite #1: I want to use a program to be used outside this, therefore all data should be read from database&lt;/P&gt;&lt;P&gt;Prerequesite #2: Canceling printing should not cancel the posting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution #1: Database reading whlie posting can be done with update task, or perform on commit.&lt;/P&gt;&lt;P&gt;Solution #2: Printing interface can the independent with starting new task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem: How do I maintain these two?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using update task inside starting new task, does not work since there is no COMMIT WORK in the update task code.&lt;/P&gt;&lt;P&gt;Using starting new task inside update task, causes errors with some abap commands and interface as far as I checked.&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>Tue, 30 Aug 2011 10:51:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-task-and-starting-new-task/m-p/8177533#M1623895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-30T10:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: UPDATE TASK and STARTING NEW TASK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-task-and-starting-new-task/m-p/8177534#M1623896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... Canceling printing ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I guess you mean "any runtime error during print processing".&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prerequesite #1: I want to use a program to be used outside this, therefore all data should be read from database&lt;/P&gt;&lt;P&gt;Prerequesite #2: Canceling printing should not cancel the posting&lt;/P&gt;&lt;P&gt;Problem: How do I maintain these two?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You could use tRFC (call function ... in background task). It will be executed during the COMMIT WORK, after the update task has been run successfully. In case of failure, you can manage it using SM58.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using update task inside starting new task, does not work since there is no COMMIT WORK in the update task code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Sure, COMMIT WORK is forbidden inside update tasks, because the update task is started by COMMIT WORK.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using starting new task inside update task, causes errors with some abap commands and interface as far as I checked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;starting an RFC commits database, so it must be used very carefully during an update task (always before any database update)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 11:51:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-task-and-starting-new-task/m-p/8177534#M1623896</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2011-08-30T11:51:13Z</dc:date>
    </item>
  </channel>
</rss>

