Skip to Content
Former Member
Nov 16, 2008 at 05:42 PM

Delete Partner function in order save


Hi experts,

We need to delete the partner function from the order whil changiing the order.

So we are trying to delete the partner function in order save badi in Prepare method passing the values to CRM ORDER MAINTAIN function module,

but its now working.

Could you pls suggest any other alternative ofr the same......or any mistake am doing in the code

ls_partner_maint-ref_guid = ls_orderadm_i-guid.

ls_partner_maint-ref_handle = '0000'.

ls_partner_maint-ref_kind = 'B'.

ls_partner_maint-ref_partner_handle = '0000'.

ls_partner_maint-ref_partner_fct = 'LF'.

ls_partner_maint-ref_partner_no = ls_partner_lf-partner_no.

ls_partner_maint-kind_of_entry = 'C'.

ls_partner_maint-partner_fct = 'LF'.

ls_partner_maint-partner_no = ls_partner_lf-partner_no.

ls_partner_maint-no_type = 'BP'.

ls_partner_maint-display_type = 'BP'.

INSERT ls_partner_maint INTO TABLE lt_partner_maint_del.

ls_input_flds-ref_guid = ls_orderadm_i-guid.

ls_input_flds-ref_handle = '0000'.

ls_input_flds-ref_kind = 'B'.

ls_input_flds-objectname = 'PARTNER'.

ls_logical_key-ref_partner_handle = '0000'.

ls_logical_key-ref_partner_fct = 'LF'.

ls_logical_key-ref_partner_no = ls_partner_lf-partner_no.

ls_logical_key-ref_no_type = 'BP'.

ls_logical_key-ref_display_type = 'BP'.

ls_input_flds-logical_key = ls_logical_key.

ls_input_fld_names-fieldname = 'PARTNER_FCT'.

INSERT ls_input_fld_names INTO TABLE lt_input_fld_names.

ls_input_flds-field_names[] = lt_input_fld_names[].

INSERT ls_input_flds INTO TABLE lt_input_flds_maint.

CLEAR ls_input_flds.

CLEAR ls_partner_maint.

REFRESH lt_input_fld_names.