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

global data declaration in a function group..

Former Member
0 Likes
1,123

hi,

i have created a function group and created 2 FM in that. Both use some common data declarations so i declared those variables in the top include of the function group named LZFGXXXTOP.

is this include automatically recognized in my FM or do i have to include it ? sample statements please ..

thks

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
743

No, the function modules should be able to see it. the TOP include should be INCLUDEd into the main program SAPLZFGXXX automatically when creating the function group.

Regards,

Rich Heilman

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
744

No, the function modules should be able to see it. the TOP include should be INCLUDEd into the main program SAPLZFGXXX automatically when creating the function group.

Regards,

Rich Heilman

Read only

0 Likes
743

Sorry Rich, I fail to understand what you are saying.

in simple terms, i need to have some common data declarations for 2 function modules in a function group. Can u pl outline the steps I need to follow ? also i need to have a common set of form routines (FORM ENDFORM) to be used in these 2 function modules, where do i create these ?

thks a lot

Read only

0 Likes
743

hi if you declare the data variables and internal tables for both the function modules common but you cannot create the subroutines in common..you need to create the subroutines in the includes of that individual function modules.....but when you see the main program of the function module all the includes will be seen together..

Read only

Former Member
0 Likes
743

hi every function group automatically craetes the top include ....no need to create by our own...

to check this ...go to any function module..

menu bar->goto->main program---->

here the first include wil be the top include..this is created by the system