Show TOC Start of Content Area

Function documentation Setting Up Additional Attributes for Product Search Locate the document in its SAP Library structure

Use

You can now enhance your product catalog by creating your own attributes for the product search, in addition to the standard attributes delivered with ERP E-Commerce.

This means you can tailor your product catalog to your own specific needs, providing your customers with multiple product search choices, in line with the products you sell.

The attributes you create are shown at search and at product item level, enabling your customers to see which attributes from their search match the products selected.

 

Prerequisites

Your ERP system must be integrated with the TREX index server. 

 

Activities

...

       1.      You determine your own attributes using a new Business Add-In (BAdI) implementation for a BAdI definition delivered with ERP E-Commerce. The replication process uses the implementation tocollect and assign your additional attributes in the catalog replicated to TREX.

The BAdI definition BADI_ISA_REPL_CAT and its default implementation are part of the standard SAP delivery. You create your own BAdI implementation and a corresponding ABAP OO class to add your own search attributes to your Web shop. The BAdI’s interface consists of one single method called IF_EX_BADI_ISA_REPL_CAT~INSTANCE.GET. This method is used to create an instance of the ABAP OO class that shall be used for attribute assignment. In the default implementation, it creates an instance of the SAP standard class CL_ISA_REPLICATION_CATALOG.

The process consists of two steps. Firstly, you cerate a new ABAP OO class containing the code to define the additonal attributes and assign values to them. Secondly, you create a new BAdI implementation that enables the ABAP OO clasee to be used in the replication process. You proceed as follows:

...

                            a.      Create a class implementing interface IF_ISA_REPLICATION_CATALOG in transaction SE24 (class builder).You can inherit several attributes and methods from the standard class CL_ISA_REPLICATION_CATALOG as follows:

                                                  i.       Create a class and and select the Properties tab.

                                                ii.       Select Superclass and enter CL_ISA_REPLICATION_CATALOG in the corresponding field.

                                               iii.       Save the class.

                                               iv.       The system allows your new class to inherit attributes and methods from the superclass CL_ISA_REPLICATION_CATALOG.

                                                 v.       Redefine the inherited methods IF_ISA_REPLICATION_CATALOG~ATTRIBUTE_NAMES_GET and IF_ISA_REPLICATION_CATALOG~NODE_GET_ATTRIBUTE_VALUES.

Note

See SAP Note 837119 for further details and examples.

                            b.      Create a new BAdI implementation as follows: 

                                                  i.       Use transaction SE19 to create the implementation for the BAdI definition BADI_ISA_REPL_CAT.

                                                ii.       Navigate to the implementation’s interface and double-click on the method name INSTANCE_GET to open its’ implementation.

                                               iii.       Copy the method coding from the default implementation.

                                               iv.       Change the class name in the CREATE OBJECT call to the name you gave to the class created in step 1 above.

                                                 v.       Save the implementation and activate it.

       2.      Once the attributes are assigned in the new class, the system will copy them to the TREX server during replication, and assign them with the attribute type you specified.

The attribute type string, for example, means that attributes of only one word, for example color or size, can be read by the system, and found when your customer performs a search.

If, however, you need the search function to find several words for an attribute, for example a group of words in a detailed product description, you need to change the attribute to type “text” on the TREX. Please note, you should only use the attribute type text if it is absolutely necessary.

 

       3.      Once you have maintained your own attributes you need to install the fields on your Web shop interface for your customer to use. For more information, see SAP Note 482338.

Note

If you decide to add new attributes to your product catalog after your system is up and running, you must remember to re-replicate your product catalog to the TREX server, once you have finished implementing the new attributes.

Example

Adding attributes to your product catalog gives your customers a direct line to the exact product they are looking for. They can put in as much detail as is necessary to avoid a lengthy search through a large catalog.  For example, if you supply furniture, you could determine a search attribute for a specific wood type, or for specific measurements. In this case your customer can enter the specific details in the various search engine fields and search directly for an oak table, with a light varnish, and with dimensions 20x30x100. This means your customer no longer has to first search for tables, then table materials, and then sizes. Your customer has a direct line to the specific product, cutting the search time needed.

 

End of Content Area