Synchronize Pricing Master Data Exchange between SAP ERP and hybris

 

Agenda: Pricing Integration scenarios between SAP ERP and hybris and prerequisites and configurations needed for hMC.

Learning Path:

Screen Shot 2016-04-25 at 9.28.13 am

Screen Shot 2016-04-25 at 9.28.51 am.png

hybris Pricing and ERP pricing scenarios

There are two options for pricing integration:

  1. Hybris pricing(Asynchronous pricing): Pricing conditions are replicated from SAP ERP to hybris and pricing is done in hybris. The advantage is that pricing in hybris is done independent of the availability of SAP ERP, however the disadvantage is that the pricing logic needs to be setup in hybris.
  2. ERP pricing(Synchronous pricing): SAP ERP is called directly from hybris for pricing. The advantage is that the pricing logic remains in SAP ERP and does not need to be replicated. The disadvantage is that pricing functionality is dependent on the availability of SAP ERP.

Pricing:

  • Only product prices and discounts transferred from SAP ERP tohybris.
  • Payment costs, delivery costs and taxes are not transferred and require double maintenance.
  • Once the transfer is done, all calculations are done by hybris, by which it can run independently of SAP ERP.
  • IDoc type ‘COND_A04’ is used
  • Pricing data is send to Data Hub using Spring Integration
  • hybris Data Hub handles receiving, processing and saving the IDoc to hybris platform.
  • Insert and update operations are supported.

Mapping of SAP Condition to hybris PriceRow and DiscountRow

Screen Shot 2016-04-25 at 9.36.07 am.png

Example price in hybris Management Console(hMC)
Screen Shot 2016-04-25 at 9.37.01 am.png

Asynchronous Process Flow

Screen Shot 2016-04-25 at 9.38.00 am.png

  1. Pricing data(idoc COND_A04) sent from ERP (eg. VK13)
  2. sapidocintegration – HTTP servlet that receives the idoc xml and forward it to appropriate handler.
  3. sappricing – handles COND_A04 payload.
    • Has mappings from Raw to Canonical to Target
    • Has grouping handler that reads Condition Type customizing to determine if Price or Discount
    • Has transformations to format data and read other customizing.
  4. Data Hub saves PriceRow and DiscountRow into hybris via the Data Hub Adapter

Overview ERP Pricing

  • Pricing data is read directly from SAP ERP backend for
    • catalog
    • Product details
    • Cart / Checkout
    • Product list will always reads from cache(SOLR, get updated via ERP list price incl. general discounts, not the personlized price). On a project basis SOLR can be bypassed and read directly from ERP.
    • Generic articles, configurable products, Sales BOM are excluded.
  • Backend calculation are done using FM PIQ_CALCULATE
  • Indication when to use ERP pricing
    • Complex pricing 24X7 availability of backend.
    • Sizing: sizing guide provided
  • Prices, Discounts, Payment costs, Delivery costs and Taxes are provided by the API(contract and quote prices would require additional enchancement)
  • Synchronous scenarios for Catalog and Cart / Checkout.

Synchronous scenarios for Catalog and Cart / Checkout

Screen Shot 2016-04-25 at 9.45.59 am.png

Extensions and services for ERP pricing

Screen Shot 2016-04-25 at 9.47.07 am.png

  • sappricingbol takes care of all calls to the backend.
  • sappricing overrides hybris services, so that we can provide our logic
    • SAPPriceService overrides PriceService and calls ERPPricingBackend
    • SAPCalculationService overrides CalculationService and Calls ERPPricingBackend
    • SAPPartnerService is used to determine the partner for pricing. If this is a b2bsappricing extension will be active and will override the logic so that the b2bunit is taken into account.

Prerequisites

  • hybris Commerce Suite 5.3+ incl. hybris Data Hub
  • hybris pricing SAP ERP 6.0 Ehp5 SP09 or higher
  • ERP pricing: SAP ERP 6.0 Ehp7 SP04 or higher SP

Configuration checklist on ERP side

  • RFC destination to the hybris server is created(tcode: SM59)
  • Distribution model has been created(tcode: BD64)
  • IDoc Processing Port of type XML HTTP has been created(tcode: WE21)
  • Partner Profile of type LS (logical system) has been created(tcode: WE20)

Configuration in hybris hMC

  • Product, User group, Product group and Discount must exist prior to Pricing data transfer(from ERP)
    • Report DOWNLOAD_CUSTOMIZING_AS_IMPEX(note 1983231) to export general customizing from SAP ERP.
    • Manual import into hybris via ImpEx.
  • Maintain SAP Runtime Configuration – Pricing tab(disable sync flags)(ERP Pricing for catalog and Orders)
  • Assign configuration to BaseStore.

Configuration of hybris Data Hub

  • Condition Types and Condition Class(from SAP ERP)
    • Used to determine if a condition is a price or discount
    • Transfer method to be finalized
  • Catalog determination
    • Mapping will use Product Sales Organziation and Distribution Channel to Catalog.
    • Each pair can map to one or more hybris catalogs
    • Final logic to be finalized

Customizing / Configuration

hybris hMC

  • RFC Destination to ERP backend
  • SAP Runtime Configuration
    • Setup Common Settings – Sales org, Distribution Channel, Reference Customer, etc..
    • Setup Pricing – Enable Synchronous flags
    • Setup Pricing – Front-end field mappings
    • Setup Pricing – Delivery and Payment methods
  • Assign Configuration of BaseStore.

Pricing Settings in SAP Base Store Configuration in hMC

Screen Shot 2016-04-25 at 10.06.39 am.png

  • ERP Pricing for Catalog – Activate ERP pricing in catalog
  • ERP Pricing for Orders  – Activate ERP pricing in basket and checkout
  • Cache ERP Catalog Prices – see below
  • Subtotals for price elements
    • Product Price
    • Discounts
    • Taxes
    • Shipping Costs
    • Transaction Costs
  • Payment : You can map different payment options(eg Mastercard or invoice) in hybris to Payment Modes in SAP ERP(e.g. to CCINS: PTMC ‘Master-/Euro Card’, or 0001 ‘Pay immediately w/o deduction’). This can determine payment costs in the order and set the Payment card type or Payment terms respectively in the order

sapPricingCache in hyrbis management console

With caching you can improve the performance or your shop. Caching can be switched on in the hMC with ‘Cache ERP Catalog Prices’. The pricing cache can be managed in the hybris management console.

Screen Shot 2016-04-25 at 10.55.43 am

Example mapping of hybris to SAP ERP payment mode

You can map different payment options (eg. Master card) in hybris to Payment Modes in SAP ERP (e.g to CCINS: PTMC ‘Master-/Euro Card’ ). This can determine payment costs in the order(additional charges for mastercard)

Screen Shot 2016-04-25 at 10.58.18 am.png

Example pricing setup for asynchronous order

The Pricing Condition Types maintained in the hMC under SAP Integration/ Pricing need to be mapped to the Condition types in the pricing procedure in SAP ERP(tcode: v/08)

Screen Shot 2016-04-25 at 10.59.54 am.png

 

————————-End of the Page———————–

2 responses

  1. great

    Like

  2. Great article. Do you have any insights on an integration with SAP CRM for the prices?

    Liked by 1 person

Thanks for Reading. Please comment !!!

This site uses Akismet to reduce spam. Learn how your comment data is processed.