cancel
Showing results for 
Search instead for 
Did you mean: 

Where is the partnerset to a campaign saved?

Former Member
0 Kudos

Hello,

in the table CRMD_MKTPL_PAR the partnerset is allocated to the campaign id. But where are the partners allocated to the partnerset? Are there function modules to find the partners? Or is there a table?

Greetings from Germany,

Friederike

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Maybe (using iv_mkt_object_key as the GUID):


*--- map, set and get data
  lr_appl_base      = cl_crm_mktpl_appl_base=>get_instance( ).
  lv_mkt_object_key = iv_mkt_object_key.

*--- get bus object
  CALL METHOD cl_crm_mktpl_appl_base_service=>get_bor_type_from_guid
    EXPORTING
      im_mktelement      = lv_mkt_object_key
    IMPORTING
      ex_bor_object_type = lv_bor_object_type
    EXCEPTIONS
      not_found          = 0
      wrong_input        = 0
      OTHERS             = 0.

*--- get par_assignment and assignment attributes
  CALL METHOD lr_appl_base->partner_assign_read
    EXPORTING
      im_mktelement_guid   = lv_mkt_object_key
    IMPORTING
      ex_par_assignment    = lr_par_assignment
      ex_parset_attributes = ls_parset_attributes
    EXCEPTIONS
      not_found            = 1
      change_not_possible  = 2.
  IF sy-subrc <> 0.
  ENDIF.

Cut'n'pasted from CL_CRM_BSP_MKTPL_ACC_PARTNER (method IF_CRM_BSP_MKTPL_ODC_IL~ODC_READ).

Cheers

Dom

Former Member
0 Kudos

Hello Dom,

I haven't tried it out, but it looks absolutly fabulous. I'll report how it worked out.

In worship ,

Friederike

Former Member
0 Kudos

Hello,

here is my solution:

DATA: lv_prom_id TYPE zrpromotionid,

lv_prom_guid TYPE cgpl_project_guid,

lt_partner TYPE crmt_mktpl_partner.

DATA: lr_appl_base TYPE REF TO cl_crm_mktpl_appl_base.

lr_appl_base = cl_crm_mktpl_appl_base=>get_instance( ).

  • get the guid from promotion id

CALL FUNCTION 'CONVERSION_EXIT_MKTPL_INPUT'

EXPORTING

input = lv_prom_id

IMPORTING

OUTPUT = lv_prom_guid

  • get a table with partner numbers

CALL METHOD lr_appl_base->partner_assign_read

EXPORTING

im_mktelement_guid = lv_prom_guid

IMPORTING

ex_partner = lt_partner

EXCEPTIONS

not_found = 1

change_not_possible = 2.

IF sy-subrc <> 0.

ENDIF.

the table lt_partner then holds diverse info to the partners.

Thanks again.

Friederike

Answers (0)