Quantcast
Channel: SCN : All Content - SAP CRM: Marketing
Viewing all articles
Browse latest Browse all 1578

Unable to create Campaign Element from the existing Campaign id.

$
0
0

Hi Team,

 

My scenerio is that i have campaign id(header) along with Campaign element in a flat file.

 

My scenerio is i need to create campaign element and assign it to the existing campaign id,so that when i see it on web ui,under campaign id i can see campaign element.

 

so i use class cl_crm_mktpl_appl_base and assign the guid of campaign id to the lv_parent.

 

zmkt-OBJECT_TYPE = 'CPT'.
zmkt-EXTERNAL_ID =  P_CHILD(External id of the campaign element).

 

CALL METHOD lr_appl_base->ELEMENT_CREATE
  EXPORTING
*   IM_MKTELEMENT_GUID          =

    IM_OBJECT_TYPE                   = "CPT"
    IM_ATTRIBUTES                      = zmkt
*   IV_USE_EXTERNAL_ATTRIBUTES =
    im_texts                                  = lt_texts
    IM_PARENT                            = LV_PARENT

*   IM_CHECK_ATTRIBUTES        =
*   IT_SETTYPE_VALUES          =
*   IV_DEFAULTING              = ’X’
*   IV_SUPPRESS_PARDET         = SPACE
  RECEIVING
    rv_new_guid                = lv_new_guid
  EXCEPTIONS
    GUID_EXISTS                = 1
    INCONSISTENT_DATA          = 2
    PARENT_OBJECT_LOCKED       = 3
    others                     = 4.

 

Probleem is after calling this function module when i try to use

   CALL METHOD lr_appl_base->save
EXCEPTIONS
  failed = 1
  OTHERS = 2.

 

it gives sy-subrc = 1(failed)

 

Can anyone please help.its urgent.

 

Regards,

ANKIT SAXENA


Viewing all articles
Browse latest Browse all 1578

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>