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

How to pass values to a type ref data variable

Former Member
0 Likes
1,034

Hi ,

I have a data statement like this.

DATA:l_parameters type ref to /POSDW/IF_PARAMETER_READ.

The interface '/POSDW/IF_PARAMETER_READ' has only one method called 'GET_VALUE'. I do not want to pass any values to actual parameter ' l_PARAMETERS' in the below mentioned function. But as the parameter is called by reference , the system is expecting a value in the parameter 'l_PARAMETERS' and it is giving a runtime error. This parameters consists of control record of idocs and it's value. How to pass parameters names and its value to this 'l_PARAMETERS'. Please advise. Thanks in advance.

CALL FUNCTION '/POSDW/SEND_IDOC'

EXPORTING

i_retailstoreid = l_sndprn

i_idoctype = gc_idoctype

i_messagetype = gc_messagetype

IT_TRANSACTIONS = ll_transaction

IR_PARAMETERS = l_PARAMETERS

TABLES

  • it_edidd = lt_edidd

CT_EDIDD = lt_edidd

et_objectlink = et_objectlink[].

Thanks

JC

1 REPLY 1
Read only

uwe_schieferstein
Active Contributor
0 Likes
596

Hello JC

If the function module is expecting an instance (of TYPE REF TO /POSDW/IF_PARAMETER_READ) then there must be a class available which implements this interface.

Perhaps the CONSTRUCTOR of this class has an EXPORTING parameter DOCNUM (IDoc number).

Since the function module want to send an IDoc it needs the control record in addition to the data records. I guess the class might read the control record when it is intantiated.

Regards

Uwe