Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Creating PM plans using /ISDFPS/MPLAN_CREATE

Former Member
0 Likes
2,062

Hi all,

I am trying to creat maintenance plan for a equipment by using the function module '/ISDFPS/MPLAN_CREATE'. When i create plan using transaction IP01 plan number and item are internally generated. When i am creating the plan by using the above function module what should i pass for plan number and item. i am trying to pass like %0000001, it is giving an error saying there is no maintenanace plan with %0000001.

Thanks

Rajavardana Reddy

6 REPLIES 6
Read only

Former Member
0 Likes
1,139

Before calling this function module FM NUMBER_GET_NEXT is used to get the next number for plan and item. This is number is passed to create function module

Message was edited by:

rajavardhana reddy

Read only

Former Member
0 Likes
1,139

Hi

I'm trying to create a maintenance plan with multiple counters but unable to find any BAPIs or FMs. BDC was one of my option but had trouble controlling the multiple cycles.

Anyhow, What do you feed in for the

1. Number range number (Current latest number?)

2. Number range object. Where do you find the number range object for maintenance plan. I found a Tcode IP20 for maintenance plan number.

Please help. Thank you very much.

Regards

Joanne Kerk

Read only

0 Likes
1,139

I later managed to find out the object numbers for the following tables:

For the header table - MPLA

Object: MPLA_NR

For the item table - MPOS

Object: MPOS_NR

Read only

0 Likes
1,139

Hi Joanne,

Thanks for your reply. I am retriving the existing maintenance plan data from the table Mpla, mpos,mmpt and creating the maintenance plan for the new contract and item with using of this data except Wapos and WARPL.

I need to use the function module 'MPLAN_CREATE' to create and the customer is not prefer to use the BDC.

Read only

0 Likes
1,139

Hi Lourdu,

It is always advisable to use a standard FM whenever possible, rather than BDC.


As Reddy suggested, we should use the FM NUMBER_GET_NEXT. Belated thanks to Reddy by the way.

I have previously tried with MPLA_NR for to retrieve the next number for maintenance plan, and MPOS_NR for the next maintenance plan item number.

CALL FUNCTION 'NUMBER_GET_NEXT'

   EXPORTING

     nr_range_nr   = '01'

     object   = 'MPLA_NR'

   IMPORTING

     number   = lv_mpla_nr

   EXCEPTIONS

     interval_not_found   = 1

     number_range_not_intern = 2

     object_not_found   = 3

     quantity_is_0   = 4

     quantity_is_not_1   = 5

     interval_overflow   = 6

     buffer_overflow   = 7

     OTHERS   = 8.


Regards,

Joanne

Read only

Former Member
0 Likes
1,139

Hi reddy,

I tried to use the fm 'Number_get_text'  with the values for Importing parameters

NR_RANGE_NR--> 20 or 00 and OBJECT = 'WARPL'  i am getting the error message "The Number ranage object WARPL does not exist" .

Could you please let me know which value i need to pass in the function module importing parameters.