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

Error at Date Value passing on Report

erdem_sephanelioglu
Participant
0 Likes
1,759

Hallo everybody,

when I enter the dates on selection screen in the Z* Program I receive such an error related to datefrom and dateto parameters.

The specified opening period for profile 30 is not valid

Message No. EPRO059

Diagnosis

You tried to open profile 30 for the period 40.01.IEQ2 00:00:00 to 40.01.IEQ2 23:59:59 in time zone CET.

System Response

Profile 30 cannot be opened with the parameters specified.

This can be for the following reasons:

  • The interval length of the profile values is not suitable for the opening period
  • You tried to open a day value profile without including the day offset and the time zone in the profile header.

Procedure

Check your entries.


The coding related to date part is as below.

Selection-Screen Begin of block b001 with frame title text-t01.

   SELECT-OPTIONS:pa_datab    FOR EEDMSETTLUF-DATEFROM OBLIGATORY NO

INTERVALS

   DEFAULT

   '20140101',   "Datefrom

                  pa_dtbis FOR EEDMSETTLUF-DATETO OBLIGATORY NO

INTERVALS

                  DEFAULT

                  '20140131'.      "DateTo

   selection-screen end of block b001.

...........................................

lv_dt1 = pa_datab.

lv_dt2 = pa_dtbis.

CALL FUNCTION 'ISU_EEDM_READ_PROFILE_VALUES'

   EXPORTING

     X_PROFILENR           = ls_EEDMSETTLUF-PROFILE

     X_DATEFROM            = lv_dt1

     X_TIMEFROM            = '000000'

     X_DATETO              = lv_dt2

     X_TIMETO              = '235959'

     X_TIMEZONE            = 'CET'

     X_MODE                = '1'

*   X_SIMULATION          =

*   X_INTSIZEID           =

*   X_TIMEZONE_ORIG       =

   IMPORTING

     YT_VALUE              = lt_values[]

*    YT_VALUE_STAT         =

* EXCEPTIONS

*   GENERAL_FAULT         = 1

*   OTHERS                = 2

           .

IF SY-SUBRC <> 0.

* Implement suitable error handling here

ENDIF.

Regards

Eddy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,512

I think the error long text is pretty self-explanatory. LV_DT1 and LV_DT2 contain invalid data. How did you declare them and how did you assign values to them?

It looks like you have tried to assign the entire contents of your SELECT-OPTIONs to these variables instead of just the LOW values.

Rob

Message was edited by: Rob Burbank

Hallo everybody,

when I enter the dates on selection screen in the Z* Program I receive such an error related to datefrom and dateto parameters.

The specified opening period for profile 30 is not valid

Message No. EPRO059

Diagnosis

You tried to open profile 30 for the period 40.01.IEQ2 00:00:00 to 40.01.IEQ2 23:59:59 in time zone CET.

System Response

Profile 30 cannot be opened with the parameters specified.

This can be for the following reasons:

  • The interval length of the profile values is not suitable for the opening period
  • You tried to open a day value profile without including the day offset and the time zone in the profile header.

Procedure

Check your entries.


The coding related to date part is as below.

Selection-Screen Begin of block b001 with frame title text-t01.

   SELECT-OPTIONS:pa_datab    FOR EEDMSETTLUF-DATEFROM OBLIGATORY NO

INTERVALS

   DEFAULT

   '20140101',   "Datefrom

                  pa_dtbis FOR EEDMSETTLUF-DATETO OBLIGATORY NO

INTERVALS

                  DEFAULT

                  '20140131'.      "DateTo

   selection-screen end of block b001.

...........................................

lv_dt1 = pa_datab.

lv_dt2 = pa_dtbis.

CALL FUNCTION 'ISU_EEDM_READ_PROFILE_VALUES'

   EXPORTING

     X_PROFILENR           = ls_EEDMSETTLUF-PROFILE

     X_DATEFROM            = lv_dt1

     X_TIMEFROM            = '000000'

     X_DATETO              = lv_dt2

     X_TIMETO              = '235959'

     X_TIMEZONE            = 'CET'

     X_MODE                = '1'

*   X_SIMULATION          =

*   X_INTSIZEID           =

*   X_TIMEZONE_ORIG       =

   IMPORTING

     YT_VALUE              = lt_values[]

*    YT_VALUE_STAT         =

* EXCEPTIONS

*   GENERAL_FAULT         = 1

*   OTHERS                = 2

           .

IF SY-SUBRC <> 0.

* Implement suitable error handling here

ENDIF.

Regards

Eddy

4 REPLIES 4
Read only

Former Member
0 Likes
1,513

I think the error long text is pretty self-explanatory. LV_DT1 and LV_DT2 contain invalid data. How did you declare them and how did you assign values to them?

It looks like you have tried to assign the entire contents of your SELECT-OPTIONs to these variables instead of just the LOW values.

Rob

Message was edited by: Rob Burbank

Read only

0 Likes
1,512

Do this:

lv_dt1 = pa_datab-low.

lv_dt2 = pa_dtbis-low.


And remember, the debugger is your friend. You'd have solved this yourself if you looked at the variables going into the FM.


Rob

Read only

0 Likes
1,512

But I did not get the underlying problem. Could you please clarify again pls.

Thanks in advance.

Eddy

Read only

0 Likes
1,512

The underlying problem is that you are passing 40.01.IEQ2 as dates.

I said before that this is the contents of the SELECT-OPTION line, not the low value of the SELECT-OPTION.

Have you used the debugger to look at the contents of the variables???

Rob