Question:
Hello,
I am trying to fill the operation long text just on the first operation(0010) of a work order. I want to fill this with a standard text (a safety notice). I can see that there is an option on config to default a standard text into this area, but I need to put a different text in dependant on maint plant and work order type. Changing a function module, I have managed to defualt my required standard text field in the work order operation line (KTSCH) and I can default my short text in the line (field AFVGD-LTXA1), but I cannot populate the long text with the required text.
If you manually enter (or select from the drop down) the standard text in the standard text field and hit enter, the long text is automatically populated, I would like this to happen from the default standard text that is entered by me when the work order is being created.
I have spent sveral hours now looking at function modules SAVE_TEXT, READ_TEXT, OPERATION_TEXT, INIT_TEXT and can' seem to get any of these to work. I am populating these FM's with the follwing:
Object = AUFK
ID = AVOT
NAME = client + aufpl +line no
(ie 002999995600100000001)
Lang = 'EN'
Any clues - I am gettig a bit frustrated as I think I am nearly there, but with one more step needed.
Thanks in advance of any assistance.
Martin
Answer:
Martin,
Not at a system right now - are the following SAP standard FMs: SAVE_TEXT, READ_TEXT and OPERATION_TEXT, INIT_TEXT?
If so, its not a good idea to change them since any changes will not be automatically updated/upgraded, also they may be used in other parts of SAP and you may cause serious problems.
Why don't you use Task Lists to default the required data? There are a couple of user exits you could investigate:
1. IWO10020 - Maintenance order: Automatically include task list
2. IWO10021 - Automatic task list transfer when creating order from notif.
_________________
Sponsored partner: www.arch.co.uk
PM/CS FAQ
Search SAPFans
Answer:
Thanks for that PJA,
It sounds like the right thing to use the exit.
I was looking at changing FM CO_IH_OPERATION_DETAIL_CALL, not the other TEXT FMs above.
The 2 user exitx you mentioned, I did have a look at
FUNCTION EXIT_SAPLCOIH_021,
and
FUNCTION EXIT_SAPLCOIH_020,
are these the same as the 2 you mentioned? or am I looking at the wrong exits. I couldnt see how to get my standard text or long text populated using these as they only pass the structure CAUFVD which doesnt have a standard text field of 7 characters.
CALL CUSTOMER-FUNCTION '020'
EXPORTING
CAUFVD_IMP = CAUFVD.
FUNCTION EXIT_SAPLCOIH_020.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(CAUFVD_IMP) LIKE CAUFVD STRUCTURE CAUFVD
*"----------------------------------------------------------------------
INCLUDE ZXWO1U06 .
It sounds as if you knw this area well - I normally work more in the ABAP side of things.
Thanks again for any advice.
Martin
Answer:
Martin,
The two user-exits you mentioned are the ones I was referring to in my previous message.
Just for background info; a Task List (TL) is a template for a PM/CS Order. It can contain multiple operations each with time, materials, PRTs etc. A Standard Text can also be assigned to the TL operations. When the TL is copied to the order all the TL operation data is copied to the order operations.
Therefore you could use one of the user-exits mentioned previosly to call in a TL complete with Standard Texs.
Try it and let use know how it went (I've never actually used thes user-exits myself!!!)
_________________
Sponsored partner: www.arch.co.uk
PM/CS FAQ
Search SAPFans
Answer:
Hi PJA,
I have tried the 2 user exits and also read back on some previous items in this forum regarding these user exits, but I still cannot get them to work.
I am even populating the SEL_TAB table fields with an existing task list (FWP12) in debug mode in user exits
03 FUNCTION EXIT_SAPLCOIH_003 (component of IWO20001)
and also in
21 FUNCTION EXIT_SAPLCOIH_021
as follows
SEL_TAB-PLNTY = 'A'.
SEL_TAB-PLNNR = 'FWP12'.
SEL_TAB-PLNAL = '1'.
APPEND SEL_TAB.
but the operation still appears without any task list data.
Any clues as to what I'm doing wrong??
Cheers
Martin
Answer:
i think you also have to provide the plant WERKS
Didier
Answer:
Martin,
I know these user-exits have caused problems before (see Chiels messages). Since I have not used them I can't say what the problem is.
If it were me, I would set a breakpoint in the user-exits to see exactly when they are triggered.
Please let us know how you get on
_________________
Sponsored partner: www.arch.co.uk
PM/CS FAQ
Search SAPFans
Answer:
Good news,
I have managed to get this to work at last, and can populate both the long text and/or the standard text field on the operation.
Basci steps are as follows
1. Create a task list with the relavant data populated, ie standard text name, long text data etc( in my case called it 'SAFE_INS' )
2. Use cmod to open up user exit EXIT_SAPLCOIH_020.
(IWO10020 Maintenance order: Automatically include task list)
and here, in include INCLUDE ZXWO1U06, use one of the sample code performs shown in the info box, in my case I used
PERFORM FCODE_PLSU(SAPLCOIH).
note I did not change any values here, just entered the perform statement as above in the INCLUDE ZXWO1U06 .
3. Use cmod to open up user exit EXIT_SAPLCOIH_003
(IWO20001 PM order: User exit to pass routing to order).
Here in INCLUDE ZXWOCU03, I entered the follwing code
IF NOT CAUFVD_IMP-AUART = 'WPM'.
****"the if statement is used to exclude order types 'WPM' ****
SEL_TAB-PLNTY = 'A'.
SEL_TAB-PLNNR = 'SAFE_INS'. "***This is the name of the task list
SEL_TAB-PLNAL = '01'.
APPEND SEL_TAB.
ENDIF.
Activate everything then create your work order.
Thanks to everyone who helped on this especially PJA/Pete
Cheers
Martin
Answer:
Martin,
Well done, this has been a long standing issue with the PM Forum - and finally you've cracked it.
Did you set the breakpoints and find out exactly when the user-exits are triggered?
_________________
Sponsored partner: www.arch.co.uk
PM/CS FAQ
Search SAPFans
Answer:
I posted a solution in the ABAP forum yesterday. The solutions can be downloaded from our web site (It is a pdf file).
Thanks &
Good Luck All.
_________________
Prometheus Group
http://www.sapsolutions.net