‎2007 Nov 23 5:00 AM
Hi all,
Give me an Idea that I want to populate the day(like for 23 nov as Friday 24 of nov as Saturday) dynamically for every month in table control for time sheet program.Could you suggest me what is the best way to achieve this?
‎2007 Nov 23 5:04 AM
try function module HRIQ_DATE_COMPUTE_DAY or HRIQ_GET_DATE_DAYNAME
‎2007 Nov 23 5:04 AM
try function module HRIQ_DATE_COMPUTE_DAY or HRIQ_GET_DATE_DAYNAME
‎2007 Nov 23 5:22 AM
Hi Sharayu,
The function module you given is ok.But am Using Table Control which is having 31 fields for display for 31 days when the user enters the data in today's date it show as Friday at the top or somewhere else in table control because in table control we can't add text box or pushbutton.so whether i have to add 31 text box at the top of table control and display the correct day?if some other solution is there let me know.
‎2007 Nov 23 5:15 AM
Hi,
Use this FM to get the day from date
DATE_TO_DAY
and
Using the function module below at the initialization you can dynamically populate the month.
*----
Initialization
*----
INITIALIZATION.
CALL FUNCTION 'CACS_DATE_GET_YEAR_MONTH'
EXPORTING
I_DATE = SY-DATUM
IMPORTING
E_MONTH = p_month
E_YEAR = p_year
Regards,
‎2007 Nov 23 5:18 AM
‎2007 Nov 23 5:20 AM
use this FM
DATA : lv_date TYPE sydatum.
DATA : lv_day TYPE t246-langt.
lv_date = v_date.
CALL FUNCTION 'FTR_DAY_GET_TEXT'
EXPORTING
pi_date = lv_date
IMPORTING
pe_day_text2 = lv_day.
v_day_name = lv_day.