SAP Knowledge Base Article - Preview

2790581 - SCU0 | Internal error: WLID

Symptom

WLID.PNG

Internal error: WLID appears in the status line


Read more...

Environment

This KBA applies for all SAP Products based on NetWeaver and S4H.

Keywords

Message no. TB801
Interner Fehler: WLID *&---------------------------------------------------------------------*
*& Report ZSLA_CORRECT_CMPPARAM_WLID
*&---------------------------------------------------------------------*
*& Corrects CMPPARAM VALUE corersponding to maximum value of
*& CMPWLH-WLID
*&---------------------------------------------------------------------*
REPORT ZSLA_CORRECT_CMPPARAM_WLID.
DATA: CMPPARAM_ROW LIKE CMPPARAM.
DATA: CMPWLH_TABLE TYPE STANDARD TABLE OF CMPWLH.
DATA: CMPWLH_ROW LIKE CMPWLH.
DATA: CMPWLH_WLID TYPE I.
DATA: CMPPARAM_WLID TYPE I.
DATA: LV_SUBRC TYPE CMPWL_CONST2_TYPE.
DATA: LS_MSG TYPE CMPWL_S_MSG_TYPE.
START-OF-SELECTION.
PERFORM ENQUEUE_DEQUEUE_CMPPARAM
 USING 'E'
       'WLID'
 CHANGING LV_SUBRC
          LS_MSG.

IF LV_SUBRC = CMPWL_RC_INTERNAL_ERROR.
  MESSAGE ID LS_MSG-MSGID
  TYPE LS_MSG-MSGTY
  NUMBER LS_MSG-MSGNO
  WITH LS_MSG-MSGV1 LS_MSG-MSGV2 LS_MSG-MSGV3 LS_MSG-MSGV4
  RAISING INTERNAL_ERROR.
ELSEIF LV_SUBRC = CMPWL_RC_FOREIGN_LOCK.
 MESSAGE ID LS_MSG-MSGID
  TYPE LS_MSG-MSGTY
  NUMBER LS_MSG-MSGNO
  WITH LS_MSG-MSGV1 LS_MSG-MSGV2 LS_MSG-MSGV3 LS_MSG-MSGV4
  RAISING FOREIGN_LOCK.
  EXIT.
ENDIF.
SELECT * FROM CMPWLH APPENDING TABLE CMPWLH_TABLE ORDER BY WLID DESCENDING.
READ TABLE CMPWLH_TABLE INTO CMPWLH_ROW INDEX 1.
CMPWLH_WLID = CMPWLH_ROW-WLID.
SELECT SINGLE * FROM CMPPARAM INTO CMPPARAM_ROW
 WHERE PARAMNAME = 'WLID'.
CMPPARAM_WLID = CMPPARAM_ROW-VALUE.
IF CMPWLH_WLID <> CMPPARAM_WLID.
 CMPPARAM_ROW-VALUE = CMPWLH_ROW-WLID.
 MODIFY  CMPPARAM FROM CMPPARAM_ROW.
 IF SY-SUBRC = '0'.
  WRITE: 'WLID had been corrected to value', CMPWLH_ROW-WLID, 'in table CMPPARAM'.
 ENDIF.
ELSE.
 WRITE: 'No inconsistency was found'.
ENDIF.
PERFORM ENQUEUE_DEQUEUE_CMPPARAM
 USING 'D'
       'WLID'
 CHANGING LV_SUBRC
          LS_MSG.

*----------------------------------------------------------------------*
*      Form  ENQUEUE_DEQUEUE_CMPPARAM                                  *
*----------------------------------------------------------------------*
*       enqueue dequeue cmpparam                                       *
*----------------------------------------------------------------------*
*      -->PV_MODUS
*      -->PV_PARAM
*----------------------------------------------------------------------*
FORM ENQUEUE_DEQUEUE_CMPPARAM
  USING PV_ACTION TYPE C
        PV_PARAM LIKE CMPPARAM-PARAMNAME
  CHANGING PV_SUBRC TYPE CMPWL_CONST2_TYPE
           PS_MSG TYPE CMPWL_S_MSG_TYPE.

  DATA: LS_SELLIST LIKE VIMSELLIST.
  DATA: LT_SELLIST LIKE VIMSELLIST OCCURS 0.
  DATA: LV_UNAME LIKE SY-UNAME.

  PV_SUBRC = CMPWL_RC_OKAY.
  CLEAR PS_MSG.

  LS_SELLIST-VIEWFIELD = 'PARAMNAME'.
  LS_SELLIST-OPERATOR = 'EQ'.
  LS_SELLIST-VALUE = PV_PARAM.
  APPEND LS_SELLIST TO LT_SELLIST.

  IF PV_ACTION = 'E'.
    CALL FUNCTION 'ENQUEUE_E_TABLEE'
         EXPORTING
              MODE_RSTABLE   = 'E'
              TABNAME        = 'CMPPARAM'
              VARKEY         = 'WLID'
              _WAIT          = 'X'
         EXCEPTIONS
              FOREIGN_LOCK   = 1
              SYSTEM_FAILURE = 2
              OTHERS         = 3.

    IF SY-SUBRC = 1.
      LV_UNAME = SY-MSGV1.
      PS_MSG-MSGID = 'TB'.
      PS_MSG-MSGTY = 'S'.
      PS_MSG-MSGNO = '820'.
      PS_MSG-MSGV1 = LV_UNAME.
      PV_SUBRC = CMPWL_RC_FOREIGN_LOCK.
    ELSEIF SY-SUBRC > 1.
      PS_MSG-MSGID = 'TB'.
      PS_MSG-MSGTY = 'E'.
      PS_MSG-MSGNO = '801'.
      PS_MSG-MSGV1 = 'Sperrverwaltung     '(005).
      PV_SUBRC = CMPWL_RC_INTERNAL_ERROR.
    ENDIF.

  ELSE.
    CALL FUNCTION 'DEQUEUE_E_TABLEE'
         EXPORTING
              MODE_RSTABLE = 'E'
              TABNAME      = 'CMPPARAM'
              VARKEY       = 'WLID'.
  ENDIF.

ENDFORM.                               " ENQUEUE_DEQUEUE_CMPPARAM , KBA , BC-CUS-TOL-CST , Cross-System Tools , How To

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.