cancel
Showing results for 
Search instead for 
Did you mean: 

Assigning a marketing attribute in abap

olivier_schietecat2
Participant
0 Kudos

Hi, what is the function module for adding a marketing attribute to a business partner? A code sample would be perfect!

Oliver

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Olivier,

Welcome to SDN.

You can refer this link below:

[Marketing Attributes|http://help.sap.com/saphelp_crm40/helpdata/en/77/4a213cc534f20ae10000000a11402f/frameset.htm]

Check the Function Modules

CRM_MKTTG_PF_BP_TAB_TO_GUID

CRM_MKTTG_PF_CONV_ID_TO_GUID

Regards,

Swapna.

olivier_schietecat2
Participant
0 Kudos

Thank you for your reply. Those function modules, correct me if I'm wrong, are to fetch the business partner guid? I was actually looking for a way (a function or something similar) to assign an additional marketing attribute + value to a business partner. As I'm quite new to the technical side of SAP, I assumed there would be a standard method for this?

Oliver

Answers (1)

Answers (1)

olivier_schietecat2
Participant
0 Kudos

Summary:

I simply used the bol in the end:

lref_ent = lref_bpheader->create_related_entity( iv_relation_name = 'BuilMktAttributeRel ' ).

lv_str1 = ls_VAL_DEF-val_name.

lref_ent->set_property_as_string( iv_attr_name = 'ATTRIBUTE_SET' iv_value = lv_str1 ).

lref_core->modify( ).

lv_str1 = 'LAST_VISIT_DATE'.

lref_ent->set_property_as_string( iv_attr_name = 'ATTRIBUTE' iv_value = lv_str1 ).

lv_str1 = lv_date.

lref_ent->set_property_as_string( iv_attr_name = 'VALUE' iv_value = lv_str1 ).