Quantcast
Channel: SCN : All Content - SAP CRM: Marketing
Viewing all articles
Browse latest Browse all 1578

Not able to add a campaign to an lead using abap

$
0
0

Hi Experts,

 

I am writing a program, which will take one tab delimited text file as input then it will create LEADs in mass from the data of that text file.

But I'm not able to add any existing campaign to the leads, which are getting created from my program.

The part of my code to add campaign in the program written below. It is not creating the link with the lead and the campaign.

It's urgent. Please help me out.

 

           REFRESH: lt_fieldnames.

           ls_fieldnames-fieldname = 'BREL_KIND'.

           INSERT ls_fieldnames INTO TABLE  lt_fieldnames.

           ls_fieldnames-fieldname = 'OBJKEY_A'.

           INSERT ls_fieldnames INTO TABLE  lt_fieldnames.

           ls_fieldnames-fieldname = 'OBJKEY_B'.

           INSERT ls_fieldnames INTO TABLE  lt_fieldnames.

           ls_fieldnames-fieldname = 'OBJTYPE_A'.

           INSERT ls_fieldnames INTO TABLE  lt_fieldnames.

           ls_fieldnames-fieldname = 'OBJTYPE_B'.

           INSERT ls_fieldnames INTO TABLE  lt_fieldnames.

           ls_fieldnames-fieldname = 'RELTYPE'.

           INSERT ls_fieldnames INTO TABLE  lt_fieldnames.

 

           CLEAR ls_input_fields.

           ls_input_fields-ref_guid = lv_leadguid.

           ls_input_fields-ref_kind = lc_headmode.

           ls_input_fields-objectname = 'DOC_FLOW'.

           ls_input_fields-field_names = lt_fieldnames.

           INSERT ls_input_fields INTO TABLE  lt_input_fields.

 

           ls_doc_link-objkey_a = ls_campguid.(guid of the campaign from CGPL_PROJECT)

           ls_doc_link-objtype_a = 'BUS2010020'.

           ls_doc_link-objkey_b = lv_leadguid.(Guid of Lead, which is being created by the program)

           ls_doc_link-objtype_b = 'BUS2000108'.

           ls_doc_link-brel_kind = 'A'.

           ls_doc_link-brel_mode = 'A'.

           ls_doc_link-reltype = 'VONA'.

           INSERT ls_doc_link INTO TABLE  lt_doc_link.

 

           ls_doc_flow-ref_guid = lv_leadguid.

           ls_doc_flow-ref_kind = lc_headmode.

           ls_doc_flow-doc_link = lt_doc_link.

           INSERT ls_doc_flow INTO TABLE lt_doc_flow.


Now I'm have put lt_doc_flow to ct_doc_flow of crm_order_maintain.


Viewing all articles
Browse latest Browse all 1578

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>