cancel
Showing results for 
Search instead for 
Did you mean: 

CRM_MKTBP_CHANGE_BP not working

RaviTejaGuptha
Active Participant
0 Kudos

Hello friends,

We are using the FM CRM_MKTBP_CHANGE_BP to update the marketing attributes.

But this is removing the maintained values for that set and updating the new values. But we are expecting it should add the new values to the BP.

Please find the code

**  Maintain marketing for business partner.
     CALL FUNCTION 'CRM_MKTBP_CHANGE_BP'
       EXPORTING
         iv_profile_template_id = ls_mkt-attr_set
         iv_bp_guid             = ls_mkt-partner_guid
         iv_fcode               = 'C'
         iv_commit              = lv_commit
       TABLES
         it_imp_seltab          = ls_mkt-imp_seltab
         et_return              = lt_return.


Kindly suggest whether it is a standard behaviour or something else need to be passed.

Let me know if you need more details.


Thanks,

Ravi Teja

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ravi

This Function Module overwrites the current values

I had logged this with SAP before and was told the behaviour is standard,

If I recall correctly, it will overwrite the current Attribute Set that you're working with.

To overcome the issue along with the current updates, you also need to supply the current unchanged values of the associated marketing attributes of that Business Partner for the Attribute Set you're busy updating.

Regards

Arden

RaviTejaGuptha
Active Participant
0 Kudos

Hi Arden,

Thanks for your reply.

Regards,

Ravi

RaviTejaGuptha
Active Participant
0 Kudos

Hi Adren,

Which FM's can i use in this scenario. I have went through many links but every FM will be useful to update the attributes for the first time only.

Thanks,

Ravi Teja

Former Member
0 Kudos

Hi Ravi

You need to use the same function module.

But before you call this function module, retrieve all of the Attributes and their Attribute Values in the current Attribute Set which are currently assigned to the Business Partner.

Where the Attribute and Attribute value is unchanged, load into the Function Module as is, then for the changed Attribute value...load them in.

Then call the function module as you are now.

This will work.

Regards

Arden

RaviTejaGuptha
Active Participant
0 Kudos

Hi Arden,

Yeah, i thought the same.

But it may leads to performance issue (Unnecessarily reading the data) and the history of the data maintained will be changed (like created by, created on etc ).

So i made this will be my last option.

Correct me if i am wrong.

Thanks,

Ravi

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Ravi,

See if the following discussion is helpful for u regarding 'CRM_MKTBP_UPDATE_ATTR_BP' FM.

Thanks & Regards

Richa

faisal_pc
Active Contributor
0 Kudos

Hi Raviteja,

There is a 'non standard' way you can try. First read the current attributes of the BP by using the FMs like CRM_MKTBP_READ_BP_DATA(or you can check the function group CRM_MKTBP_DB). Then add the existing values also to the FMs like CRM_MKTBP_CHANGE_BP or CRM_MKTBP_SAVE_BP_LIST. It will update the new values, but the old values won't be lost.


Thanks,

Faisal

Former Member
0 Kudos

Hi Teja,

See the FM 'CRM_MKTBP_UPDATE_ATTR_BP'., if it works for you.

Thanks & Regards

Richa

RaviTejaGuptha
Active Participant
0 Kudos

Hi Richa,

I am not sure how to use the above FM. In standard it has not been used.

So I am not sure how to generate the key values for the AUSP table.

Let me know if you have any further inputs.

Thanks,

Ravi

nisha_vinod
Advisor
Advisor
0 Kudos

Hi Ravi, Does the following link help?

http://scn.sap.com/community/crm/blog/2015/01/21/marketing-attributes-assign-and-modify-to-the-busin...

Alternatively, you could think of calling the update FM in any badi which gets triggered whenever the attributes have changed. Did you check this possibility? Regards Nisha