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

Perform statement with Tables

Former Member
0 Likes
764

Hi Experts,

I would like to use the same function module multiple times but with different tables (with different structures) each time. How do I acheive this using perform statement with only one table parameter while calling the form OR optimize in any other way?

Thanks

UV

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
576

Hi,

Another way is to use Sub Routine.

perform ........ tables tab1.

perform ........ tables tab2.

Form .....

call function .........

Endform.

Regards,

Srilatha.

5 REPLIES 5
Read only

former_member194669
Active Contributor
0 Likes
576

Hi,

May be try with Macro


  define callfm.
      .......  call your fm   and &1  " Here &1 table contains value table you are passing
     ........
  end-of-definition.

 callfm ztable.
 callfm ytable.
 callfm wtable.

aRs

Read only

Former Member
0 Likes
577

Hi,

Another way is to use Sub Routine.

perform ........ tables tab1.

perform ........ tables tab2.

Form .....

call function .........

Endform.

Regards,

Srilatha.

Read only

0 Likes
576

Thanks Ars and Srilatha.

Srilatha,

In form, each table is referred to a structure. Now, this structure is different for each table. So, I think it may not work. Share your thoughts.

form table tab1 structure tab1

call function XYX

tables

data = tab1

..........

endform.

Read only

0 Likes
576

Hi UV,

Check with below links :

Thanks

Seshu

Read only

0 Likes
576

Thanks Seshu.

Field symbol seems close. But still the examples in the link are addressing tables of same structure not tables with different structures.

UV