質問

私の友人のようだとは困ABAP.こちらのコピーの質問に掲載してSAP地域フォーラム


こんにちは皆様、 うことによりマークのDateNavigatorとをテーマにしています。またコンテキストというマーキング、属性の日カテゴリーとツールチップ.

ノード:マーキング

  • 日時:
  • カテゴリ:
  • ツールヒント:

I封入カテゴリの属性は二つのカテゴリ: e_category-threee_category-four.I封入日の属性です。またこれらの日を区分三その他のカテゴリです。

現在、すべての日付に設定した最初のカテゴリー(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-categoryls_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.
...
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top