Campaign element creation

Hello ,
My requirement is to create Campaigns and Campaigns elements from flat file.
I am able to create Campaigns through BAPI MKT_ELEMENT_CREATE, but i am unable to find a BAPI to create Campaign elements under the created Campaign.
Can anyone please let me know the process or BAPI to create a Campaign element.

Hi,
You can create campaign elements using the method 'element_create' of the class 'cl_crm_mktpl_appl_base' followed by the 'save' method and BAPI_TRANSACTION_COMMIT.
hope this helps!!!
Prerna

Similar Messages

  • MKT_ELEMENT_CREATE gives Dump during creation of Campaign Element

    Hi,
    I am trying to create campaign element through code and I am getting dump in the following class method.
    Class : CL_CRM_MKTPL_OL_MKTPROJECT
    Method : SET_ATTRIBUTES
    Line No : 15 ->> lr_header_item->get_attributes( EXPORTING iv_get_external_attributes = abap_true
                                      IMPORTING es_attributes              = ls_header_attr ).
    In above statement LR_HEADER_ITEM comes as Initial.
    Below is the code for creating campaign element.
    DATA: LR_TASK          TYPE REF TO CL_CGPL_TASK,
            LR_TASKS         TYPE REF TO CL_CGPL_TASKS,
            LR_PROJECT       TYPE REF TO CL_CGPL_PROJECT.
      DATA: WA_PROJECT  TYPE CGPL_PROJECT.
      DATA: WA_TASK     TYPE CGPL_TASK.
      DATA: LIT_TASKS   TYPE CGPLD_ITAB_TASK.
      DATA: WA_MESSAGE TYPE BAPIRET2.
      DATA: LIT_RETURN TYPE TABLE OF BAPIRETURN1.
      DATA: WA_CAMPAIGN TYPE CRM_MKTPL_CAMPAIGN,
            WA_ATTRIBUTES TYPE CRM_MKTPL_MKTELEMENT.
      DATA: LV_GUID TYPE SYSUUID-X."BAPI_MARKETINGELEMENT_GUID-MKTELEMENT_GUID.
      DATA: LV_CAMP_GUID TYPE BAPI_MARKETINGELEMENT_GUID-MKTELEMENT_GUID.
      CALL FUNCTION 'MKT_ELEMENT_READ'
        EXPORTING
          MARKETINGELEMENT = IV_SOURCE_GUID - THIS IS A IMPORT PARAMETER OF FUNCTION MODULE ( CAMPAIGN GUID ).
        IMPORTING
          EX_CAMPAIGN      = WA_CAMPAIGN
          EX_ATTRIBUTES    = WA_ATTRIBUTES.
      CONCATENATE WA_ATTRIBUTES-EXTERNAL_ID '_' SY-DATUM '_' SY-UZEIT INTO WA_ATTRIBUTES-EXTERNAL_ID.
      WA_ATTRIBUTES-OBJECT_TYPE = 'CPT'.
      CALL FUNCTION 'SYSTEM_UUID_CREATE'
        IMPORTING
          UUID = WA_ATTRIBUTES-GUID.
      LV_CAMP_GUID = WA_ATTRIBUTES-GUID.
      WA_ATTRIBUTES-PROJECT_GUID = IV_SOURCE_GUID.
      WA_ATTRIBUTES-PARENT_GUID = IV_SOURCE_GUID.
      CALL FUNCTION 'MKT_ELEMENT_CREATE'
        EXPORTING
          IM_MARKETINGELEMENT = LV_CAMP_GUID
          IM_ATTRIBUTES       = WA_ATTRIBUTES
        TABLES
          RETURN              = LIT_RETURN.
      IF LIT_RETURN[] IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            WAIT = 'X'.
      ENDIF.

    This would happen if you are not passing the right guid to the program or Function Module. Please check that the guid is available in cgpl_project table.
    Ajay Gupta

  • Creation of service order from campaign element

    Hi,
    We have a requirement where service orders are to be created for all those business partners who responded to the campaign. We are using standard service order type SVRO. We have set up campaign automation by creating campaign and element, assigned target group, set decision point (rule & condition) to split target group in two; one for those who have replied to campaign and others who have not replied. These target groups are also linked to other campaign elements within the campaign.
    The question is, how to create a follow-on transactions such as service orders through campaign, so that one service order gets created for each successful BP from campaign result?
    Thanks in advance for your advice / suggestions.
    Regards
    Umesh
    Edited by: Umesh Singh on Sep 30, 2009 6:36 PM

    Hi Shatnhala,
    Thank you for your help. I'll try this and will come back to you.
    My further requirenment is to re-trigger pricing to upade latest price information on these service orders and then to create and send letter to all those customer with price informations. Can I use the same workflow with different steps to complete all these task?
    Also, how will these service orders (created through workflow) be linked with the campaign? Is their a way to link one campaign with many orders?
    Thanks
    Umesh

  • Document in Campaign Element

    Hi all,
    Can anyone tell me, how the documents are stored in the documents tab of an campaign.
    I have been trying to attach an document using the BADI.
    CRM_MKT_EXP_CAMP_DAT Method EXPORT_CAMPAIGN_DATA.
    i am not able to attach the document.
    i want the file to be generated in the application server and an link to it in the campaign document tab.  so that user can read the document.
    Please.. guide me.. i am very new to CRM.
    Thanks & Regards
    DSM Sharma.

    Hello Sharma,
    To attach a new document to CRM object (here Marketing campaign element) from a BAdI (not from UI) you can use one of the following <b>Content Management (KW) APIs</b>: 
    <b>Class:</b>
    CL_CRM_DOCUMENTS
          <b> Methods: </b>
        - CREATE_AL_WITH_TABLE  <i>(Create ArchiveLink Document)
    </i>    - CREATE_FOLDER <i>(Create Folder)</i>
        - CREATE_URL <i>(CREATE_VERSION_WITH_FILE)</i>
        - CREATE_VERSION_WITH_FILE <i>(CREATE_VERSION_WITH_TABLE)</i>
        - CREATE_VERSION_WITH_TABLE <i>(Create New Version of Document (Contents in Tab))</i>
        - CREATE_WITH_FILE <i>(Create a Document (Content in File))</i>
        - CREATE_WITH_TABLE <i>(Create a Document (Content in Table))</i>
        - CREATE_WITH_URL <i>(Document Creation (Content From a URL))</i>
    <b>Function module</b>:
    CRM_KW_DOC_CREATE_VERSION
    CRM_KW_DOC_CREATE_WITH_TABLE
    You need to pass in the BOR number : <b>Campaign element = BUS2010022</b> and need to pass in the <b>GUID</b> of the element together with the document property which depend on the API used.
    Sincerely,
    Alain Gauthier

  • BSP Error while selecting "campaign elements" in spanish --- crm 2007

    Hi experts,
    I´m trying to look for a solution for a problem with an error that occours while selecting in WEB UI --marketing --- campaign elements , in spanish language.
    Error Business Server Page (BSP)
    <thtmlb:textView>: (design) The Attribute Value is not a Value from: STANDARD/HEADER1/HEADER2/LABEL/VALUE/ITALIC/BOLD
    In english it works perfect.

    Which field is? Has translate value content to spanish for this field?.
    In SAP CRM UI, press F2 and tell me which is the field

  • Doubt in data element creation

    Hi,
        I have doubt in data element creation ie, there is 2 options elementary type
    (domain and built-in-type) and reference type (name of the reference type &
    ref to predefined type). if there is built in type here then what is the use of
    built-in-type in initial screen of the table and also explain me about the use of
    reference type.
    with regards,
    nanjunda sharma

    Hi!
    With the use of the built-in type, you have to set always in every different data element the exact type.
    With the use of the domains (pre-defined types) you just have to enter the domain name into the data element. If you have to modify the type, you can maintain it in the domain (only once) but the built in types have to modifyed in every data element (which means more work).
    Domains have a little more options also, than the built in types.
    Regards
    Tamá

  • Fact sheet to show up Campaign Elements

    Hi,
    Is it possible to show Campaign Elements in Fact sheet.
    Campaign element needs to be based on the customer which is in Target group of that particular BP.
    It is not on the basis of  Employee responsible of campaign element.
    Say for example if customer XYZ  is in Target group of Campaign element 1234. When I confirm the BP & open fact sheet it should display me campaign element 1234 in the fact sheet.
    Cheers,
    RK

    Well you can download and install the PSE11 trial from http://prodesigntools.com/photoshop-elements-11-direct-download-links-pse-premiere-pre.htm l to get the PSE11 versions of the Lighting files. Follow their very important instructions EXACTLY or you will likely encounter authorisation errors or download the latest version instead.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • How to make Marketing Plan/Campaign ELEMENTS visible in Marketing Calendar?

    Hi,
    Does anyone know whether it's possible to show Marketing Plan Elements or Campaign Elements in the Marketing Calendar? Until now, I can only show Marketing Plans and Campaigns, no Elements...
    Regards,
    Jeroen

    already solved, type had to be entered.

  • Default account assignment in cost element creation

    hi,
    in the cost element creation transaction (KA01) I need the default account assignment to be the WBS element. but in the transaction only cost center and order is showing as dafault account assignment, how can I include the WBS as cost object?
    Thanks
    Edited by: gayani premawardena on Sep 3, 2010 12:24 PM

    Hi
    If you are aware of FI substitution or validation, it works the same way
    1. Go to OKC9 and click on New entries
    2. Enter your contr area and choose Event = Line Item and Save.. It would ask for a transport request
    3. Now click on the magnifying lens icon, then drill down on cost accounting > Line Item. Now click on Create Substitution icon and give it a name
    4. Now click on Create Step and write your substitution by choosing fields from the COBL structure
    It should like like, Prerequisites: IF COBL - BUKRS = XXXX and Cost Ele = YYYY,
    Action to be taken if Pre-req is met - Substitute WBS = ZZZZ
    Regards
    Ajay M

  • Performance will go down in case of Dynamic UI element Creation.

    Performance will go down in case of Dynamic UI element Creation

    suryar wrote:
    Performance will go down in case of Dynamic UI element Creation
    hi,
    is this an information or a question?
    Please be more specific so that your queries can be answered quickly
    Regards,
    Sahai.S

  • Which table campaign element details are stored

    Hi All,
    Would anyone know which table campaign and campaign element details are stored? I am using CRM 2007 and i am looking to find where details such as campaign element ID, campaign element description, start/end date are stored?
    i could not fund such data after looking through se16
    Any assistance is much appreciated.
    Thanks,
    Jonathan

    Hi,
    se16 > CGPL_PROJECT
    does not have records for the Campaign Element or Marketing Plan Elemtents,
    do you know which table I can find this information in please?
    Many thanks
    Mrugesh

  • Campaign Element generation using coding mask

    Hi Friends,
    Iam working on the automatic number generation for marketing/campaign plan generation. I have implemented the Note provided by SAP and everything is fine.
    The issue is with the campaign elements. I have used the coding mask to generate the campaign elements. Whenever i delete a campaign element and create a new one, the same number is used again. I mean the previously deleted campaign element numbers are generated again.
    Is there any standard way to create a new campaign element every time from the coding mask without re-using the deleted campaign elements.
    Thanks
    Raju

    Hello Narayan,
    Be more specific? Which version are you in? Is default badi activated? do you have any active custom implementation of  Badi CRM_MKTPL_OL_OBJ with code in method "external id generation".
    Are you using code masking along with the Badi activation. if you custom implementation of badi CRM_MKTPL_OL_OBJ, make sure you deactivate the default implementation.
    Some time this issue might be caused by conflict of multiple implementations active.
    Thanks & Regards
    Raja Pamireddy
    Moderator

  • Campaign Element execution and job status

    Hello SAP Gurus,
    I have a requirement, where the Client wants to execute the Campaign Element. Is that possible?
    He also says, the end user should execute the Campaign element level.
    I tried doing that, but the Job status remains as "JOB NOT SCHEDULED".
    *Is it a technical error or settings to be done at the back end ?
    Kindly help me out.
    Thanks in advance.
    Regards,
    Srinivasan Raghavendran

    Hi Srinivasan,
    You can execute Campaign elements individually but you have to make sure that u r all uppel level marketing Plan, Campaign should be released first, Job remains not scheduled due to various reasons. if u r running mail campaign then check the target group which u r assigning to campaign has email id maintained also check for mail form maintained. 
    For job please check Start date if u r running periodic job then the condition must be fullfilled, for test try running job with  Start date as Immidiate
    Regards,
    DD's

  • Campaign element approval

    in our organization
    when ever the parent campaign is approved the campaign elements are also approved
    the campaign elements can also be approved manually
    Is there any field in the database to determine how the campaign element is approved?
    where approved manually or approved as a result of the approval of parent campaign.
    Thanks in advance

    I don't know, but why don't you search in the Business Workflow Explorer (transaction code SWDM)? By specifying the application component you will see what is available.

  • Updating offercode(priority code) in campaign element

    Hello,
    My requirement is to create Campagins and Campaign Elements from flat file through BAPIS.
    I have used BAPI  MKT_ELEMENT_CREATE to create that.
    But in the attributes(IM_ATTRIBUTES) we dont  have the offercode or the priority code field to  be updated to campaign element.
    Can anyone please suggest how to update the offercode to campaign element.......
    Thanks
    kranthi

    We can add fields , Hide fields add onther Tab by using SPRO configuration.
    CRM - Marketing - Marketing Planner and Campaign Management - Additional Fields and Business Add-Ins (BAdIs) for Marketing -Define Additional Fields: Set Types
    the fields are in a new separate tab will be added into a addition tab.
    Regards,
    Siva

Maybe you are looking for