0% found this document useful (0 votes)
114 views2 pages

Applies To:: (API) (Code Example) EAM - PMDEF - PUB - UPDATE - PM - DEF - How To Update A PM Schedule Name (Doc ID 2025233.1)

Uploaded by

herculean2010
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views2 pages

Applies To:: (API) (Code Example) EAM - PMDEF - PUB - UPDATE - PM - DEF - How To Update A PM Schedule Name (Doc ID 2025233.1)

Uploaded by

herculean2010
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

10/21/21, 5:12 PM Document 2025233.

1
  Last Login: October 21, 2021 3:22 PM IST sudhakar (Available) (0) Contact Us Help
PowerView is Off

 
Dashboard Knowledge Service Requests Patches & Updates Community

Give Feedback...
Copyright (c) 2021, Oracle. All rights reserved. Oracle Confidential.

[API][Code Example] EAM_PMDEF_PUB.UPDATE_PM_DEF - How to Update a PM Schedule Name (Doc ID To Bottom


2025233.1)

  Was this document helpful?  

APPLIES TO: Yes


No
Oracle Enterprise Asset Management - Version 12.1.1 and later    

Information in this document applies to any platform.


  Document Details  

GOAL
Type:
HOWTO
Status:
How to update PM Schedule Definition? PUBLISHED
Last Major
 
08-Jul-2019
Update:
05-Dec-2019
Last Update:
SOLUTION    

  Related Products  
The script can be download from here.
Oracle Enterprise Asset
The below script can be used  
Management
 

/*   Information Centers  

$Header: mrm_epb_update_pm_def.sql 120.1 2012/03/17


Enterprise Asset Management (Product ID 1142) - Update PM Schedule Name


[API][Code Example] EAM_PMDEF_PUB.UPDATE_PM_DEF - How to Update a PM Schedule Name (Doc ID 2025233.1)




   

Copyright (c) 2010-2015, Oracle Corporation. All rights reserved.




  Document References  
NAME
    
mrm_epb_update_pm_def.sql

   

DESCRIPTION

to update a PM Schedule Name by changing the Name
     Use API

  Recently Viewed  

VERSIONS
API eam_pmdef_pub.update_p
    strings -a $EAM_TOP/patch/115/sql/EAMPPMDB.pls | grep '$Header' [2561339.1]
    EAMPPMDB.pls, v 120.20.12010000.27

    EAMPPMDS.pls, v 120.8.12010000.1   
  Updating WO Material Issue Re

[2418798.1]

PARAMETERS Apps.wip_eam_workrequest_pu
     None
API Does Not Work After Patch
*/
[2712394.1]


API Required To Add Material A
-- set serveroutput on Association In Work Order [275
declare

API / Interface Required For WI


  in_pm_schedule_rec           eam_pmdef_pub.pm_scheduling_rec_type; Creation & Updation [2292


  in_pm_activities_tbl         eam_pmdef_pub.pm_activities_grp_tbl_type;

Show More
  in_pm_day_interval_rules_tbl eam_pmdef_pub.pm_rule_tbl_type;    

  in_pm_runtime_rules_tbl      eam_pmdef_pub.pm_rule_tbl_type;

  in_pm_list_date_rules_tbl    eam_pmdef_pub.pm_rule_tbl_type;

  out_msg_count     NUMBER;

  out_msg_data      VARCHAR2(5000);
  out_return_status VARCHAR2(1);

  msg_index     NUMBER;

  temp_err_mesg VARCHAR2(2000);
 

err_create_pm_def_failure EXCEPTION;

begin

  fnd_global.apps_initialize(user_id      => 1013415,


                             resp_id      => 23118,

                             resp_appl_id => 426);

  in_pm_schedule_rec.pm_schedule_id := 9290;
  --- PM Schedule Name OLD = MRM_AN_PM_1

  in_pm_schedule_rec.name                     := 'XXX_PM_111';
  in_pm_schedule_rec.rescheduling_point       := 1;

  in_pm_schedule_rec.set_name_id              := 1;

  in_pm_schedule_rec.type_code                := 10;
  in_pm_schedule_rec.scheduling_method_code   := 10;

  in_pm_schedule_rec.whichever_first          := 'Y';

  in_pm_schedule_rec.generate_wo_status       := 17;

  in_pm_schedule_rec.interval_per_cycle       := 1;

  in_pm_schedule_rec.maintenance_object_id    := 3333000;
  in_pm_schedule_rec.maintenance_object_type  := 3;

  in_pm_schedule_rec.current_seq              := 0;

  in_pm_schedule_rec.current_cycle            := 1;

  in_pm_schedule_rec.generate_next_work_order := 'N';
  in_pm_schedule_rec.non_scheduled_flag       := 'N';

  in_pm_day_interval_rules_tbl(1).rule_type := 1;
  in_pm_day_interval_rules_tbl(1).day_interval :=
7;

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=370245549152891&id=2025233.1&displayIndex=35&_afrWindowMode=0&… 1/2
10/21/21, 5:12 PM Document 2025233.1

  in_pm_activities_tbl(1).pm_schedule_id := 9290;
  in_pm_activities_tbl(1).activity_association_id := 50925;
  in_pm_activities_tbl(1).interval_multiple := 1;
  in_pm_activities_tbl(1).allow_repeat_in_cycle := 'Y';

  eam_pmdef_pub.update_pm_def(p_api_version               => 1.0,


                              p_init_msg_list             => fnd_api.g_true,
                              p_commit                    => fnd_api.g_true,
                              p_validation_level          => fnd_api.g_valid_level_full,
                              x_return_status             => out_return_status,
                              x_msg_count                 => out_msg_count,
                              x_msg_data                  => out_msg_data,
                              p_pm_schedule_rec           => in_pm_schedule_rec,
                              p_pm_activities_tbl         => in_pm_activities_tbl,
                              p_pm_day_interval_rules_tbl => in_pm_day_interval_rules_tbl,
                              p_pm_runtime_rules_tbl      => in_pm_runtime_rules_tbl,
                              p_pm_list_date_rules_tbl    => in_pm_list_date_rules_tbl);

  DBMS_OUTPUT.PUT_LINE('Return Status: ' || out_return_status);


  DBMS_OUTPUT.PUT_LINE('Return Message Count: ' || out_msg_count);
  DBMS_OUTPUT.PUT_LINE('Return Message Data: ' ||
                       replace(out_msg_data, chr(0), ' '));

  out_msg_count := fnd_msg_pub.count_msg;

  IF (out_msg_count > 0) THEN


    msg_index := out_msg_count;
    FOR i IN 1 .. out_msg_count LOOP
      fnd_msg_pub.get(p_msg_index     => FND_MSG_PUB.G_NEXT,
                      p_encoded       => 'F',
                      p_data          => temp_err_mesg,
                      p_msg_index_out => msg_index);
      dbms_output.put_line('Error:' || msg_index || ':' || temp_err_mesg);
    END LOOP;
  END IF;
end;

REFERENCES

NOTE:1938936.1 - [EAM] Enterprise Asset Management Latest Patch Level for R12 (12.1.X/12.2.X)

Didn't find what you are looking for? Ask in Community...

Attachments
Update PM SChedule (4.23 KB)

Related
Products

Oracle E-Business Suite > Asset Lifecycle Management > Asset Lifecycle Management > Oracle Enterprise Asset Management > PM > PM Engine

Keywords
API; DBMS_OUTPUT; EAM_PMDEF_PUB; SCRIPT

Back to Top
 
Copyright (c) 2021, Oracle. All rights reserved. Legal Notices and Terms of Use Privacy Statement
   

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=370245549152891&id=2025233.1&displayIndex=35&_afrWindowMode=0&… 2/2

You might also like