2.2.11

SAP Note 21373 - SAPLCK35, RAISE_EXCEPTION "PLANT_NOT_FOUND"

Symptom:

Error when entering the plant within the account assignment on a profitability segment, for example, for transaction FB01 or the order-accounting assignment or external data transfer.
If you enter an invalid plant in the account assignment window of the profitability segment, an ABAP/4 runtime error 'RAISE_EXCEPTION Exception condition "PLANT_NOT_FOUND" raised' is generated in program LKEA3U16.

Cause and prerequisites

Exception "PLANT_NOT_FOUND" is not trapped in function module 'RKE_CHECK_ORG_ELEMENTS'.

Solution
Please insert the following marked statements in program LKEA3U16 (transaction SE38).

Excerpt from program LKEA3U16:
.......
.......
* 1. Schritt: Verproben Kette Werk-Bukrs-Kokrs-Erkrs
IF NOT WERKS IS INITIAL. "Werk gefüllt

CALL FUNCTION 'CK_F_ORG_ELEMENTS_PLANT'
EXPORTING
WERK = WERKS
IMPORTING
ORGANISATIONSELEMENTE = ORGWERK
EXCEPTIONS
BUKRS_NOT_FOUND = 1
BWKEY_NOT_FOUND = 1
KOKRS_NOT_FOUND = 2
PLANT_NOT_FOUND = 3. "<====

IF SY-SUBRC = 0 OR SY-SUBRC = 1.
W_BUKRS = ORGWERK-BUKRS.
ENDIF.
IF SY-SUBRC = 0 OR SY-SUBRC = 2.
W_KOKRS = ORGWERK-KOKRS.
ENDIF.
IF SY-SUBRC = 3. "<====
MESSAGE E018(KG) WITH WERKS. "<====
ENDIF. "<====
.......
.......

Additional key words

Account assignment on a profitability segment, FB01, KE4X

No comments:

Post a Comment