Global data declaration in a function group..

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

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

Similar Messages

  • Global data declaring/using in Function modules

    Hi,
    I have declared an internal table(say ITAB1) in the top include.Appending the values through FM1(function module).
    I am using the same through FM2 (Tables ITAB1).
    ( Function group is same for both FM1 and FM2 )
    but i am not getting the values in the ITAB1.
    Can anyone help me....
    Thanks in advance
    KB

    Bhavani,
    I don't think it works that way. If you are accessing that variable with in that function module you will be able to access that table.
    As you are calling another function module else where, the execution memory is different and the previous variables will not exist any more. However, if you call function2 with function1 it should work.
    The other way could using the EXPORT and IMPORT commands. Then you should be able to access the data.
    Regards,
    Ravi
    Note : Please reward points, if this helps you.

  • Where to set up a TYPE-POOL Declaration in a Function Group ?

    Hi,
    I ve got a Function Group.
    I set up a Function Module in the Function Group.
    I must use  TABLES I_T_SELECT TYPE SBIWA_T_SELECT.
    I get the error:
    Type pool SBIWA has not been declared
    Message no. FL031
    Diagnosis
    You used a type from type pool & in the interface of a function module.
    Procedure
    For the program to be syntactically correct, you must
    declare the type pool in the global data declaration of the
    function group using the 'TYPE-POOLS: &.' statement.
    Where / How do I set up a Type Pool in the global data declaration of the
    function group ?
    Where / what is the global data Declaration of the Function Group ?
    Thank You
    Best Wishes
    Martin

    Hello Martin,
    First off:
    TABLES I_T_SELECT TYPE SBIWA_T_SELECT.
    Correct me if I'm mistaken here, but tables is expecting a name of a DDIC structure. It is then creating a work area using that structure.
    If you have to declare an internal table, the correct code would be:
    DATA i_t_select TYPE TABLE OF sbiwa_t_select.
    Or:
    TABLES sbiwa_t_select.
    Regarding your questions:
    A global data declaration of a function group is just what it says, a point where you can declare your data usable for the whole function group.
    This is usually an Include.
    That said, you can fix your issue by creating an Include in your function group.
    Within that include you have to write:
    TYPE-POOLS: pool1, pool2, pool3.
    or, in case you only have one type pool:
    TYPE-POOLsbiwa
    After creating the include, you have to point your function module to that file.
    INCLUDE include_name.
    Kind regards,
    Michael

  • Creation and Change Date for Tcode and Function Groups

    Hello All,
    I need to display the Creation and Change Dates for Custom Tcodes and Function Groups in a Report. Can anyone please let me know the logic of retrieving it.
    regards,
    Mahesh

    Hi,
    TADIR and TRDIR is the tables where you can find all these data
    Regards
    Sudheer

  • Global data declaration in user exit 'MV45AFZZ ' for VA01

    Hi folks,
    i  am using USEREXIT_PRICING_PREPARE_TKOMP  in MV45AFZZ for VA01 pricing modification.i need to declare one Global internal table for this exit.i tried to do this one in MV45ATZZ.but i can not save as it is asking access key.
      how can i achieve this one?
    ur answers will be rewarded.
    Thanks
    pabi

    Hi Pabitra,
    You can find the parent program and use an enhancement point to declare a global internal table mainly in the top include of the program
    ed: if t-code ABC is executed then the program for the t-code ABC is your parent program...
    Here SAPMV45A is your parent program for VA01
    and in INCLUDE MV45ATOP.
    use ENHANCEMENT-POINT MV45ATOP_02 SPOTS ES_SAPMV45A STATIC. to declare the global internal table
    Once the table is declared,also check in the user exit by debugging if the table is made available..
    i have done the above technique to use an internal table in userexit_save_document after declaring table in the mentioned enhancement point and it worked for me...
    Pls check and revert
    Reward if useful
    Regards
    Byju

  • Function group in tablenaintenance generator.

    hi experts,
           can anybody please tell me why we create a function group
          while creating a table maintenance generator?
    what is the utility of creating a function group.
    regards
    pankaj

    Function Groups
    Function groups are containers for function modules. You cannot execute a function group. When you call a function module, the system loads the whole of its function group into the internal session of the calling program (if it has not already been loaded). For further information, refer to Organization of External Procedure Calls.
    The following diagram shows the structure of a function group: The name of a function group, fgrpcan be up to 26 characters long. This is used by the system to create the components of the group (main program and corresponding include programs). When you create a function group or function module in the Function Builder , the main program and include programs are generated automatically.
    The main program SAPLfgrp contains nothing but the INCLUDE statements for the following include programs:
    キ LfgrpTOP. This contains the FUNCTION-POOL statement (equivalent for a function group of the REPORT or PROGRAMstatement) and global data declarations for the entire function group.
    キ LfgrpUXX. This contains further INCLUDEstatements for the include programs LfgrpU01, LfgrpU02,... These includes contain the actual function modules.
    キ The include programs LfgrpF01, LfgrpF02,... can contain the coding of subroutines that can be called with internal subroutine calls from all function modules of the group.
    The creation of these INCLUDE programs is supported from the ABAP Workbench by forward navigation (for example creation of a subroutine include by double clicking on the name of a subroutine in a PERFORM statement within a function module).
    You cannot declare a COMMON PART in a function group. Function groups have their own table work areas (TABLES). Function groups encapsulate data. In this respect, they are a precursor of ABAP Objects (see From Function Groups to Objects ).
    All of the function modules in a function group can access the global data of the group. For this reason, you should place all function modules that use the same data in a single function group. For example, if you have a set of function modules that all use the same internal table, you could place them in a function group containing the table definition in its global data.
    Function groups, like executable programs and module pools, can contain screens (selection screens and lists) as components. User input is processed either in dialog modules or in the corresponding event blocks in the main program of the function group. There are special include programs in which you can write this code. In this way, you can use function groups to encapsulate single screens or screen sequences.
    In SAP, it is a function group - instead of function - that is loaded into active memory.
    Function ( or function module ) is the one that you call from the program to do things.
    A function group contains functionally related function modules, global variables and procedures .
    To display / edit function module you use SE37,
    To display / edit function group you use SE80 .
    Reward if found helpful,
    regards
    palak

  • Function group memory with RFC calls

    We have a system where a web front-end interacts with our 4.6C system through RFC calls.
    I am having a number of problems where variables declared in a function group are not being cleared out between separate RFC calls to functions in the same group.
    I would not have expected separate RFC calls from an external system to use the same memory area.
    I have seen this happen at other sites too, but have never found an explanation for it.
    Has anyone else experienced this problem and if so can you give me more information about why it happens?
    Thanks for you help,
    Denis.

    This does make sense as global data within a function group is accessable by all function modules of the group.  Normally, in the ABAP system, you call multiple function modules of the same group, and they all share the data.  If you are calling from outside the system, I would expect a different behavior if you are connecting one by one.  But if you are using a pooled connection, this may be the issue.  Not sure though.  It seems that the session on r/3 has not ended and you are accessing the same when calling the second function module.  Is there any function module of the group that looks like it is a "refresher".  In some groups, there is a function module that will refresh the global data. 
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db992335c111d1829f0000e829fbfe/frameset.htm
    Regards,
    Rich Heilman

  • Function modules and function groups

    Hi alll
       Can anybody explain me abt function module and function groups...please
    Thanks and Regards
    vijaya

    <b>Function groups</b> are containers for function modules. You cannot execute a function group. When you call an function module, the system loads the whole of its function group into the internal session of the calling program (if it has not already been loaded).
    The name of a function group can be up to 26 characters long. This is used by the system to create the components of the group (main program and corresponding include programs). When you create a function group or
    function module in the Function Builder [Ext.] , the main program and include programs are generated automatically.
    When you create a new function group, the system automatically creates a main program containing two includes. Like any other programs and includes, you can display them in the Repository Browser.
    The name of the main program is assigned by the system. This is made up of the prefix SAPL followed by the function group name. For example, the main program for function group SXXX is called SAPLSXXX.
    The names of the include files begin with L followed by the name of the function group, and conclude with UXX ( or TOP for the TOP include). The TOP include contains global data declarations that are used by all of the function modules in the function group. The other include file within the main program is used to hold the function modules within the group.
    You cannot declare a COMMON PART in a function group. Function groups have their own table work areas (TABLES). Function groups encapsulate data.
    All of the function modules in a function group can access the global data of the group. For this
    reason, you should place all function modules that use the same data in a single function group.
    For example, if you have a set of function modules that all use the same internal table, you could
    place them in a function group containing the table definition in its global data.
    Like executable programs (type 1) and module pools (type M), function groups can contain screens, selection screens, and lists. User input is processed either in dialog modules or in the corresponding event blocks in the main program of the function group. There are special include programs in which you can write this code. In this way, you can use function groups to
    encapsulate single screens or screen sequences.
    For function module, have a look at
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    I hope it helps.
    Best Regards,
    Vibha

  • How many includes will create when we are activating a function group...

    hi all.
      And one more thing if i see in 4.7 there are three includes r there generated by function group starts with 'L'.....If i created in ECC Same function group and module only two includes are there.....
    missing includes are, what ever we write in tat form sub routine is missing in ECC.....
    can any one help me out in this..

    Hi
    I have created the Function Group in ECC 6.0 and the Following Includes are generated for the same.
      System-defined Include-files.                                 *
      include lzfunctiontop.                     " Global Data
      include lzfunctionuxx.                     " Function Modules
      User-defined Include-files (if necessary).                    *
    INCLUDE LZFUNCTIONF...                     " Subprograms
    INCLUDE LZFUNCTIONO...                     " PBO-Modules
    INCLUDE LZFUNCTIONI...                     " PAI-Modules
    What is your problem exactly? IF you want to write any subroutine jus uncomment the necessary includes and write your code inside it.
    Cheers,
    Hakim

  • Java Thread is not able to see global Data

    In my Windows application, I am creating a new thread using CreateThread and loading JVM into my application and attaching new thread to this JVM.
    After loading JVM, none of the functions (ofcourse JNI functions) are able to see the global data. Do i need to take care something while loading JVM?
    please, let me know if any of you have faced this problem previously
    Thanks,
    Lokesh

    Thanks for response,.
    you are right about the problem
    Yes, all the global data is declared in a C file and in all other source files (including files with JNI functions), this global data is declared as external.
    e.g.
    "char *Strbuf, int ThreadContext " are two globals declared in a C file, and declared as external in all other source files. These two variables are initialized before JVM is loaded. after loading JVM, JNI methods are not able to access these two variables, and as soon as the JNI methods access these two variables, my application hangs/crashes/disappears.
    Thanks,
    Lokesh
    Your problem statement is underspecified. I interpret
    it to say that
    1. You have a C program that specifies some global
    data, and then creates a JNVM. Something that is
    called in the JVM then calls a native method through
    JNI, and the JNI method can't see the global data.
    Is that the problem?
    Is the global data declared to be external? Does the
    native method declare the global data to be external?
    How about posting some code?

  • Global declaration in function group.

    I have a function group within which i have 6 function modules. I want to declare global data in the function group which can be used in all the function modules. Is it possible? If yes then please give me the details..
    Thanks,
    Abhishek

    Each function module is nothing but INCLUDE program. So, if you see the list of includes, there will be a TOP include which is common and will be accessible to all other function modules.
    You can declare variables there.
    Regards,
    Ravi
    Note - Please mark all the helpful answers

  • Global data in Function Group

    Hello Consultants,
    my requirement is, i have created one function group and it holds around 6 function modules. when i call my first FM in the group, i want to pass header data and store as a global data and i want to use the same data in other FM also. I don't want pass the same data all the times. how is it possible?
    I tried by declaring as STATICS but no use..:-(
    Thanks a lot in advance...
    Rgds,
    Mohan

    Hi Mohan,
    The best Idea is to use the Global Definition in TOP include at Function Group level.
    You may be loosing data.. .Because U may have called this FM in Different reports...
    If u call all FMs in SAME report then the Global Data will remain present all the time.. there is no second thought about that..
    Please reward this if u are convinced....:)
    DARSHAN

  • What's the lifecycle of Global Data in Function Group?

    Hello,
    I thought the Global Data in function group will be cleaned for each call stack. While it seems not so.
    With a BSP web application, it seems the global data of the function group would persist untill the session times out.
    I didn't find exact description regarding this. Could anybody help clarify this? For web session and SAPGUI session.
    Thanks and regards,
    Said

    hi,
    based on my understanding of the global data in the funtion group, let's say, when you call a FM a in FG b,  all of the content in the FG b is loaded into the stack. so the global data is cleaned after your program or transaction is complete.  but this will not happen when the called FM is finished, coz when you call a FM , the whole FG is loaded, so if you call FM c in FG b after you callling FM a, your program will not load the whole FG again.

  • How to declare constant across a function group?

    Hi,
    I want to define constants for use within a whole function group. How could it be done?
    Thanks,
    Said

    You can maintain constansts or global variable in the 'Global Data' of function group.
    Please go to the function group through SE37 transaction and select display or change. in the Popup select for mainprogram in the mainprogram you can see the a include program which will be with 'Global Data'. this is the section where you can maintain the global variables.
    Ex;
      include lwbabaptop.                        " Global Data
    Thanks,

  • Exporting data from one function group to another

    Dear all,
    can you pls provide the solution for the below.
    in my requirement two function groups are there. one is standard function group & other is user specific function grp.
    in the standard FGRP i have one SAP standard screen xxx, & one user created screen yyy. from xxx screen call goes to the yyy screen. then from yyy  call goes to the screen zzz which is in user specific FGRP.
    how to export the data (i.e from structure) from screen yyy which is in one FGRP to screen zzz which is in some other FGRP.
    Regards
    Venkat

    Venkata,
    The receiving FM should have a parameter under TABLES for your structure.  You have to put the structure data in an internal table, and then read table ... index 1 to retrieve it both in the FM, and in the calling program.  Upon return to the calling program you wil again need to read table ... index 1 to retreive it and restore it to the structure you process in your calling program.

Maybe you are looking for

  • Contact Person for Vendor in SRM/CUA

    Hello SRM Expert, We are using Central user administration (CUA and like other system SRM is connected to CUA. I am getting the error 'Central system not accessible' while creating the employee (manage business partner) for business partner (Vendor).

  • Best Practice for mail connectors

    I am setting up connectors for exchange and groupwise and am testing auto-provisioning. I am running into an issue with groupwise where the GroupWise connector attempts to provision before the E-Directory account is established. Is there a best pract

  • Does MXF OP1A work with Premiere Pro CC 2014, and later?

    Is below formats can work through Adobe preimere CC File Format: MXF OP1A Filename extension :    *.mxf VIDEO and ADVANCED VIDEO: MPEG Type: MPEG-2 Long GOP Format Profile: 4:2:2@High Level Video Resolution: 1920x1080(PAL) 16:9 DISPLAY Frame Rate: 25

  • Database report ....

    I am brand new DBA .... Users wants me to make daily database reports. What should I write in the report .... I have put the alert.log on the report, Tablespace usage, Backup status with RMAN and Long Operation Status (v_$session_longops), but still

  • FIORI Leave Approval Scenario Definition Error

    Hi, I have implemented a leave approval before. That was working fine. Now I'm implementing another leave approval on a different server (embedded deployment also). I followed the same configurations for scenario definition and system alias. But I'm