Get date F4 help for date with holiday calendar


We can highlight public holiday in F4 date help we can achieve this by using the calendar id i.e. “IN” for India or any other calendar id defined in the SCAL transaction.




  1. SCAL transaction code


  1. select the calendar and click on the year






  1. Now write a code and include the calendar id “IN”



PARAMETERS p_date TYPE gkday.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_date.
 CALL FUNCTION 'F4_DATE'
   EXPORTING
     date_for_first_month         = sy-datum
     factory_calendar_id          = 'IN'  " 'IN' for India
   IMPORTING
     select_date                  = p_date
   EXCEPTIONS
     calendar_buffer_not_loadable = 1
     date_after_range             = 2
     date_before_range            = 3
     date_invalid                 = 4
     factory_calendar_not_found   = 5
     holiday_calendar_not_found   = 6
     parameter_conflict           = 7
     OTHERS                       = 8.
 IF sy-subrc <> 0.


 ENDIF.


Save and execute


Protected by Copyscape Web Copyright Checker

No comments:

Post a Comment

/*Newer Post*/ Older Post Home