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

Changing parameters in a FM

Former Member
0 Likes
685

Hey,

Can anyone tell me why I can't put a table into the changing parameters of a Function Module.

The problem that we need to do it like this because some client did use such a method rather to do it inside the table.


*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  CHANGING
*"     VALUE(GET_SET_VALUE) TYPE  ZCLTESTA
*"     REFERENCE(TABLE) LIKE  ZTEST STRUCTURE  ZTEST
*"       OPTIONAL
*"----------------------------------------------------------------------

So, we need to test it like that, because we need to resolve a problem by our client that happen when we use JCO.

The problem that getting the table will lead to an exception.

Using the transaction I tried to find function module having changing, but I can't find an automated search which I'll get all FMs having Changing Parameters, I'm looking for FM having a table as a changing Parameters.

Regards,

Kais

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
549

You need to use the Table Type in the Associated type to be able to have Table as changing parameter.

E.g. you can use the SHP_VBAP_T in the changing parameter and it will provide you the internal table but if you use the VBAPVB (underlying structure of the SHP_VBAP_T) it will only provide you the workarea of the structure VBAPVB.

So, you need to create a table type of your ZTABLE in SE11.

Select the option Data Type

Give your Name

and Select the Table type in the next popup.

Regards,

Naimesh Patel

Hey,

Can anyone tell me why I can't put a table into the changing parameters of a Function Module.

The problem that we need to do it like this because some client did use such a method rather to do it inside the table.


*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  CHANGING
*"     VALUE(GET_SET_VALUE) TYPE  ZCLTESTA
*"     REFERENCE(TABLE) LIKE  ZTEST STRUCTURE  ZTEST
*"       OPTIONAL
*"----------------------------------------------------------------------

So, we need to test it like that, because we need to resolve a problem by our client that happen when we use JCO.

The problem that getting the table will lead to an exception.

Using the transaction I tried to find function module having changing, but I can't find an automated search which I'll get all FMs having Changing Parameters, I'm looking for FM having a table as a changing Parameters.

Regards,

Kais

1 REPLY 1
Read only

naimesh_patel
Active Contributor
0 Likes
550

You need to use the Table Type in the Associated type to be able to have Table as changing parameter.

E.g. you can use the SHP_VBAP_T in the changing parameter and it will provide you the internal table but if you use the VBAPVB (underlying structure of the SHP_VBAP_T) it will only provide you the workarea of the structure VBAPVB.

So, you need to create a table type of your ZTABLE in SE11.

Select the option Data Type

Give your Name

and Select the Table type in the next popup.

Regards,

Naimesh Patel