
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:
All our own DDIC structures and the class implemented is created in a package called “ZCRM_ANGEBOT”.
ZCRMT_BSP_ACC_QUOTATION
Component | Component type |
---|---|
OBJECT_KEY | CRMT_BSP_OBJECTKEY |
URL | CRMT_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:
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.
All PC-UI Customizing is done in Transaction CRMC_BLUEPRINT_C.
Navigate to Application Element, Field Group, Field Group. We add two new field groups:
Field Group | Description | Structure Name |
---|---|---|
Z_ACC_ORDER | Orders | ZCRMT_BSP_ACC_ORDER |
Z_ACC_QUOTATION | Quotations | ZCRMT_BSP_ACC_QUOTATION |
Navigate to Application Element, Field Group, Field Group Structure. Enter the field group name:
Field Group | Screenposition | Field Name | Fieldtype |
---|---|---|---|
Z_ACC_ORDER | 10 | URL | Inputfield |
Z_ACC_QUOTATION | 10 | URL | Inputfield |
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”.
Navigate to Application Element, Event. Add our own two events:
Event | Usage | Unlock | Text |
---|---|---|---|
ZACC_ORDER | A Layout-Relevant | No Data Loss Popup | Order |
ZACC_QUOTATION | A Layout-Relevant | No Data Loss Popup | Quotation |
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:
View | Sequence | Event |
---|---|---|
SITECOSALE | 30 | ZACC_QUOTATION |
SITECOSALE | 35 | ZACC_ORDER |
Navigate to Application Layout, Define Application Layout. Add events to application CRMM_ACCOUNT.
Event | ZACC_ORDER | ZACC_QUOTATION |
---|---|---|
Position | Detail Area 1 | Detail Area 1 |
Screen Element Type | HTML | HTML |
Field Group | Z_ACC_ORDER | Z_ACC_QUOTATION |
Tab Page Group | ACC_01 | ACC_01 |
Structure Name | ZCRMT_BSP_ACC_ORDER | ZCRMT_BSP_ACC_QUOTATION |
Navigate to Application Element, Application Set. Choose the application set: COMM_BUPA and choose Model Access. Add these two entries:
Application Set | COMM_BUPA | COMM_BUPA |
---|---|---|
Structure Name | ZCRMT_BSP_ACC_ORDER | ZCRMT_BSP_ACC_QUOTATION |
Access Class | ZCL_ANGEBOT_ABSPRUNG | ZCL_ANGEBOT_ABSPRUNG |
Structure Type | Dependent Structure | Dependent Structure |
Parent Name | BUP_MAIN | BUP_MAIN |
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.
Thanks to Paul Walmsley who implemented this functionality for us. And a special thank to brian.mckellar/blog for reviewing this Weblog.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |