Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Report ZTEST_BEWERTEN *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
REPORT ZTEST_BEWERTEN .
* Equipment
data i_object type RMCLF-OBJEK value '000000000000000065'.
** Wahrscheinlich ist das für Dich EQUI !!!!!
data I_OBTAB type RMCLF-OBTAB value 'MARA'.
data T_FIELD_TAB type API_OB_KEY occurs 0 with header line.
*-- Bewertungen aufbereiten für API
data: L_ausp_tab like api_ausp occurs 5 with header line.
.
CALL FUNCTION 'CLCV_CONVERT_OBJEK_TO_TABLE'
EXPORTING
I_OBJECT = I_OBJECT
I_OBTAB = I_OBTAB
* I_CONV_TO_INTERNAL =
TABLES
T_FIELD_TAB = T_FIELD_TAB
EXCEPTIONS
ERROR = 1
OTHERS = 2 .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*-- AUSP aufbereiten
refresh l_ausp_tab .
* loop at change_ausp.
* write change_ausp-atinn to l_ausp_tab-charact.
* move change_ausp-atwrt to l_ausp_tab-value.
* append l_ausp_tab.
* endloop.
******************************
* Denk Dir mal eine paar Bewrtungen aus !
*******************************
* Merkmalname
l_ausp_tab-charact = 'XXXX'.
* Merkmalwert
l_ausp_tab-value = '1234'.
append l_ausp_tab.
************************************************
* EINGABEPARAMETER ANPASSEN ! CLASS_TYPE = '002'
************************************************
CALL FUNCTION 'CACL_OBJECT_VALIDATION_MAINT'
EXPORTING
* OBJECT = '000000000000000065'
OBJECT_TYPE = 'MARA'
CLASS = '427100'
CLASS_TYPE = '001'
* CHANGE_NO = change_KSSK-aennr
I_DATUV = sy-datum
* I_NO_DEFAULTS = 'X'
TABLES
VALIDATION_MAINT = l_ausp_tab
OBJECT_IDENTIFICATION = T_FIELD_TAB
EXCEPTIONS
ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* perFORM WRITE_SINGLE_MESSAGE USING SY-MSGID SY-MSGNO
* SY-MSGTY SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* UND DAS GANZE SICHERN !
CALL FUNCTION 'CACL_CLASSIFICATION_SAVE'
* EXPORTING
* I_COMMIT = 'X'
* I_WAIT = ' '
* I_NO_UPD_TASK = ' '
* I_NO_CHECK = ' '
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.
Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Report ZTEST_CTMS_ENTER_VALUES_POPUP *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
REPORT ZTEST_CTMS_ENTER_VALUES_POPUP .
DATA INCLUDE_HEADER TYPE INCL_BILD.
DATA: BEGIN OF MTABLE OCCURS 0,
ZMMNR LIKE CABN-ATINN, "int. Merkmalnr. zentral
OMMNR LIKE CABN-ATINN, "Int. Merkmalnr. überschrieben
SICHT LIKE KSML-ABTEI, "Anwendungssicht
END OF MTABLE.
DATA OBJECT TYPE CTMS_01.
DATA SELECTION TYPE COMW OCCURS 0 WITH HEADER LINE.
DATA RETURN(4).
DATA LT_KLAH TYPE KLAH OCCURS 0 WITH HEADER LINE.
DATA LT_KSML TYPE KSML OCCURS 0 WITH HEADER LINE.
OBJECT-KLART = '001'."Materialklasse
*object-OBJEK = '000000000000000065'.
OBJECT-CLASS = '427100'.
*object-MAFID
*object-OBJID = 'MARA'.
*object-CUOBJ
*object-CLINT
LT_KLAH-KLART = OBJECT-KLART.
LT_KLAH-CLASS = OBJECT-CLASS.
APPEND LT_KLAH.
* Objekt zur Klasse
CALL FUNCTION 'CLSE_SELECT_KLAH'
EXPORTING
NO_BUFFER = 'X'
* FILL_BUFFER =
TABLES
IMP_EXP_KLAH = LT_KLAH
EXCEPTIONS
NO_ENTRY_FOUND = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LT_KSML-CLINT = LT_KLAH-CLINT.
APPEND LT_KSML.
* Merkmale zu Klassen
CALL FUNCTION 'CLSE_SELECT_KSML'
EXPORTING
KEY_DATE = SY-DATUM
BYPASSING_BUFFER = 'X'
* I_AENNR = ' '
TABLES
IMP_EXP_KSML = LT_KSML
EXCEPTIONS
NO_ENTRY_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT LT_KSML.
MTABLE-ZMMNR = LT_KSML-IMERK.
APPEND MTABLE.
ENDLOOP.
* INCLUDE_HEADER-PROGRAM = 'SAPLCBCM'.
* INCLUDE_HEADER-SCREEN = '0010'.
INCLUDE_HEADER-PROGRAM = 'SAPLCOP0'.
INCLUDE_HEADER-SCREEN = '0001'.
*zB SAPLCBCM
* 0010
CALL FUNCTION 'CTMS_ENTER_VALUES'
EXPORTING
* BATCH = ' '
* CALLED_FROM_CL24 = ' '
* CONFIGURE_INSTANCE = ' '
* CUTTING_VALUES = ' '
IDENT = 'KL'
INCLUDE_HEADER = INCLUDE_HEADER
* KNOWLEDGE_DISPLAY = ' '
LANGUAGE = SY-LANGU
LINE = '1'
* LINES_INCLUDE_HEADER = ' '
* MESSAGE = ' '
* MESSAGE_ID = ' '
MESSAGE_NR = '000'
* MESSAGE_TYPE = ' '
MODE = 'S'
* M_POINTS = ' '
* M_SELECTIV = ' '
* NEUTRAL_LANGUAGE = ' '
* NO_CHANGES = ' '
NO_CLASSIFICATION = 'X'
NO_DISPLAY = ' '
* NO_F11 = ' '
* NO_F12 = ' '
* NO_F15 = ' '
* NO_F3 = ' '
* NO_F8 = ' '
* NO_PASSING = ' '
OBJECT = OBJECT
* OBJECT_NOT_CLASS = ' '
* OBJECT_TEXT = ' '
* OBLIGATORY = ' '
OKCODE = 'WEIT'
* ONE_NODE_BACK = ' '
PF_STATUS = 'OBJD'
*=> OBJD=Vorgabe/MWRT=Merkmale alle Werte/MRKM=Merkmalliste
* RESULT = ' '
ROLL = ' '
* ROOT = ' '
* ROOTID = ' '
ROW = '5'
SINGLE_VALUE = ' '
* STATUS = ' '
TITLEBAR = 'CLA'
WITH_INFORMATION = ' '
KEY_DATE = SY-DATUM
* CHANGE_NUMBER =
* ONLY_CLASS_ALLOCATIONS = ' '
* CDDB_INSTANCE =
SUPPRESS_DIALOG = ' '
HIERARCHY_ALLOWED = ' '
MULTIPLE_ALLOWED = ' '
* LANGUAGE_BY_DIALOG =
* VIEW = ' '
* FILTER_ACTIVE = ' '
* FOCUS = ' '
* OBJECT_INSTANCE =
* READONLY = ' '
IMPORTING
* DECIMALPOINT =
* NEW_LANGUAGE =
* NEW_NEUTRAL_LANGUAGE =
* NEW_STATUS =
RETURN = RETURN
* WITH_INHERITED =
TABLES
MTABLE = MTABLE
* NEW_MULTIPLE_CLASSES =
* PASSING_VALUE =
SELECTION = SELECTION
EXCEPTIONS
NO_CHARACTERISTICS = 1
INTERNAL_ERROR = 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.