Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reg:Screen Programming-Date picker

Former Member
0 Likes
380

Hello All,

Currently am working in time sheet in screen programming. Am bringing the calendar control using custom controller concepts, which the code as follows,

CLASS lcl_event_receiver DEFINITION.

PUBLIC SECTION.

METHODS dateselected

FOR EVENT date_selected OF cl_gui_calendar

IMPORTING date_begin

date_end.

ENDCLASS. "lcl_event_receiver DEFINITION

CLASS lcl_event_receiver IMPLEMENTATION.

METHOD dateselected.

if not date_begin is INITIAL.

PERFORM determine_monday using date_begin.

endif.

ENDMETHOD.

TO register events

wa_events-eventid = h_dat_calendar->m_id_date_selected.

wa_events-appl_event = ' '.

APPEND wa_events TO events.

CALL METHOD h_dat_calendar->set_registered_events

EXPORTING

events = events

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

illegal_event_combination = 3.

Object creation for container

CREATE OBJECT h_dat_container

EXPORTING container_name = 'DATEPICKER'.

object creation for the date selected.

CREATE OBJECT event_receiver.

SET HANDLER event_receiver->dateselected FOR h_dat_calendar.

when clicking a particular day on a calendar i can get a day through the set_registered events, my problem was after the method and endmethod it stops as such displaying the screen instead of going to the PBO.

After clicking the date it should go to PBO how can i acheive this scenario?

1 REPLY 1
Read only

Former Member
0 Likes
347

it was 'X' that caused me the trouble

wa_events-appl_event = 'X'.

after registerting this events i could achive what i wanted