cancel
Showing results for 
Search instead for 
Did you mean: 

Read Campaign details in BADI

Former Member
0 Kudos

Hello all,

I need your help.

I have created one Action Profile and with METHODCALL type and implemented the EXEC_METHODCALL_PPF BADI.

I am unable understand how to read the campaign details in this BADI.

Please help me. Thank you so much!

Accepted Solutions (0)

Answers (2)

Answers (2)

Saurabh_Kabra
Participant
0 Kudos

Hi Maren,

Can you please try following code:

data: l_o_object   TYPE REF TO cl_doc_crm_order,
         l_v_order_guid       TYPE   crmt_object_guid.

          

l_o_object ?= io_appl_object.      """"""""" (Importing parameter of BADI)

l_v_guid = l_o_object->get_crm_obj_guid( ).

Here L_V_GUID should be the campaign GUID. I am not sure but can you please give it a try.

Once you have the GUID of campaign then there are many FM's like MKT_ELEMENT_READ or MKT_ELEMENT_STATUS_READ to get the campaign details.

Thanks

Saurabh

Former Member
0 Kudos

Thanks Saurabh.

I will try this and get back to you. Thanks for the reply.

Former Member
0 Kudos

Hello Experts,

Can someone please provide me with some sample code?

Thank you in advance.

Former Member
0 Kudos

Hi Maren

A campaign is made up of quite a lot of Data Components

What Data are you looking for?

Regards

Arden

Former Member
0 Kudos

Hi Arden,

I' want to read the campaign header data like Status, Employee Responsible and if possible Target group assigned to the campaign.

If it's one order, the BADI's import parameter will have the GUID and then we can use CRM_ORDER_READ to retrieve the other data.

Here, I don't know how to get the GUID of the campaign and then to read the header data.

Please help me with this. Thank you!

0 Kudos

Hi Maren,

MKT plan and campaign are designed with the totally different architecture with 1O document.

You can get the info from tables directly.

The following tables may be useful:

CGPL_PROJECT, CRM_MKTPL_ATTR, CRM_MKTPL_TPATTR(for TPM)

regards,

Jack Yu

Former Member
0 Kudos

Hi Jack,

Thanks for your response.

I know these tables. But, I have to read the data in a BADI. For this, I need have a GUID of the campaign. I am unable to understand how I can get the GUID in the BADI implementation.

0 Kudos

Hi Maren,

The key point it what can you get imported within the BADI? If you get the exteral ID, you can use FM CONVERSION_EXIT_MKTPL_INPUT. This is the only way to get the GUID of a campaign.

regards,

Jack Yu