Business Contexts | Context Description |
---|---|
MKT_DIGITAL_ACCOUNT | Marketing: Digital Account |
MKT_EXPORT_DEFINITION | Marketing: Export Definition |
MKT_INITIATIVE | Marketing: Campaign |
MKT_INI_EXT_SUCCESS_DATA | Marketing: Campaign Performance Actual Measure |
MKT_INI_PERFORMANCE_TARGET | Marketing: Campaign Performance Target Measure |
MKT_INTERACTION | Marketing: Interaction |
MKT_INTERACTION_CONTACT | Marketing: Contact and Corporate Account |
MKT_LANDING_PAGE | Marketing: Landing Page |
MKT_MARKETING_AREA | Marketing: Marketing Area |
MKT_PERMISSION | Marketing: Permission |
MKT_PLAN | Marketing: Marketing Plan |
MKT_PROGRAM | Marketing: Program |
MKT_RECO | Marketing: Recommendations |
In general, this is the process to implement custom logic:
SAP Documentation: Creating Custom Logic:
Creating custom logic is one of the options available to extend and enhance the SAP Marketing Cloud standard delivery. You can find more information in our Extensibility Guide
ABAP Class Name | Description |
---|---|
CL_CUAN_CE_IC_QUERY | Search for Interaction Contact |
CL_CUAN_CE_IA_HELPER | Interaction Helper |
CL_CUAN_CE_IC_HELPER | Interaction Contact Helper |
CL_CUAN_CE_MKT_ATTR_CAT_HELPER | Helper Class for Marketing Attributes Categories |
CL_CUAN_CE_MKT_PERM_HELPER | Helper Class for Marketing Permission |
CL_CUAN_COMMON_HELPER | Common Helper |
CL_CUAN_INTERACTION_HELPER | Helper Methods for Interactions |
CL_CUAN_INTEREST_HELPER | Interest Helper |
CL_CUAN_LOC_HELPER | Helper Class for Marketing Location |
CL_CUAN_MKT_EXEC_HELPER | Marketing Execution: Helper Class |
CL_CUAN_PRODUCT_HELPER | Helper Class for Product |
CL_ABAP_CONTEXT_INFO | Helper Class for System Info |
CL_CUAN_INTERACT_CNTCT_HELPER | Helper Class for Get Additional Contact Fields |
CL_CUAN_CAMPAIGN_HELPER_API | Helper Class for Campaign Data |
DATA:
lt_contact TYPE cuan_t_qr_ce_ic_root_ext,
ls_query TYPE cuan_s_q_ce_ic_root_ext,
lt_query TYPE cuan_t_q_ce_ic_root_ext.
* Create Query internal table to search for existing contacts
CLEAR ls_query.
ls_query-name_last = 'Doe'. "last name
ls_query-name_first = 'John'. "first name
* ls_query-name_text = . "full name
* ls_query-country = . "country code
* ls_query-country_ft = . "country free text
* ls_query-region = . "region code
* ls_query-region_ft = . "region free text
* ls_query-postcode1 = . "postal code
* ls_query-city1 = . "city
* ls_query-street = . "street
* ls_query-house_num1 = . "house number
* ls_query-title = . "title code
* ls_query-title_ft = . "title free text
* ls_query-search_text = "search text
APPEND ls_query TO lt_query.
* search for interaction contacts
cl_cuan_ce_ic_query=>search(
EXPORTING
query = lt_query " Interaction Contact Query
IMPORTING
contact = lt_contact " Interaction Contact Root Result
).
DATA(v_date) = cl_abap_context_info=>get_system_date( ).
DATA(v_time) = cl_abap_context_info=>get_system_time( ).
DATA v_text TYPE string.
CONCATENATE v_date v_time INTO v_text SEPARATED BY SPACE.
* SELECT MARKETING AREA FROM CAMPAIGN
IF marketing_area_id IS INITIAL.
SELECT SINGLE MarketingArea
INTO @data(v_id_marketing_area)
FROM I_Mkt_Initiative
WHERE CampaignID = @CAMPAIGN_ID.
ENDIF.
* Select additional MARKETING AREAs from CBO: YY1_ADD_MKT_AREA
SELECT id_mkt_area_allowed FROM yy1_add_mkt_area
APPENDING TABLE @target_mkt_area_ids
WHERE id_mkt_area_origin = @sorce_mkt_area_id.
DATA: v_campaign_id TYPE cuan_initiative_id,
o_oc_header_attribute TYPE REF TO cuan_s_oc_header_attribute,
s_campaign_root TYPE cuan_s_campaign_root_api.
READ TABLE header_attributes REFERENCE INTO o_oc_header_attribute
WITH KEY param_name = if_cuan_mkt_orch_constants=>sc_open_channel_header_attr-campaign. " CAMPAIGN
IF sy-subrc IS INITIAL. " Campaign identifier has been passed in parameter HEADER_ATTRIBUTES
v_campaign_id = o_oc_header_attribute->param_value.
s_campaign_root = cl_cuan_campaign_helper_api=>campaign_root_read( EXPORTING iv_id = v_campaign_id ).
IF s_campaign_root-priority EQ cl_cuan_campaign_helper_api=>co_priority-high.
* ....
ELSE.
* ....
ENDIF
ENDIF.
Area | Description |
---|---|
Naming Conventions | The purpose of using a standardized name convention is to considerably increase the maintainability of customer-specific adaptations and expansions. Define general rules and familiarize developers to them. |
Code Commenting | Make sure that the code has explicit comments about the functionality of the implemented custom logic. |
Error Handling | When executing particular ABAP statements, the SAP kernel sets the value of the global variable SY-SUBRC. Generally, a SY-SUBRC value of zero indicates a successful execution of a statement. SY-SUBRC system field is still available with ABAP for Key Users. Always check SY-SUBRC in your ABAP custom code after READ internal table, SELECT data or CALL to internal functions. Also, always check for Exceptions when you call ABAP-class methods. |
Selects/Joins | SELECT clauses in LOOP should be avoided. As an alternative, use VIEWS, JOINS or the addition clause FOR ALL ENTRIES in SELECTS. FOR ALL ENTRIES tips:
|
Field Symbols | Field symbols refers to existing data. Work in a LOOP or iterations for each row from internal tables using Field Symbols. This is always faster than copying or moving the data to auxiliary work structure areas, especially if the table content needs to be changed. You should use field symbols whenever possible. |
Business Context | BAdI Definition Name | BAdI Description |
---|---|---|
MKT_DIGITAL_ACCOUNT | CUAN_DA_GET_ACCESS_TOKEN | Getting of Access Token |
Business Context | BAdI Definition Name | BAdI Description |
---|---|---|
MKT_EXPORT_DEFINITION | HPA_EXP_DEF_ADD_ACT_PARAMETER | Add Action Parameter |
MKT_EXPORT_DEFINITION | HPA, EXP_ADD_ATTR_FOR_EXP_FILE | Add Attributes to Export Definition Content |
MKT_EXPORT_DEFINITION | HPA_EXP_DEF_CHECK_AUTH4COLUMN | Check User Authorization for Preview Columns of Export Content |
MKT_EXPORT_DEFINITION | HPA_EXP_GET_EXPORT_DEFINITIONS | Configure Retrieval of Dropdown List for Export Definitions |
MKT_EXPORT_DEFINITION | HPA_EXP_DEF_GET_KEYS | Get Keys to Determine the CSV and Preview Content |
MKT_EXPORT_DEFINITION | HPA_EXP_DEF_SET_OBJECT_HEADER | Set Object Header and Content Attribute Columns in CSV File |
MKT_EXPORT_DEFINITION | HPA_EXP_DEF_COLUMN_NO_INI_VAL | Set Flag for Specific Columns: No Initial Attribute Value from Segmentation |
Business Context | BAdI Definition Name | BAdI Description |
---|---|---|
MKT_INITIATIVE | CUAN_CAMPAIGN_CHECK | Check Attributes of Campaign Header |
MKT_INITIATIVE | CUAN_CAMPAIGN_UPDATE | Update Attributes of Campaign Header |
MKT_INITIATIVE | CUAN_CMSG_ADAPT_HYPERLINKS | Adjust Hyperlink Parameters While Sending Emails |
MKT_INITIATIVE | CUAN_CMSG_ADD_BLOCK_ATTRIBUTES | Add Block Attributes |
MKT_INITIATIVE | CUAN_CPG_EXEC_DYN_CNTNT_MTH | Dynamic Content Retrieval for Campaign Execution |
MKT_INITIATIVE | CUAN_LM_CAMPAIGN_REPLICATION | Filter for Campaigns to Be Replicated to SAP Cloud for Customer |
MKT_INITIATIVE | CUAN_LM_TARGET_SYS_TYPE | Lead Management: Determine Target System Type |
Business Context | BAdI Definition Name | BAdI Description |
---|---|---|
MKT_INITIATIVE | CUAN_CPG_OPN_CHNL_DEFINITION | (1) Open Channel: Define Implementations: Mandatory |
MKT_INITIATIVE | CUAN_CPG_OPN_CHNL_IA_TEMPL | (2) Open Channel: Define Parameters for Implementation: Optional |
MKT_INITIATIVE | CUAN_CPG_OPN_CHNL_PARAMETER | (3) Open Channel: Define Global Settings for Execution: Optional |
MKT_INITIATIVE | CUAN_CPG_OPN_CHNL_PRE_PROC | (4) Open Channel: Enhance Payload for Data Transfer: Optional |
MKT_INITIATIVE | CUAN_CPG_OPN_CHNL_PRE_TRANSF | (5) Open Channel: Define Template for Outbound Interaction: optional |
Business Context | BAdI Definition Name | BAdI Description |
---|---|---|
MKT_INI_EXT_SUCCESS_DATA | CUAN_CMPGN_PERF_IMPORT_SUCCESS | Adapt Campaign Success Before Import |
MKT_INI_PERFORMANCE_TARGET | CUAN_CMPGN_PERF_IMPORT_TARGET | Adapt Campaign Targets Before Import |
Business Context | BAdI Definition Name | BAdI Description |
---|---|---|
MKT_INTERACTION | CUAN_IA_REVISE_FOR_DISPLAY | Revise Interaction Data Before Import |
MKT_INTERACTION | CUAN_IA_REVISE_FOR_IMPORT | Revise Interaction Data for Display on the UI |
Business Context | BAdI Definition Name | BAdI Description |
---|---|---|
MKT_INTERACTION_CONTACT | CUAN_FIND_INTERACTION_CONTACT | Find Interaction Contact |
MKT_INTERACTION_CONTACT | CUAN_IMPORT_IA_4_IC | Review Imported Interaction Updating an Interaction Contact |
MKT_INTERACTION_CONTACT | CUAN_IMPORT_IA_IC_ADJUST | Adjust System Behavior on Interaction Contact Import |
MKT_INTERACTION_CONTACT | CUAN_IMPORT_IC | Review Imported Interaction Contact Data |
MKT_INTERACTION_CONTACT | CUAN_MERGE_IC | Merge Interaction Contact |
MKT_INTERACTION_CONTACT | CUAN_UPDATE_IC_ROOT | Update Interaction Contact (Best Record) |
Business Context | BAdI Definition Name | BAdI Description |
---|---|---|
MKT_LANDING_PAGE | CUAN_CP_DEPLOY_ADJUST_FILES | Change File Contents Before Landing Page Publication |
MKT_LANDING_PAGE | CUAN_CP_DETERMINE_CONTACT | Find Contact Using Landing Page Input |
MKT_LANDING_PAGE | CUAN_CP_READ_CONTACT_PREFILL | Read Contact Data for Landing Page Personalization |
MKT_LANDING_PAGE | CUAN_CP_SEND_CONFIRMATION | Control Sending of Confirmation E-mail for Double Opt-In Process |
Business Context | BAdI Definition Name | BAdI Description |
---|---|---|
MKT_MARKETING_AREA | CUAN_MKT_EXEC_MARKETING_AREA | Marketing Area Separation for Campaign Execution |
MKT_MARKETING_AREA | HPA_ALLOWED_MKT_AREAS | Allowed Marketing Areas |
Business Context | BAdI Definition Name | BAdI Description |
---|---|---|
MKT_PERMISSION | CUAN_MKT_NEWSLETTER_PERMISSION | Permission and Subscription Check |
MKT_PERMISSION | CUAN_MKT_PERMISSION_PASS | Permission and Subscription Copy |
MKT_PERMISSION | CUAN_MKT_PERMISSION_UPDATE | Permission and Subscription Update |
MKT_PERMISSION | CUAN_MKT_SUPPRESSION_RULES | Suppression Rules Check |
Business Context | BAdI Definition Name | BAdI Description |
---|---|---|
MKT_PLAN | CUAN_MARKETING_PLAN_CHECK | Check Attributes of Marketing Plan Header |
MKT_PLAN | CUAN_MARKETING_PLAN_UPDATE | Update Attributes of Marketing Plan Header |
Business Context | BAdI Definition Name | BAdI Description |
---|---|---|
MKT_PROGRAM | CUAN_PROGRAM_CHECK | Check Attributes of Program Header |
MKT_PROGRAM | CUAN_PROGRAM_UPDATE | Update Attributes of Program Header |
Business Context | BAdI Definition Name | BAdI Description |
---|---|---|
MKT_RECO | RECO_AGGREGATE_IMPRESSIONS | Aggregate or Transform Runtime Recommendation Impressions |
MKT_RECO | RECO_AGGREGATE_MASS_IMPRESSNS | Aggregate or Transform Mass Runtime Recommendation Impressions |
MKT_RECO | RECO_ENHANCE_RUNTIME_PARAMETER | Enhance Recommendation Runtime Parameters |
******************************************************
* Sample logic setting the IC ROOT validation status *
******************************************************
* c_anonymous = ' '
* c_self_identified = '10'
* c_qualified = '20'
* c_business_partner = '30'
LOOP AT lt_ia_facet REFERENCE INTO lr_ia_facet.
CASE lr_ia_facet->id_origin.
WHEN cl_cuan_ce_ic_helper=>gc_crm_bupa OR "SAP CRM Business Partner
cl_cuan_ce_ic_helper=>gc_erp_bupa OR "SAP ERP Business Partner
cl_cuan_ce_ic_helper=>gc_erp_contact OR "SAP ERP Contact
cl_cuan_ce_ic_helper=>gc_erp_customer OR "SAP ERP Customer
if_cuan_ce_c=>co_origin_sap_erp_company OR "SAP ERP Company
if_cuan_ce_c=>co_origin_sap_c4c_indiv_cust. "SAP C4C Individual Customer
es_ic_new-validation_status = c_business_partner.
EXIT.
ENDLOOP.
DATA: lv_marketing_area type c length 40.
IF interaction_data-mkt_area_id is initial
OR interaction_data-mkt_area_id EQ 'GLOBAL'.
SELECT SINGLE InteractionContactMktgArea FROM I_MKT_IntactnCntctMktgArea
WHERE InteractionContactOrigin EQ @interaction_data-id_origin
AND InteractionContactId EQ @interaction_data-id
AND InteractionContactUUID EQ @interaction_data-contact_key
INTO @lv_marketing_area.
* Set Marketing Area into Interaction
interaction_data-mkt_area_id = lv_marketing_area.
ENDIF.
DATA: v_campaign_id TYPE cuan_initiative_id,
s_header_Attributes LIKE LINE OF header_attibutes,
s_campaign_root TYPE cuan_s_campaign_root_api.
package_size = 100. " change the number of target group members processed in one package and transferred in the odata payload
CHECK_PERMISSION = abap_false.
read table HEADER_ATTRIBUTES assigning FIELD-SYMBOL(<fs_head>) WITH KEY param_name = 'CAMPAIGN'.
if sy-subrc eq 0.
v_campaign_id = <fs_head>-param_value.
endif.
s_campaign_root = cl_cuan_campaign_helper_api=>campaign_root_read( EXPORTING iv_id = v_campaign_id ).
clear s_header_attributes.
s_header_attributes-param_name = 'Z_NEW_FIELD'.
s_header_attributes-param_value = s_campaign_root_api-yy1_new_field.
append s_header_attributes to HEADER_ATTRIBUTES.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
8 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |