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

Dump message

Former Member
0 Likes
333

I wish to restrict my user on selection screen.

As soon as user enters the date range it should validate that date range should not be greater than one month.

select-options : mbadat for eban-badat.

At SELECTION-SCREEN.

if mbadat is not INITIAL.

perform check_month.

endif.

CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'

EXPORTING

DATE1 = mbadat-high

DATE2 = mbadat-low

OUTPUT_FORMAT = '05'

  • IMPORTING

  • YEARS =

MONTHS = v_months

DAYS = v_days

  • EXCEPTIONS

  • INVALID_DATES_SPECIFIED = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

IF v_days > 31.

MESSAGE 'Date Range should be less than 1 Month' TYPE 'E'.

ENDIF.

Gives a DUMP messg

Function parameter "DAYS" is unknown.

What happened?

Error in ABAP application program.

The current ABAP program "ZSPURREQ" had to be terminated because one of the

statements could not be executed.

This is probably due to an error in the ABAP program.

Function module "HR_HK_DIFF_BT_2_DATES" was called

with the parameter "DAYS".

This parameter is not defined.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
293

Hi,

Please remove the comment before "importing"...it will work,

Because of the comment it is not recognising "days" as a parameter...

Pls check and revert

Regards

Byju

1 REPLY 1
Read only

Former Member
0 Likes
294

Hi,

Please remove the comment before "importing"...it will work,

Because of the comment it is not recognising "days" as a parameter...

Pls check and revert

Regards

Byju