在 DateNavigator 上设置类别
我的朋友似乎在使用 ABAP 时遇到了一些问题。这是他的问题的副本 - 发布在 SAP 社区论坛上。
嘿大家, 我试图用两个类别来标记 DateNavigator。我创建了一个名为“标记”的上下文,其中包含“日期”、“类别”和“工具提示”属性。
节点:标记
- 日期:
- 类别:
- 工具提示:
我用两个类别填充了类别属性:e_category-三
和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.
" ...
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.
" ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设 ls_dates_shared 是类型标记?
如果是这种情况,您必须明确填写
ls_dates_shared-category
和ls_dates_shared-tooltip
字段。目前,这可能会在您提供给我们的代码片段之前填写。尝试这样的事情:
I'm assuming that
ls_dates_shared
is of type marking?If this is the case you have to fill the fields
ls_dates_shared-category
andls_dates_shared-tooltip
explicitly.Currently this may be filled prior to the code snippet that you give us. Try something like this: