‎2008 Dec 30 7:45 AM
In report program, how can i get the default screen values as current month's low and high values as sy-datum will only give current date. i. e. suppose today it is dec 30 then, default low value should show dec 01 and high should show dec 31. please help.
‎2008 Dec 30 7:51 AM
Hi,
You need to write your code in the event INITIALIZATION to get the default values in the selection screen.
The FM to be used is HRWPC_BL_DATES_MONTH_INTERVAL. this returns the first day and last day of the month for the given date.
Thanks,
Shailaja
‎2008 Dec 30 7:47 AM
hi
write the coding in the initialization to have default screen values.
Regards,
Madhu
‎2008 Dec 30 7:51 AM
Hi,
You need to write your code in the event INITIALIZATION to get the default values in the selection screen.
The FM to be used is HRWPC_BL_DATES_MONTH_INTERVAL. this returns the first day and last day of the month for the given date.
Thanks,
Shailaja
‎2008 Dec 30 7:54 AM
‎2008 Dec 30 8:00 AM
Here it goes...
DATA: lv_begda TYPE sy-datum,
lv_endda TYPE sy-datum.
INITIALIZATION.
CALL FUNCTION 'HRWPC_BL_DATES_MONTH_INTERVAL'
EXPORTING
datum = sy-datum
month_pst = 0
month_ftr = 0
IMPORTING
begda = lv_begda
endda = lv_endda
EXCEPTIONS
invalid_values = 1
OTHERS = 2.
IF sy-subrc = 0.
WRITE: lv_begda,
/ lv_endda.
ENDIF.
START-OF-SELECTION.Regards,
Shailaja
‎2008 Dec 30 7:56 AM
hi,
Write ur coding in AT SELECTION SCREEN OUTPUT .
The FM to be used is HRWPC_BL_DATES_MONTH_INTERVAL. this returns the first day and last day of the month for the given date.
It will give the first day and last day of the current month that you will get from sy-datum.
then it will get displayed on your selection screen.
regards
Bharat.
‎2008 Dec 30 8:03 AM
You can do the default value assignment in the INITIALIZATION event, use the function REAL_ESTATE_CALC_DATE_SLST to get the first and the last day of the month by passing the current date as the input.
You can also use LAST_DAY_OF_MONTHS. Keeping 1st as the first day of month always
regards,
Advait