Application Development 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: 

Using the perform statement

Former Member
0 Kudos
307

Hi,

I have a function called

Z_FS_FUSED_BUSINESS_OBJ_DATA,

I have also defined a form in this function called

FORM conglomerated_data

All of this is in one function group called z_fs_inbound

If I have another function, in another function group, what is the syntax for calling the form in the first function group ; i tried

PERFORM conglomerated_data in program

Z_FS_FUSED_BUSINESS_OBJ_DATA

but this did not work

thanks

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
87

You would not sure the function module name as the program name, you would use the function group main program. In your case is would be something like SAPL<Your_Function_Group_Name>.



PERFORM conglomerated_data in program 
                            SAPL<function_group_name>.

Regards,

Rich Heilman

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
88

You would not sure the function module name as the program name, you would use the function group main program. In your case is would be something like SAPL<Your_Function_Group_Name>.



PERFORM conglomerated_data in program 
                            SAPL<function_group_name>.

Regards,

Rich Heilman

Former Member
0 Kudos
87

Hi,

Create an include program in the main program of the function pool. Save the form subroutine in this include. Then you can call it directly from each function.

"For each function group <fgrp> there is a main program, generated by the system, called SAPL<fgrp>.

The main program contains INCLUDE statements for the following programs:

L<fgrp>TOP. This contains the global data for the function group.

L<fgrp>UXX. These includes contain the function modules themselves. The numbering XX indicates the chronological order in which the function modules were created. This includes L<fgrp>U01 and L<fgrp>U02 contain the first two function modules in the function group.

L<fgrp>F01, L<fgrp>F02... These includes can be used to write subroutines (forms) that can be called as internal forms by all function modules in the group. "

Svetlin

Message was edited by: Svetlin Rusev

Former Member
0 Kudos
87

Use

PERFORM conglomerated_data IN PROGRAM saplz_fs_inbound.

0 Kudos
87

If these answers have been helpful, please award points accordingly and mark this post as solved.

Regards,

Rich Heilman