Application Development 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: 

Type Issue at Function Module

erdem_sephanelioglu
Participant
0 Kudos
1,204

Hello Experts,

I am having error when I run the report and it is as below

The function module interface allows you to specify only fields of a particular type under "YT_VALUE".

The field "LT_VALUES-PROF_VALUE" specified here is a different field type.

AIM: I would like to have value of one field in importing table(PROF_VAL from YT_VALUE)

The Reference Function Module is: ISU_EEDM_READ_PROFILE_VALUES

In ABAP Dictionary the types are in Standard as below

YT_VALUE

Reference Type: TEPROFVALUES

The type definition and field assignments at function modules I did in Z* Report are as below


Data: lt_values type TEPROFVALUES WITH HEADER LINE,

         prof_value type PROFVAL.

.

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

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----------------------------error in matching

*    YT_VALUE_STAT         =

* EXCEPTIONS

*   GENERAL_FAULT         = 1

*   OTHERS                = 2

Looking forward to having your comments & feedbacks

Kind Regards

Eddy

6 REPLIES 6

Former Member
0 Kudos
506

Create an intermediate variable of the correct type. Assign lt_values to that variable and call the fm with the new variable.

Rob

ArcherZhang
Product and Topic Expert
Product and Topic Expert
0 Kudos
506

Hi Eddy,

IMPORTING

    YT_VALUE              = lt_values[]


BRs,

Archer

Former Member
0 Kudos
506

Hi Eddy,

As Zhang mentioned make it IT_VALUES[], as you declared it_values with header line it is considering as Work Area in the FM. 

Regards,

Mounika

mayur_priyan
Active Participant
0 Kudos
506

Hi,

Please check the data type declaration of this table.. If you have declared it as TABLE and with HEADER LINE.. This might be causing you the issue.. Then in this case you need to pass only the table body via using the braces i.e. in your case Eg: IT_VALUES[]

erdem_sephanelioglu
Participant
0 Kudos
506

Hallo everybody,

When I enter it_values[] program workks. However when I enter the dates on selection screen I receive such error

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.

Regards

Eddy

0 Kudos
506

So if your original problem is resolved, it would be better to open a separate thread for this.

And mark it as a question.

Rob