Skip to Content

CRM 7.0 :Adding Custom Text Type on Web UI View

In this blog I will explain about Adding Custom Text Type on Web UI View  for Business Transaction.

This blog will touch all the topics covered so far starting from Customization and Component Enhancement.

Step 1: “Z” Text Created and Added under Text Determination  (Check customization in “Text Management”).

Step 2: Text is visible In Note for Transaction Type.

Step 3: Extend BT Model for “Z” Text Type

Image 1.png

Create New Entry Selecting Source Object “BTTextH” and Reletion Name “Your Custom Text Type” (find from F4 Help of  Reletion Name).

image 2.png

BT Model Get Extended

Image 3.png

Step 4: Example of  Enhanceing Standard Component for Adding Text On View.

Create Custom Controller

IMAGE 5.png

IMAGE 6.png

Bind BTADMINH to Component Controller BTADMINH.

IMAGE 7.png

Enhance View Set  to Add Text on Veiw

IMAGE 8.png

Create Node “BTZTEXT”

IMAGE 9.png

IMAGE 10.png

IMAGE 11.png

IMAGE 12.png

Generate Getter Setter for “STRUCT.CONC_LINES”

in  Get method set ” value = ‘ ‘  “.

Add code on .htm of view set.

<%@page language=”abap” %>
<%@extension name=”htmlb” prefix=”htmlb” %>
<%@extension name=”thtmlb” prefix=”thtmlb” %>
<%@extension name=”xhtmlb” prefix=”xhtmlb” %>
<%@extension name=”crm_bsp_ic” prefix=”crmic” %>
<%@extension name=”bsp” prefix=”bsp” %>
<thtmlb:areaFrameSetter displayMode     = “<%= controller->view_group_context->is_view_in_display_mode( controller ). %>”
                        toolbarButtons  = “<%= controller->gt_button %>”
                        maxButtonNumber = “1” />
<thtmlb:grid xmlns:thtmlb = “CRMThinHTMLBLibrary”
             cellSpacing  = “1”
             columnSize   = “1”
             height       = “100%”
             rowSize      = “5”
             width        = “100%” >
  <thtmlb:gridCell colSpan     = “1”
                   columnIndex = “1”
                   rowIndex    = “1”
                   rowSpan     = “1” >
    <bsp:call comp_id = “<%= controller->GET_VIEWAREA_CONTENT_ID( ‘TaskDetailsViewArea’ ) %>”
              url     = “<%= controller->GET_VIEWAREA_CONTENT_URL( ‘TaskDetailsViewArea’ ) %>” />
  </thtmlb:gridCell>
  <thtmlb:gridCell colSpan     = “1”
                   columnIndex = “1”
                   rowIndex    = “2”
                   rowSpan     = “1” >
    <bsp:call comp_id = “<%= controller->GET_VIEWAREA_CONTENT_ID( ‘NotesViewArea’ ) %>”
              url     = “<%= controller->GET_VIEWAREA_CONTENT_URL( ‘NotesViewArea’ ) %>” />
  </thtmlb:gridCell>
  <%– Text Add –%>

  <%
  include: crm_status_con.
  data:
  lv_status       type        string,
  lv_process_type type        string,
  lr_BTADMINH     type REF TO cl_crm_bol_entity.

  try.
  lr_BTADMINH ?= BTADMINH->collection_wrapper->get_current( ).
  lv_process_type = lr_BTADMINH->get_property_as_string( ‘PROCESS_TYPE’ ).

if lv_process_type = ‘ZTST ‘ %>

<thtmlb:gridCell colSpan=”1″ columnIndex=”1″ rowIndex=”4″ rowSpan=”1″>
       <thtmlb:label id   = “text”
       design = “label”
       for    = “//”
       text = “Text” />
       </thtmlb:gridCell>
  
    <thtmlb:gridCell colSpan=”1″ columnIndex=”1″ rowIndex=”5″ rowSpan=”1″  height = “15%”
       width       = “100%” >
       <thtmlb:textArea cols     = “164”
       rows     = “5”
       height   = “50”
       width    = “100%”
       text     = “//BTZTEXT/CONC_LINES”
       disabled = “<%= BTZTEXT->GET_I_Conc_Lines( ) %>” />
       </thtmlb:gridCell>

ENDIF.
<%
  catch cx_root.
  endtry.
  %>
 

Output of ZText Block Added on View

IMAGE 13.png

3 Comments
You must be Logged on to comment or reply to a post.