Assign BP to Target Groups

Hi,
Can anyone tell me how i could assign (Automaticlly) a business partner to an Attribute without having to do that by the transaction CRMD_PROF_BP.
The purpose is when i create my new bussiness partner i have the segmentation already done by the fields i fill.
For example if i fill the field 'Country' with a specific value, that partner will have the attribute corresponding to that value.
Thanks in advance,
Hugo.

Hugo,
   You can implement a BADI (BUPA_GENERAL_UPDATE) to assign the attribute set with the default value for the attribute. In this BADI you get partner guid.
In this BADI, You can check whether there is an assignment already for this partner with the function module CRM_MKTPFCHR_READ. You need to export iv_name_char which is the attribute name to this function module and you will get the assigned values in ET_CHARACTVALUEDESCR. You can check the ET_RETURN for errors if the attribute is not assigned already.
If the attribute is not assigned already, to assign the attribute set and attribute values, you can use the function module CRM_MKTBP_CHANGE_BP. You need to export the partner GUID, profile_template_id which the attribute set id, fcode 'B' to create the assignment and the attribute list with values in the table it_imp_seltab (with atname and atwrt field filled with attribute name and attribute value correspondingly).
Prakash
Reward points if this helps.

Similar Messages

  • Creation of empty target group---URGENT!!!!!!!

    Hi...
       I have a scenario in campaign automation where i need to create a target group automatically when ever a  customer clicks on yes/no in the survey.
          I hope there is a standard workflow which creates target grooup.but do we need to have an empty target group so that who ever cliks on yes/no can form a target group.?
       When ever a Target group is created,i need to create LEAD automatically from it.How do i achieve this?is there a workflow or BADI? and if at all leads are created automatcally,how are they automatically assigned to Lead qualifier??
    Regards,
    Sanjana

    hi sanjana
    its easy as you just assign a new target group to existing or new profile set and do not assign any BP tp that target group
    this way you have empty target group at your discretion.
    best regards
    ashish

  • 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

  • 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

  • Assign Target group to Campaign

    Hi,
    What  is the FM to assign target group to marketing campaign?
    Thanks a lot

    Hi Raja/Kiryl,
    I am trying to assign target group to a campaign using this FM MKTPL_TGGR_ASSIGN_CREATE. But its not working for me.
    It seems I am not passing the right parameters. Could you please help me to know which paramters we need to pass to this function to assign the target group.
    It would be great if you provide the info about how to get the relavent data for this function module.
    Thanks in advance.
    Regards,
    Kumar.

  • Creation of Target group.

    Hi All,
    I having one urgent requirement, we have maintained the Ztable for maintaning the information of Vehicles against Business partners.
    The Fields in the said Ztables are Vehicle type, vehicle Reg Number and BP number.
    I want to send the mails using target group to customer who is having Perticular vehicle type for that i have created Infoset using the Ztable, then i have created the data source for target group still i m not getting the desired result !!!!!!
    please anybody tell me that i  missing any of step for above requirement ???
    how to link up the BP to Ztables fields ???
    How to create the said Target group ???   
    Regards,
    Dipesh

    Hi,
    You can try this alternative solution:-
    Instead of maintaining vehicle type etc in Z table, please crate it as "attribute", and assign it to Business Partners.
    You can use CRMD_PROF_BP transaction to assign Attributes to Business partners.
    Based on the attributes , you can subsequently create the "target group".
    Regards,
    PD
    Pl. Reward points if it helps !!

  • Creating a target group based on the BP email address only in CRM

    Hi there,
    I am currently trying to create a target group based on the business partner email address only.
    I have a list of over 1000 email addresses - these email addresses equate to a BP in our CRM system, however I do not have a list of the equivalent business partner numbers, all I have to work on are the email addresses.  With these 1000 BP email addresses I need to update the marketing attributes of each of these 1000 BP records in CRM.
    What I need is a method to find the 1000 BP numbers based on the email addresses and then use the marketing expert tool (tx. CRMD_MKT_TOOLS) to change the marketing attributes on all of the 1000 BPs.
    The issue I am having is how can I find the list of BP numbers just based on the BP email address, I tried creating an infoset based on table BUT000, BUT020 and ADR6 but I after creating attribute list & data source for this I am stuck on what to do next. In the attribute list the selection criteria does not allow me to import a file for the selection range.  I can only enter a value but I have 1000 email addresses and cannot possibly email them manually in the filter for the attribute list.   I also looked at imported a file into the target group but I do not have any BP numbers so this will not work.
    Does anyone know a method where I can create a target group based on the email addresses only without having to do any code?
    Any help would be most appreciated.
    Kind regard
    JoJo

    Hi JoJo ,
    The below report will return you BP GUID from emails that is stored in a single column .xls file and assign the BP to a target group.
    REPORT  zexcel.
    * G L O B A L D A T A D E C L A R A T I O N
    TYPE-POOLS : ole2.
    TYPES : BEGIN OF typ_xl_line,
    email TYPE ad_smtpadr,
    END OF typ_xl_line.
    TYPES : typ_xl_tab TYPE TABLE OF typ_xl_line.
    DATA : t_data TYPE typ_xl_tab,
           lt_bu_guid TYPE TABLE OF bu_partner_guid,
           ls_bu_guid TYPE  bu_partner_guid,
           lt_guids TYPE TABLE OF bapi1185_bp,
           ls_guids TYPE  bapi1185_bp,
           lt_return TYPE bapiret2_t.
    * S E L E C T I O N S C R E E N L A Y O U T
    PARAMETERS : p_xfile TYPE localfile,
                  p_tgguid TYPE bapi1185_key .
    * E V E N T - A T S E L E C T I O N S C R E E N
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_xfile.
       CALL FUNCTION 'WS_FILENAME_GET'
         IMPORTING
           filename         = p_xfile
         EXCEPTIONS
           inv_winsys       = 1
           no_batch         = 2
           selection_cancel = 3
           selection_error  = 4
           OTHERS           = 5.
       IF sy-subrc <> 0.
         CLEAR p_xfile.
       ENDIF.
    * E V E N T - S T A R T O F S E L E C T I O N
    START-OF-SELECTION.
    * Get data from Excel File
       PERFORM sub_import_from_excel USING p_xfile
       CHANGING t_data.
       SELECT but000~partner_guid FROM but000 INNER JOIN but020 ON
    but000~partner =
       but020~partner
         INNER JOIN adr6 ON but020~addrnumber = adr6~addrnumber INTO TABLE
    lt_bu_guid FOR ALL ENTRIES IN t_data WHERE adr6~smtp_addr =
    t_data-email.
       CLEAR: lt_guids,ls_guids.
       LOOP AT lt_bu_guid INTO ls_bu_guid.
         ls_guids-bupartnerguid = ls_bu_guid.
         APPEND ls_guids TO lt_guids.
       ENDLOOP.
       CALL FUNCTION 'BAPI_TARGETGROUP_ADD_BP'
         EXPORTING
           targetgroupguid = p_tgguid
         TABLES
           return          = lt_return
           businesspartner = lt_guids.
    *&      Form  SUB_IMPORT_FROM_EXCEL
    *       text
    *      -->U_FILE     text
    *      -->C_DATA     text
    FORM sub_import_from_excel USING u_file TYPE localfile
    CHANGING c_data TYPE typ_xl_tab.
       CONSTANTS : const_max_row TYPE sy-index VALUE '65536'.
       DATA : l_dummy TYPE typ_xl_line,
              cnt_cols TYPE i.
       DATA : h_excel TYPE ole2_object,
              h_wrkbk TYPE ole2_object,
              h_cell TYPE ole2_object.
       DATA : l_row TYPE sy-index,
              l_col TYPE sy-index,
              l_value TYPE string.
       FIELD-SYMBOLS : <fs_dummy> TYPE ANY.
    * Count the number of columns in the internal table.
       DO.
         ASSIGN COMPONENT sy-index OF STRUCTURE l_dummy TO <fs_dummy>.
         IF sy-subrc EQ 0.
           cnt_cols = sy-index.
         ELSE.
           EXIT.
         ENDIF.
       ENDDO.
    * Create Excel Application.
       CREATE OBJECT h_excel 'Excel.Application'.
       CHECK sy-subrc EQ 0.
    * Get the Workbook object.
       CALL METHOD OF h_excel 'Workbooks' = h_wrkbk.
       CHECK sy-subrc EQ 0.
    * Open the Workbook specified in the filepath.
       CALL METHOD OF h_wrkbk 'Open' EXPORTING #1 = u_file.
       CHECK sy-subrc EQ 0.
    * For all the rows - Max upto 65536.
       DO const_max_row TIMES.
         CLEAR l_dummy.
         l_row = l_row + 1.
    * For all columns in the Internal table.
         CLEAR l_col.
         DO cnt_cols TIMES.
           l_col = l_col + 1.
    * Get the corresponding Cell Object.
           CALL METHOD OF h_excel 'Cells' = h_cell
             EXPORTING #1 = l_row
             #2 = l_col.
           CHECK sy-subrc EQ 0.
    * Get the value of the Cell.
           CLEAR l_value.
           GET PROPERTY OF h_cell 'Value' = l_value.
           CHECK sy-subrc EQ 0.
    * Value Assigned ? pass to internal table.
           CHECK NOT l_value IS INITIAL.
           ASSIGN COMPONENT l_col OF STRUCTURE l_dummy TO <fs_dummy>.
           <fs_dummy> = l_value.
         ENDDO.
    * Check if we have the Work Area populated.
         IF NOT l_dummy IS INITIAL.
           APPEND l_dummy TO c_data.
         ELSE.
           EXIT.
         ENDIF.
       ENDDO.
    * Now Free all handles.
       FREE OBJECT h_cell.
       FREE OBJECT h_wrkbk.
       FREE OBJECT h_excel.
    ENDFORM. " SUB_IMPORT_FROM_EXCEL
    Just copy paste the code and run the report select any local xls file with emails and pass the target group guid.
    snap shot of excel file:
    Let me know if it was useful.

  • How to create/assigh Target Group while creating Marketing Plan in CRM 6.0

    Hi all,
    I am new to this field  and would like to know that how can we assign the Target Group ( business Partners ) in the Campaign while creating a Marketing plan.
    It will be really handy for me if I get the detail steps to execute.
    Regards,
    Zen

    Hi,
    perhaps this can help you:
    http://help.sap.com/saphelp_crm60/helpdata/en/32/ad6f422f91c153e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_crm60/helpdata/en/46/0abec5abb314dce10000000a155369/frameset.htm
    This describes step by step what you have to do to create a marketing plan / campaign.
    Regards,
    Claudia

  • Automatic Profile Set / Target Group Creation in SAP CRM

    Hi,
    Need some help on the listed process.
    Is there any procedure to create Profile Ser/Target group automatically based on certain criteria? We want to reduce the manual work of Profile/Target group creation for the users.
    We are currently using SAP CRM 5.0 and looking at options of creating Target Groups automatically based on infoset. The criteria used to model is below mentioned.
    - New Customers  & Head Office (They are the customer specific Z-fields in BP Master Data)
    - Relationship Data: Has contact person Relationship. This is based on the assignment of Contact person to the BP (i.e. Day when the Relationship assignment done to the respective BP Master Data --> under Relationship tab page.
    We are not using Attribute Set (that we assign to Marketing Attribute tab page of BP Master), for your information.
    Appreciate, if you could let us know whethe this is possible by Standard feature/ any work around on this.
    Kindly do the needful.
    Thanks,
    Rahul

    Hello Rahul,
    it is possible to create a target group from an external list as far as i am aware. Maybe have a look at
    http://help.sap.com/saphelp_crm50/helpdata/en/57/d7de42777c2978e10000000a155106/frameset.htm
    Regards
    Mark

  • Enhance output of Target Group opened in segment builder

    Hello Experts,
    We are implementing SAP CRM Lean Marketing using CRM 7.0. Our business requirement is to do segmentation based on Company attributes and Relationship Category. The output of the target group should enlist the persons related to the Company based on the relationship category selected while doing the segmentation.
    Using standard InfoSet CORM_MKTTG_BP_ORG_CDE and while creating data source selecting BUT000_PER-PARTNER_GUID in the field business partner, we are able to get the list of persons matching the segmentation query (based on the relationship category e.g. Has Supplier, Has Contact Person, etc) . But the issue is , the output of the target group (shown as an ALV grid , when the target group is opened in segment builder) only enlists matching Persons, it does not enlist the related company ID /name in front of the Person ID in the output of the target group. And this Company BP ID is not available if I try to modify the output layout. So business is unable to understand the Person enlisted in TG belongs to which Company. Can we enhance this ALV grid output of the target group displayed in segment builder ? if yes , how can it be achieved ? If this is possible and we are able to add related company BP ID/ name in front of every person enlisted in the target group then our issue gets resolved. Or is there any alternative solution to resolve this issue ?
    Highly appreciate your early response in order to resolve this critical issue.
    Thanks and Regards
    Ambar
    Edited by: AMBAR ADHAV on Sep 10, 2011 11:52 AM
    Edited by: AMBAR ADHAV on Sep 10, 2011 2:21 PM

    Naresh,
    Thanks for the response.
    As per your suggestion I made additions to my z Infoset , and added all the fields you suggested.
    While creating the data source I selected following fields
    Business Partner: BUT000_PER-PARTNER_GUID (as my requirement is to return Persons and this field works with only GUID)
    Reference Object: BUT051-RELNR
    Reference Object Type:  BUT051-RELTYP
    Now when I create the target group with this data source unfortunately I am still not getting the the relationship number when I click in Show assigned Objects in the target group screen of web UI.
    Please suggest where I am going wrong
    Thanks
    Ambar

  • Regeneration of Target Group

    Hi crmguys,
    We have the following case about the Target Group in CRM Marketing:
    Already Generate a Target Group in Segment Builder on x date
    A Campaign has been created and the Target Group has been assigned to this Campaign
    After that some changes has been done at the time of releasing the campaign,
    shall i have to regenerate the target group or not to get the exact target group accroding to attribute list
    thanks in advance
    Raj

    hi
    you said you already maintained the target group ,so when you release the campign its pretty simple,if you have maintained the target group using the same set of attributes which are there in your attribute list,then you need not create the target group again
    but if thats not the case then you need to regenerate the target group on the basis of attribute list,infosets or BW query,using whatever you want to do the segmentation.
    target group once assigned to the campaigns can be used again and again but on the basis of which target group are assigned is very crucial.this must be remembered every time we do segmentation.
    besides you can maintain a background job for scheduling the target group assignment to the BP too,so that once target group is generated it is assigned automatically for segmentation.
    best regards
    ashish

  • Deletion of target group

    Hi experts,
    We are unable to delete a targetgroup which is assigned to a campaign element of  a  campaign.
    The campaign scheduled with campaign automation for the execution.
    When we are trying to delete the target group from the campaign element the message displays as " target group has already been transfered to channel"
    Can anybody explain the procedure for the deletion of the target group which is already assigned to a campaign which is released to channel transfer.
    Regards,
    Madhu

    Hi madhu,
    Under easy access menu, follow the below path:
    Marketing -> Tools -> Expert Tools
    Under segment builder, you will have the option called "Deletion of Target groups".
    Click on that and mention the target group, which u want to delete and click on execute button.
    Hope this helps.
    Reward points if it is helpful.
    Thanks.
    Sindhu.

  • Creating Target group

    HI all,
    I am trying to create the target group in Segment builder, for which I have done the following settings
    1)I have maintained Attributes and attribute set,
    2)i have assigned attribute set to Business partner.
    3)I also have created Data source here i have maintained
    Origin type as attribute set
    maintained name of attribute set
    function module used Cross-selling: function module CRM_MKTPR_PP_CS_TG_READ,and description.
    4)Created attribute list as follows
    Description_______
    Category:Product proposal
    Segment type:Product Proposal and saved.
    Then assigned data source and highleted what ever attributes required to display in Segment builder.
    The issue here is:
    When i go to Segment builder(crmd_mktseg):
    in Segment builder when i tried to create profile set for product proposal the system is asking for Profile set description and Master group.
    and i am unable to drag and drop profile set onto staging area and create target group.
    can u/any one advice me in this regard/
    Thanks in advance.
    mdv.

    Hi mdv,
    For the purpose of creating your target group, the name of the profile set is of no importance. CRM just requires that you do create the target group within a profile set. That being said, when you create a profile set and system asks you for profile set description and master group, just put any words in the description field that is meaningful to you, and don't select anything in the master group.
    Once this is done, you will need to drag and drop your 'filter' that you created for your attribute list into the staging area. Then, one very important step (which I missed in the beginning and it took me 8 hours to figure out) is that you need to click on the 'Count' button. Once you see a number on the target group, it means the filter is working. From there you can create your target group and open it for list export.
    Hope this helps.
    Leon

  • Creating Target Group from External File

    Hello Experts
    We need to create target group from external file. (That is to say we will have let's say txt file containing BP that belongs to specific target group and we need to assign these BPs to to specific target group in SAP CRM)
    I have searched for it on sdn and found something benefical. I have found BAPI_TARGETGROUP_CREATE, I have checked it but I don't understand how should we use it becuase as far as we understand it just creates target group, we cannot see anything related with Business Partner. How can we relate BPs with the target group we create by this BAPI.
    What should we do, is anyone have previous experience about it? or is there a way to do it without using BAPI.
    thanks it advance
    M.
    Edited by: Mehmet Ergul on Jan 22, 2009 11:19 AM

    Hi,
    You can do this from within the standard Web UI. It's straight out of the box.
    Create a profile set and in there create a target group in the target group assignment block just by entering the description of the target group. Then enter edit mode of this target group and click the button "Import Members". Remeber to mark "Change selected target group" unless you want to create a new target group.
    /Anders

  • Transport Layers and Target Groups

    Hello,
    Can one transport layer be assigned to two different target groups?  We have some number range changes that are automatically trying to go to our FIX_QAX target group since it is config, however, the transport cannot be generated because the config is part of package KEG0 which is set up currently as part of the SAP layer which only handles the FIX_IND target group.  I was thinking of making the SAP layer go to both target groups FIX_QAX & FIX_IND.  Is there any danger of this?
    Thank you for your time,
    Erin Byrne

    i think we can't assing a transport layer to 2 different target groups. and, even connection b/n 2 target groups is not possible. i am not sure, if we can use the same transport layer (SAP) twice.
    the alternative way is.. manually (copy the data file and cofile in the other tranport domain) import the request.
    hope this info helps.
    regards,
    Rajesh.
    <i>pls, award points</i>

Maybe you are looking for

  • How to unlock my sprint iphone5 with the code provided

    I have this iphone5 given by a friend. Sprint has offered an unlocking code supposedly allows me to use it internationally. But i found nowhere to input such code, and the phone still doesn't recognize my chinese sim card. Could anyone help with this

  • Tax license by region

    Hello people! I really need your help in this one: we are going to implement SAP in a company settled in Canada. The users requested us that it is highly important to maintain Tax exemption certificate for GST (GST is "Goods and sales tax" -- not wit

  • Guest Account Bug Resets User Accounts and Deletes Files on Snow Leopard

    Hi Everyone Well basically, I hadn't used my Guest Account since upgrading to snow leopard, and I accidentaly clicked it instead of my user account this morning, to find that when I logged into my normal account ALL my files, settings, mail etc had b

  • How to batch paginate multiple pdf files consecutively?

    How to batch paginate multiple pdf files consecutively? Thanks.

  • Synchronized text issue from desktop to mobile site design

    Hello, I love the idea of synchronized text, but is there a way to assign different styles on both desktop and mobile site pages? For example, If I use synchronized text on my desktop pages, my font sizes will be larger then the font sizes I would us