Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Create Service Order

Hi

I am creating free service order using CRM_ORDER_MAINTAIN. At that time I want to pass business partners also.

I am able to create the service order but the business partner is not assigned to it.

For BP I am using following code>>

ls_input_field_names-fieldname = 'PARTNER_FCT'.

INSERT ls_input_field_names INTO TABLE lt_input_field_names.

ls_input_field_names-fieldname = 'DISPLAY_TYPE'.

INSERT ls_input_field_names INTO TABLE lt_input_field_names.

ls_input_field_names-fieldname = 'NO_TYPE'.

INSERT ls_input_field_names INTO TABLE lt_input_field_names.

ls_input_field_names-fieldname = 'KIND_OF_ENTRY'.

INSERT ls_input_field_names INTO TABLE lt_input_field_names.

ls_input_field_names-fieldname = 'PARTNER_NO'.

INSERT ls_input_field_names INTO TABLE lt_input_field_names.

CLEAR ls_input_fields.

ls_input_fields-ref_kind = c_aa.

ls_input_fields-objectname = 'PARTNER'.

ls_input_fields-field_names = lt_input_field_names.

INSERT ls_input_fields INTO TABLE lt_input_fields.

REFRESH: lt_partner1.

LOOP AT lt_partner ASSIGNING <f_partner> WHERE ref_guid EQ <f_appointment>-ref_guid.

CLEAR: w_partner1.

w_partner1-ref_kind = 'A'.

w_partner1-ref_guid = <f_partner>-ref_guid.

w_partner1-ref_handle = <f_partner>-ref_handle.

w_partner1-partner_fct = <f_partner>-partner_fct.

w_partner1-display_type = <f_partner>-display_type.

w_partner1-no_type = <f_partner>-no_type.

w_partner1-kind_of_entry = 'C'.

w_partner1-partner_no = <f_partner>-partner_no.

w_partner1-mainpartner = <f_partner>-mainpartner.

w_partner1-partner_guid = <f_partner>-bp_partner_guid.

INSERT w_partner1 INTO TABLE lt_partner1.

ENDLOOP.

please let me know what am I missing.

Cheers,

Ashish

Tags:
Not what you were looking for? View more on this topic or Ask a question