Code: Alles auswählen.
lv_object_type = 'MARA'.
lv_class = 'MATDATA_COPICS'.
lv_class_type = '001'.
ls_object_identification-field = 'MATNR'. "Fuer was soll Merkwert anglegt werden?
ls_object_identification-value = uebergabe-matnr.
APPEND ls_object_identification TO lt_object_identification.
ls_validation_maint-charact = 'ETLIPOS'.
ls_validation_maint-value = ' '.
ls_validation_maint-fldelete = 'X'.
APPEND ls_validation_maint TO lt_validation_maint.
CALL FUNCTION 'CACL_OBJECT_VALIDATION_MAINT'
EXPORTING
object_type = lv_object_type
class = lv_class
class_type = lv_class_type
* status = '1'
TABLES
object_identification = lt_object_identification
validation_maint = lt_validation_maint "AUSP Merkmale
EXCEPTIONS
error = 1
warning = 2
OTHERS = 3.
IF sy-subrc <> 0.
"Message für Application log.
ls_msg-msgty = sy-msgty.
ls_msg-msgid = sy-msgid.
ls_msg-msgno = sy-msgno.
ls_msg-msgv1 = sy-msgv1.
ls_msg-probclass = 4.
PERFORM log_msg_add USING ls_msg CHANGING lt_loghandle.
IF sy-subrc <> 0.
ls_msg-msgty = 'E'.
ls_msg-msgid = 'ZMM'.
ls_msg-msgno = '092'.
ls_msg-msgv1 = 'Anfuegen'.
PERFORM logfehler.
ENDIF.
ELSE.
"Klassifkationssicht speichern
CALL FUNCTION 'CACL_CLASSIFICATION_SAVE'
EXPORTING
i_commit = 'X'
i_wait = 'X'
EXCEPTIONS
error = 1
warning = 2
OTHERS = 3.
Code: Alles auswählen.
ls_validation_maint-value = ' '.