Quantcast
Channel: SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 188

Creating Assignment Block with custom table in CRM Web UI (Part 1)

$
0
0
Creating Assignment block in CRM Web UI is a very common requirement in CRM Web UI development and I will try to be as much descriptive as possible giving details of every step. Your comments and suggestions for improvement are most welcome.

 

1.   Introduction

 

The development consists out of three parts:

  1. a) Create maintenance tables
  2. b) Add assignment block in web UI account overview page (new assignment block)
  3. c) Copying delivery service related data into sales order header

2. MAJOR FEATURES

 

For Web UI:

Web UI Component BP_HEAD has been enhanced and a new assignment block will be created.

3. TECHNICAL DETAILS

 

Web UI Component BP_HEAD has been enhanced and a new BSP application YBP_O2C_BP_HEAD has been created. The View AccountSdsOV has been added to it.

Web UI Component Name:

BP_HEAD

BSP Application Name:

YB_O2C_BP_HEAD

Class

YCL_O2C_DELIVERY_SPECIFICATION, other classes generated automatically by Web UI Wizard.

Details:

Web UI component BP_HEAD has been enhanced

 

scn1.jpg

 

A new view has been created in the enhancement in the BSP application YB_O2C_BP_HEAD called AccountSdsOV. This view is for the assignment block for YSDS maintenance. The new block had been added to BP_HEAD/BPHEADOverview.

 

scn1.jpg

 

For adding Meta data (YSDS) to newly created sales orders for a given ship to party has been done using the class YCL_O2C_DELIVERY_SPECIFICATIONS

 

scn1.jpg

 

After creating the necessary data elements the table YSDS is created to save the data maintained in the assignment block

 

scn1.jpg

Now the KEY tables are maintained

 

scn1.jpg

Creating the Assignment Block:

The Web UI component BP_HEAD was enhanced so as to create the new view for assignment block.

A new view has been created with 2 context nodes

 

scn1.jpg

 

The Context for BUILHEADER is mapped to model head Bol entity is BUILHEADER. The Binding is done with BUILHEADER.

For the value node YSDSVALNODE the Dictionary structure YSDS is used.

 

scn1.jpg

 

The Configuration is done in the following manner.

 

scn1.jpg

 

Three buttons for Edit, Save, Cancel has been added to the top menu of the assignment block

 

scn1.jpg

 

In the implementation class an attrbute has to be added for the button

 

scn1.jpg

 

To make the list of buttons and their functionality the following code has been written in the do_prepare_output method of the implementation class.

 

scn1.jpg

 

scn1.jpg

Also the data from YSDS table is fetched and displayed on the screen.

 

scn1.jpg

In order to have a drop down list, the methods of the attributes, namely GET_V_XXXX and GET_P_XXXX has been adjusted accordingly for all the fields where drop down list is required.

 

scn1.jpg

 

Adding the following code in GET_P_XXXX helps in creation of drop down list.

 

scn1.jpg

 

The records for the drop down list are added in GET_V_XXXX

 

scn1.jpg

 

This has been done for all the the fields of YSDS except PARTNER.

Three event handler methods are created for Edit, Save and Cancel functions in the assignment block menu.

 

scn1.jpg

 

The cancel event changes edit mode to display mode.

 

scn1.jpg

 

The edit event changes the assignment block to editable one.

 

scn1.jpg

 

The save event has the necessary logic for saving the changes to table.

In order to add this view as an assignment block, the view is added in the View area shown below.

 

scn1.jpg

 

Now we go to component structure brower and enhance the view BPHEADOverview,

 

scn1.jpg

 

After editing the component page we add the assignment block we had created to the available assignment blocks (left to right).

 

scn1.jpg

The new assignment block is now available for use.

 

scn1.jpg

 

Continued in Creating Assignment Block with custom table in CRM Web UI (Part 2)


Viewing all articles
Browse latest Browse all 188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>