hi! expert,
i want to make an authorization control so that only authorize sales organization could view the customer details such as cuctomer code, name, address, payment term and sales organization.
below is a part of authorization code, but its still remain error for all sales organization code although it's authorized.
.
.
.
FORM at_selection_screen_input .
DATA:WA_KNVV TYPE KNVV.
AUTHORITY-CHECK OBJECT 'Z_VKORG'
ID 'ACTVT' FIELD '03' " read access
ID 'ZVKORG' FIELD S_VKORG. " actual value
IF sy-subrc EQ 0. " check authorization
* fetch record
SELECT SINGLE *
FROM KNVV
INTO WA_KNVV
WHERE VKORG EQ S_VKORG.
IF sy-subrc NE 0 .
MESSAGE e014(ZMSG) WITH knvv-vkorg .
ENDIF .
ELSE.
ENDSELECT .
IF sy-subrc NE 0 .
MESSAGE e668(ZMSG).
ENDIF .
ENDFORM .
thanks, regards,
Liyana