Skip to Content
author's profile photo Former Member
Former Member

ET_SERVICE_I fields not getting updated using CRM_ORDER_MAINTAIN

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Dec 02, 2014 at 12:43 PM

    Hi,

    Try to maintain the data in webui and keep debugger in CRM_ORDER_MAINTAIN and check what values are passed into the table input_fields and SERVICE_I then pass those fields and values in code and try.

    Regards,

    Deepika.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Varma,

      Are you creating item in your program, there is no item details passed to changing paramters of order_maintain FM? You have to create item first and then update service_i.

      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.

      Best Regards,

      Dharmakasi.

  • Posted on Dec 02, 2014 at 08:45 AM

    Hi Varma,

    Try updating et_service_I using separate order maintain after the main order maintaian.

    In general we have to update always sale_I and service_I after item creation using a separate order maintain function module.

    Best Regards,

    Dharmakasi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 22, 2015 at 07:42 PM

    Hello Varma,

    Were you able to resolve this issue? I am facing the same issue now.

    If you could solve the issue, could you please share the solution?

    Regards,

    Binson

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.