Skip to Content
Author's profile photo K Jogeswara Rao

Automatic Tasklist transfer to PM Orders: User Exits IWO10020,21

Introduction


Subject matter is one of the FAQs where there has been a frequent and clear replies from forum to use the Enhancement, i.e., user-exit IWO10020 – Maintenance order: Automatically include task list. I was one among the members who received this reply but could not utilize because there existed no further info on ‘How?’ . The ‘How to use this user-exit‘ has remained a big ? for me since then (quite long period). I know it is still an unresolved issue to many. Whenever I remembered about this issue, I searched forum vigorously but no where concrete solutions found. Due to this  I always avoided to reply to other members, advising to use this exit for automatic including of tasklist, becuase I was unaware of complete solution. I always tried to give the code to be used in user-exits during replies in discussions. Also I documented these solutions for ready reference.

The time for documenting the solution for the subject matter has finally arrived, because I recently found the key to use user-exit IWO10020 which automatically transfers Tasklist while creating Order through IW31.

So to start with, first let’s see, what we achieve at the end of this document.

1. I prepared an Equipment Tasklist (IA01) like below for Equipment 53330333.

ia01.JPG


2. I run IW31 entered Order type and Equipment number

iw31.JPG

3. Pressed keyboard Enter button

iw31_1.JPG

What I found here in Create Order screen is the entire Equipment tasklist has been automatically copied to the Operations tab. Isn’t this of a great convenience?


Similarly I created a Functional location tasklist (IA11) for a Functional location AEP-CCWE  as under.

ia11.JPG

then I run IW31.

iw31_2.JPG


and I see all the operations of the F/L tasklist are copied to my Order.

iw31_fl.JPG


Note:

In both cases you notice that the Tasklist Short text became the Order Short text.

I am sure members would agree that this feature has got a great significance in creating PM Orders due to the convenience of having automatic operations. I need not specially mention that the Components details of the tasklist will also be transferred to Order alongwith the operations.

So now let’s see how to do it?

We already talked about the user-exit which is responsible for this. It is IWO10020.  But the thing is this has been an half information.  The other half of the info in this regard is we need to use another user-exit namely IWO20001 – User exit to pass routing to order alongwith the above to achieve this result.

Having revealed this, it is now simple task for me to tell the readers about further-how by simply giving the codes to be written in these user-exits.

Code to be put in the include ZXWO1U06 (user-exit IWO10020)


IF CAUFVD_IMP-AUART = 'ZM03'.
   PERFORM FCODE_PLSU(SAPLCOIH).  "This form calls User Exit IWO20001
 ENDIF.


The 01. and 03. lines above restrict the use of this feature to Order type ‘ZM03’. (Means Automatic tasklist feature  applicable to this Order type only)



Code to be put in the include ZXWOCU03 (user-exit IWO20001)



 TYPES: BEGIN OF TY_SELTAB,
       LV_PLNTY TYPE EAPL-PLNTY,
       LV_PLNNR TYPE EAPL-PLNNR,
       LV_PLNAL TYPE EAPL-PLNAL,
   END OF TY_SELTAB.
 
 DATA: IT_SELTAB TYPE TABLE OF TY_SELTAB,
       WA_SELTAB LIKE LINE OF IT_SELTAB.
 
 IF CAUFVD_IMP-EQUNR IS NOT INITIAL.
   SELECT PLNTY PLNNR PLNAL FROM EAPL INTO TABLE IT_SELTAB WHERE EQUNR = CAUFVD_IMP-EQUNR.
 ELSEIF CAUFVD_IMP-EQUNR IS INITIAL AND CAUFVD_IMP-TPLNR IS NOT INITIAL.
   SELECT PLNTY PLNNR PLNAL FROM TAPL INTO TABLE IT_SELTAB WHERE TPLNR = CAUFVD_IMP-TPLNR.
 ELSE.
 ENDIF.
  SEL_TAB[] = IT_SELTAB[].











The job is done.

And… that was about Automatic Tasklist while creating Order directly. Let’s now look into another user-exit namely IWO10021 – Automatic task list transfer when creating order from notif. As the name indicates, this is the enhancement which is supposed to give us above convenience while creating Order from a Notification. Let’s see what to do to have this.

Put this code in the include ZXWO1U07 (user-exit IWO10021)



IF CAUFVD_IMP-AUART = 'ZM03'.
 
   TYPES: BEGIN OF TY_SELTAB,
         LV_PLNTY TYPE EAPL-PLNTY,
         LV_PLNNR TYPE EAPL-PLNNR,
         LV_PLNAL TYPE EAPL-PLNAL,
     END OF TY_SELTAB.
 
   DATA: IT_SELTAB TYPE TABLE OF TY_SELTAB,
         WA_SELTAB LIKE LINE OF IT_SELTAB.
 
   IF CAUFVD_IMP-EQUNR IS NOT INITIAL.
     SELECT PLNTY PLNNR PLNAL FROM EAPL INTO TABLE IT_SELTAB WHERE EQUNR = CAUFVD_IMP-EQUNR.
   ELSEIF CAUFVD_IMP-EQUNR IS INITIAL AND CAUFVD_IMP-TPLNR IS NOT INITIAL.
     SELECT PLNTY PLNNR PLNAL FROM TAPL INTO TABLE IT_SELTAB WHERE TPLNR = CAUFVD_IMP-TPLNR.
   ELSE.
   ENDIF.
 
   SEL_TAB[] = IT_SELTAB[].
  ENDIF.










After this, when you create an Order of type ZM03, from the Create Order icon of a Notification     the Equipment tasklist OR the Functional location tasklist will be copied to operations tab automatically.

To be Remembered.

1. Configuration settings

Path: Maintenance and Service Orders > Functions ans Settings for Order Types > Default values for Tasklist Data and Profile Assignments

spro2.JPG

The above setting suppresses the tasklist pop-ups and copies entrie tasklist to the Order. (Ideal for this application). Due to some reason if some wants the tasklist operation pop-up before copying, then Tick  the 1st checkbox i.e., OprSelection.



2. Order personal Default values  settings


Inside Order: Extras > Settings > Default values…

Here in Control tab have this setting

It is observed that Operation selection pop-up can be triggered from the above setting (by tick marking the Operation select.) without going for SPRO settings as explained earlier in Point1.

3. Use of General Maintenance Tasklists

You can use GM Taklists also in this process, but you need to develop logic to relate a tasklist to some field value of the Equipment or F/Locn master. This logic will be replacing the code I provided in the includes ZXWOCU03 and ZXWO1U07.


4. Enhancements to be listed in a Project

This is a reminder point for use of any user-exit, that it is a pre-condition that the above discussed user-exits are required to be assigned to a project created through CMOD.

That’s all friends on this topic. Hope this information will be useful to many. I document knowledge mainly for one purpose. That is to prevent losing important knowledge pieces due to memory erosion.

Thank you

KJogeswaraRao

Assigned tags

      22 Comments
      Comments are closed.
      Author's profile photo Phi Dang
      Phi Dang

      Thank you for your excellent work.

      It's helpful a lot.

      Author's profile photo Jogeswara Rao K
      Jogeswara Rao K
      Blog Post Author

      Thank you Phi Dang,

      🙂

      Author's profile photo James Prabaharan
      James Prabaharan

      Dear Rao,

      I appreciate your efforts in sharing your knowledge. Its your simplicity, which claims that the submission is to prevent losing important knowledge pieces due to memory erosion.

      Thank you very much.

      James Prabaharan

      Author's profile photo Jogeswara Rao K
      Jogeswara Rao K
      Blog Post Author

      Thank you Prabaharan,

      Whatelse can be more rewarding than such comments from a fellow SAPien. Thank you so much. 🙂

      KJogeswaraRao

      Author's profile photo Sadin Mihran
      Sadin Mihran

      thanks Jogeswara Rao Kavala

      all document is very useful

      please can u add document for clearance management for A to Z with screen shut 🙂

      Author's profile photo Jogeswara Rao K
      Jogeswara Rao K
      Blog Post Author

      Thank you Sadin,

      Lot of documentation already available in net on WCM like:WCM Process

      Also I have limited exposure here Sadin.

      Regards

      KJogeswaraRao

      Author's profile photo Sadin Mihran
      Sadin Mihran

      Jogeswara Rao Kavala

      thank you so much for response and for this material you are the best 🙂

      Author's profile photo Sadin Mihran
      Sadin Mihran

      hi Jogeswara Rao Kavala

      Thanks for all the information provided to us whether possible to explain scheduling in plant maintenance step by step beside external scheduling and how to made the external scheduling in IDS system 🙂

      Author's profile photo Jogeswara Rao K
      Jogeswara Rao K
      Blog Post Author

      Hi sadin,

      This topic can be better explained through sap help links and through replies by experts in a fresh discussion. 🙂

      Thank you

      Author's profile photo Sadin Mihran
      Sadin Mihran

      thanks Jogeswara Rao Kavala i will be create discussion 🙂

      Author's profile photo Former Member
      Former Member

      I lost words. Greaaaaaaaaaaaaaaat 😀 thanks

      Author's profile photo Sridhara Venkatakrishnappa
      Sridhara Venkatakrishnappa

      Dear Jogeswara rao,

      Thanks,

      We really appreciate your help in sharing these details.

      Author's profile photo Former Member
      Former Member

      Dear Rao Sir,

      Great work! Just an observation, this work would need enhancing the logic if equipment or functional location have multiple task list. I think the logic applied for general maintenance task list enhanced to look for some field values would suffice the requirement.

      You have shown the way and this can be enhanced as per the requirements.

      Thanks for sharing the contents!

      Regards

      Upinder

      Author's profile photo Jogeswara Rao K
      Jogeswara Rao K
      Blog Post Author

      Thank you Upinder 🙂 ,

      Exactly, Every work will have some focus point. Here the focus is on the Code which made this automation possible. 'PERFORM FCODE_PLSU(SAPLCOIH)'.   Obviously the logic would vary as per the situation. Here I used the Equipment / Functional location tasklist assuming a single tasklist on each. The way I mentioned in Point3 for a separate logic for the  use of GMTL, we need to use similar logics if situation demands.

      Good day to you.

      KJogeswaraRao

      Author's profile photo Lokesh Ojha
      Lokesh Ojha

      really good one sir ....amazing document.....

      Author's profile photo Jogeswara Rao K
      Jogeswara Rao K
      Blog Post Author

      Thank you Lokesh 🙂

      Author's profile photo Former Member
      Former Member

      Hi SDN's,

      I implemented same enhancement for tasklist auto pick for Work order, It's working fine.

      But the problem is i am getting pouup like "Should operations be deleted?" , So my client asking me to suppress this pop-up.

      How can achieve this .Anyone can Help me on this.

      Regards

      Suba

      Author's profile photo Sunil Mundhe
      Sunil Mundhe

      Abaper can help by select "OPT 1".

      Author's profile photo Former Member
      Former Member

      Hi Sunil,

      thank you for your reply

      I didn't get you, can you explain detail. What to do..

      regards

      suba

      Author's profile photo Sunil Mundhe
      Sunil Mundhe

      Hi Suba,

      I am not ABAPer, but typically when we are facing such pop up (which arrive due to user action) can be suppressed/Handle by ABAPer.

      For Example when we run BDC or BAPI to created Notification and there is Priority assigned to Notification "Pop up " comes ask whether to change date "Yes" or " No".

      which a simple tasl for ABAP person.please take help from ABAP

      Rgds, Sunil

      Author's profile photo Former Member
      Former Member

      Hi Sunil,

      I am the ABAPer, I implemented the Customer-exit what Jogeswararao ecplained above.It's working fine.

      But i am getting the popup when PERFORM FCODE_PLSU(SAPLCOIH). was executed,

      Just i wanted to know is there any settings kind of things to suppress the poupups?

      Regards,

      Suba

      Author's profile photo Sunil Mundhe
      Sunil Mundhe

      Hi Suba,

      I am having following setting in IW32 as default


      Order personal Default values  settings


      Inside Order: Extras > Settings > Default values...

      Here in Control tab have this setting

      It is observed that Operation selection pop-up can be triggered from the above setting (by tick marking the Operation select.) without going for SPRO settings as explained earlier in Point1.

      Comments are closed.