Skip to Content

Applies to:

SAP CRM WEB UI version 6.0 and 7.0 or more 


This blog is to add New Date Fields as Context Attribute to the UI component. There are some objects of the object model for business transaction which cannot be enhanced using EEWB/AET. For such cases SAP provides an alternative enhancement option.

Chand Shaik is Techno Functional Consultant in the area of SAP CRM and SAP Portal. He have started with SAP in 2004 coming from a web development background (JAVA). His experience ranges from Web Dynpro Java, Enterprise Portal, CRM ABAP, CRM BSP and BOL, CR580 and to functional skills in SAP. He has done several projects at different SAP customers. Currently working as a SAP CRM Consultant with TCS.

This Document explains how to add new Date Fields as context attribute to the UI component.

  1. Define Date Types
  2. Extend Model for Business Transactions with New Relations
  3. Create Context Attributes
  4. Change the super class to CL_CRM_UIU_BT_DATE_CN of the Z context node’s class
  5. Modify the ON_NEW_FOCUS as below.
  6. Modify the GET_XXX of the newly added attribute to remove NOT BOUND text in the field
  7. Modify the GET_I_XXX of the newly added attribute to make the field editable if required.
  8. Add the new Date Fields attribute to WEB UI View Configuration from the component work bench
  9. Result

Define Date Types

For Duration Field

Extend Model for Business Transactions with New Relations


For Duration field

Create Context Node in Component work bench

Change the super class to CL_CRM_UIU_BT_DATE_CN of the Z context node’s class

Check for the errors(Remove the extra Base_Entity_Name attribute from the class) and activate

Now you can observe the new date attribute has been added to the node

Modify the ON_NEW_FOCUS as below

Pass the’ I ‘for Item, ‘H’ for Header

Pass the Date Type defined in the date profile

Pass the category as T for Dates.

Add the new field to the UI Config

For Date field

For Duration field


To report this post you need to login first.


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

  1. Arun Prakash Karuppanan

    I don’t understand why you need to add new relations to get something that is already there. The reason your attribute works is only due to the coding in the ON_NEW_FOCUS method. It has nothing to do with the relations. Even better would be to skip the node/relations altogether. Just adding a model attribute to an existing node by browsing through the relations and changing the code in the get/set to point to the right entity would have been enough.



    1. Chand Shaik Post author

      Here I am not adding the new relationship. just we need to make sure the relevant BOL relationship is present or not, if not we need to maintain. Try to debug the ON_NEW_FOCUS,Date profile fields refers the BOL relationship maintained is the SPRO.

      However I am not sure about adding new attribute to existing node with bol relationship and changing the code in the getter methods is also may be another approach. If you have proven solution, please share.



    2. Former Member

      I do agree with Arun.

      All you need to do is create a new node and filter the collection of date in the on_new_focus method.




Leave a Reply