SAP

Sana Commerce 9.3
Your connector

Additional Data Fields

 NOTE

This is a technical article and it is targeted at the SAP developers.

Sana is the ERP integrated e-commerce solution. This integration is unique in the sense that all information used in your web store comes directly and in real-time from a single place - your ERP system. As all master data is managed and stored in a single ERP database you can prevent data inconsistency and ensure that all your departments work with the same data.

There is the "GetEntityFields" Sana API method which retrieves all fields for a certain entity. This method takes as a parameter the name of the table in SAP and returns the list of fields of this table. For example, if you request the entity fields for the "Product" table, all material fields, like "Name", "Material Type", "Item Category Code", "Base Unit of Measure", etc. will be returned from SAP to Sana.

The purpose of the "GetEntityFields" method is to have the list of fields for a certain table in SAP and to retrieve data from this table.

Out of the box, the Sana Commerce framework requests the entity fields only for the product, customer, contact and shipping address entities by passing the "Product", "Customer", "Contact" and "ShippingAddress" values as the parameters of the "GetEntityFields" method.

All entities are mapped in SAP to the appropriate SAP table/BAPI structure.

Product

The entity fields of the products are used to retrieve material data from SAP, to show it in the Sana web store, configure catalog search, filtering and sorting, and to create product sets.

Related topics
ERP Integration
Search
Product Sets

Customer, contact and shipping address

The entity fields of the customers, contacts and shipping addresses are used to retrieve customer and contact data, and shipping addresses from SAP, to allow customers to place sales orders in the Sana web store.

These fields are also used to set up the registration form for customers, profile forms for different types of customers (consumers, business customers, guests and prospects), and shipping address fields for consumers and business customers.

Related topics
Customer
Shipping

All tables in SAP have a lot of fields and store a lot of data. Thus, with the "GetEntityFields" method we return the predefined list of fields from SAP to Sana.

To see the complete list of fields which are returned from SAP to Sana for each entity:

Step 1: Call the transaction Data Browser (SE16).

Step 2: Enter /SANAECOM/MAPFLD in the Table Name field and click Table Contents. Then click Execute.

You can also check all fields which are returned from SAP to Sana for each entity separately, by requesting the "GetEntityFields" method for a certain entity. This can be done either in SAP, using Manual Process Requests, or in Sana Admin, using Debug ERP request. For more information, see "Manual Process Requests".

It is possible to add extra fields which will be returned from SAP to Sana for each entity, to retrieve the necessary data from your SAP system.

Step 1: Call the transaction Maintain Table Views (SM30)

Step 2: Enter /SANAECOM/MAPFLD in the Table/View field and click Maintain.

Step 3: In the Sana Commerce Field Mapping table, you can add any required field to a certain entity. Enter the Webstore ID, select the Object Type (Salesperson, BOM, Customer, Contact, Product or Address) and enter the technical name of the table field. You can set up entity fields for each webstore separately.

See above in this article to which SAP table/BAPI structure each entity is mapped to.

Step 4: Once the necessary fields are added, run the General information import task in Sana Admin.

Now, the fields which you have added to the Sana Commerce Field Mapping table in SAP, will be returned in the "GetEntityFields" method for the appropriate entity. You can use these fields in Sana Admin to setup catalog, customer registration and profile forms, and shipping address.

Step 5: In case you added extra entity fields for products or customers in the Sana Commerce Field Mapping table and you want to return these extra fields from SAP to Sana, then you need to enable the necessary settings in the Webstore Optimization window.

You can access Webstore Optimization either from the main window of the Sana Commerce solution (/n/sanaecom/webstore), or by calling the transaction /n/sanaecom/optimize.

 NOTE

The possibility to activate and deactivate extra entity fields for products and customers in the Webstore Optimization window is available starting from Sana 9.3.5. In the earlier versions of Sana in SAP ECC, there is one extra fields option for products and customers.

If you need to retrieve the extra entity fields for products from SAP, expand Product Optimizations and select the Extra Field Material checkbox.

If you need to retrieve the extra entity fields for customers from SAP, expand Customer Optimizations and select the Extra Field Customer checkbox.

For more information, see "Webstore Optimization".

Material Classification

To manage catalog, the fields of the materials table and material classifications are returned from SAP to Sana in the "GetEntityFields" method. Using material classifications in SAP, you can add material characteristics which will be shown on the product pages in the Sana web store.

To manage the fields of the material classifications:

Step 1: Call the transaction CL04.

Step 2: Enter the class type and name which you are using to set up material characteristics for the web store catalog. Click Change.

Step 3: On the Characteristics tab, you can manage the fields which are used to set up material characteristics. These fields are also returned from SAP to Sana in the "GetEntityFields" method for the product entity.