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

Display default value in the parameter

Former Member
0 Likes
1,509

Hi ,

I am learning the ABAP, I want to display the first day of the current month in the selection screen using parameters.

Thanks,

Rama.

Hi ,

I am learning the ABAP, I want to display the first day of the current month in the selection screen using parameters.

Thanks,

Rama.

4 REPLIES 4
Read only

Former Member
0 Likes
1,200


Hi mohan,

Please find the below code.

data: lv_date type sy-datum,

initialization.
concatenate '01' sy-datum+4(2) sy-datum+0(4) into lv_date.

p_date = lv_date.

Thanks,

Sree

Read only

Former Member
0 Likes
1,200

Hi ,

If you want to display the day name , this is the function module you must use .

RH_GET_DATE_DAYNAME

pass the date to this FM and it will return the day name .

Thanks

Manik

Read only

Former Member
0 Likes
1,200

hi Rama Mohan,

Please try this FM also:

CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
   EXPORTING
     IV_DATE                   = sy-datum
  IMPORTING
    EV_MONTH_BEGIN_DATE       = s   "start date of the current month
    EV_MONTH_END_DATE         = e   "end date of the curentmonth

.

Read only

0 Likes
1,200

Thank you Abdul,

I can add a photo .

data: lv_date type d.

INITIALIZATION.

CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'

    EXPORTING

      IV_DATE                   = sy-datum

   IMPORTING

     EV_MONTH_BEGIN_DATE       = lv_date.

f_day = lv_date.