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

Dynamic FM call

Former Member
0 Likes
1,192

Hi All,

I am calling some FM dynamically. All these Fm have been created by me. these function modules have one table parameter. I want these table data dynamicaally.

code

-


CALL FUNCTION fmname

tables t1 = lt_data.

I am getting dump. Can somebody tell me I am calling it correctly or not.

Regards,

Jeetu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,139

Hi,

yaa u can call like this but the tables parameters t1 should exist in the function module and the table you are passing should be the same type as t1.

rgds,

bharat.

8 REPLIES 8
Read only

Former Member
0 Likes
1,140

Hi,

yaa u can call like this but the tables parameters t1 should exist in the function module and the table you are passing should be the same type as t1.

rgds,

bharat.

Read only

0 Likes
1,139

Hi Bharat,

If I got your point correctly, t1 should be of type table of FM called. should I declare ti of type the table used by FM.

Read only

0 Likes
1,139

yaa.in ur case T1 should be of table type in the calling FM.

and in dynamic FM calling all the mandatory(importing,changing&tables) parameters should be provided.

rgds,

bharat.

Read only

0 Likes
1,139

Hi,

Still I am getting a dump of that "parameter missing in the FM call". The Fms do not have any import, export of changing parameters. These have only table parameters.

I declared t1 of type table specified in the table parameter of FM.

What is wrong now?

Read only

0 Likes
1,139

Hi Jeetu,

R u calling a Smartforms FM.

Reply..

Regards,

Morris Bond.

Read only

0 Likes
1,139

No,

It is in a FM.

Read only

0 Likes
1,139

Hi All,

Now I am not getting the error since I changed the t1 to to exact table parameter name of FM which is going to be called dynamically. My doubt is if I have many FMs which are going to be called dynamically. How can I achieve this since in every FM the table parameter name is different.

Read only

0 Likes
1,139

Hi,

in such a case u cannot call like this.

in real time u'll not get a situation to call like this.

only we will call like this in case of smartforms(in that case the structure is same every time)

rgds,

bharat.