CL_GUI_CALENDAR

Hi Everyone.
I am building a gui screen dynamically in a class method. I am using a gui container, and a dynamic document cl_dd_document inside the container. Inside the dynamic document I utilizing the form area using cl_dd_form_area. Within the form area I have a couple of selection elements. I had four date objects that I made input elements. The free text input elements were a pain to maintain. What I wanted to do was replace the input elements with the cl_gui_calendar object.
Anyone know the best way to implement the gui calendar? Can I add the calendar to the dd_document or the dd_form_area?
I am not sure how best to implement the calendar.
Thanks for any help I can get. I am not looking for specifics, just a general direction.
Stephen

Hi Stephen
Try this link:
http://help.sap.com/printdocu/core/print46b/en/data/en/pdf/BCCICALENDAR/SAP_KALENDER.pdf
Reg:Screen Programming
Regards
Neha Shukla

Similar Messages

  • How to refresh the result of an ALV

    Hello,
    I'm try to use an ALV Grid and I want to refresh the data with a request. It work the first time but not the others. This is my code :
    REPORT  ZRAP_TRANS.
    DATA it_lgu_log_hre TYPE TABLE OF ZLGU_LOG_HRE.
    DATA: R_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
          R_GRID TYPE REF TO CL_GUI_ALV_GRID.
    DATA: r_cont_date_beg TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
          r_calendar_date_beg TYPE REF TO CL_GUI_CALENDAR.
    DATA: date_beg LIKE sy-datum,
          date_end LIKE sy-datum,
          hour_beg LIKE sy-timlo,
          hour_end LIKE sy-timlo.
    date_beg = sy-datum.
    date_end = sy-datum.
    hour_beg = 28800.
    hour_end = 61200.
    SELECT * FROM ZLGU_LOG_HRE INTO TABLE it_lgu_log_hre.
    MODULE POPULATE_LIST OUTPUT.
      CREATE OBJECT r_container
        EXPORTING
          CONTAINER_NAME = 'CONT_TRANSACTIONS'.
      CREATE OBJECT r_grid
        EXPORTING
          I_PARENT = r_container.
      CALL METHOD r_grid->set_table_for_first_display
        EXPORTING
          i_structure_name = 'ZTRANS'
        CHANGING
          it_outtab        = it_lgu_log_hre.
    ENDMODULE.
    MODULE USER_COMMAND_9000 INPUT.
      CASE SY-UCOMM.
        WHEN 'SEARCH' OR 'PICK'.
          r_container->set_visible( visible = 'TRUE' ).
          SELECT * FROM ZLGU_LOG_HRE INTO TABLE it_lgu_log_hre WHERE AEDTM >= date_beg AND AEDTM <= date_end.
          r_grid->refresh_table_display( ).
        WHEN 'BACK'.
          SET SCREEN 0.
      ENDCASE.
    ENDMODULE.
    When I arrive in my Dynpro I see all my table. When I search the first time I view the correct result and when I search a second time, with diffrent data, I have the result of the first search.
    Do you have an idea?
    Thanks a lot.

    Hi,
    The method refresh_table_display( ) should be coded in the PBO module (use the parameter is_stable to keep current grid position)...
    You could have something like e.g:
    MODULE POPULATE_LIST OUTPUT.
      IF r_container IS INITIAL.
        CREATE OBJECT r_container
          EXPORTING
            CONTAINER_NAME = 'CONT_TRANSACTIONS'.
        CREATE OBJECT r_grid
          EXPORTING
            I_PARENT = r_container.
        CALL METHOD r_grid->set_table_for_first_display
          EXPORTING
            i_structure_name = 'ZTRANS'
          CHANGING
            it_outtab        = it_lgu_log_hre.
      ELSE.
        r_grid->refresh_table_display( ).
      ENDIF.
    ENDMODULE.
    Kr,
    Manu.

  • [How-to] Evaluate dynamically an ABAP Constant

    Hello,
    Do you know how I can dynamically/programatically retrieve the value of a defined constant in an ABAP Class having the name of the Constant.
    I tried using the CLASSDESCR of the class to retrieve all attributes of type "constant", but I am not able to get the constant-value.
    Thanks for your help,
    Laurent

    Laurent Chavanis wrote:
    Hello,
    >
    > Do you know how I can dynamically/programatically retrieve the value of a defined constant in an ABAP Class having the name of the Constant.
    >
    > I tried using the CLASSDESCR of the class to retrieve all attributes of type "constant", but I am not able to get the constant-value.
    >
    > Thanks for your help,
    > Laurent
    Seems you are trying to do something like this, not sure though
    DATA:
      lv_const_name TYPE char30 VALUE 'ALIGN_AT_BOTTOM'.
    FIELD-SYMBOLS:
    <fs_cons_value> TYPE ANY.
    ASSIGN cl_gui_calendar=>(lv_const_name) TO <fs_cons_value>.
    IF sy-subrc IS INITIAL.
      WRITE :<fs_cons_value>.
    ENDIF.
    You can only access constants defined as 'Public' using the above technique.
    -Rajesh.

  • Customize search help for date.

    Dear All ,
    Any Idea how we going to customize / standard function the search help for the date by refering to the closing period month and year.
    Example this month closing period is 'July 2009', so when user click on the screen search help date button, the search help will pop up only 'July 2009' calender. Not like standard one with different years and months.
    I only want 1 month calender.
    Any idea ??
    Thanks.

    You may need to look into fm
      CALL FUNCTION 'F4_DATE'
        EXPORTING
          date_for_first_month         = sy-datum  " <your date>
        IMPORTING
          select_date                  = l_select_date
          select_week                  = l_select_week.
    or use class CL_GUI_CALENDAR
    a®s

  • How to display the calender which responds to double click even module pool

    Hi Experts,
                       I got a  requirement  to display a calender in module pool. when user clicks on any date on the calender i need pick that particular date and i have to display that date with some other information.
    I have displayed the calender using
    data:      my_calendar1           TYPE REF TO cl_gui_calendar,
                  my_calendar1_style TYPE i,
                 container1                  TYPE REF TO cl_gui_custom_container.
        CREATE OBJECT container1
           EXPORTING
             container_name = 'G_CONTAINER1'.
    *---Assing style to calender
        my_calendar1_style = cnca_style_v_navigator.
    *----Creating calender object
        CREATE OBJECT my_calendar1
           EXPORTING
             parent     = container1
             view_style = my_calendar1_style.
    please help me to display the calender which responds to double click event or single click.
    Thanks in advance,
    nag.

    Hi Nag,
    You have to use DATE_SELECTED event. Register it (method SET_REGISTERED_EVENTS), assign an handler (SET HANDLER) in which you know which date has been selected.
    You have to trigger the PAI/PBO so that you can change the list of possible values in the list boxes, so you should register (via method above) by setting APPL_EVENT = 'X'.
    Refer to demo program SAPCALENDAR_NAVIGATOR to see exactly how it works.
    BR
    Sandra

  • Disable date from F4 help

    Hi All,
         I have a screen field of type DATS, during F4 based on some condition I want to disable some dates, i.e user cannot select that date and also I want to set some max. date limit.
    Regards,
    bharani

    LOOP AT SCREEN.
    IF screen-group = 'XYZ'
    screen-input = 0 or 1....check in debugging mode
    modify screen.
    endif.
    ENDLOOP..
    That doesn't work for dates inside calendar controls!!!
    To the poster, take a look at class CL_GUI_CALENDAR and the demo programs that use it.  I don't know that you can stop certain dates from being picked though.  I've only used it for formatting the way a calendar is displayed.

Maybe you are looking for

  • How much future useage for CS6 for a stand-alone photographer?

    I'm a semi professional small-scale photographer. It's a hobby, but I do some commercial work. It certainly isn't a living (I have other income) I've been on CS6 for some time. It does absolutely everything that I need, and in fact it's too much. I c

  • Error when running Air apps on Mac

    Hey everyone, There is a person I am working with who keeps running into this issue where the Air application she is running crashes immediately. I have the error logs below. Anyone have the slightest idea what might be causing this? Error report: Mo

  • Video - downloading from pc to library and itouch

    Hi, I had difficulty downloading video from my pc to library. success rate 2 out of 10. can't figure out what is different between these 2 and the rest. Also, could not sync these 2 to my itouch. When I hit the Video icon on my itouch, it keep saying

  • Why are animation presets not showing in pop-up list for fractal noise?

    In a standard install of AE CS4, the animation presets pop-up list showed a bunch of presets for fractal noise (see attached image). In a standard install of AE CS5.5, the animation presets pop-up list showed a bunch of presets for fractal noise (see

  • Retrieving Replaced data

    In the process of saving our information files were lost. In attempts to reverse the process THE MAIN AUDIO FILE that we use to create songs, was replaced by another file of the Same Name. My attempts at using time machine failed because it wont go f