When you maintain work center capacities or capacities, error message CR148 "System error: Entry in table XKAPA was not found" is displayed when you branch to the details of an interval of available capacity or into the available capacity profile.
Cause and prerequisitesThe database table KAPA (capacity shift values) contains entries with day number (TAGNR) 0 or shift number (SCHNR) 0. This constellation may not be present.
The origin of such entries could not yet be determined.
The incorrect entries must be removed from the database using the following report. The parameter UPDATE shows the incorrect data records with "blank" without changing the database; the records are
deleted with "X".
*&--------------------------------------------------------------------*
*& Report ZZ-KAPA1 *
*& Author: Peter Anselmann *
*&--------------------------------------------------------------------*
*& Deletes entries in table KAPA, where day number and/or shift *
*& number are 0 *
*&--------------------------------------------------------------------*
REPORT ZZ-KAPA1.
DATA: BEGIN OF LOC_KAPA OCCURS 10.
INCLUDE STRUCTURE KAPA.
DATA: END OF LOC_KAPA.
TABLES KAPA.
PARAMETERS UPDATE.
SELECT * FROM KAPA CLIENT SPECIFIED
INTO TABLE LOC_KAPA
WHERE
TAGNR = 0 OR
SCHNR = 0.
IF SY-SUBRC = 0.
LOOP AT LOC_KAPA.
FORMAT INTENSIFIED OFF.
WRITE: / LOC_KAPA-MANDT,
5 LOC_KAPA-KAPID,
15 LOC_KAPA-VERSN,
18 LOC_KAPA-DATUB.
FORMAT INTENSIFIED ON.
WRITE:
29 LOC_KAPA-TAGNR,
33 LOC_KAPA-SCHNR.
ENDLOOP.
ENDIF.
IF SY-SUBRC = 0 AND UPDATE = 'X'.
DELETE KAPA CLIENT SPECIFIED FROM TABLE LOC_KAPA.
ENDIF.
Additional key words
CR02, CR03, CR12, CR13
No comments:
Post a Comment