Hi,
I'm developing a program that creates a service confirmation against a service order. If the assigned to partner in the confirmation is different from the one in service order we need to change the assigned to to the new one and create the confirmation.
I have the following code that is creating the new assigned to but the old one still persists in the confirmation.. i.e, I have two assigned tos in the confirmation. How do I replace the assigned to instead of creating a new..
I'm thinking of reading the confirmation after crm_order_save and then delete it.. but not sure if we need multiple crm_order_maintain calls ?
ls_partner-ref_kind = c_a.
ls_partner-ref_partner_handle = '0001'.
ls_partner-partner_fct = 'ZPTC'. "ls_partner_r-partner_fct.
ls_partner-partner_no = lv_partner. "new assigned to
ls_partner-no_type = 'BP'. "ls_partner_r-no_type.
ls_partner-display_type = 'BP'. "ls_partner_r-display_type.
ls_partner-kind_of_entry = 'C'. "ls_partner_r-kind_of_entry.
INSERT ls_partner INTO TABLE t_partner.
ls_input_fields-ref_kind = c_a.
ls_input_fields-objectname = 'PARTNER'
ls_input_fields-logical_key = '0001'.
ls_fields-fieldname = c_disp_type. "'DISPLAY_TYPE'.
INSERT ls_fields INTO TABLE lt_fields.
ls_fields-fieldname = c_kind_of_entry.
INSERT ls_fields INTO TABLE lt_fields.
ls_fields-fieldname = c_no_type.
INSERT ls_fields INTO TABLE lt_fields.
ls_fields-fieldname = c_partner_fct.
INSERT ls_fields INTO TABLE lt_fields.
ls_fields-fieldname = c_partner_no.
INSERT ls_fields INTO TABLE lt_fields.
ls_input_fields-field_names = lt_fields[].
INSERT ls_input_fields INTO TABLE t_input_fields.
Thanks
Sreesanth