<?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 Calling Function Module in Update Task ! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-function-module-in-update-task/m-p/4814268#M1126736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a function module (Z_FIRST) that read JIT Tables and update a Ztable with some flags. The same function module is also calling BAPI for goods movement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am calling the above function module (Z_FIRST) in another function module (Z_SECOND) with IN UPDATE TASK option. I have given the correct input parameters required by Z_FIRST to update the enteries in ZTABLE but I did not see any update in ZTABLE. Neither the goods movement happened. I am not sure where I am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the sample code below for more information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module Z_FIRST is called in Z_SECOND as written below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'Z_FIRST' IN UPDATE TASK&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              PRODN     = V_JIT&lt;/P&gt;&lt;P&gt;              EXTST       = V_STATUS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code in Z_FIRST is taking the values of V_JIT and V_STATUS and reading some database tables and ZTABLE. Based on some conditions it update some flags in ZTABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I run the function module Z_FIRST without giving IN UPDATE TASK option, it successfully update ZTABLE and does the Goods movement. But it is not doing the same in IN UPDATE TASK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please let me know where I am doing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Nov 2008 00:56:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-26T00:56:26Z</dc:date>
    <item>
      <title>Calling Function Module in Update Task !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-function-module-in-update-task/m-p/4814268#M1126736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a function module (Z_FIRST) that read JIT Tables and update a Ztable with some flags. The same function module is also calling BAPI for goods movement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am calling the above function module (Z_FIRST) in another function module (Z_SECOND) with IN UPDATE TASK option. I have given the correct input parameters required by Z_FIRST to update the enteries in ZTABLE but I did not see any update in ZTABLE. Neither the goods movement happened. I am not sure where I am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the sample code below for more information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module Z_FIRST is called in Z_SECOND as written below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'Z_FIRST' IN UPDATE TASK&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              PRODN     = V_JIT&lt;/P&gt;&lt;P&gt;              EXTST       = V_STATUS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code in Z_FIRST is taking the values of V_JIT and V_STATUS and reading some database tables and ZTABLE. Based on some conditions it update some flags in ZTABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I run the function module Z_FIRST without giving IN UPDATE TASK option, it successfully update ZTABLE and does the Goods movement. But it is not doing the same in IN UPDATE TASK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please let me know where I am doing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2008 00:56:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-function-module-in-update-task/m-p/4814268#M1126736</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-26T00:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Function Module in Update Task !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-function-module-in-update-task/m-p/4814269#M1126737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;some things you can check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1- is there a commit work in your first FM? that only will trigger the FM in update task.&lt;/P&gt;&lt;P&gt;2- Are  you passing all the required parameters to the 2nd FM? are those 2 parameters you  passing enough to find the entry in Z table and update that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2008 01:41:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-function-module-in-update-task/m-p/4814269#M1126737</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-26T01:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Function Module in Update Task !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-function-module-in-update-task/m-p/4814270#M1126738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As MxG said, check the existence of "COMMIT WORK" first.&lt;/P&gt;&lt;P&gt;Without "IN UPDATE TASK", commit will be automatically performed if there is a dialog switch;&lt;/P&gt;&lt;P&gt;But with "IN UPDATE TASK", commit will ONLY be performed when statement "COMMIT WORK".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2008 02:47:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-function-module-in-update-task/m-p/4814270#M1126738</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-26T02:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Function Module in Update Task !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-function-module-in-update-task/m-p/4814271#M1126739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to use explicit &lt;STRONG&gt;COMMIT WORK.&lt;/STRONG&gt; after calling the such FM to complete SAP LUW.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2008 06:00:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-function-module-in-update-task/m-p/4814271#M1126739</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-26T06:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Function Module in Update Task !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-function-module-in-update-task/m-p/4814272#M1126740</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;Commit work is required to be done when ever any update task is done to database .&lt;/P&gt;&lt;P&gt;You need to write "COMMIT WORK" at end of FM .&lt;/P&gt;&lt;P&gt;After COMMIT WORK Dialog Process is free to proceed with next user input .Final Part of SAP UW is done .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your parameters must be correct otherwise without using "COMMIT WORK" records could not have been updated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2008 07:07:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-function-module-in-update-task/m-p/4814272#M1126740</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-26T07:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Function Module in Update Task !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-function-module-in-update-task/m-p/4814273#M1126741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;design change&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 15:47:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-function-module-in-update-task/m-p/4814273#M1126741</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-16T15:47:39Z</dc:date>
    </item>
  </channel>
</rss>

