!--a11y-->
Marketing Attributes in Document
Distribution 
Use this function to use marketing attributes in document distribution to meet your specific business needs. For example, you could use the marketing attributes to identify prospects interested in a particular product.
· Marketing attributes are defined in the customer system and corresponding ERMS attributes can therefore not be contained in the delivery. But a generic Service for reading marketing attributes is provided. Based on this service you only need to define the concrete Attributes.
· The Fact Gathering Service DD_FG_MKTATTR_MP collects the marketing attributes of the main document partner (Prospect) into the ERMS Fact Base.
The XML structure of the data appears as follows:
<main_partner_attribute>
<attribute_set>NameOfAttributeSet</attribute_set>
<attribute>NameOfAttribute</attribute>
<attribute_value>ValueOfAttribute</attribute_value>
</ main_partner_attribute>
· To take an example, if you want to create an ERMS attribute that corresponds to the marketing attribute GOLF belonging to an Attribute Set HOBBY, you are required to enter the following XPath expression in the ERMS attribute definition:
/parts/main_partner_attribute[attribute_set='HOBBY'] [attribute='GOLF']/attribute_value/text()
In addition, enter the following path if GOLF is a multi-value attribute:
/parts/main_partner_attribute[attribute_set='HOBBY'] [attribute='GOLF']/attribute_value
· Provide Value Help for the attributes you create. To accomplish this, you can inherit your Input Support Class from the generic base class CL_CRM_DD_F4_MKT_ATTR, which provides the necessary functions. You only need to pass the names of the attribute set and the attribute to the constructor of the base class.
· Work with the marketing attributes for other partner functions, by first creating an ERMS Fact Gathering Service and implementing the corresponding ABAP class. You can inherit your class from CL_CRM_DD_FG_MKT_ATTR, which provides the basic functions to read marketing attributes.