IW31, IW32: When you allocate a production resource/tool to the operation of a maintenance order, error message E230(CF) appears on the screen ("Production resource/tool is not intended for this type of task list").
Cause and prerequisitesConcept information:
Every production resource/tool is allocated to a specific task list usage.
For this task list usage there has to exist an allocation to plant maintenance task list types (Customizing Transaction OP88). The default value for maintenance orders is set to "equipment task list". After a general maintenance task list has been allocated to the order, the task list type for the maintenance order changes to "general maintenance task list".
The production resource/tool must have a task list usage in which both "equipment task list" and "general maintenance task list" have been allocated. The other option is to change the customizing data of your system (Transaction OP88).
Note on the correction:
In Release 2.1, the task list type was defined in Customizing. The default value of the field was "equipment task list". The field could not be maintained in the interface.
Note the concept information.
From Release 2.2, the task list type was no longer defined in Customizing. Error CF230 appears when you allocate a PRT in the case of all order types created in PM from this time. The correction
ensures that the default value is entered in the field by the program.
Enter correction P22K005618.
Release 3.0:
Note the concept information.
The PRT must have a task list usage in which the task list types 'Equipment task list' and 'General maintenance task list' are allocated. The other option is to change the Customizing data in your system (Transaction OP88).
For Release 2.1 and 3.0, no action is necessary
For Release 2.2:
Enter correction P22K005618:
Also enter note 30044!
1.) Program LCOIHTOP
...
* sonstige Konstanten
DATA: Y_ORDER VALUE 'O'. "(O)rder
DATA: STATUS_PRINT(5) VALUE 'I0007'. "Printed
DATA: Y_ZAUN VALUE '#'.
DATA: Y_BLDGR_DETAIL_DARK(2) VALUE 'DD'. "Bldgr für Dunkle Detaildynpro
DATA: Y_KONTIERUNGS_TYP_ORDER LIKE T163K-KNTTP VALUE 'F'.
DATA: Y_BELEGART_BANF LIKE EBAN-BSART VALUE 'NB '.
DATA: Y_ERSTELLUNGS_KZ_BANF LIKE EBAN-ESTKZ VALUE 'F'.
DATA: YX VALUE 'X'. "Flag X
DATA: YIPHAS_ABGESCHLOSSEN LIKE CAUFVD-IPHAS VALUE 3.
DATA: Y_PLNTY_E LIKE CAUFVD-PLNTY VALUE 'E'. "P22K005618
...
2.) Program LCOIHO10
MODULE TRANS_INIT OUTPUT.
*--- Plantyp vorbelegen Default immer 'E' -----------------------------
CAUFVD-PLNTY = Y_PLNTY_E. "P22K005618
*--- nur einmal prozessieren ------------------------------------------
CHECK T490 IS INITIAL.
...
3.) Program LCOIHI10
MODULE CHECK_ORDER_TYPE INPUT.
*... nur bei Anlegen
CHECK TC10-TRTYP EQ Y_TRTYP_ANL.
CALL FUNCTION 'CO_TA_T003O_READ'
EXPORTING
T003O_AUART = CAUFVD-AUART
IMPORTING
T003OWA = T003O
EXCEPTIONS
NOT_FOUND = 1.
IF SY-SUBRC <> 0.
MESSAGE E205 WITH CAUFVD-AUART.
ENDIF.
*--- Statusschema versorgen -------------------------------------------*
CAUFVD-STATS = T003O-STSMA.
CALL FUNCTION 'CO_TA_T003P_READ'
EXPORTING
T003P_SPRAS = SY-LANGU
T003P_AUART = CAUFVD-AUART
IMPORTING
T003P_TXT = CAUFVD-ARTTEXT
EXCEPTIONS
NOT_FOUND = 1.
*...Pruefen ob Auftragstyp fuer diese Transaktion zulaessig ist
IF T003O-AUTYP <> T490-AUTYP.
MESSAGE E202.
ENDIF.
CALL FUNCTION 'CO_TA_T399X_READ'
EXPORTING
AUART = CAUFVD-AUART
WERKS = CAUFVD-IWERK
IMPORTING
STRUCT = T399X
EXCEPTIONS
NO_ENTRY = 01.
IF NOT SY-SUBRC IS INITIAL.
MESSAGE E206.
ENDIF.
*--- Plantyp versorgen ------------------------------------------------*
* CAUFVD-PLNTY = T399X-PLNTY. "P22K005618
...
4.) Program LCOIHF10
FORM ORDER_CHANGE.
DATA BEGIN OF ORD_PRE OCCURS 0.
INCLUDE STRUCTURE ORD_PRE.
DATA END OF ORD_PRE.
...
* Header aus BT lesen
CALL FUNCTION 'CO_BT_CAUFV_READ_WITH_KEY'
EXPORTING
AUFNR_ACT = CAUFV-AUFNR
IMPORTING
CAUFVD_EXP = CAUFVD.
*--- Plantyp vorbelegen -----------------------------------------------*
CAUFVD-PLNTY = Y_PLNTY_E. "P22K005618
...
5.) Program LCODBU04
FUNCTION CO_DB_VAFILOA_READ.
*"----------------------------------------------------------------------
*"Lokale Schnittstelle:
*" IMPORTING
*" CAUFVD_IMP LIKE CAUFVD STRUCTURE CAUFVD
*" EXPORTING
*" *ILOA LIKE ILOA STRUCTURE ILOA
*" CAUFVD_EXP LIKE CAUFVD STRUCTURE CAUFVD
*" RIWO1_EXP LIKE RIWO1 STRUCTURE RIWO1
*" EXCEPTIONS
*" NOT_FOUND
*"----------------------------------------------------------------------
DATA: Y_PLNTY_E LIKE CAUFVD-PLNTY VALUE 'E'. "P22K005618
*--- View AFIH und ILOA einlesen, falls nicht schon gemacht -----------*
IF CAUFVD_IMP-ILOAN IS INITIAL.
SELECT SINGLE * FROM VAFILOA WHERE AUFNR EQ CAUFVD_IMP-AUFNR.
* . . . nix gefunden
IF SY-SUBRC NE 0.
RAISE NOT_FOUND.
ELSE.
* . . . Caufvd_Exp (output = input)
CAUFVD_EXP = CAUFVD_IMP.
* . . . *iloa
MOVE-CORRESPONDING VAFILOA TO *ILOA.
* . . . Caufvd_exp mit VAFILOA ergänzen
MOVE-CORRESPONDING VAFILOA TO CAUFVD_EXP.
* VAFILOA-AUFNR = CAUFVD_EXP-IAUFNR.
* VAFILOA-KOKRS = CAUFVD_EXP-IKOKRS.
* VAFILOA-BUKRS = CAUFVD_EXP-IBUKRS.
* VAFILOA-GSBER = CAUFVD_EXP-IGSBER.
CAUFVD_EXP-IAUFNR = VAFILOA-AUFNR.
CAUFVD_EXP-IKOKRS = VAFILOA-KOKRS.
CAUFVD_EXP-IBUKRS = VAFILOA-BUKRS.
CAUFVD_EXP-IGSBER = VAFILOA-GSBER.
CAUFVD_EXP-AUFNR = CAUFVD_IMP-AUFNR.
CAUFVD_EXP-KOKRS = CAUFVD_IMP-KOKRS.
CAUFVD_EXP-BUKRS = CAUFVD_IMP-BUKRS.
CAUFVD_EXP-GSBER = CAUFVD_IMP-GSBER.
* . . . *AFIH
* MOVE-CORRESPONDING CAUFVD_EXP TO *AFIH.
* . . . RIWO1
MOVE-CORRESPONDING CAUFVD_EXP TO RIWO1_EXP.
ENDIF.
*--- wenn schon eingelesen die WA's füllen
ELSE.
* . . . Caufvd_Exp (output = input)
CAUFVD_EXP = CAUFVD_IMP.
* . . . VAFILOA
* MOVE-CORRESPONDING CAUFVD_IMP TO VAFILOA.
* . . . *ILOA
MOVE-CORRESPONDING CAUFVD_EXP TO *ILOA.
*ILOA-AUFNR = CAUFVD_IMP-IAUFNR.
*ILOA-KOKRS = CAUFVD_IMP-IKOKRS.
*ILOA-BUKRS = CAUFVD_IMP-IBUKRS.
*ILOA-GSBER = CAUFVD_IMP-IGSBER.
* . . . *AFIH
* MOVE-CORRESPONDING CAUFVD_IMP TO *AFIH.
* . . . RIWO1
MOVE-CORRESPONDING CAUFVD_EXP TO RIWO1_EXP.
ENDIF.
*--- Speicherplatz freigeben -------------------------------
FREE VAFILOA.
CAUFVD_EXP-PLNTY = Y_PLNTY_E. "P22K005618
ENDFUNCTION.
6.) Actions
- Generate programm SAPLCOIH
- enerate programm SAPLCODB
No comments:
Post a Comment