cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between FMs CRM_MKTBP_ASSIGN_ATTRIBUT_TAB and CRM_MKTBP_CHANGE_BP

Former Member
0 Kudos

Hi Experts,

What is the difference between the functionality offered by the FMs CRM_MKTBP_ASSIGN_ATTRIBUT_TAB and CRM_MKTBP_CHANGE_BP?

I want to assign both attribute set and attributes to business partners through an ABAP program.

Thanks,

Diptee

Accepted Solutions (1)

Accepted Solutions (1)

former_member200342
Active Contributor
0 Kudos

Hi,

The first one assigns the attribute set to a BP's group whereas the second one checks for a particular BP if the attribute set is there and if not it creates it.

For your requirement, CRM_MKTBP_CHANGE_BP function module can work.

Regards,

PP

Former Member
0 Kudos

Thanks Prajit,

I will try using the FM CRM_MKTBP_CHANGE_BP.

Also I need to remove the attribute assignment in case a blank value is received for an attribute.

Can this also be acheived through the same FM?

Thanks,

Diptee

former_member200342
Active Contributor
0 Kudos

Hi,

You can use the FM: CRM_MKTBP_CHECK_OW in that case.

Also you can write a logic to check the attribute value in the same FM.

Regards,

PP

Former Member
0 Kudos

Thanks Prajit,

I could use the CHANGE_BP FM for the same once.

However, the FM is not working now.

Below is the code i am using to call it

CALL FUNCTION 'CRM_MKTBP_CHANGE_BP'

        EXPORTING

          iv_profile_template_id       = attribute_set

         IV_BP_GUID                   = lv_partner_guid

         IV_XDESCR                    = ' '

         IV_FCODE                     = 'C'

         IV_MSA                       = 'X'

         IV_COMMIT                    = 'X'

*         IV_PARTNER                   =

         IV_CONVERT_VALUES            = 'X'

       TABLES

         IT_IMP_SELTAB                = lt_imp_seltab

         ET_RETURN                    = lt_error

                .

No error is returned in the lt_error table and the AUSP table is also updated; however, the updates are not seen in the Marketing Attributes tab of transaction BP.

Please advise.

Thanks,

Diptee

Former Member
0 Kudos

Hi Diptee,

Try using  FM CRM_MKTBP_ASSIGN_ATTRIBUT_TAB .

              CALL FUNCTION 'CRM_MKTBP_ASSIGN_ATTRIBUT_TAB'
                  EXPORTING
                    iv_attribute_set = v_attributeset
                    iv_msa           = 'X'

                    iv_commit        = 'X'

                    iv_obtyp         =  'BUT000'

                  TABLES
                    it_partner       = it_partner
                    et_return        = it_return
                    it_attributes    = it_attribute.

Regards,

Nithish

Former Member
0 Kudos

Hi Nitish,

I receive the below error when using this FM

Internal error; attributes do not exist

However, the attribute set and attribute exist in the KLAH and CABN tables respectively.

Thanks,

Diptee

Former Member
0 Kudos

Hi Diptee,

If you are assigning marketing attributes for the first time , the also use

'CRM_MKTBP_ASSIGN_ATTRIBUT' followed by CRM_MKTBP_ASSIGN_ATTRIBUT_TAB

   LOOP AT it_attribute_result INTO wa_attribute_result.
                        CALL FUNCTION 'CRM_MKTBP_ASSIGN_ATTRIBUT'
                          EXPORTING
                            iv_atname        =
wa_attribute_result-atname

                            iv_attribute_set =  v_attr_set

                            iv_atwrt         = wa_attribute_result-atvalue
                          TABLES
                            it_partner       = it_partner_result.
                      ENDLOOP.

You can also use  FM CRM_MKTBP_SAVE_BP_LIST . Check report CRMBW_DEMO_BP , you can analyze how parameters are passed.

Regards,

Nithish

Answers (0)