cancel
Showing results for 
Search instead for 
Did you mean: 

How to get "objkey_A" from "campaign ID"

Former Member
0 Kudos

Hai Experts,

We are going to make functional specification for creating lead in mobility and i need field campaign as requirement. When i checked in crm_order_read, there's no mention about campaign ID, but objkey_A. Could you explain me, how can the campaign ID convert into objkey_A?

Best Regards,

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Arief,

You can obtain Campaign ID from objkey_A using method read_generic_attributes of class cl_crm_mktpl_appl_base_db. This method will return ES_CGPL_PROJECT which will contain the External ID of campaign.

You can use the logic as

CALL METHOD cl_crm_mktpl_appl_base_db=>read_generic_attributes

       EXPORTING

         iv_mktelem      = ls_doc_flow-objkey_a

       IMPORTING

         es_cgpl_project = ls_campaign

      EXCEPTIONS

         not_found       = 1

         OTHERS          = 2.

Campaign ID is ls_campaign-external_id. Additionally a lot of other details can also be obtained for campaign like this.

Regards,

Ravi