<?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: How to execute Update Module FM after final commit work for a T-code. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execute-update-module-fm-after-final-commit-work-for-a-t-code/m-p/6463542#M1415872</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could tell us how you resolve it? It could be useful for others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Dec 2009 15:48:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-17T15:48:17Z</dc:date>
    <item>
      <title>How to execute Update Module FM after final commit work for a T-code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execute-update-module-fm-after-final-commit-work-for-a-t-code/m-p/6463540#M1415870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a bit complex issue with my current object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have modified MM41/MM42 transactions and added a subscreen to fulfill the requirement.&lt;/P&gt;&lt;P&gt;We have designed the subscreen and embedded the same to MM41/MM42 through SPRO configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now for update business logic,i am trying to execute one Function module(Update Module) in update Task...so that it will be executed once after the final commit work will be done for MM41/MM42.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But its not executing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To fulfill my requirement i need to execute the FM only after Final Commit work for MM41/MM42.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest in this regard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even i can see few BADI's which are triggering through MM01/MM02 but not through MM41/MM42.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BADI_ARTICLE_REF_RT&lt;/P&gt;&lt;P&gt;BADI_MATERIAL_CHECK&lt;/P&gt;&lt;P&gt;BADI_MAT_F_SPEC_SEL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code with which i am trying is given below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After PAI event of the subscreen---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1:        MODULE USER_COMMAND_9001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2:       MODULE user_command_9001 INPUT. &lt;/P&gt;&lt;P&gt;                    PERFORM sub_save_mara ON COMMIT.&lt;/P&gt;&lt;P&gt;          ENDMODULE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3:       FORM sub_save_mara.&lt;/P&gt;&lt;P&gt;                     CALL FUNCTION 'ZMMUPDATE_MARA_APPEND_STRUCT' "IN UPDATE TASK&lt;/P&gt;&lt;P&gt;                                    EXPORTING&lt;/P&gt;&lt;P&gt;                                             materialno = gv_matnr&lt;/P&gt;&lt;P&gt;                                             appendmara = ty_zzmara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         ENDFORM.                    "sub_save_mara&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4:                FUNCTION zmmupdate_mara_append_struct.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                "----------------------------------------------------------------------&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                  &lt;STRONG&gt;"&lt;/STRONG&gt;"Update Function Module:&lt;/P&gt;&lt;P&gt;*"&lt;/P&gt;&lt;P&gt;                   &lt;STRONG&gt;"&lt;/STRONG&gt;"Local Interface:&lt;/P&gt;&lt;P&gt;                  *"  IMPORTING&lt;/P&gt;&lt;P&gt;               *"     VALUE(MATERIALNO) TYPE  MATNR&lt;/P&gt;&lt;P&gt;               *"     VALUE(APPENDMARA) TYPE  ZZMARA&lt;/P&gt;&lt;P&gt;                  *"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Data Declaration for Local use&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DATA : w_mara TYPE mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Selecting the latest values for the material.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  SELECT SINGLE * FROM mara INTO w_mara WHERE matnr = materialno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Move the ZZMARA values to structure MARA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    MOVE-CORRESPONDING appendmara TO w_mara.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Update the values in table MARA.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    MODIFY mara FROM w_mara.&lt;/P&gt;&lt;P&gt;  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;Kindly suggest.Thanks in advance.&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;Ansumesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2009 07:31:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execute-update-module-fm-after-final-commit-work-for-a-t-code/m-p/6463540#M1415870</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-17T07:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute Update Module FM after final commit work for a T-code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execute-update-module-fm-after-final-commit-work-for-a-t-code/m-p/6463541#M1415871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2009 12:27:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execute-update-module-fm-after-final-commit-work-for-a-t-code/m-p/6463541#M1415871</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-17T12:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute Update Module FM after final commit work for a T-code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execute-update-module-fm-after-final-commit-work-for-a-t-code/m-p/6463542#M1415872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could tell us how you resolve it? It could be useful for others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2009 15:48:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execute-update-module-fm-after-final-commit-work-for-a-t-code/m-p/6463542#M1415872</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-17T15:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute Update Module FM after final commit work for a T-code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execute-update-module-fm-after-final-commit-work-for-a-t-code/m-p/6463543#M1415873</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;The code given by me will work fine provided the Final commit should happen.&lt;/P&gt;&lt;P&gt;Because to execute FM with update task,final commit work should happen which is mandatory and after that it will call the update task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case final commit work was not happeneing because..SAP standard program was not able to detect wether there is any change in my sub-screen or not as the standard program &amp;amp; my custom program,subscreens are different.&lt;/P&gt;&lt;P&gt;As it was not able to detect the change,so final commit was not happening and hence update task also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To provide the reference of change in my subscreen to standard program ,i set a flag as per the change in the subscreen&lt;/P&gt;&lt;P&gt;And exported the same to memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Implemented one enhacement spot in MATERIAL_CHANGE_CHECK_RETAIL Fm where i have Imported the flag value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on my custom flag value,i have set one standard flag FLG_AENDERUNG_GES which tells SAP standard program for MM42 wether any change has happened or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above solved my purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ansumesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2009 16:29:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execute-update-module-fm-after-final-commit-work-for-a-t-code/m-p/6463543#M1415873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-17T16:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute Update Module FM after final commit work for a T-code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execute-update-module-fm-after-final-commit-work-for-a-t-code/m-p/6463544#M1415874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot! -:) Very appreciated -;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2009 16:38:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execute-update-module-fm-after-final-commit-work-for-a-t-code/m-p/6463544#M1415874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-17T16:38:46Z</dc:date>
    </item>
  </channel>
</rss>

