03-31-2014 5:27 PM
Hi,
Anyone can guide me, how to add the factory or Holiday calender in ABAP Selection screen?
Thanks in advance.
VJ.
04-01-2014 6:05 AM
Hi Vijay,
Call Function module 'F4_DATE', in event AT SELECTION-SCREEN ON VALUE-REQUEST.
Pass Factory calendar ID to " FACTORY_CALENDAR_ID" parameter.
You can execute the FM in SE37 screen and see how it works.
Days marked in red will be one which are excluded from the standard calendar.
Regards,
Nisha Vengal.
03-31-2014 8:24 PM
03-31-2014 9:11 PM
Hi Vikram,
Thanks for your reply..
My req is, when we click the selection, i need the factory calender. i don't want F.calender ID.
Please guide me.
Thanks.
VJ.
03-31-2014 9:56 PM
Can you please elaborate?
When you click on what? a button?
What do you mean by you need the factory calendar? a group of parameters and select options?
Vikram.M
03-31-2014 10:01 PM
In the Select Options:\\
SELECT-OPTIONS: s_date FOR sy-datum DEFAULT space NO-EXTENSION.
Here i declared sy-datum.
my client re.q is factory or holiday calender. Below is my current screen.
03-31-2014 10:29 PM
You will need to build the logic on at selection on value request.
for factory calendars you can look at the transaction SCAL. You should be able to build something similar. You can use the tables:
THOCT: Public holiday calendar texts
TFACD: calendar definition
THOCI: Public holiday calendar.
There should be similar table from which you can get the required data.
Vikram.M
04-01-2014 6:05 AM
Hi Vijay,
Call Function module 'F4_DATE', in event AT SELECTION-SCREEN ON VALUE-REQUEST.
Pass Factory calendar ID to " FACTORY_CALENDAR_ID" parameter.
You can execute the FM in SE37 screen and see how it works.
Days marked in red will be one which are excluded from the standard calendar.
Regards,
Nisha Vengal.
04-01-2014 4:26 PM
Hi Nisha,
Thanks for your reply.
As per your sugession i have created but i am not able to pick the date from Factory calender.
Means, in the selection screen s_date field just showing the factory calender but i am not able to pick the date from the f. calender.
You have any idea about this issue?
Thanks.
VJ.
04-01-2014 4:36 PM
Use the below code and it should work.
AT SELECTION-SCREEN on VALUE-REQUEST FOR p_date. "p_date is your selection screen field.
CALL FUNCTION 'F4_DATE'
EXPORTING
DATE_FOR_FIRST_MONTH = SY-DATUM
DISPLAY = ' '
FACTORY_CALENDAR_ID = 'US'
HOLIDAY_CALENDAR_ID = 'US'
IMPORTING
SELECT_DATE = p_date
The thing to note above is DISPLAY should NOT be 'X'.
04-01-2014 5:55 PM
Hi Vikram,
The above code is working. and also trying for High value..
Means in the selection screen ranges low and high..
Once again thanks for your cooperation.
Thanks.|
VJ.
04-01-2014 6:00 PM