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

pass table as import parameter

former_member227140
Active Participant
0 Likes
541

Hello Friends,

i have written this code...

TYPES : BEGIN OF X_TIME,

READING_TIME TYPE IMRC_ITIME,

END OF X_TIME.

DATA : IT_TIME TYPE TABLE OF X_TIME WITH HEADER LINE,

WA_TIME TYPE IMRC_ITIME.

IT_TIME = SY-UZEIT.

APPEND WA_TIME TO IT_TIME.

CLEAR IT_TIME.

WA_TIME = SY-UZEIT + 2.

APPEND WA_TIME TO IT_TIME.

CLEAR IT_TIME.

and then as i have to pass table (it_time) to FM.

CALL FUNCTION 'MEASUREM_DOCUM_RFC_SINGLE_001'

EXPORTING

MEASUREMENT_POINT = MEASUREPOINT

  • SECONDARY_INDEX =

READING_DATE = SY-DATUM

READING_TIME = IT_TIME

when i execute it shows runtime error.which describes

The function module interface allows you to specify only

fields of a particular type under "READING_TIME".

The field "IT_TIME" specified here is a different

field type

.

what is probelm i am not understanding.....can anyone help...

3 REPLIES 3
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
508

Goto se11 create a structure with field READING_TIME TYPE IMRC_ITIME,

Then create a table type for the structure

then use that table type in export parameter of function module.also there is no need of header line here.

Change it as,

DATA : IT_TIME TYPE TABLE OF X_TIME.

Read only

Former Member
0 Likes
508

Hi Abhijeet,

You are not supposed to use Internal tables, have to use Tables types declared Globally as it is Function module..

Table type can be created using Tcoce se11

Read only

former_member227140
Active Participant
0 Likes
508

ok