BAPI :  Marketting Attribute upload 'CRM_MKTBP_ASSIGN_ATTRIBUT_TAB'

Hi,
I am trying to upload with prospects and marketting attribute simultanously at that only prospects are uploading but marketting attribute are not uploading.
this is the error we got : an entry with the same value alredy exists for attribute
you cannot aasign more than one value to attribute
format art & abc is invalid for attribute value below my code please guide me.
constant : ls_att_set TYPE CRMT_MKTPROF_KEYS-PROFILE_TEMPLATE_ID VALUE 'GENERAL'.
wa_partner-partner = BAPI_BP1.
APPEND wa_partner TO iT_partner.
CLEAR wa_partner.
wa_attrib-atname = 'CODE'. "Marketing attr name
wa_attrib-atvalue = WA_FILE-PROF_CHARACT_VA. "Marketing attr value
APPEND wa_attrib TO it_attrib.
wa_attrib-atname = 'type'. "'type'."wa_file-char_desct. "Marketing attr name
wa_attrib-atvalue = WA_FILE-PROF_CHARACT_VA_2. "Marketing attr value
APPEND wa_attrib TO it_attrib.
CALL FUNCTION 'CRM_MKTBP_ASSIGN_ATTRIBUT_TAB'
EXPORTING
iv_attribute_set = ls_att_set
iv_commit = 'X'
iv_obtyp = 'BUT000'
TABLES
it_partner = it_partner
et_return = it_return3
it_attributes = it_attrib.
sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
please guide me.

Hi,
I uploaded bp prospects then now i am going to upload marketting attribuutes so here i am going to use code but i am not able to upload it's showing error i am not able to see in internal table also and how i can pass my bp id to this program.please advice me.just i am passing only 2 marketting attribute and bp id.please kindly check this code.
*& Report  YPROSPECT_UPLOAD_001_WA
REPORT  YPROSPECT_UPLOAD_001_WA.
DATA : BEGIN OF WA_FILE,
       PARTNER TYPE but000-PARTNER,
       PROF_CHARACT_VA TYPE CRMD_MKTTGGRP_PT-PROF_CHARACT_VA,
       PROF_CHARACT_VA_2 TYPE CRMD_MKTTGGRP_PT-PROF_CHARACT_VA,
      GUID   TYPE CRMT_MKTBP_PARTNER_TAB-PARTNER_GUID,
       END OF WA_FILE.
DATA : IT_FILE LIKE TABLE OF WA_FILE.
DATA : IT_RETURN3 LIKE TABLE OF BAPIRET2,
       WA_RETURN3 LIKE LINE OF IT_RETURN3.
DATA : BEGIN OF WA_PARTNER OCCURS 0.
       INCLUDE STRUCTURE BU_PARTNER.
DATA:END OF WA_PARTNER.
DATA : IT_PARTNER LIKE TABLE OF WA_PARTNER.
*data it_partner like BU_PARTNER. "BU_PARTNER.
DATA : BEGIN OF IT_ATTRIB OCCURS 0.
       INCLUDE STRUCTURE CRMT_MKTPROF_COMW.
DATA:END OF IT_ATTRIB.
*DATA : IT_ATTRIB LIKE TABLE OF WA_ATTRIB.
DATA : ls_att_set TYPE CRMT_MKTPROF_KEYS-PROFILE_TEMPLATE_ID VALUE 'GENERAL'.
DATA  : FP_FILE LIKE RLGRAP-FILENAME.
*& F4 HELP
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
  PROGRAM_NAME        = SYST-REPID
  DYNPRO_NUMBER       = SYST-DYNNR
  FIELD_NAME          = ' '
  STATIC              = ' '
  MASK                = ' '
  CHANGING
    FILE_NAME           = FP_FILE
EXCEPTIONS
  MASK_TOO_LONG       = 1
  OTHERS              = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*& GUI UPLOAD
DATA : L_FILE TYPE STRING.
L_FILE = FP_FILE.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    FILENAME                      = L_FILE
   FILETYPE                      = 'ASC'
   HAS_FIELD_SEPARATOR           = 'X'
  HEADER_LENGTH                 = 0
  READ_BY_LINE                  = 'X'
  DAT_MODE                      = ' '
  CODEPAGE                      = ' '
  IGNORE_CERR                   = ABAP_TRUE
  REPLACEMENT                   = '#'
  CHECK_BOM                     = ' '
  VIRUS_SCAN_PROFILE            =
  NO_AUTH_CHECK                 = ' '
IMPORTING
  FILELENGTH                    =
  HEADER                        =
  TABLES
    DATA_TAB                      = IT_FILE
EXCEPTIONS
   FILE_OPEN_ERROR               = 1
   FILE_READ_ERROR               = 2
   NO_BATCH                      = 3
   GUI_REFUSE_FILETRANSFER       = 4
   INVALID_TYPE                  = 5
   NO_AUTHORITY                  = 6
   UNKNOWN_ERROR                 = 7
   BAD_DATA_FORMAT               = 8
   HEADER_NOT_ALLOWED            = 9
   SEPARATOR_NOT_ALLOWED         = 10
   HEADER_TOO_LONG               = 11
   UNKNOWN_DP_ERROR              = 12
   ACCESS_DENIED                 = 13
   DP_OUT_OF_MEMORY              = 14
   DISK_FULL                     = 15
   DP_TIMEOUT                    = 16
   OTHERS                        = 17
To upload marketing attributes
       wa_partner-partner_guid = ."<BP guid>.
       wa_partner-partner = bapi_bp1."<BP ID>.
       APPEND wa_partner TO IT_partner.
       CLEAR wa_partner.
To upload marketing attributes
LOOP AT IT_FILE INTO WA_FILE.
       wa_partner-partner_guid = WA_FILE-GUID.
        it_partner-PARTNER = WA_FILE-PARTNER.
       APPEND wa_partner TO iT_partner.
       CLEAR wa_partner.
it_attrib-atname = 'ATR1'."'"wa_file-char_desct.  "Marketing attr name
  it_attrib-slwrt = WA_FILE-PROF_CHARACT_VA.  "Marketing attr value
  APPEND  it_attrib.
  it_attrib-atname = 'ATR2'.""wa_file-char_desct.  "Marketing attr name
  it_attrib-slwrt = WA_FILE-PROF_CHARACT_VA_2.  "Marketing attr value
  APPEND it_attrib.
CALL FUNCTION 'CRM_MKTBP_CHANGE_BP'
EXPORTING
iv_profile_template_id =  ls_att_set
iv_xdescr = ' '
iv_fcode = 'C'
iv_msa = 'X'
iv_commit = 'X'
iv_partner = IT_PARTNER
TABLES
it_imp_seltab = it_attrib[]
et_return = it_return3.
*CALL FUNCTION 'CRM_MKTBP_ASSIGN_ATTRIBUT_TAB'
*EXPORTING
*iv_attribute_set = ls_att_set
*iv_commit = 'X'
*iv_obtyp = 'BUT000'
*TABLES
*it_partner = it_partner
*et_return = it_return3
*it_attributes = it_attrib[].
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
       EXPORTING
         WAIT = 'X'.
ENDLOOP.
loop at it_return3 into wa_return3.
write : / 'ERROR MESSAGE BP ATTRIB ', wa_return3-message.
endloop.
Edited by: rose01 on Aug 22, 2010 1:47 PM

Similar Messages

  • Marketing Attribute Upload

    Hi Experts,
    Can you suggest how can we upload the Marketing attributes in bulk for Business partners. I had tried this using ELM, but its allows only upload data for each Attribute SET, My requirement is to upload more than one attribute set with their various attributes values.
    Please help .
    Regards
    Arun Kumar

    Hello Arun,
    All the BP's to which you want to assign the attribute set needs to be put in a target group. After that please use the report CRM_MKTBP_BPS_OF_TG_ASSIGN_ATT which will assign the attribute sets along with the attribute value.  I hope this helps.
    Regards,
    Manoj

  • BAPI to upload marketing attributes to BP

    Hi Gurus,
    I have a requirement in which I need to create a BP first and then add marketing attributes to it.Right now I am using FM CRM_MKTBP_CHANGE_BP .But the performance is very poor and it is taking a lot of time.Is there any standard BAPI
    which has better performance.
    Regards,
    Raghu.

    Hi Rahul,
    To add the marketing attributes you can go to transaction CRMD_PROF_TEMPL  and add attributes there.
    Following tables are also related to Marketing Attibutes.
    Tables for marketing attributes
    CABNT - Characteristic Descriptions
    KLAH - Attribute Set Name & ID(CLINT)
    INOB - Object ID,BP Number
    KSSK - Object ID, Attribute set ID
    CABN - Attribute ID , Attribute name
    CAWN – Attribute name, possible values
    AUSP - BP GUID, Attribute Name ,Value ,Object ID
    Award points if find helpful.
    Regards
    Aashish Garg

  • Default marketing attribute not assigned by BAPI.

    Hi,
    I have a requirement where I am creating Person type BPs in CRM from
    XApps. I am using the standard bapis for this purpose.
    In CRM, I have created a Marketing attribute set. I have made this
    marketing attribute set default for Person type BP.
    When I create a new person type BP in SAP GUI, this Marketing Attribute
    set is getting assigned to the BP.
    However , when I create a person BP using the
    BAPIs 'BAPI_BUPA_CREATE_FROM_DATA' and 'BAPI TRANSACTION COMMIT', the
    BP is created but the marketing attribute set is not getting assigned.
    I think the configuration should work in both the cases.Please let me know whether I am missing out something.
    Thanks,
    Samrat..

    Hi,
    i am trying to upload characteristics data for class using BAPI_OBJCL_CHANGE module. Now when people who knows this function module ,they must be knowing that we have 3 tables there for Char data,numeric data and currency data. Now when i upload the data from excel sheet in to SAP ,i put space in some of the cell with numeric data type but this function module put 0 in those characteristics instead of space.Now user want to see space there instead of 0. Is there any way around to have space rather than 0.
    i am updating the customer classification with the function module BAPI_OBJCL_CHANGE:
    call function 'BAPI_OBJCL_CHANGE'
    exporting
    objectkey = w_objkey
    objecttable = 'KNA1'
    classnum = w_classnum
    classtype = '011'
    keydate = sy-datum
    tables
    allocvaluesnumnew = i_ze_valnum
    allocvaluescharnew = i_ze_valchar
    allocvaluescurrnew = i_ze_valcurr
    return = i_return.
    call function 'BAPI_TRANSACTION_COMMIT'
    exporting
    wait = c_x.
    In addition, I am checking with ENQUEUE_EXKNA1/DEQUEUE_EXKNA1 whether or not the customer master is locked before executing the code above.
    Thanks&regards,
    Naresh

  • Uploading Marketing Attributes

    Hi Experts,
    We need to upload Marketing Attributes to the new system
    Component version   SAP CRM ABAP 6.0.
    Please suggest the ways to do the same. BAPI's / Upload FMs./ LSMW etc??.
    Thanks.

    Hi,
    I have looked into your query.
    Kindly check the notes 609236 and 1081545.
    After implementing the notes, you can use Idoc CRMXIF_PARTNER_SAVE via LSMW and you can import the marketing attributes into the CRM system.
    In LSMW, there is a process called Idoc Input method by which you can be able to import the marketing attributes into the system.
    I hope this helps.
    Regards,
    Venkat

  • Data upload for Marketing Attributes.

    Hi experts,
    We have a requirement to create Marketing Attributes for Business partners. In our current roll-in the number of records are expected to be about 1000000 records. (1 Million). For the pilot roll-in we had about 300000 records and we wrote a custom program and used the FM CRM_MKTBP_ASSIGN_ATTRIBUT_TAB to update the records. Now that the data quantity is almost tripled, is there any different approach to load this?
    We are now going to upgrade to CRM 7.0.
    In the prev version the standard IDOC that we use to load BP does not contain any segment structure for Marketing attributes. Hence we would like to know how to approach such a huge volume? If it is through IDOCS we felt we can go for parallel processing, but I have not done it before. so my questions are:
    1.Is there a standard IDOC in 7.0 version to load Marketing Attributes?
    2.If yes, does parallel processing improve the performance of the data load?
    3.If there is no standard IDOC then what will be the best approach for this data volume?
    4.Should we still continue to use CRM_MKTBP_ASSIGN_ATTRIBUT_TAB?
    Eagerly looking forward to your answers. Thanks in advance.
    Regards
    Balaji

    Hi,
    Thanks for the Reply, Could you provide details about the external List management with the document if any, in order to proceed further.
    Thanks in advance
    Regards
    Balaji.A

  • How to upload marketing attribute to a BP

    hi,
    i am having nearly 5 million BP and i want to assign a marketing attribute to each BP with a different Value. I tried this one with the LSMW but i couldn't succeed. Can any one Suggest me how to upload?

    Hi Prabhakar,
    Try to use the FM "CRM_IC_SCRIPTING_MKTBP_CHANGE" which will internally call the FM "CRM_MKTBP_CHANGE_BP".  This should help.
    <b>Reward points if it helps!!</b>
    Best regards,
    Vikash.

  • Upload Marketing Attributes

    Hi,
    Just had a quick question I was hoping I could get some help with:
    Can you upload Marketing Attributes into CRM using External List Management?
    Any help would be greatly appreciated.
    <b>Points Awarded for helpful answers.</b>
    Regards,
        Philip Johannesen

    Hi Rahul,
    To add the marketing attributes you can go to transaction CRMD_PROF_TEMPL  and add attributes there.
    Following tables are also related to Marketing Attibutes.
    Tables for marketing attributes
    CABNT - Characteristic Descriptions
    KLAH - Attribute Set Name & ID(CLINT)
    INOB - Object ID,BP Number
    KSSK - Object ID, Attribute set ID
    CABN - Attribute ID , Attribute name
    CAWN – Attribute name, possible values
    AUSP - BP GUID, Attribute Name ,Value ,Object ID
    Award points if find helpful.
    Regards
    Aashish Garg

  • Bdoc Creation once Marketting Attribute is Uploaded through ELM

    Hi,
    I had uploaded Marketting attribute against the BP through ELM process but it is not getting display in Mobile Client i found that there is no Bdoc is created once Marketing attribute are updated against the BP.
    Can any one please guide me  over this Bdoc generation.
    With Regard's
    Ankush Rai

    Hi Ankush,
    You will need to ensure that all customizing is also subscribed to the MSA clients.
    Customizing Publications:
    1  Customizing Objects
    2  Customizing Objects II
    3  Customizing Objects III
    4  Customizing Objects (Mobile Client specific)
    5  Customizing Mobile Client specific from R/3
    6  Business Transaction Customizing
    7  Classification - for getting the Customizing for marketing
       Attribute Sets/Attributes/Values
    Then check if the data is now in the IDES and/Or CDB.
    Refer to the SAP notes  591186 and 591183
    First, an initial download is required in order to distribute the
    data from CRM Online to the clients. The corresponding tables in the CDB
    must be empty
    Tables: SMOCABN, SMOCABNT, SMOCAWN, SMOCAWNT, SMOKLAH, SMOKLAT,
    SMOKSML, SMOSWOR, SMOKSSK, SMOAUSPH, SMOAUSP.
    You must also use the Admin console to 'de-assign' the following
    subscriptions:
    Classification, Marketing profiles values by Business Partners,
    Marketing profiles values by Contacts, Marketing Profiles by Business
    Partners, Marketing Profiles by Contacts
    Then download the following business objects in the specified sequence
        1. DNL_CHAR
        2. DNL_PFTPL
        3. DNL_MKTPROF
        4. DNL_CHARVAL
    Regards,
    Gervase

  • Error in Marketing Attribute Update

    HI All,
    I need to update the Marketing attribute of the BP. For this i tried using below mentioned FM
    1. CRM_MKTBP_ASSIGN_ATTRIBUT
    2. CRM_MKTBP_CHANGE_BP
    Now i am facing a strange issue here. My code is able to update BP half of the time and half of the time Not at all.
    Doesn't return any error OR warning, but not working.
    Is there any thing else which i can try Or any limitation on Marketing attribute, I simply have no idea how to resolve this.
    Any help is deeply appreciated.
    Dave

    HI Prerna,
    Thanks a lot for the reply...
    I tried your approach, but still not able to resolve it.
    I am not getting any error in the return table. It shows success. But when i go to BP transaction and then to Marketing attribute tab, i don't see any Attribute Set assigned to BP.
    When i go to Edit Mode and manually assign attribute set, It shows me the values passed by me, but even there also if i save BP, Attribute set is not getting saved.
    I am thinking it might be a bug, did any body else has faced similar problem with Marketing attributes?
    If yes, what is the Solution for this and did you raised any OSS?
    FYI, We are working on CRM 7 Ehp1.
    I am able to find One Error. When my program is calling FM CRM_MKTBP_ASSIGN_ATTRIBUT_TAB. It is raising an exception.
    Exception is 'CX_SY_OPEN_SQL_DB'. In the FM at line 340 there is a statement:
        INSERT ausp FROM TABLE lt_i_ausp.
    This is the place where exception is raised.
    I am looking for a Note for this, but if some body has any idea on this, Please share.
    Dave
    Edited by: Dave on Sep 19, 2011 12:28 PM

  • Populating CRM marketing attributes using the APD

    Hi Experts
    We are having problems with populating CRM marketing attributes using the APD. When we run our process we get the error message:
    CRMBW_ATTR_WRITE005: Error when processing function module CRMBW_UPDATE_BPMKT_5. Message no. RSAN_MDL024
    As you can see, we are using the new function module CRMBW_UPDATE_BPMKT_5 since the old CRMBW_UPDATE_BPMKT did not work either.
    Do we have to add a reference to a infoobject in transaction CRMBWTARGETS? We have not done this because the marketing attribute in CRM doesn’t have decimals and all the objects in BI have. Could this be the cause of the error?
    Kind regards
    Erik

    Hi Ramesh,
    Thanks for quick reply.
    I have already followed the procedure you have described. Since there is not common objects between ODS and Bpatner infoobject, i am not able to do mapping.
    for eg. my ZBPARTNER infoobject has attributes like zfooty, ztennis and zrugby but my ODS has char name , char value, counter for multiple values infoobjects.
    I am following the example in the demo content to work out the process but could not understand how the data is getting uploaded from ODS to Business partner.
    http://help.sap.com/saphelp_nw70/helpdata/en/bf/5df63bf9deaf09e10000000a114084/frameset.htm
    Thanks,
    Sandeep Jogde

  • Mass creation of Marketing attributes under attribute set

    Hi All,
    Please let me know if there is a possibility for mass creation of Marketing attributes and marketing attribute sets in SAP CRM Standard functionality.
    I am not talking about below " creation & assignment to BPs using the expert tools. "
    CRMD_PROF_CHAR  Create/Change Marketing attribute/set
    CRMD_MKTDS           Create datasource/attributre list
    Create marketing attribute and maintain in Business Partner.
    CRMD_MKT_TOOLS  you can use this to delete/assign mass marketing attributes to BP.
    we can go for a BDC program, But I want to keep that as a last option.
    Please help and suggest me if there is any standard way of creating or uploading the Mass Marketings attributes in CRM system.
    Regards,
    karthik J

    This functionality can be achieved through ELM (External list management)

  • Marketing attributes creation/update from ELM

    Hi Experts.
    A small question regarding the external list management.
    I have created a mapping format with some marketing attributes I want to create/update for a certain business partner. This works fine in the sense that the system is fully capable of updating if there already exist a marketing attribute of the same type for the BP, and create if there is none already.
    Also, if the marketing attribute I try to upload allows multiple value, the system is clever enough just to add an additional and not overwrite the existing. So, this part is fine:-)
    The issue arises when I want use the mapping format for marketing attributes and leave some columns blank (= I have a standard format I use, but for some BP's, I do not want to upload all marketing attributes, only some in the format). When I try to upload this, I get an error message saying the the value blank is not allowed for a certain marketing attribute. This is true, but I find it rather stupid if the system cannot simply ignore the blank entries in a file, since I would then need to create a new mapping format for every single BP!
    Does anyone know how to fix this?
    I can see that it is possible to add code for every single field in the mapping format, so I was thinking to write a small piece of code that the system should ignore the values that are blank. Have anyone tried this?
    Thanks and Regards, Mia

    Indeed this is something we encountered as well.
    Possible work around (we implemented like this, you can't leave ELM file field blank but upload fake value) is creating a fake value for your attribute (for example:  " not yet maintained", "to be filled in").  In that way a BP is made with attribute but with no "real" value...  to your business to deside if this is an acceptable way of working!
    Kind regards,
    Francis
    Edited by: FDEV on May 28, 2008 11:35 AM

  • Marketing attributes for a business partner

    Hi,
    how can I input marketing attributes for a business partner with a BAPI?
    Or can I use BATCH-INPUT (the transactions is "BP")?
    Thanks and best regards.

    Hi JoJo,
    I don't know about LSMW. But I have done something similar in a program by calling the following function module in a loop for each of the business partner:
    CALL FUNCTION 'CRM_MKTBP_CHANGE_BP'
          EXPORTING
            IV_PROFILE_TEMPLATE_ID = lv_attribute
            IV_PARTNER             = lv_partner
          TABLES
            IT_IMP_SELTAB          = lt_attr
            ET_RETURN              = et_return.
    Here you can provide the attribute set in lv_attribute
    and business partner in lv_partner. lt_attr contains all the attributes (name and value).
    Example:
        ls_attr-atname = 'Z_CUST_TEAM_ASSGN'.
        ls_attr-atwrt = 'Test Team'.
        APPEND ls_attr to lt_attr.
    Hope this helps.
    Regards,
    Chandrika

  • URGENT: How to remove the assignment of marketing attributes for an BP

    Hi Guys,
    In my project we are maintaining two marketing attributes for all the business partners.
    But there is a need now based on some condition we want to remove one of the assignment for the BP (I.e which ever BP matching certain condition written in my BP upload program)..
    I dont want to remove this manually using the transaction codes or the segment builder
    Is there any function module to remove the assignment of the marketing attribute for the BP which i can use in my upload program
    Would appreciate an early reply since it is very urgent...
    Regards,
    Sundar

    Hi Sundar,
    Most Easier approach is to code a BDC based on trasaction : CRMD_PROF_BP. in the search field pass BP ID, you will get the BP attributes and you can delete it their and then.
    Save.
    Data is back in Database.
    All will happen in BDC in background.
    Else you can use
    FM 'CRMT_MKTBP_WRK' to delete the assignments.
    This is the basic FM called to delete marketing attributes assignment.
    Best Regards,
    Pratik Patel
    <b>Reward with Points!</b>

Maybe you are looking for

  • HT204053 How can I print from my iPad ?

    I've tried different apps and i still can't get it to work please help me

  • AMFPHP and AS3FLEXDB - how to disable 'busy indicator' during query execution ?

    I'm doing some experiments with Flex and SQL with use of as3flexdb and AMFPHP. I've written some application which is pushing some data to SQL base... problem is, that durring query execution, there is some 'busy indicator' on the screen - some circl

  • V$lock, sys.obj$ very slow

    Hello, I need to fetch wait time by object and that is why the query below. The problem: it takes forever :( any suggestions? select vlock.ctime, vdb.name,sysdate from v$lock vlock, sys.obj$ vdb where block = 1 and type = 'TM' and id1 = vdb.obj# orde

  • Trigger need to be create...........

    Hi All, I got a new requirement- As I have to generate a new trigger when business rule executed. Mean when business rule is executed a trigger file need to be generate in a specified location Depending on that trigger I have to execute two scripts i

  • How to access T100 messages

    Hi @all, does anyone can tell me where I can find T100 messages? (table, report, etc) They are related to entries within Syslog. Thanks & regards, Falk Message was edited by:         Falk Ostermann