<?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 Deactivating maintenance plan via function module or method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/deactivating-maintenance-plan-via-function-module-or-method/m-p/12569108#M2008334</link>
    <description>&lt;P&gt;Hi together,&lt;/P&gt;
  &lt;P&gt;I am trying to deactivate a maintenance plan via a function module or method, such as: FM - MPLAN_DEACTIVATE or mplan_api-&amp;gt;mplan_deactivate, but nothing is working. The status of the maintenance plan remains unchanged. Is there any function module or method that I can use to change the status of a maintenance plan from active to inactive?&lt;/P&gt;
  &lt;P&gt;Please find below a snippet of code that I used in FM and method:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA: lv_warpl TYPE mpla-warpl,
        table_l  TYPE bapirettab,
        me       TYPE REF TO mplan_api.
  lv_warpl = '1010000608'.
"FM
 CALL FUNCTION 'MPLAN_DEACTIVATE'
    EXPORTING
      warpl  = lv_warpl
    TABLES
      return = table_l.


"Method
  me = mplan_api=&amp;gt;get_reference( ).

  CALL METHOD me-&amp;gt;mplan_deactivate
    EXPORTING
      warpl  = lv_warpl
*      dialog =
    IMPORTING
      return = table_l
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Thank you all in advance!&lt;/P&gt;
  &lt;P&gt;Bests regards,&lt;/P&gt;
  &lt;P&gt;R&lt;/P&gt;</description>
    <pubDate>Thu, 13 Oct 2022 10:01:47 GMT</pubDate>
    <dc:creator>Raxph</dc:creator>
    <dc:date>2022-10-13T10:01:47Z</dc:date>
    <item>
      <title>Deactivating maintenance plan via function module or method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deactivating-maintenance-plan-via-function-module-or-method/m-p/12569108#M2008334</link>
      <description>&lt;P&gt;Hi together,&lt;/P&gt;
  &lt;P&gt;I am trying to deactivate a maintenance plan via a function module or method, such as: FM - MPLAN_DEACTIVATE or mplan_api-&amp;gt;mplan_deactivate, but nothing is working. The status of the maintenance plan remains unchanged. Is there any function module or method that I can use to change the status of a maintenance plan from active to inactive?&lt;/P&gt;
  &lt;P&gt;Please find below a snippet of code that I used in FM and method:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA: lv_warpl TYPE mpla-warpl,
        table_l  TYPE bapirettab,
        me       TYPE REF TO mplan_api.
  lv_warpl = '1010000608'.
"FM
 CALL FUNCTION 'MPLAN_DEACTIVATE'
    EXPORTING
      warpl  = lv_warpl
    TABLES
      return = table_l.


"Method
  me = mplan_api=&amp;gt;get_reference( ).

  CALL METHOD me-&amp;gt;mplan_deactivate
    EXPORTING
      warpl  = lv_warpl
*      dialog =
    IMPORTING
      return = table_l
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Thank you all in advance!&lt;/P&gt;
  &lt;P&gt;Bests regards,&lt;/P&gt;
  &lt;P&gt;R&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 10:01:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deactivating-maintenance-plan-via-function-module-or-method/m-p/12569108#M2008334</guid>
      <dc:creator>Raxph</dc:creator>
      <dc:date>2022-10-13T10:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Deactivating maintenance plan via function module or method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deactivating-maintenance-plan-via-function-module-or-method/m-p/12569109#M2008335</link>
      <description>&lt;P&gt;Hello &lt;SPAN class="mention-scrubbed"&gt;tk_gerald&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I guess you are missing commit work. Why don't you add the following after the call to MPLAN_DEACTIVATE:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;BR /&gt;      EXPORTING&lt;BR /&gt;        wait = 'X'.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Dominik Tylczynski&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 10:29:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deactivating-maintenance-plan-via-function-module-or-method/m-p/12569109#M2008335</guid>
      <dc:creator>Dominik_Tylczynski</dc:creator>
      <dc:date>2022-10-13T10:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Deactivating maintenance plan via function module or method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deactivating-maintenance-plan-via-function-module-or-method/m-p/12569110#M2008336</link>
      <description>&lt;P&gt;Many thanks for your help, it solved my issue!!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 11:54:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deactivating-maintenance-plan-via-function-module-or-method/m-p/12569110#M2008336</guid>
      <dc:creator>Raxph</dc:creator>
      <dc:date>2022-10-13T11:54:17Z</dc:date>
    </item>
  </channel>
</rss>

