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

selection screen help

Former Member
0 Likes
725

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
701

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

6 REPLIES 6
Read only

Former Member
0 Likes
701

hi

write the coding in the initialization to have default screen values.

Regards,

Madhu

Read only

Former Member
0 Likes
702

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

Read only

0 Likes
701

can you write the code please

Read only

0 Likes
701

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

Read only

Former Member
0 Likes
701

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.

Read only

Former Member
0 Likes
701

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