Hi Experts,
I am working on data migration program to upload service requests using crm_order_maintain. The issue with IT_SERVICE_I fileds not getting updated. All the remaining parameters like it_appointment, it_service_h, it_orgman, it_partner... Only the fields of IT_SERVICE_I are not updating. Am able to see the values in debugging for the fields.
I tried in many ways by passing Object Guid and Item Guid for ref_guid field of it_service_i. But still the fields are not getting updated. I am not sure what am missing. Please find below my code.
Please suggest.
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_16 = lv_item_guid.
CLEAR gt_service_i.
* gs_service_i-ref_handle = '0000000001'.
gs_service_i-ref_guid = lv_item_guid.
gs_service_h-ref_kind = 'B'.
gs_service_i-zzafld0000XX = <fs_excel_data>-XX.
gs_service_i-zzafld0000YY = <fs_excel_data>-YY
gs_service_i-zzafld0000ZZ = <fs_excel_data>-ZZ.
APPEND gs_service_i TO gt_service_i.
CLEAR gs_service_i.
*** Input fields for IT_SERVICE_I
* gs_input_fields-ref_handle = '0000000001'.
gs_input_fields-ref_guid = lv_item_guid.
* READ TABLE lt_obj_guid INTO gs_service_i-ref_guid INDEX 1.
gs_input_fields-ref_kind = 'B'.
gs_input_fields-objectname = 'SERVICE_I'.
gs_field_line-fieldname = 'ZZAFLD0000XX'.
INSERT gs_field_line INTO TABLE gs_input_fields-field_names.
gs_field_line-fieldname = 'ZZAFLD0000YY'.
INSERT gs_field_line INTO TABLE gs_input_fields-field_names.
gs_field_line-fieldname = 'ZZAFLD0000ZZ'.
INSERT gs_field_line INTO TABLE gs_input_fields-field_names.
INSERT gs_input_fields INTO TABLE gt_input_fields.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_appointment = lt_appointment
it_orgman = lt_orgman
it_ext_ref = lt_ext_ref
it_partner = lt_partner
it_text = lt_text
it_activity_h = lt_activity_h
it_status = lt_status
it_srv_req_h = lt_srvreq_h
it_service_h = lt_service_h
it_service_i = lt_service_i
CHANGING
ct_orderadm_h = ct_ordradm_h2
ct_input_fields = ct_input_fields
ct_doc_flow = ct_docflow
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
Thanks & Regards,
Varma