Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
jogeswararao_kavala
Active Contributor

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.


2. I run IW31 entered Order type and Equipment number

3. Pressed keyboard Enter button


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.


then I run IW31.


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


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

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

22 Comments
Labels in this area