Code: Alles auswählen.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = l_tab_header_guid
IMPORTING
et_orderadm_h = l_tab_orderadm_h_read
et_partner = l_tab_partner_read
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7 .
Code: Alles auswählen.
l_wrk_field_names-fieldname = 'PARTNER_NO'.
l_wrk_field_names-changeable = 'X'.
APPEND l_wrk_field_names TO l_tab_field_names.
l_wrk_input_fields-field_names = l_tab_field_names[].
l_wrk_input_fields-ref_guid = l_wrk_orders_status-header.
l_wrk_input_fields-ref_kind = 'A'.
l_wrk_input_fields-objectname = 'ORDER'. "ERSTE UNKLARTHEIT
l_wrk_input_fields-logical_key = '0000'. "ZWEITE UNKLARHEIT
APPEND l_wrk_input_fields TO l_tab_input_fields. .
Code: Alles auswählen.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_partner = l_tab_partner_maintain
CHANGING
ct_orderadm_h = l_tab_orderadm_h_maintain
ct_input_fields = l_tab_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
Code: Alles auswählen.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = l_tab_objects_to_save
IMPORTING
et_saved_objects = l_tab_saved_objects
et_objects_not_saved = l_tab_objects_not_saved
CHANGING
cv_log_handle = l_tab_log_handle
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.