Campaign Details from Target Group

Hi All,
I have a requirement, in which from the GUID of the Target Group, i need to fetch the details of the Campaigns in which it is assigned (There will be multiple assignement).
I found two Tables for this:
1. CRMD_MKTPL_TGGRP : Field: TARGETGRP_GUID
2. CRMD_MKTTG_TG_H : Fields: SET_H_GUID, SET_GUID, PROF_GUID
My logic was to join these table for getting the Campaign for each Target Group, but unfortunately i didnt find any common data in between the field TARGETGRP_GUID of CRMD_MKTPL_TGGRP and above stated 3 fields of the CRMD_MKTTG_TG_H.
is there any FM available for getting the Campaign details from the Target Group?
Please share your comments.
Regards
Dave

Hi Dave,
Did you try to use the dynamic query SEGTgAdvQuery?
this is a Dynamic query that searches for Target Groups. The result BOL Object contains a relation SEGTgTgCampaignRel that contains all Marketing Campaigns for that Target Group.
here is how you could call the dynamic query.
data:         lr_query_service          TYPE REF TO cl_crm_bol_dquery_service,
        lr_selection_param        TYPE REF TO if_bol_selection_param,
        lr_selection_param_buil   TYPE REF TO if_bol_selection_param,
        lr_tg              TYPE REF TO cl_crm_bol_entity,
        lr_mkt           TYPE REF TO if_bol_entity_col,
        lr_query_result           TYPE REF TO if_bol_entity_col,
      lr_query_service = cl_crm_bol_dquery_service=>get_instance( 'SEGTgAdvQuery' ).
      IF lr_query_service IS BOUND.
        CALL METHOD lr_query_service->insert_selection_param
          EXPORTING
            iv_index           = 1
            iv_attr_name       = 'ID'
            iv_sign            = 'I'
            iv_option          = 'EQ'
            iv_low             = '12345'      "This is your Target Group ID
          RECEIVING
            rv_selection_param = lr_selection_param_buil.
        lr_query_result = lr_query_service->get_query_result( ).
        lr_tg ?= lr_query_result->if_bol_bo_col~get_first( ) .
        IF lr_tg IS NOT INITIAL.
          lr_mkt ?= lr_tg->get_related_entities( 'SEGTgTgCampaignRel' ).
NOW YOU HAVE THE LIST OF MKT CAMPAIGNS...
        ENDIF.
     ENDIF.
hope this helps.
Kind regards,
Micha

Similar Messages

  • Issues exporting file from Target group

    Hi Experts,
    Can someone let me know the process for exporting file from Target group, I am working on CRM 7.0 .
    or give me the SNOTE to implement the same.
    Thanks
    Leela

    Hi,
    for small Target Groups (i.e. Target Groups that can be displayed completely on the UI, < 10k members) you can export them via the export to spreadsheet button on the header of the Target Group item page (right side). Note that only the members that are shown in the table on the UI are exported. For bigger Target Groups, you can only export them to the application server. To do this, you will have to press the "Export to File" button on the header of the Target Group page. this will schedule a job which exports your Target Group to the application server. You can download it from there using report CRM_MKTTG_FEXP_SHOW_FILE.
    Hope this helps
    --klaus

  • How manage unsubscribers from Target Groups created in Graphical Modeler

    We have a communications database which I've created in Graphical Modeler. I have used a SMB filter and then subtract a 'Do not Contact' filter.
    How can I manage those contacts who do not want to receive these email campaigns? In general: how can we manage unsubscribes when creating Target Groups in GM?
    Best,
    Siegbert

    HI
        in gui u have to create target group in tcode crmd_mktseg  create profile  create target group and copy attribute list of existingif needed create filters  and go for web ui create profile set and go for graphical modler and take ur attribute list and drag and drop u can split or rejoin merge target groups i think it is use full
                                                                                    abhinav

  • Creation of Campaign Id and assign Target Group to it.

    Hi all,
    I am facing a problem in creating a Campaign Id. This is the first time i am working on CRM Marketing Campaign, and i dont know the process of creating a Campaign id for a Target Group created for BP's. Please do help me in providing me any program or link where i can find the sample programs for creation of campaign id, Campaign Element, Profile Set, Target Group, Assigning BP's to Target Group.. I am presently using the below mentioned function modules/BAPI's for creation of Profile Set, Target Group etc.,
    For Profile Set Creation:                                         BAPI_PROFILESET_CREATE
    For Target Group Creation:                                    BAPI_TARGETGROUP_CREATE
    For Assigning Target Group to Campaign:             MKTPL_TGGR_ASSIGN_CREATE
    for Campaign Element:                                            MKT_ELEMENT_CREATE
    Please provide me complete program to explain the above.
    Thanks in Advance,
    Nagesh Thanneeru.

    hi,
    Target group is a group of BP, like a BP list.  It's a kind of master data which can be used in business transaction.
    And profile set is a base of target group, just like Product Hierachy and Product category.  Each target group should belong to a profile set. So create the profile set, before you create target group.
    Campaign is a kind of Marketing element of CRM Marketing.  In campaign, it need the BP or BP group or Target Group as its campaign objectives. Just like Customer of Sales Order, Vendor of Purchase order.
    Campaign can be assigned several target groups or BP or BP groups in it.
    So if you want to create campaign and assign target group to it, the steps is:
    1.  create a profile set  by BAPI_PROFILESET_CREATE
    2. create target group by BAPI_TARGETGROUP_CREATE, in this calling, you will use the profile set created before.
    3. create campaign by MKT_ELEMENT_CREATE
    4. assign the target group to your campaign, by MKTPL_TGGR_ASSIGN_CREATEl, the target group comes from step 2, the campaign comes from step 3

  • How to generate Campaign details in XML format for sending to downstream sy

    Dear gurus,
    we have a requirement to send the Campaign details from CRM to some Downstream system in the XML format through PI interfaces. We want to include the following campaign details in the structure.
    <SAPTOAL DATE="03-MAR-2011" TIME="13:25pm">
          <CAMPAIGN>
                <ID></ID>
                <NAME></NAME>
                <RUNDATE></RUNDATE>
                <RUNTIME></RUNTIME>
                <STARTDATE></STARTDATE>
                <ENDDATE></ENDDATE>
                <RECORDCOUNT></RECORDCOUNT>
          </CAMPAIGN>
          <TARGETGROUP>
                <ID></ID>
                <NAME></NAME>
    </TARGETGROUP>
          <BUSINESSPARTNERS>
                <BUSINESSPARTNER>
                      <ID>001</ID>
                <TARGETGROUPID></TARGETGROUPID>
                <FIRSTNAME></FIRSTNAME>
                      <LASTNAME></LASTNAME>
                      <TITLE></TITLE>
                      <SUFFIX></SUFFIX>
                      <EMAIL></EMAIL>
                      <REPFIRSTNAME></REPFIRSTNAME>
                      <REPLASTNAME></REPLASTNAME>
                      <REPPHONE></REPPHONE>
                      <REPSIGNATUREURL></REPSIGNATUREURL>
                      <REPPICTUREURL></REPPICTUREURL>
                      <REPEMAIL></REPEMAIL>
                </BUSINESSPARTNER>
                <BUSINESSPARTNER>
                      <ID>002</ID>
                <TARGETGROUPID></TARGETGROUPID>
                      <FIRSTNAME></FIRSTNAME>
                      <LASTNAME></LASTNAME>
                      <TITLE></TITLE>
                      <SUFFIX></SUFFIX>
                      <EMAIL></EMAIL>
                      <REPFIRSTNAME></REPFIRSTNAME>
                      <REPLASTNAME></REPLASTNAME>
                      <REPPHONE></REPPHONE>
                      <REPSIGNATUREURL></REPSIGNATUREURL>
                      <REPPICTUREURL></REPPICTUREURL>
                      <REPEMAIL></REPEMAIL>
                </BUSINESSPARTNER>
          </BUSINESSPARTNERS>
    </SAPTOAL>
    We have already tried the following things in SPRO.
    CRM --> Marketing --> Marketing Planning and Campaign Management --> Campaign Execution --> Define File Export Variants
    But with this we were not able to get the full XML structure, as required above. We got only this much.
    <?xml version="1.0" encoding="utf-8" ?>
    <DATA>
    <ITEM>
       <Field_1>Test Email.</Field_1>
       <Field_2>Test Email.</Field_2>
       <Field_3>ABC Company.</Field_31>
    </ITEM>
    </DATA>
    Any pointers or help on this will he greatly appreciated.rgrds,
    Randhir Soni

    Hi Prabhu,
    The program SAPFPAYM generates the payment Medium  on the basis of your configuration and background settings, this program does not bydefault give the output in the XML.
    Varient creation for the PMW in T. Code OBPM4, use the same program, which i already done it, even without this it is not be possible to create any payment Medium.
    Regards,
    Rony

  • Wrong target group is executed

    Hi all,
    In the PCUI we have a campaign with 2 target groups under the 'Segments' tab. When we select the first and then press the 'Target Group to Channel' button, in the job log we can see the second target group was executed and not the first. The transfer status of the target groups shows the status we expect (1: Job Ended Without Errors and 2: Job not scheduled) so we could only see something was wrong looking into the job log.
    This happened only twice as we know but we would like to know how this can happen and how this can be prevented. Does anyone has an idea how to solve and clarify our issue?
    Kind regards,
    RS

    Hai,
    I think it is easy to create a target group using CRMD_MKTSEG. Target Group is every time linked with a Campaign. using attributes u create profile sets and using filter values of attributes u create target groups.
    You can check the following link.
    http://help.sap.com/saphelp_crm40sr1/helpdata/en/db/58963eac416f01e10000000a114084/frameset.htm

  • Delete target groups from campaign

    Hi,
    We are using crm 5.0 and want to archive target groups, but before they are archived we need to delete the target group from the campaign where is it used. Does anyone of you know about a program for this?
    Thanks, Camilla

    Hi Camilla,
    I guess you need to follow the Standard SAP Archiving procedure:
    First the Campaign needs to be set to Status: Finished or Rejected.
    Under the TG properties set the status of the TG as to be archived.
    Check the residence time for archiving.
    To have more detailed information on this please kindly check the link below:
    http://help.sap.com/saphelp_crm50/helpdata/en/09/72f63ad65c3b5ce10000000a11402f/frameset.htm
    Programs available for Segment Builder archiving are as follows:
    The following programs are available for the archiving object CRM_MKTSET:
    ·        CRM_MKTTG_SET_WRITE_ARC (write)
    ·        CRM_MKTTG_SET_DELETE_ARC (delete)
    ·        CRM_MKTTG_SET_LOAD_ARC (read)
    The following programs are available for the archiving object CRM_MKTTG:
    ·        CRM_MKTTG_TG_WRITE_ARC (write)
    ·        CRM_MKTT_TG_DELETE_ARC (delete)
    Hope this helps,
    Regards,
    Naveen

  • Custom Attributes in Target Group Email Campaign Not Refreshed

    We have a campaign sending emails to a target group of BPs.  To fill our custom attributes with values  we have implemented our code in badi CRM_IM_ADD_DATA_BADI method CRM_IM_BPSELE.  We tested our code using the Test Send feature from the email form and all worked fine.
    But when we ran the campaign in the background for a Target Group with multiple BPs it would not work correctly, our attribute values were incorrect. 
    We discovered while debugging the job, that the badi gets run once for each BP, but the attribute values from the previous BP do NOT get refreshed.  In fact there are 2 entire sets of attribute records in the CT_ATT_VALUES table parameter.  Each time through it multiplies by another set of our attributes.
    I have put code in the badi as a workaround that deletes the previously filled attributes for the previous BP, but I'd like to figure out what is causing this problem.
    Any help would be appreciated.
    thanks,
    Lee

    Hi Lee,
    Is this issue resolved for you now??
    I am facing the similar problem.
    Though the BADi is not used for these two mails (it is used in some other mail forms), it is actually called in 'CRM_ERMS_MAIL_COMPOSE' Function Module and the process is same as u said. There are 2 sets of values.
    I am using a Mail Alert functionality where in a 'Mail Alert ON' is sent to field engineers (FE) and then upon FE accepting the work we will send a 'Mail Alert OFF' to FEs.
    Problem is, we get one or two fields data incorrectly sometimes. I am not able to find out the root cause yet.
    Please let me know if you have had any resolution to this!
    Thanks in advance.
    Chaitanya

  • Where to see activities, which are created for the campaign with target group

    Hi
    I have created a Communication Method in SPRO -> CRM -> Marketing -> Marketing Planning & Campaign Management -> Campaign Executtion - Define Communication Method : Activity has been configured
    Activities are not appearing after creation of campaign with target group.
    Where to see activities, which are created for the campaign with target group?
    Regards
    Hamid

    Hello,
    alternatively to check  table CRMD_ORDERADM_H directly you can use the related transactions search for the campaign:
    This should bring all activities generated by the campaign. If this is empty first check the job log of the campaign execution job again:
    This gives information if any target group members have business transactions created. If the log does not contain the required information you can debug from SM37. The business transactions (activities, leads, sales orders) are generated from function module CRM_MKTTGGRP_PROC_CREATE.
    best regards,
    Johannes

  • Campaigns and Target Groups

    I'm trying to extract information about target groups and related campaigns to BW from CRM. I was initally looking at 0CRM_TGBPCT but this was extracting only one record and I found an associated OSS note (No 717539) to it recommending the use of another datasource called 0CRM_CONTACT_OUT. I tried using this datasource but when I test it even in CRM (RSA3) it says 0 records. I know data is in there though.
    Would someone be able to shed some light on this and be able to give me any tips on the same.
    Thanks !!!!

    Hi to all,
    I've the same problem when load data with datasource 0CRM_TGBPCT.
    If I extract from RSA3 retrive the correct data but if I extract directly from BW the system load only 1 record!!!
    please anyone help me?
    P.S.: The remote user for the connection have already SAPALL authorization!

  • Printing letters to customers of marketing target group or campaign

    Hello everyone,
    We have a need to print letters to customers from a marketing target group or campaign.  (SAP CRM 7)
    The problem is that we can only see an option in application to send a Mail/SMS/Fax to the customer (with an already prepared mail form), but we just can't find a letter/print channel option.
    Can it be that this basic option does not exist in the application ?
    If it does not exist u2013 How can we send letters to the customers from a target group/campaign ?
    We'll appreciate any help,
    Best Regards,
    Nitzan.

    Hi,
    I don't know if you found an answer already to your question but we had a similar issue.
    In CRM 7.0 direct mailing is no longer supported. 
    The only solution is to either develop a specific enhancement based on mail forms (find a good CRM developper) or alternatively generate a file that you would then send to an external mailing house.
    It seems that smaller customers try to do the mailing themselves but larger customers with higher volumes nearly allways use a mailing house.
    regards
    Tim

  • Error assigning Target Group to Campaign Element

    Hi
    I have created a Target group for a Campaign. I have saved and exported target group to channel and started the Campaign. But it shows error message saying No Target Groups are assigned to Campaign Element..
    Why is it showing error even after assigning members for the target group and exporting the TG to Channel. I have updated the status from created to released, approved before Starting the campaign.
    Please help.
    Thx.

    Hi Kalees
    Do you have a campaign element in your campaign? If so assign the target group to the campaign element in the segments assignment block.
    Cheers
    Declan

  • Automated campaign: Element only processing target groups

    Hello,
    I am using campaign templates to create automated campaigns. I tested all possibilities (setting a profile set to the campaign element, then setting a profile, and then a target group) and the execution only works with target groups. The worst part is that when the campaign is created he copies the target group from the profile set configured in the model to another profile set without name! That way is impossible to reuse it.
    Please advice
    Regards

    Hello,
    Thanks for your replies and sorry for not being clear.
    I have a campaign template that is configured as follows for automated campaign execution:
    The last screenshot is from the campaign element template, where the system only let me create a segment or target group and not reuse a profile group or target group, like in campaigns created without template.
    I tried to add the profile set outside the campaign automation view, but when I create a campaign from the template, the system creates a copy from that profile set.
    So the questions is:
    Is there a way to reuse profile groups/target groups when using Campaign templates like in normal campaigns (using the profile groups/target groups from the template, not copying them)?
    Thanks

  • Passing result list from Contact search to Target group

    Hi,
    I have to pass the result list of Contact serch(BP_CONT_SEARCH) to Target group creation component(SEGED_TG). Can you give me the steps that I need to follow.
    Note: Here the contact structure is different in each component.
    Thanks.

    Yes Srikanth, you need to bind context of result list to SEGED_TG using component controller binding. Let me know if you have questions.
    But the question is did you make a navigation from the contact search result to target group creation or is it a standard functionality ?
    As per my knowledge we can navigate from Profile set creation creation screen or from Trade Promotions.

  • Creation of Target group from Survey

    Hi to all...
    The scenario is...
         I need to send a survey to a Primary target group with certain attributes as options to them....
      Depending on their selection of answers in survey(questionaiire) a separate target group has to be automatically created....
       How can this be achieved..Is it a standard Functionallity...
    regards,
    sanjana

    There must be a hundred threads that deal with this subject already.
    http://help.sap.com/saphelp_crm60/helpdata/en/45/ff8980cbb709eee10000000a1553f6/frameset.htm
    /people/gregor.wolf3/blog/2006/07/22/create-run-and-analyze-an-e-mail-campaign-with-a-survey-part-1
    /people/gregor.wolf3/blog/2006/05/11/advanced-campaign-automation-in-mysap-crm-40-teaser

Maybe you are looking for

  • FSL-06002  Error 14001 This application has failed to start

    Hello Folks I have problem installing SAP R/3 Enterprise (4.72 Enterprise Ext2) IDES Version The installation is under Windows 2003 server SP2 and Oracle 920 I'm in the Database Instance Installation (non-unicode) and phase 29 (Updating database stat

  • Brand New Ipod Touch and already issues

    Alright, before I begin, I'm running 32bit Windows Vista Home Premium on an AMD Dual Core 1.9ghz processor with 2gb ram, as well I've had an iPod Nano before getting this iPod Touch without any problems before hand. I've uninstalled iTunes and reinst

  • Notebook pavilion dv2520ea RAM upgrade

    Can I upgrade the actual RAM (2x512MB PC2-5300 DDR2 667MHz 200 pin) using 2x1GB PC2-6400 DDR2 800MHz SO-DIMM 200 pin, and the notebook is able to really run this RAM at 800MHz? Thanks.

  • Move Finder on the Dock?

    How do I move it over one space? I want Firefox to be the first icon on the dock.

  • ITunes won't update songs!

    Okay so I'm in Germany right now, originally from Canada, and I have my Ipod from home. I have iTunes at home, and I downloaded it here as well, but everytime I try to update new songs from this library.. it says it's already linked to another iTunes