FM CRM_MKTBP_CHANGE_BP

Hi!
I need to assign diferent markting atributes to BP en CRM. The information is external, so I need a Z program to assign it. We were using FM CRM_MKTBP_CHANGE_BP to do so, but in some cases the assignment does not work. There is no entry created in table AUSP although the attribute is visible in BP´s marketing attributes.
The answer from SAP OSS is ... FM CRM_MKTBP_CHANGE_BP is not
a released function module which indicates that the function module can
not be used independently in custom programs.
Somebody knows a released FM that could replace CRM_MKTBP_CHANGE_BP ??
or
Is there any change we can do in the program??
Best regards,
Cristina

Hi Cristina,
U can use the following piece of code for loading marketting attributes to the BP
CALL FUNCTION 'CRM_MKTBP_CHANGE_BP'
EXPORTING
iv_profile_template_id = lf_attribute
iv_xdescr = ' '
iv_fcode = 'C'
iv_msa = 'X'
iv_commit = 'X'
iv_partner = lf_contact_person
TABLES
it_imp_seltab = it_attribute
et_return = it_return.
here in iv_profile template_id u have to pass the attribute set of the marketting attributes and in the table it_imp_seltab I have passed ATNAME (Characteristic Name) and SLWRT (Characteristic Value).
I have checked this code and its working fine for us and the entries are maintained in the table AUSP.
Reagrds,
Mayank

Similar Messages

  • 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

  • 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

  • Tables for the marketing attributes

    Hi Experts
    I want to know in which table marketing attributes data are saved
    sri

    Sri,
    The easiest way to retrieve this data is the following:
    Use the function module CRM_MKTBP_READ_BP_DATA to get the values set for a particular business partner.  You will need to pass in the guid of the business partner and the name of profile set  The exporting parameters should be IV_BP_GUID and IV_PROFILE_TEMPLATE_ID respectively.
    You will then get a table returned called ET_ALLOCVALUES to retrieve those values.
    To get the "meta-data" of an attribute set you can call the function module CRM_MKTPFTPL_READ.  You will need to pass in the attribute set name and then you will receive the ET_ATTRIBUTES which contains the meta data for that attribute set.
    This method is a lot eaiser than trying to read the tables directly in system, which is a really not a good idea in CRM, as you should use the BAPI's/API's instead.
    To update attribute set values for a business partner use the function module:
    CRM_MKTBP_CHANGE_BP
    Take care,
    Stephen

  • PROBLEM IN CREATING MARKETING ATTRIBUTES

    Hi Experts,
    I have a requirement in which i need to create OR update Marketing attributes of BP.
    I used FM CRM_MKTBP_CHANGE_BP for this.
    for updating existing Attributes it is working fine, but when i am trying to assign attributes to the BP it is not working.
    In return parameter, i am getting Success message, but if i am going to Transaction BP and view the BP, I am not able to view
    the assigned attributes.
    my code is simple:
          CALL FUNCTION 'CRM_MKTBP_CHANGE_BP'
            EXPORTING
              IV_PROFILE_TEMPLATE_ID       = LV_ATTRSET_HOBBY    " this contain the name of the Attribute Set
    *         IV_BP_GUID                   =
    *         IV_XDESCR                    = ' '
    *         IV_FCODE                     = 'C'
    *         IV_MSA                       = 'X'
    *         IV_COMMIT                    = 'X'
              IV_PARTNER                   = I_BPNUMBER         " BP Number
    *         IV_CONVERT_VALUES            = 'X'
            TABLES
              IT_IMP_SELTAB                = LT_ATTR_HOBBY             " Attributes with values
              ET_RETURN                    = LT_RETURN                 " Here i am getting sucess message
    Any idea why it is not working. if you have faced the similiar problem, how did you solved it?
    One more point here is: After calling the FM, i can see the records in table AUSP  but not in BP Transaction
    I just check this for updataing existing marketing attribute. Records are updated in the AUSP table but these changes are not reflected in BP T Code.
    Please provide your valuable inputs.
    Dave
    Edited by: Dave on Jun 15, 2011 1:24 PM

    Solved by using FM CRM_MKTBP_ASSIGN_ATTRIBU

  • Input Marketing Attributes data by EML

    Hi All,
    I want to input Marketing Attributes with BP data by EML(External List Management) of Marketing.
    Maybe I need same enhancements for EML.
    Please tell me how to this implementation?
    Regards,
    Masazumi.

    Hi Masazumi,
    you need to implement BADI CRM_MKTLIST_BADI
    and append the relevant structure.
    look in the example in:
    External List Management->Mapping Fields in help.sap.com
    to use marketing attributes you should use function:
    CRM_MKTBP_CHANGE_BP or like it.
    Eyal.

  • Market attributes

    Hi,
         I have a requirement like I have a BP GUID with now I want to read the Marketing attributes of that BP and at the same time if the marketing attributes are not available for that BP I need to give the values to that attributes. My query is with BP GUID is there any FM is available to do this. All these process I am doing when order is going to save. For this I am triggering a BADI and I am able to find out the BP GUID also. Please suggest me how to read the marketing attributes and how to change the existing BP Marketing attributes if the marketing attributes are not there.
         Thanks In Advance

    Hi,
    To read the marketting attributes you can use FM "CRM_MKTBP_READ_CHAR".
    Or "CRM_ISA_BP_CHAR_VALUES_GET".
    And to Change use FM "CRM_MKTBP_CHANGE_BP" or "CRM_ISA_BP_CHAR_VALUES_SAVE".
    Regards,
    Animesh

  • 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

  • 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.

  • Badi before create Business Partner

    Hello Expert !!!
            when I create Business Partner in transaction BP , I have to add attribute set in tab marketing attributes everytime (depend on role that i create ).
            I want to program for automatic update attribute set .
           Do you know the Badi that i can code in that ? Badi  before create Business Partner?
      please help me
    advance thanks,
    kritamate

    hey everyone !!!!
    this all code in Badi Partner_update :
    method IF_EX_PARTNER_UPDATE~CHANGE_BEFORE_UPDATE .
    FIELD-SYMBOLS: <ls_but000_new> TYPE but000,
                     <ls_but050_new> TYPE but050.
    CONSTANTS: lc_object_type TYPE crmt_prt_otype VALUE 'BUS1006'.
    DATA: lt_changed_object_guids TYPE crmt_ace_object_guid,
            lt_new_object_guids     TYPE crmt_ace_object_guid,
            ls_object               LIKE LINE OF lt_changed_object_guids,
            lt_but000_old           TYPE STANDARD TABLE OF but000,
            lt_but000_new           TYPE STANDARD TABLE OF but000,
            ls_but000_old           LIKE LINE OF lt_but000_old,
            lt_but050_new           TYPE STANDARD TABLE OF but050,
            lt_but050_old           TYPE STANDARD TABLE OF but050,
            ls_but050_old           TYPE but050,
            lv_partner_guid         TYPE bu_partner_guid,
            lt_return               TYPE STANDARD TABLE OF bapiret2,
            lv_tabix                TYPE sy-tabix.
    CLASS cl_bsp_bp_accmod DEFINITION LOAD.
    business partners ************************************************
      CALL FUNCTION 'BUPA_GENERAL_CALLBACK'
        TABLES
          et_but000_old = lt_but000_old
          et_but000_new = lt_but000_new
        EXCEPTIONS
          OTHERS        = 0.
    BP new or changed?
      LOOP AT lt_but000_new ASSIGNING <ls_but000_new>.
        ls_object-object_guid = <ls_but000_new>-partner_guid.
        READ TABLE lt_but000_old INTO ls_but000_old
                   WITH KEY partner = <ls_but000_new>-partner.
      New BP created
        IF sy-subrc NE 0 OR ls_but000_old-client IS INITIAL.
          COLLECT ls_object INTO lt_new_object_guids.
      BP changed
        ELSE.
          COLLECT ls_object INTO lt_changed_object_guids.
        ENDIF.
      ENDLOOP.
    data BP_guid type CRMT_TG_BP_GUID.
    DATA: L_ATTRIBSET TYPE CRMT_PROF_TEMPLATE.
    DATA : LW_VALUE TYPE CRMT_MKTPROF_COMW.
    DATA: T_VALUE TYPE TABLE OF CRMT_MKTPROF_COMW  .
    DATA: T_RETURN  TYPE TABLE OF  BAPIRET2 ,
           LV_BP_PERSON             TYPE  BU_PARTNER.
    CONSTANTS: C_ROLE(5)          VALUE 'ZMROL'.
    L_ATTRIBSET  =  C_ROLE.
    BP_guid = ls_object-object_guid. .
              LW_VALUE-ATNAME = 'ZMRO0001'.
              LW_VALUE-ATWRT = 'Z11'.
              INSERT LW_VALUE INTO TABLE T_VALUE.
    *LV_BP_PERSON = '20001678'."<ls_but000_new>-partner .
    CALL FUNCTION 'CRM_MKTBP_CHANGE_BP'
      EXPORTING
        iv_profile_template_id       = L_ATTRIBSET
       IV_BP_GUID                   = BP_guid
      IV_XDESCR                    = ' '
      IV_FCODE                     = 'C'
      IV_MSA                       = 'X'
      IV_COMMIT                    = 'X'
      IV_PARTNER                   = LV_BP_PERSON
      IV_CONVERT_VALUES            = 'X'
    TABLES
       IT_IMP_SELTAB                = T_VALUE
        ET_RETURN              = T_RETURN.
       if sy-subrc <> 0.
         endif.
    endmethod.
    message Shotdump :
    What happened?
    The current application program detected a situation which really
    should not occur. Therefore, a termination with a short dump was
    triggered on purpose by the key word MESSAGE (type X).
    i don't what happen . Maybe because it cannot use this function in badi . I don't know . if you know ,please help
    advance thanks ,
    kritamate

  • Downloading Marketing Attributes

    Dear Experts,
    We are required to send customer master data (including marketin attributes) to the another legacy system by using txt file. We can extract the data that is stored in BP tables such as BUT000, ADRC etc.
    However we have difficulty in how to extract marketing attribute data into file. How it is stored, how can we extract it? Do you have any previous experience about it or do you have any idea.
    Thanks in advance.
    Mehmet

    Hi!
    The Marketing Attributes are mainly stored in the following tables:
    definition:
    - KLAH - Attributesets
    - CABN - Attribut (CABNT)
    - CAWN - Attribut-Values (CAWNT)
    - KSML - Attributesets/Attribut
    characteristic values:
    - INOB - Link to BP
    - KSSK - Attributests (of BP)
    - AUSP - Values (of BP)
    To extract the characteristic data of an bp, i used the function CLSE_SELECT_AUSP. KLART = 'BUP', MAFID = 'O', objek = cuobj from inob.
    Update? CRM_MKTBP_CHANGE_BP
    kind regards, Fößleitner Johann

  • Problem in Updating marketing attributes for Contact

    Hi,
    I am trying to update marketing attributes for contact and Account while Creating lead. For this I implemented ORDER_SAVE (Chek before save).
    For account, the marketing attributes are getting updated fine. But, for Contact they are not getting updated. For both I am using the same code. But, I dont understand, why.
    Please, let me know why this is happening.
    Here is the code i used.
    The internal table li_imp_seltab contains Marketing attributs.Its being filled properly. No problem with Internal table data.
    For contact----
    >
    If not v_contact is initial.
      IF lo_contact_head->is_changeable( ) = abap_true.
    Update or create the marketing attribute if it does not exist and set the value of the attribute to 'Prospect'
              CALL FUNCTION 'CRM_MKTBP_CHANGE_BP'
                EXPORTING
                  iv_profile_template_id = k_template_id
                  iv_bp_guid             = l_contact_guid
                  iv_xdescr              = abap_false
                  iv_fcode               = abap_false
                  iv_msa                 = abap_false
                  iv_commit              = abap_true
                  iv_partner             = l_contact_no
                  iv_convert_values      = abap_true
                TABLES
                  it_imp_seltab          = li_imp_seltab
                  et_return              = li_return.
    Modify core and save so that the updations would reflect immediately in Web UI
              lo_core->modify( ).
              lo_tx = lo_contact_head->get_transaction( ).
              IF lo_tx IS BOUND.
                IF lo_tx->save( ) = 'X'.
                  lo_tx->commit( ).
                ENDIF.
              ENDIF.
            ENDIF.
    For Account -
    >
    if not v_ac is initial.
    Check if the entity is changeable.
            IF lo_account_head->is_changeable( ) = abap_true.
    Update or create the marketing attribute if it does not exist and set the value of the attribute to 'Prospect'
              CALL FUNCTION 'CRM_MKTBP_CHANGE_BP'
                EXPORTING
                  iv_profile_template_id = k_template_id
                  iv_bp_guid             = l_account_guid
                  iv_xdescr              = abap_false
                  iv_fcode               = 'C'
                  iv_msa                 = abap_true
                  iv_commit              = abap_true
                  iv_partner             = l_account_no
                  iv_convert_values      = abap_true
                TABLES
                  it_imp_seltab          = li_imp_seltab
                  et_return              = li_return.
    Modify core and save so that the updations would reflect immediately in Web UI
              lo_core->modify( ).
              lo_tx = lo_account_head->get_transaction( ).
              IF lo_tx IS BOUND.
                IF lo_tx->save( ) = 'X'.
                  lo_tx->commit( ).
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
    Please
    Thanks,
    Sandeep

    Hi Sandeep,
      You can use 'CRM_MKTBP_UPDATE_ATTR_BP' FM to update the marketing attributes of the BP.
    Regards,
    Lakshmi.Y

  • Regarding attribute set

    Hi experts,
    I have attribute name (CRM-Markrting-Attribute Name ) from Table CABN , i want to get corressponding Attribute Set.
    please specify the table or FM for this.
    thanks and regards
    Subba.

    Hi,
      Can u check with FM" CRM_MKTBP_CHANGE_BP "
    This is for Business partner.
    Also check out function moduels in function group
    CRM_MKTBP_DB. This contains many FM to read/assign marketing attribute set to BP.
    Regards.

  • 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.

  • 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

Maybe you are looking for