Additional Data Fields

NOTE

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

Sana Commerce Cloud is the ERP integrated e-commerce solution. This integration is unique in the sense that all information used in your webstore 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 Articles

Filter Fields
Keyword Fields
Webstore 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.

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: In the Table/View field, enter /SANAECOM/MAPFLD 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 (Sales person, 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 set up catalog, customer registration and profile forms, and shipping address.

Related Articles

B2C Customer Registration
B2B Customer Registration
Customer and Prospect Profiles
Customer Shipping Addresses

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.

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.

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.