<?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: Trigger a FM upon table updation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-a-fm-upon-table-updation/m-p/3717673#M894976</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;Find out the function group.&lt;/P&gt;&lt;P&gt;And go for the PAI module of your screen&lt;/P&gt;&lt;P&gt;There you can write the function module . for what you want to perform the action.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 May 2008 06:28:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-06T06:28:42Z</dc:date>
    <item>
      <title>Trigger a FM upon table updation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-a-fm-upon-table-updation/m-p/3717671#M894974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a custom Z-table created in my ERP system. To this table I have created a table maintenance generator to enable updation of values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever a new record is inserted/deleted in this table or any existing record in this table has been changed, then a FM needs to be triggered immediately with details of the record that has been inserted or updated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This FM has to be triggered immediately and not by running a batch job in the background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help me with the details for achieving the same. Awaiting your valuable inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Gayathri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2008 06:11:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-a-fm-upon-table-updation/m-p/3717671#M894974</guid>
      <dc:creator>gayathri_narayanan</dc:creator>
      <dc:date>2008-05-06T06:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger a FM upon table updation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-a-fm-upon-table-updation/m-p/3717672#M894975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you created a table maintenance generator, then a function module get autometically generated that used to update the table in database when you use table maintenance for data updetion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will find the function group by the following path: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SE11-&amp;gt; open the table -&amp;gt; Utilities -&amp;gt; table maintenance generator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now this autometically created function group can be changed according to your requirements. There you will find the point where when you table is getting uodated ( you will also get the screen no there which is used to update your table, search the PAI of that screen), and if the updetion is successful then add code ( call FM in your case) according to your requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more hints to get that perticular point,  search the following path in the screen of the function group:    &lt;/P&gt;&lt;P&gt; MODULE LISTE_UPDATE_LISTE -&amp;gt; PERFORM update_tab&lt;/P&gt;&lt;P&gt; -&amp;gt; PERFORM update_entry -&amp;gt; MODIFY extract&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2008 06:21:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-a-fm-upon-table-updation/m-p/3717672#M894975</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-06T06:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger a FM upon table updation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-a-fm-upon-table-updation/m-p/3717673#M894976</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;Find out the function group.&lt;/P&gt;&lt;P&gt;And go for the PAI module of your screen&lt;/P&gt;&lt;P&gt;There you can write the function module . for what you want to perform the action.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2008 06:28:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-a-fm-upon-table-updation/m-p/3717673#M894976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-06T06:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger a FM upon table updation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-a-fm-upon-table-updation/m-p/3717674#M894977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do this in events of table maintenance generator. Have a look at below link for details of how to use the events:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Table Maintenance Events|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if any doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vibha &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2008 06:34:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-a-fm-upon-table-updation/m-p/3717674#M894977</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-06T06:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger a FM upon table updation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-a-fm-upon-table-updation/m-p/3717675#M894978</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;Pls find below the link which will automatically update the user and the date whenever the table has a new entry or changed in table maintenance generator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8129f164-0a01-0010-2a8e-8765287250fc" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8129f164-0a01-0010-2a8e-8765287250fc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have any doubts please get back to me as I am also currently working on a similiar object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also other than as shown in the attached PDF you can also write the following code in &lt;STRONG&gt;EVENT '01'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM update_user_date_time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: f_index LIKE sy-tabix.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: BEGIN OF l_total.&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE zztable.&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE vimtbflags.&lt;/P&gt;&lt;P&gt;DATA END OF l_total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: s_record TYPE zztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT total INTO l_total.&lt;/P&gt;&lt;P&gt;	IF l_total-vim_action = aendern OR&lt;/P&gt;&lt;P&gt;		l_total-vim_action = neuer_eintrag.&lt;/P&gt;&lt;P&gt;		MOVE-CORRESPONDING l_total TO s_record.&lt;/P&gt;&lt;P&gt;		s_record-zz_user = sy-uname.&lt;/P&gt;&lt;P&gt;		s_record-zz_date = sy-datum.&lt;/P&gt;&lt;P&gt;		s_record-zz_time = sy-uzeit.&lt;/P&gt;&lt;P&gt;		READ TABLE extract WITH KEY l_total.&lt;/P&gt;&lt;P&gt;		IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;			f_index = sy-tabix.&lt;/P&gt;&lt;P&gt;		ELSE.&lt;/P&gt;&lt;P&gt;			CLEAR f_index.&lt;/P&gt;&lt;P&gt;		ENDIF.&lt;/P&gt;&lt;P&gt;		MOVE-CORRESPONDING s_record TO l_total.&lt;/P&gt;&lt;P&gt;		MODIFY total FROM l_total.&lt;/P&gt;&lt;P&gt;		CHECK f_index GT 0.&lt;/P&gt;&lt;P&gt;		MODIFY extract INDEX f_index FROM l_total.&lt;/P&gt;&lt;P&gt;	ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " UPDATE_USER_DATE_TIME[/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here ZZTABLE is the Z table and ZZ_USER, ZZ_DATE, and ZZ_TIME are the fields that are updated. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward if found helpful.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2008 06:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-a-fm-upon-table-updation/m-p/3717675#M894978</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-06T06:42:04Z</dc:date>
    </item>
  </channel>
</rss>

