on 08-29-2007 11:59 AM
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
Hi Screesanth,
Did you pass in the correct parameters to the FM? You can debug to get the correct parameters to pass in.
Cheers,
Cd.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sreesanth,
Use FM 'CRM_WR_ADD_PARTNER'
This would add partner to required transaction.
Best Regards,
Pratik Patel
<b>Reward with Points!</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don't quite understand how it works.. I guess this function module is called internally by other fms in Function grp CRM_WEBREQ_ONLINE_PRICING. May be It cannot be used by itself..if we look into the code internal table we understand that gt_Partner_com already populated with partner info.
Have you used this fm befor to update a partner ? If yes, can you please help post your code ?
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.