Quantcast
Channel: SCN : Popular Discussions - Code Exchange
Viewing all articles
Browse latest Browse all 1399

Sales prospect doesnot get assigned to lead using CRM_ORDER_MAINTAIN.

$
0
0

Hi All,

 

I have been trying to create a lead with sales prospect assigned to it.

I have written the code using the FM 'CRM_ORDER_MAINTAIN'.

Lead creates successfully but with error saying enter sales prospect.

Piece of code which i implemented here :

ls_partner-ref_kind       = 'A'.
ls_partner-ref_handle     = '0000000000'.
ls_partner-ref_partner_handle = '0001'..
  ls_partner-kind_of_entry  = 'C'.
  ls_partner-partner_fct    = '00000021'.
  ls_partner-ref_partner_fct= '00000021'.
  ls_partner-partner_no     = pernumber."'4000000048'.
  ls_partner-display_type   = 'BP' .
  ls_partner-no_type        = 'BP' .
  ls_partner-mainpartner    = ' '..

  APPEND ls_partner TO lt_partner.

 

CONSTANTS : c_fielddisplayTYPE crmt_fieldnameVALUE 'DISPLAY_TYPE',
                      c_fieldkoe    TYPE crmt_fieldnameVALUE 'KIND_OF_ENTRY' ,
                      c_fieldnotype TYPE crmt_fieldnameVALUE 'NO_TYPE' ,
                      c_fieldpartnerfct TYPE crmt_fieldnameVALUE 'PARTNER_FCT',
                      c_partnerno   TYPE crmt_fieldname   VALUE 'PARTNER_NO'.

  ls_field_names-fieldname  = c_fielddisplay.

  INSERT ls_field_names INTO TABLE ls_input_fields-field_names.

 

  ls_field_names-fieldname  = c_fieldkoe.

  INSERT ls_field_names INTO TABLE ls_input_fields-field_names.

 

  ls_field_names-fieldname  = c_fieldnotype .

  INSERT ls_field_names INTO TABLE ls_input_fields-field_names.

  ls_field_names-fieldname  = c_fieldpartnerfct.

  INSERT ls_field_names INTO TABLE ls_input_fields-field_names.

  ls_field_names-fieldname  = c_partnerno.

  INSERT ls_field_names INTO TABLE ls_input_fields-field_names.

 

  ls_input_fields-ref_handle  = '0000000000'.

  ls_input_fields-ref_kind= 'A'.

  ls_input_fields-objectname  = 'PARTNER'.

  ls_input_fields-logical_key = '0001'."st_logical_key.

  APPEND ls_input_fields TO lt_input_fields.

 

 

Kindly let me know if i need to pass any more parameters of modify the above existing parameters.

 

Thanks & Regards,

Shwetha.


Viewing all articles
Browse latest Browse all 1399

Trending Articles