<?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: fm IN BACKGROUND TASK output in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923353#M939834</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cherryl,&lt;/P&gt;&lt;P&gt;What is the flow in your RFC ? What exactly is your requirement? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you are calling the FM in BACKGROUND TASK and since it will be called only when a COMMIT WORK statement is encountered you will not be able to get the Delivery Number until COMMIT WORK is encountered &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if your requirement is to get the delivery number in this case this will be possible only after COMMIT WORK. Now if the data is commited at this point you can very well fetch the required delivery based on the sales order from the Database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even the IN UPDATE TASK Will not work as that also will be called only After the COMMIT statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why can't we call that FM as a Normal Functional Module? &lt;/P&gt;&lt;P&gt;Is it called in background task just to keep transactional Integrity ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2008 08:13:33 GMT</pubDate>
    <dc:creator>former_member195698</dc:creator>
    <dc:date>2008-06-05T08:13:33Z</dc:date>
    <item>
      <title>fm IN BACKGROUND TASK output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923348#M939829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to use the delivery number created in the FM z_create_dlvry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get an FM to have an output when it's called in background task?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'Z_CREATE_DLVRY' IN BACKGROUND TASK&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;         i_order  = vbak-vbeln&lt;/P&gt;&lt;P&gt;    TABLES                                            &lt;/P&gt;&lt;P&gt;         itab_msg = itab_msg1.                        &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab_msg1 does not return anything if it is called in background. But it returns correct value if the IN BACKGROUND TASK is removed. (delivery number = itab_msg1-msgv2). The current program needs to call the fm in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i get the delivery number created in the FM? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Che&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 02:22:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923348#M939829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-05T02:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: fm IN BACKGROUND TASK output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923349#M939830</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;In your function module 'Z_CREATE_DLVRY' , after your logic is complete, you fill the message in your internal table. After that just log a success message such as..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message s000(..). ( this should contain the delivery number ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you execute the FM in teh background, this message gets logged and in the spool you will be able to see the delivery number.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 03:44:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923349#M939830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-05T03:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: fm IN BACKGROUND TASK output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923350#M939831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cherryl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After calling this FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'Z_CREATE_DLVRY' IN BACKGROUND TASK&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_order = vbak-vbeln&lt;/P&gt;&lt;P&gt;TABLES &lt;/P&gt;&lt;P&gt;itab_msg = itab_msg1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;export delivery number(itab_msg1-msgv2) to some memory id.&lt;/P&gt;&lt;P&gt;Now in your program import delivery number(itab_msg1-msgv2)&lt;/P&gt;&lt;P&gt;from memory id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly check this and get back to me incase of any queries.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dont forget to reward points if found useful.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Satyesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 05:04:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923350#M939831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-05T05:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: fm IN BACKGROUND TASK output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923351#M939832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why do you want to call the FM in background task?&lt;/P&gt;&lt;P&gt;If you call FM in background task, they are not executed till you have a commit work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 05:37:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923351#M939832</guid>
      <dc:creator>former_member195698</dc:creator>
      <dc:date>2008-06-05T05:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: fm IN BACKGROUND TASK output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923352#M939833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Satyesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer but exporting and importing (from memory) do not when using IN BACKGROUND TASK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Abhishek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;It is called in background because it is creating a delivery for the currently opened order. The processing type is remote-enabled module. And it can be triggered by IDocs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would the IN UPDATE TASK still work? I did not code the Z_CREATE_DLVRY fm but i need the delivery number it generates. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Shruthi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added Message s000(..) inside the FM 'Z_CREATE_DLVRY' . But I am not able to see a new entry logged in TSP01 table under my username. Could you please help me how to log the delivery number to the spool and how to retrieve it after the function call?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Che&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 06:51:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923352#M939833</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-05T06:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: fm IN BACKGROUND TASK output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923353#M939834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cherryl,&lt;/P&gt;&lt;P&gt;What is the flow in your RFC ? What exactly is your requirement? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you are calling the FM in BACKGROUND TASK and since it will be called only when a COMMIT WORK statement is encountered you will not be able to get the Delivery Number until COMMIT WORK is encountered &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if your requirement is to get the delivery number in this case this will be possible only after COMMIT WORK. Now if the data is commited at this point you can very well fetch the required delivery based on the sales order from the Database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even the IN UPDATE TASK Will not work as that also will be called only After the COMMIT statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why can't we call that FM as a Normal Functional Module? &lt;/P&gt;&lt;P&gt;Is it called in background task just to keep transactional Integrity ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 08:13:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923353#M939834</guid>
      <dc:creator>former_member195698</dc:creator>
      <dc:date>2008-06-05T08:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: fm IN BACKGROUND TASK output</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923354#M939835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The requirement is to create billing document automatically after creation of KE doc (which is currently creating delivery automatically).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for your help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I put the code in the user exit save of delivery creation... and not in order creation save user exit. I am now able to create billing document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Che&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 13:15:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-in-background-task-output/m-p/3923354#M939835</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-05T13:15:16Z</dc:date>
    </item>
  </channel>
</rss>

