Home > SAP CRM, Web Channel > Extend SAP CRM Shop Management

Extend SAP CRM Shop Management

September 13th, 2009 Leave a comment Go to comments

SAP CRM web channel uses shop management module to add, arrange and configure the shop data for each company/sales area. But the standard setting cannot fulfill the business in the most case, we need to add custom field to the shop. Below are the steps to show how to extend CRM web channel shop data.

Step 1. Extend table CRMM_ISA_SHOP_H. Add a custom append structure to the table.

Step 2. Copy the standard shop read function module CRM_ISA_SHOP_DATA_GET out.

Add the custom field name and value to the extension data of the function module. The max value length of one field is 40. If your field value is larger than 40, you need to split it into several lines and increase the counter. Please refer below code for detail.

  data: ls_extension  type crmt_isales_extension_int,
        lv_counter    type crmt_isa_extension_counter,
        lv_pos        type i,
        lv_length     type i,
        lv_subtract   type i.
 
  clear: lv_pos,
         lv_length.
 
  lv_counter = 1.
  ls_extension-name = 'ZMOSSADDRESS'.
  lv_length = strlen( shop_data-zz_mserver_addr ).
 
  if shop_data-zz_mserver_addr is not initial.
    while lv_pos < lv_length.
      lv_subtract = lv_length - lv_pos.
      if lv_subtract >= lc_length.
        ls_extension-value = shop_data-zz_mserver_addr+lv_pos(lc_length).
      else.
        ls_extension-value = shop_data-zz_mserver_addr+lv_pos.
      endif.
 
      ls_extension-counter = lv_counter.
 
      lv_pos = lv_pos + lc_length.
      lv_counter = lv_counter + 1.
 
      append ls_extension to extension_out.
    endwhile.
 
    clear ls_extension-counter.
  endif.

With above two steps, we can read the shop custom field to the web channel application such as b2b, b2c. But we still need to some more field to make the custom field available to shopadmin application. After it, we can direct maintain the custom field in the browser.

Step 3. Add custom field to ShopCRM.xml.

We need to know NWDS and NWDI to change/edit/transport this file. This is an xml file that is used to group and arrange the shop field to the UI layer.

Step 4.Enable the custom field and add it to different scenario.

SAP provides complex products and with lots of controls, this is not an exception. First,we need to add the custom field to the shop field table using transaction code CRMC_ISA_SHFLD. Second, we need to add the custom field to different scenarios like B2B,OOB and so on using tcode CRMC_ISA_SHTP.

Ok, congratulations. If everything goes well, you should be able to see the custom field in the shopadmin application.

  1. No comments yet.
  1. No trackbacks yet.