<?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: Update function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055655#M90324</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;        I expected ur reply,Thanks..&lt;/P&gt;&lt;P&gt;Well i have not written any Update FM before so i take baby steps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firstly the record that needs to be inserted should be send to my Update FM&lt;/P&gt;&lt;P&gt;Secondly how should my FM luk like ? &lt;/P&gt;&lt;P&gt;do i just need to put an insert command for that record ?&lt;/P&gt;&lt;P&gt;And give an Commit Work ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any standard Example then plz forward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Azee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Nov 2005 14:39:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-11-09T14:39:05Z</dc:date>
    <item>
      <title>Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055652#M90321</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;       i have read threads in SDN regarding update function module for updating the database, Could any one send an  example for it !&lt;/P&gt;&lt;P&gt;Is there any standard function module which is provided by SAP ?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Azee.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 14:21:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055652#M90321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-09T14:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055653#M90322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not one standard function module, but many can be called in an update task.   In the function module, you specify that you can call it in update task, then when calling the function module, you add the extension IN UPDATE TASK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F1 Help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 3 &lt;/P&gt;&lt;P&gt;CALL FUNCTION func IN UPDATE TASK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additions: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ... EXPORTING  p1 = f1     ... pn = fn &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... TABLES     p1 = itab1  ... pn = itabn&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Flags the function module func for execution in the update task. It is not executed at once, but the data passed with EXPORTING or TABLES is placed in a database table and a subsequent COMMIT WORK then causes the function module to be executed by the update task. Update function modules must be flagged as such in the Function Builder &lt;/P&gt;&lt;P&gt;The return value is not set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1 &lt;/P&gt;&lt;P&gt;... EXPORTING p1 = f1 ... pn = fn &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Values of fields and field strings specified under EXPORTING are passed from the calling program to the function module. In the function module, the formal parameters are defined as import parameters. In the interface definition, default values must be assigned to all import parameters of the update function module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2 &lt;/P&gt;&lt;P&gt;... TABLES p1 = itab1 ... pn = itabn &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;TABLES passes references to internal tables. All table parameters of the function module must have values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;With update function modules, both import parameters and exceptions are ignored when the call is made. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Call function 'ZTEST'
        IN UPDATE TASK.
Commit work.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 14:27:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055653#M90322</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-09T14:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055654#M90323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are talking about updating database tables. There are some FM's available but remember SAP doesn't suggest to update standard table directly. You can use COC2_TABLE_INSERT_DB to insert records into a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 14:34:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055654#M90323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-09T14:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055655#M90324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;        I expected ur reply,Thanks..&lt;/P&gt;&lt;P&gt;Well i have not written any Update FM before so i take baby steps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firstly the record that needs to be inserted should be send to my Update FM&lt;/P&gt;&lt;P&gt;Secondly how should my FM luk like ? &lt;/P&gt;&lt;P&gt;do i just need to put an insert command for that record ?&lt;/P&gt;&lt;P&gt;And give an Commit Work ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any standard Example then plz forward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Azee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 14:39:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055655#M90324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-09T14:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055656#M90325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you updating a custom table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 14:43:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055656#M90325</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-09T14:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055657#M90326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am updating ztable .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 14:46:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055657#M90326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-09T14:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055658#M90327</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;Your fm should have an export parameter (if you want to store only one record) or table (if you wan to save several records) structurated as your table and and export parameter to indicate which action has to be made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your program you should pass the record(s) you want to insert/update and the action type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'Z_UPDATE_TABLE' IN UPDATE TASK&lt;/P&gt;&lt;P&gt;   EXPORT&lt;/P&gt;&lt;P&gt;     RECORD     = ZTABLE&lt;/P&gt;&lt;P&gt;     ACTION     = 'I'&lt;/P&gt;&lt;P&gt;   EXCEPTION&lt;/P&gt;&lt;P&gt;     FAIL       = 1&lt;/P&gt;&lt;P&gt;     OTHERS     = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_UPDATE_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE ACTION.&lt;/P&gt;&lt;P&gt; WHEN 'D'. DELETE ZTABLE FROM RECORD.&lt;/P&gt;&lt;P&gt; WHEN 'I'. INSERT ZTABLE FROM RECORD.&lt;/P&gt;&lt;P&gt; WHEN 'U'. UPDATE ZTABLE FROM RECORD.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0. RAISE FAIL. ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: max bianchi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 14:51:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055658#M90327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-09T14:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055659#M90328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First Create your function module in SE80.&lt;/P&gt;&lt;P&gt;In the attributes tab, under processing type, choose Update Module, Start Immeditatly.  Define your import parameters,  enter the source code,  All validations should have been done prior to the call to this function module, so all you need in the source, is the updating of the database,  INSERT, MODIFY, UPDATE,  whatever.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you call you function module, use IN UPDATE TASK,  after the call,  COMMIT WORK.  The commit work will trigger the db update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2005 14:52:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055659#M90328</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-09T14:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Update function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055660#M90329</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;Can I pass Memory ID values in update function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any restrictions in using the Export / Import....???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because I am facing problem in importing the values from memory ID, while exporting I can see the value in my variable , but after import no values are coming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2007 18:36:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-function-module/m-p/1055660#M90329</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-20T18:36:34Z</dc:date>
    </item>
  </channel>
</rss>

