CRM and CX Blogs by Members
Find insights on SAP customer relationship management and customer experience products in blog posts from community members. Post your own perspective today!
cancel
Showing results for 
Search instead for 
Did you mean: 
gregorw
Active Contributor
0 Kudos

In the new SAP CRM: Webclient UI - Framework, Brant Berg  asked the question "PCUI Has anyone used HTML viewer to call a custom BSP?"? Here are step-by-step instructions to show how we used the HTML  viewer to call a custom URL. In our case we've integrated an R/3 Transaction using WinGUI via the Portal Application  Integrator. The result will be:

Our Setup

  • SAP CRM 4.0 PL 7 System
  • SAP Enterprise Portal 6.0 SP 7

Create Package

All our own DDIC structures and the class implemented is created in a package called “ZCRM_ANGEBOT”.

Dictionary Structures

ZCRMT_BSP_ACC_QUOTATION

                                         
ComponentComponent type
OBJECT_KEYCRMT_BSP_OBJECTKEY
URLCRMT_BSP_URL
HEIGHT CRMT_BSP_HEIGHT

ZCRMT_BSP_ACC_ORDER just includes ZCRMT_BSP_ACC_QUOTATION because it has the    same structure. The package now has the following content:

Class which implements IF_CRM_BSP_MODEL_ACCESS_IL

Create a new class ZCL_ANGEBOT_ABSPRUNG which implements the interface IF_CRM_BSP_MODEL_ACCESS_IL. The method read has to be implemented

  method if_crm_bsp_model_access_il~read.
    data :
      lv_account type bu_partner,
      lv_submi   type crmt_object_id,
      lv_guid    type crmt_object_guid,
      ls_screen_structure type zcrmt_bsp_acc_quotation,
      lt_screen_structure type table of zcrmt_bsp_acc_quotation,
      wa_portal type char32.
  
  *
  * Call Transaction ZSDSL_400 via WinGUI
  *
  wa_portal = 'eep04.siteco.net'.
  *
  * Create URL WinGUI Call via Portal Application integrator
  *
  concatenate 'http://' wa_portal
    '/irj/servlet/prt/portal/prtroot/'
    'com.sap.portal.appintegrator.sap.Transaction'
    '?System=SAP_R3&Technique=SSD&'
    'TCode=ZSDSLS_400&OkCode=ONLI&'
    'GuiType=WinGUI&ApplicationParameter='
   into ls_screen_structure-url.
  
  
    case iv_screen_structure_name.
  * Quotations for Customer
      when 'ZCRMT_BSP_ACC_QUOTATION'.
        read table it_object_key index 1 into lv_account.
  * Portal
        concatenate
          ls_screen_structure-url 'P_KUNNR%3d' lv_account
          ';P_AUF%3d;P_ANG%3dX'
         into ls_screen_structure-url.
  * Orders for Customer
      when 'ZCRMT_BSP_ACC_ORDER'.
        read table it_object_key index 1 into lv_account.
  * Portal
        concatenate ls_screen_structure-url
          'P_KUNNR%3d' lv_account
          ';P_AUF%3dX;P_ANG%3d'
         into ls_screen_structure-url.
    endcase.
    ls_screen_structure-height = '800'.
    insert ls_screen_structure into table lt_screen_structure.
  
    et_screen_structure = lt_screen_structure.
  
  endmethod.

You also have to implement the MODIFY method because you will get an error when you open another tab if it is not implemented. A empty implementation is enough:

method IF_CRM_BSP_MODEL_ACCESS_IL~MODIFY.
endmethod.

PC-UI Customizing

All PC-UI Customizing is done in Transaction CRMC_BLUEPRINT_C.

Create Field Group

Navigate to Application Element, Field Group, Field Group. We add two new field    groups:

                                                     
Field GroupDescriptionStructure Name
Z_ACC_ORDEROrdersZCRMT_BSP_ACC_ORDER
Z_ACC_QUOTATIONQuotationsZCRMT_BSP_ACC_QUOTATION

Create Field Group Structure

Navigate to Application Element, Field Group, Field Group Structure. Enter the field group name:

                                                                 
Field GroupScreenpositionField NameFieldtype
Z_ACC_ORDER10URLInputfield
Z_ACC_QUOTATION10URLInputfield

Don’t forget to create the Field Group. Navigate to Application Element, Field Group, Layout Generation. Enter the Field Group name and uncheck “Only Check Field Groups”.

Create Events

Navigate to Application Element, Event. Add our own two events:

                                                                 
EventUsageUnlockText
ZACC_ORDERA Layout-RelevantNo Data Loss PopupOrder
ZACC_QUOTATIONA Layout-RelevantNo Data Loss PopupQuotation

Add Events to Tab Page Group ACC_01

Navigate to Application Element, Tab Page Group, Tab Page Group Structure.

We had our own view defined which is called SITECOSALE which we use for the    Sales Representative role. To this view we add the previously created events:

                                                     
ViewSequenceEvent
SITECOSALE30ZACC_QUOTATION
SITECOSALE35ZACC_ORDER

Define Application Layout

Navigate to Application Layout, Define Application Layout. Add events to application    CRMM_ACCOUNT.

                                                                                                         
EventZACC_ORDERZACC_QUOTATION
PositionDetail Area 1Detail Area 1
Screen Element TypeHTMLHTML
Field GroupZ_ACC_ORDERZ_ACC_QUOTATION
Tab Page GroupACC_01ACC_01
Structure NameZCRMT_BSP_ACC_ORDERZCRMT_BSP_ACC_QUOTATION

Define Application Set

Navigate to Application Element, Application Set. Choose the application set:    COMM_BUPA and choose Model Access. Add these two entries:

                                                                                         
Application SetCOMM_BUPACOMM_BUPA
Structure NameZCRMT_BSP_ACC_ORDERZCRMT_BSP_ACC_QUOTATION
Access ClassZCL_ANGEBOT_ABSPRUNGZCL_ANGEBOT_ABSPRUNG
Structure TypeDependent Structure Dependent Structure
Parent NameBUP_MAINBUP_MAIN

Summary

In principle, adding a new tab within a CRM People Centric UI application consists    of two main steps. In the first the model access class is written. Thereafter    the customization transaction is used to configure the new tabs into an existing    application.

 

Credits

Thanks to Paul Walmsley who implemented this functionality for us. And a special    thank to brian.mckellar/blog for reviewing this Weblog.

7 Comments