题
我的朋友似乎具有一些麻烦种.这里有一个复制的他的问题-张贴在SAP社会论坛。
嘿每个人, 我试图来标记DateNavigator与两个类别。我做了一个上下文中叫做标记,有的属性日期、类别和工具提示。
节点:标记
- 日期:
- 类别:
- 提示:
我填类别属性,与两个类别: e_category-three
和 e_category-four
.我充满了新的属性与日期。我想要一些这些日期要类别的三个和其他类别的四个。
目前,所有日期都设定为第一类(e_category-three
)和代码看起来是这样的。
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.
" ...
解决方案
我假设 ls_dates_shared
是的类型标记?
如果是这种情况下你必须要填补的领域 ls_dates_shared-category
和 ls_dates_shared-tooltip
明确。
目前这可能是填补现有的代码,你给我们。试试这样的事情:
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"
ls_dates_shared-category = e_category-three.
"ls_dates-tooltip = appropriate_tooltip for 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"
ls_dates_shared-category = e_category-four.
"ls_dates-tooltip = appropriate_tooltip for e_category-four"
append ls_dates_shared to lt_dates_shared.
add 1 to date.
ENDWHILE.
endif.
...
不隶属于 StackOverflow