Code: Alles auswählen.
Data Errmsg(5) .
DATA: BEGIN OF OBTAB OCCURS 0,
field LIKE API_OB_KEY-field,
value LIKE API_OB_KEY-value,
END OF OBTAB.
DATA: BEGIN OF Rmerk OCCURS 0,
Field LIKE API_VAL_R-CHARACT,
Value LIKE API_VAL_R-VALUE,
Fldel LIKE API_VAL_R-INHERITED,
Vass LIKE API_VAL_R-VAL_ASSIGN,
Inst LIKE API_VAL_R-INSTANCE,
Vneutr LIKE API_VAL_R-VALUE_NEUTRAL,
Desrc LIKE API_VAL_R-CHARACT_DESCR,
END OF Rmerk.
DATA: BEGIN OF Wmerk OCCURS 0,
Field LIKE API_AUSP-CHARACT,
Value LIKE API_AUSP-VALUE,
Fldel LIKE API_AUSP-FLDELETE,
Inst LIKE API_AUSP-INSTANCE,
END OF Wmerk.
obtab-field = 'MATNR'. obtab-value = '000000107'.
append obtab.
CALL FUNCTION 'CACL_OBJECT_READ_VALIDATION'
EXPORTING
OBJECT_TYPE = 'MARA'
CLASS_TYPE = '001'
CLASS = '427100'
WITH_UNASSIGNED_CHARACTS = 'X'
WITH_INHERITED_CHARACTS = 'X'
* DATE = Sy-Datum
LANGUAGE = SYST-LANGU
I_OBJ_NOT_CHK = ' '
* I_AENNR =
I_EXECUTE_DEP = ' '
TABLES
OBJECT_IDENTIFICATION = Obtab
CHARACT_VALUES = Rmerk .
* EXCEPTIONS
* ERROR = 1
* WARNING = 2
* OTHERS = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.