CRM and CX Blogs by SAP
Stay up-to-date on the latest developments and product news about intelligent customer experience and CRM technologies through blog posts from SAP experts.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Introduction

User is creating a shopping cart order in e-commerce site.

For particular partner number, we would like to show credit card payment mode as only payment method when user clicks at checkout in e-commerce site.

Audience

Technical CRM / ABAP Consultant

Purpose

This document show complete solution approach to achieve the requirement mention in introduction section.

Dependencies/Pre-requisites

None

Technical Process steps

  1. Implement BADI in SE19 as ZCRM_RISK_MGMT_BADI.
  2. Implement method GET_PAYMENTTYPES.
  3. Use function Module 'CRM_ORDER_READ' to get partner number attached to order.
  4. If particular Partner number found in partner internal table, keep CT_ALLOWED_PAYMENT_TYPES as ZERO, and delete rest of allowed payment types.

method IF_EX_CRM_RISK_MGMT_BADI~GET_PAYMENTTYPES.

DATA: lt_headerguid_tab       TYPE crmt_object_guid_tab,

w_part_tmp type CRMT_PARTNER_EXTERNAL_WRK,
lt_partner TYPE CRMT_PARTNER_EXTERNAL_WRKT.

INSERT IV_ORDER_GUID INTO TABLE lt_headerguid_tab.

CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
IT_HEADER_GUID                     lt_headerguid_tab

IMPORTING

ET_PARTNER                        = lt_partner.

IF SY-SUBRC <> 0.
* Implement suitable error handling here
ELSE.

loop at lt_partner into w_part_tmp
where PARTNER_NO = '3273'.

    delete CT_ALLOWED_PAYMENT_TYPES where TYPES <> '0'.
exit.
endloop.
endif.

endmethod.

Customizing

None

Demo Information

Search item and add to cart and click in checkout.

Before BADI activation payment method invoice is coming.

After badi Activation, Payment method had been changed.

Conclusion

We can achieve result the by implementing the BADI CRM_RISK_MGMT_BADI. There are other payment methods also available like cash on Delivery. Here we have hard coded Partner number, but we can also have logic to first find the partner numbers (as example, search all customers who have exhausted credit limit) then show only cash on delivery for such partners.