cancel
Showing results for 
Search instead for 
Did you mean: 

Marketing area determination based on a custom field

former_member701491
Participant
0 Kudos
241

Hello Gurus,

We are replicating accounts from ECC and C4C using CUAN_BUSINESS_PARTNER_IMP_SRV, and we want to determine the marketing area of an account automatically based on his Sales org.

As I understand, there's two ways to achive that :

Option 1- In CPI iFlow, create a logic that match the value of Sales org with the right Marketing area

Option 2- Create a custom field in SAP Marketing Cloud, and then create a custom logic on import to update the marketing area automatically (Source : BAdl documentation) :


For Option 1, we are facing an issue : We can't find the node MarketingArea in the iFlow.

So, we are proceeding with option 2 :

In Marketing Cloud we created a custom field "YY1_SALESORGANIZATION", where the value of the sales org of an account is copied from C4C :


So I wrote this code :

IF contact_data-YY1_SALESORGANIZATION_MCP IS NOT INITIAL AND contact_data-id_origin EQ 'SAP_C4C_BUPA'.
      IF contact_data-YY1_SALESORGANIZATION_MCP EQ 'SO_111'
         marketing_area = 'MKT_FRANCE'
      ENDIF.

But it's not working. My knowledge in BAdl is very limited.

Could you please suggest a better Code ?

Best regards,

Anas

Accepted Solutions (1)

Accepted Solutions (1)

SCHNEIDERT
Active Contributor

Hi Anas,

unfortunately I'm also not that good in coding and using the BAdI. Maybe someone else could provide a solution for that.

But regarding Option 1:

are you sure you're using the current version of the iFlow? Could you check the mapping in the actual version and see if it is there? Check the official iFlow on API Hub: https://api.sap.com/integrationflow/com.sap.scenarios.c4c2ymkt.businesspartnerreplicate

Here I can also see the field, so I would suggest to check this one.

When you check the iFlow and click on the OData Adapter, are you able to see the field here?

If you create a Custom Field and need to have it in the structure, how does you or your team get it there?

BR Tobias

former_member701491
Participant

Hello schneidert ,

Thank you for your quick reply. In fact, you are right, the MarketingArea was already there, but we mistakenly didn't notice it,

We were able to do the logic in CPI for each sales organization and the right Marketing area as you suggested in the other topic.

So We completed the configuration using only the first option

Thanks,

Anas

Answers (1)

Answers (1)

former_member226
Employee
Employee

Hello,

There is an issue with the following code:

marketing_area = 'MKT_FRANCE'. // Wrong CODE

The issue here is, marketing_area is a table, to which with your code you are assigning a constant value. Hence the system will throw an error. Instead, you need to append the constant value to it as a line item as shown:

marketing_area = value #( ( mkt_area_id = 'CXX_EMEA' ) ).

So your final code should look like this:

IF contact_data-YY1_SALESORGANIZATION_MCP IS NOT INITIAL AND contact_data-id_origin EQ 'SAP_C4C_BUPA'.
      IF contact_data-YY1_SALESORGANIZATION_MCP EQ 'SO_111'
         marketing_area = value #( ( mkt_area_id = '<Your MKT Area Code>' ) ).
      ENDIF.
ENDIF.

BR

former_member701491
Participant

Hello saurabhkabra2009,

Thank you for your code, I was sure that the mistake was on the marketing area level. Thanks for the clarification.

Right now, we completed the configuration only using the first option.

Best regards,

Anas