Hi. My friend seems to be having some trouble with ABAP. Here's a copy of his question - posted on the SAP community forums.
Hey Everyone, I am trying to mark the DateNavigator with two categories. I made a context called Marking, with attributes Date, Category and Tooltip.
Node: Marking
- Date:
- Category:
- Tooltip:
I filled category attribute with two categories : e_category-three
and e_category-four
. I filled the Date attribute with dates. I want some of these dates to be category-three and others category-four.
Currently, all dates are set to the first category (e_category-three
) and the code looks like this.
if ls_host_name-host_name <> host_msg and ls_vm_name-vm_name = vm_msg.
loop at lt_machine_booking into wa.
if ls_host_name-host_name = wa-host_name.
date = wa-reserved_from.
while date <= wa-reserved_till.
ls_dates_shared-dates = date. > i want these dates to be e_category-three
append ls_dates_shared to lt_dates_shared.
add 1 to date.
ENDWHILE.
endif.
ENDLOOP.
elseif ls_host_name-host_name <> host_msg and ls_vm_name-vm_name <> vm_msg.
loop at lt_machine_booking into wa.
if ls_host_name-host_name = wa-host_name and ls_vm_name-vm_name = wa-vm_name.
date = wa-reserved_from.
while date <= wa-reserved_till.
ls_dates_shared = date. > i want these dates to be e_category-four
append ls_dates_shared to lt_dates_shared.
add 1 to date.
ENDWHILE.
endif.
" ...