Setting Up Sample Data

Objective

After completing this lesson, you will be able to configure tax settings and import and validate sample customer data in SAP Commerce Cloud, ensuring correct tax application and accurate customer records across the integrated systems.

Create Taxes

While the information about the tax classification of product data is replicated along with the products themselves from SAP S/4HANA Cloud to SAP Commerce Cloud, actual tax rates and customer tax classification are not. So, the tax rates must be manually maintained in SAP Commerce Cloud by reference to SAP S/4HANA Cloud.

You can check the product tax classification in SAP Commerce Cloud Backoffice once the product has been replicated from SAP S/4HANA Cloud.

SAP Administration Cockpit Products screen with the Pricing tab open and Tax Class set to “US Sales Tax.”

You would've determined the tax classification of products for country/region earlier, in Configure Product Replication, when configuring common settings for SAP Commerce Cloud, ready for master data replication. Let's assume you've done it at that time for DE and US, which has now been downloaded from SAP S/4HANA Cloud, the system you're doing the integration with. During asynchronous order processing in the SAP Commerce Cloud business processes, taxes will be determined as per this tax row in the storefront. This tax price is then pushed to SAP S/4HANA Cloud as a manual tax rate. If taxes are to be determined in the SAP Commerce Cloud storefront, you need to activate net price for base store in the SAP Commerce Cloud Backoffice.

  1. Access SAP Commerce Cloud Backoffice and log on as an administrator.
  2. Navigate toBase CommerceBase Store.
  3. Choose the powertools base store of the storefront site.
  4. Make sure the Net field under the Properties tab is turned on.SAP Administration Cockpit Base Store screen with “powertools” selected; Net set to True and default currency USD.

    Flagging the base store as Net implies that the price displayed on the product is without tax. Tax is calculated and added later in the checkout flow on the storefront. Every price row in SAP Commerce Cloud also has the same flag to differentiate if it's a net or a gross price. Price/Condition records in SAP S/4HANA Cloud don’t have this flag, but SAP Commerce Cloud requires this value for checkout and order. So, this setting on the base store determines the flagging of the replicated condition records from SAP S/4HANA Cloud.

  5. On the Properties tab, in the Tax Group section, assign a default customer tax jurisdiction to the base store by choosing US Taxes.SAP Administration Cockpit Base Store screen with “powertools” selected; Tax Group set to “US Taxes.”
  6. Choose Save after making any changes.

Import Sample Data for Customers

The sample_data_de.impex and sample_data_us.impex files on SAP Note 2726058 automatically import sample data for DE (Germany) and US (United States) from S/4HANA Cloud to SAP Commerce Cloud, such as B2BBudget, B2BCostCenter, B2BOrderThresholdPermission, B2BOrderThresholdTimespanPermission, ZoneDeliveryModeValue (Delivery Costs), and Taxrow.

  1. Go to SAP Note 2726058, and download the two ImpEx files (de_sample_data.impex and us_sample_data.impex) attached to it.
  2. Modify the ImpEx files as needed to reflect the actual data in your SAP Commerce Cloud system. For example, the B2B units you replicated from SAP S/4HANA Cloud as business partners.

    Caution

    Normally you only need to replace the values of the ImpEx Macros indicated by the leading dollar signs "$" in the file. For example, you can replace the B2B Unit code in the ImpEx file with "1000080_1710_10_00", which is your replicated B2B Unit code.

    The last ImpEx statement INSERT_UPDATE TaxRow; ...... is wrong. TaxRow data is catalog aware, but it’s missing the unique modifier and default values in the header. You need to add a Macro to fix it, like the following screenshot, otherwise you’ll receive error messages.

    IMPEX code snippet setting the powertools product catalog and adding a US sales tax TaxRow with value 19.
  3. To import an ImpEx file, access the Hybris Administration Console (HAC), and log on as an administrator.
  4. Go to the Console tab, and choose ImpEx Import.
  5. Choose the Import script tab, and locate the ImpEx downloaded from the SAP Note on the Script Import field. Please turn on the Legacy Mode options.
  6. Choose Import File.Hybris Administration Console ImpEx Import page with “us_sample_data.impex” selected and async mode enabled.
  7. A confirmation message will be briefly displayed, once the import has been successfully processed.

    Hint

    You can also use the Import content tab, and copy and paste the lines from the ImpEx file into the text area.