cancel
Showing results for 
Search instead for 
Did you mean: 

Catalog Enhancement (Product Catalog filter)

Former Member
0 Kudos

Good Day!

I am using Web Channel 3.0 with CRM .

I have a requirement which is to filter the product per customer.

My customers are in CRM, I have created a function Module RFC enable that returns me all the product for that specific customer.

I have enhanced the Catalog module with bo, md and ui.

I have created my custom module that extends extends BackendBusinessObjectBaseSAP

Header 1

public class ZCustomCatalogItem extends BackendBusinessObjectBaseSAP {

  private Map<String,String> CatalogCode = new HashMap<String,String>();

  public void getMaterialList(String iv_stpnum) {

  JCoConnection jcoCon = getDefaultJCoConnection();

  try {

  JCoFunction function = jcoCon

  .getFunction("/BSA/WCEM_LIST_OF_MATERIAL");

  function.getImportParameterList().setValue("IV_STPNUM", iv_stpnum);

  jcoCon.execute(function);

  JCoTable products = function.getExportParameterList().getTable(

  "ET_MATERIAL_LIST");

  String result = function.getExportParameterList().getString("EV_RESULT");

  if (result.equalsIgnoreCase("Success")) {

  for (int x = 0; x < products.getNumRows(); x++) {

  products.setRow(x);

  CatalogCode.put(products.getString("MATERIAL_NR"),products.getString("MATERIAL_DESC"));

  }

  }

  } catch (BackendException be) {

  }

  }

  public void setCatalogCode(Map<String,String> catalogCode) {

  CatalogCode = catalogCode;

  }

  public Map<String,String> getCatalogCode() {

  return CatalogCode;

  }

}

but now I do not know where to find the definitive list of product that come from MDM into web channel and apply my filter.

My Web Channel Catalog view displays a total of 80 products configured, and my function module returns a specific number of product and this should work once the user logs in.

Does any of you have a document showing how to modify the filtering of product coming from MDM to Web channel.

Accepted Solutions (0)

Answers (1)

Answers (1)

daniel_ruiz2
Active Contributor
0 Kudos

Hi Rossi,

I think the easiest way for you to achieve your goal is to find a J2EE/Java Developer.. SAP knowledge is trivial, you are really looking for a J2EE person.

As soon you have one, this could help him:

"Valid for WCEM 2.0"

Create a new BackendBO (please don't even think about using the code showed above) which will populate a List<String> containing the productGuids.

Intercept and extend the LoginEvent and SoldToChanged event in order to set your List<String> into CatalogHelperMDM.. a full search on source files will show you all used places and it will be fairly straight forward to figure out what he/she needs to extend and re-implement... Or, just intercept and handle such events in the Catalog Module, in such way you acquire a new List from your BackendBO and pass this list to CatalogHelperMDM.

In CatalogHelperMDM, extend the getItemSearchContraints (this method will depend on which release SP you are, but it's a method to bring constraints like Area, Validity Times, Filters and Sorters to be applied in a MDM Search object) -- override as you normally would, then add a new searchItem having ITEM_TABLE and ITEMPRODUCT_GUID as Dimension with a TextSearchConstraint (productGuid, TextSearchConstraint.EQUALS) for each item returned in your List<String>.. you should use a SearchGroup, will probably speed up in MDM.

You'd also need to enhance ProductCatalogImpl "getItemsByKey" to remove any items that are not part of your List<String>.

Cheers,

D.

PS: I'm fairly positive this process will slow down a bit the MDM, and I'd suggest you ask your J2EE how to best achieve the same results (seems to me you have a proposed solution from a functional person, they should not be proposing stuff and it leads to poor designed solutions)

Former Member
0 Kudos

Thank you Daniel.

It worked like a charm.

daniel_ruiz2
Active Contributor
0 Kudos

no worries,

good to know it worked!