Skip to Content
avatar image
Former Member

start date in date navigator

im using date navigator i need to put start date in navigator as current date but when i give sy-datum it shows the output as invalid entry. kindly resolve this issue .Thanking u in advance.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 30, 2008 at 12:20 PM

    Try creating attribute type datum in the context.

    Bind it to the Starts with property of DateNavigator UI Element.

    and Set its value to sy-datum in WDDOINIT.

    I think it will work.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      After setting context to data element DATUM,

      you call set_atribute and assign default value.

      DATA lo_el_context TYPE REF TO if_wd_context_element.

      DATA ls_context TYPE wd_this->element_context.

      DATA lv_datum LIKE ls_context-datum.

      • get element via lead selection

      lo_el_context = wd_context->get_element( ).

      • get single attribute

      lo_el_context->set_attribute(

      EXPORTING

      name = `DATUM`

      value = SY-DATUM ).

      Happy coding.

      //Kiran Singh