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

Function module for a pop up to input date and time

Former Member
0 Likes
7,417

Hi Experts,

Is there any function module by which we can have a pop up to input date and time?

Thanks in advance.

Yogesh Gupta

1 ACCEPTED SOLUTION
Read only

Former Member
3,498

Hi Yogesh Gupta ,

I Remember only this FM at present F4_DATE for the date...

For Time , Atpresent I dont remember...

If I able to recollect, I will reply in the same thread..

Regards,

GP..

Rewards points if its useful answer....

Hi Yogesh Gupta ,

I Remember only this FM at present F4_DATE for the date...

For Time , Atpresent I dont remember...

If I able to recollect, I will reply in the same thread..

Regards,

GP..

Rewards points if its useful answer....

3 REPLIES 3
Read only

Former Member
0 Likes
3,498

Get a date

DATE_GET_WEEK Returns week for a date

WEEK_GET_FIRST_DAY Returns first day for a week

RP_LAST_DAY_OF_MONTHS Returns last day of month

FIRST_DAY_IN_PERIOD_GET Get first day of a period

LAST_DAY_IN_PERIOD_GET Get last day of a period

RP_LAST_DAY_OF_MONTHS Determine last day of month

Date calculations

DATE_COMPUTE_DAY Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.

DATE_IN_FUTURE Calculate a date N days in the future.

RP_CALC_DATE_IN_INTERVAL Add days/months to a date

RP_CALC_DATE_IN_INTERVAL Add/subtract years/months/days from a date

SD_DATETIME_DIFFERENCE Give the difference in Days and Time for 2 dates

MONTH_PLUS_DETERMINE Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.

DATE_CREATE Calculates a date from the input parameters:

Example: DATE_CREATE

CALL FUNCTION 'DATE_CREATE'

EXPORTING

anzahl_jahre = 1

anzahl_monate = 2

anzahl_tage = 3

datum_ein = '20010101'

IMPORTING

datum_aus = l_new_date.

Result:

l_new_date = 20020304

Example: MONTH_PLUS_DETERMINE

data: new_date type d.

CALL FUNCTION 'MONTH_PLUS_DETERMINE'

EXPORTING

months = -5 " Negative to subtract from old date, positive to add

olddate = sy-datum

IMPORTING

NEWDATE = new_date.

write: / new_date.

Holidays

HOLIDAY_GET Provides a table of all the holidays based upon a Factory Calendar &/ Holiday Calendar.

HOLIDAY_CHECK_AND_GET_INFO Useful for determining whether or not a date is a holiday. Give the function a date, and a holiday calendar, and you can determine if the

date is a holiday by checking the parameter HOLIDAY_FOUND.

Example: HOLIDAY_CHECK_AND_GET_INFO

data: ld_date like scal-datum default sy-datum,

lc_holiday_cal_id like scal-hcalid default 'CA',

ltab_holiday_attributes like thol occurs 0 with header line,

lc_holiday_found like scal-indicator.

CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO'

EXPORTING

date = ld_date

holiday_calendar_id = lc_holiday_cal_id

WITH_HOLIDAY_ATTRIBUTES = 'X'

IMPORTING

HOLIDAY_FOUND = lc_holiday_found

tables

holiday_attributes = ltab_holiday_attributes

EXCEPTIONS

CALENDAR_BUFFER_NOT_LOADABLE = 1

DATE_AFTER_RANGE = 2

DATE_BEFORE_RANGE = 3

DATE_INVALID = 4

HOLIDAY_CALENDAR_ID_MISSING = 5

HOLIDAY_CALENDAR_NOT_FOUND = 6

OTHERS = 7.

if sy-subrc = 0 and

lc_holiday_found = 'X'.

write: / ld_date, 'is a holiday'.

else.

write: / ld_date, 'is not a holiday, or there was an error calling the function'.

endif.

Checking dates

DATE_CHECK_PLAUSIBILITY Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems.

Converting dates

DATE_CONV_EXT_TO_INT Conversion of dates to SAP internal format e.g. '28.03.2000' -> 20000328 Can also be used to check if a date is valid ( sy-subrc <> 0 )

Function to return literal for month

he table you want to use is T247. You can also use the function MONTH_NAMES_GET.

You can also try table T015M. It has the month number in it's key.

Kevin

Read only

Former Member
0 Likes
3,498

You can use one of them:

  1. POPUP_TO_CONFIRM_STEP - Create a dialog box in which you make a question whether the user wishes to perform the step.

  2. POPUP_TO_CONFIRM_WITH_MESSAGE - Create a dialog box in which you inform the user about a specific decision point during an action.

  3. POPUP_TO_CONFIRM_WITH_VALUE - Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object.

  4. POPUP_TO_DECIDE - Provide user with several choices as radio buttons

  5. POPUP_TO_DECIDE_WITH_MESSAGE - Create a dialog box in which you inform the user about a specific decision point via a diagnosis text.

  6. POPUP_TO_DISPLAY_TEXT - Create a dialog box in which you display a two-line message.

  7. POPUP_TO_SELECT_MONTH - Popup to choose a month

  8. POPUP_WITH_TABLE_DISPLAY - Provide a display of a table for user to select one, with the value of the table line returned when selected.

  9. POPUP_TO_CONFIRM - Pop-up dialog confirm an action before it is carried out.

  10. POPUP_TO_DISPLAY_TEXT - Displays a text in a modal screen

  11. POPUP_TO_INFORM - Displays several lines of text. No OK or Cancel buttons.

  12. TH_POPUP - Display a popup system message on a specific users screen.

  13. POPUP_TO_CONFIRM_LOSS_OF_DATA - Create a dialog box in which you make a question whether the user wishes to perform a processing step with loss of data.

  14. POPUP_TO_CONFIRM_STEP - Create a dialog box in which you make a question whether the user wishes to perform the step.

  15. POPUP_TO_CONFIRM_WITH_MESSAGE - Create a dialog box in which you inform the user about a specific decision point during an action.

  16. POPUP_TO_CONFIRM_WITH_VALUE - Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object.

  17. POPUP_TO_DECIDE - Provide user with several choices as radio buttons

  18. POPUP_TO_DECIDE_WITH_MESSAGE - Create a dialog box in which you inform the user about a specific decision point via a diagnosis text.

  19. POPUP_TO_DISPLAY_TEXT - Create a dialog box in which you display a two-line message.

  20. POPUP_WITH_TABLE_DISPLAY - Provide a display of a table for user to select one, with the value of the table line returned when selected.

  21. POPUP_TO_CONFIRM_LOSS_OF_DATA - Create a dialog box in which you make a question whether the user wishes to perform a processing step with loss of data.

  22. POPUP_TO_CONFIRM_STEP - Create a dialog box in which you make a question whether the user wishes to perform the step.

  23. POPUP_TO_CONFIRM_WITH_MESSAGE - Create a dialog box in which you inform the user about a specific decision point during an action.

  24. POPUP_TO_CONFIRM_WITH_VALUE - Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object.

  25. POPUP_TO_DECIDE - Provide user with several choices as radio buttons

  26. POPUP_TO_DECIDE_WITH_MESSAGE - Create a dialog box in which you inform the user about a specific decision point via a diagnosis text.

  27. POPUP_TO_DISPLAY_TEXT - Create a dialog box in which you display a two-line message.

  28. POPUP_WITH_TABLE_DISPLAY - Provide a display of a table for user to select one, with the value of the table line returned when selected.

Regards,

Chandru

Read only

Former Member
3,499

Hi Yogesh Gupta ,

I Remember only this FM at present F4_DATE for the date...

For Time , Atpresent I dont remember...

If I able to recollect, I will reply in the same thread..

Regards,

GP..

Rewards points if its useful answer....