Code: Alles auswählen.
* Reset aller Belegtabellen.
CALL FUNCTION 'CO_ZF_DATA_RESET_COMPLETE'.
* Änderung des Arbeisplatzes
REFRESH lt_method.
REFRESH lt_operation.
REFRESH lt_operation_up.
CONCATENATE i_aufnr i_vornr INTO l_objid.
ls_method-refnumber = 1.
ls_method-objecttype = 'OPERATION'.
ls_method-method = 'CHANGE'.
ls_method-objectkey = l_objid.
APPEND ls_method TO lt_method.
ls_method-refnumber = 1.
ls_method-objecttype = ''.
ls_method-method = 'SAVE'.
ls_method-objectkey = l_objid.
APPEND ls_method TO lt_method.
ls_operation-activity = i_vornr.
ls_operation-work_cntr = i_arbpl.
APPEND ls_operation TO lt_operation.
ls_operation_up-activity = 'X'.
ls_operation_up-work_cntr = 'X'.
APPEND ls_operation_up TO lt_operation_up.
REFRESH lt_return.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = lt_method
it_operation = lt_operation
it_operation_up = lt_operation_up
return = lt_return.