cancel
Showing results for 
Search instead for 
Did you mean: 

Colours in Date Navigator

Former Member
0 Kudos

Hi,

I am trying to use data navigator UI element. My requirement is to highlight colours on few dates i.e absent days of an employee.

Saw the help documents but couldn find how to do it.

Could you please tell me on how to do it step by step.

Thanks in advance,

Sri

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

I think these will be helpful for you.

[Date Navigatorproperties|https://cw.sdn.sap.com/cw/docs/DOC-30969?treeid=DOC-8137]

[Date Navigator - how to set colors for individual dates|;

Thanks & Regards,

Monishankar C

Answers (2)

Answers (2)

sahai
Contributor
0 Kudos

hi anusri,

DateNavigatorMarking property of the ui element can be used you van simply set it to any of the four possible colour to display.

regards,

sahai.s

gill367
Active Contributor
0 Kudos

hi

-


> Create a node with one attribute .

let node name -- marking.

attribute name -- date of type D.

---> give cardinality and selection as 0..N

-


> and then go to the layout and add right click on the date navigator node and insert selction.

-


> give the makring node as the data source and date attribute as data property.

-


> in the wddoinit or in the supply function of the node MARKING. fill the node with the values i.e. with the dates which you

want to highlight.

like as shown below.

DATA lt_marking TYPE wd_this->Elements_marking.
  DATA ls_marking LIKE LINE OF lt_marking.

  lS_marking-category = CL_WD_DATE_NAV_LEGEND=>E_CATEGORY-ONE.
  lS_marking-date     = '20110101'.
APPEND LS_MARKING TO LT_MARKING.
lS_marking-category = CL_WD_DATE_NAV_LEGEND=>E_CATEGORY-TWO.
  lS_marking-date     = '20110103'.
APPEND LS_MARKING TO LT_MARKING.
lS_marking-category = CL_WD_DATE_NAV_LEGEND=>E_CATEGORY-TWO.
  lS_marking-date     = '20110106'.
APPEND LS_MARKING TO LT_MARKING.
** bind all the elements
data node type ref to if_wd_context_node.
node = wd_context->get_child_node( 'MAKRING' ).
  node->bind_table(
    new_items            =  lt_marking
    set_initial_elements = abap_true ).

-


> then go to the layout and set the category property of the marking UI to any of the four possible values to

give them a color.

thanks

sarbjeet singh