How to organize function modules & subroutines in a function group?

Hi,
There are several function modules and subroutines in a function group. And the subroutines will be called by severel modules.
Originally:
1. I put subroutine forms in an Include.
2. and in the function modules which will use the forms, I include the Include before the function definition.
3. While when activating the functin modules, it's reported that the forms had already been defined. Only if one function module includes the Include, it's OK.
How should the forms and function modules be organized?
Thanks!
Sayid

Hi Atish
Yes, you are right.
It works.
Thank you.
Regards,
Sayid

Similar Messages

  • 1...how to find that a function module belongs to normal function module or

    Hi to all.........
    1...how to find that a function module belongs to normal function module or remote enabled function module?
    Thanks and regards,
    K.Swaminath reddy

    Hi Swaminath,
    Go to Transaction SE37.
    In The Remote enabled function module, in the Attribute tab radio Button "Remote Enabled module will be selected and in the Normal Function Module, Normal Function Module will be selected.
    Regards,
    Mukesh Kumar

  • 2.....how to convert normal function module into remote enabled function mo

    Hi...
    2.....how to convert normal function module into remote enabled function module?
    thanks and regards,
    k.swaminath.

    Hi,
    In the attributes tab select radio button as  remote enabled instead of normal..
    u can call the remote enabled fm as...
    CALL FUNCTION <Function module> destination <destination name>
    Regards,
    Nagaraj

  • Function Module to fetch Partner Functions in PM Notification

    Hi Expert,
    I have one requirement to send mail to M2- Engineering Man in PM Notification after saving.
    So I want to fetch all M2 (Engineering Man i.e. Partner Functions) from that Notification at runtime.
    Right now I am writing the Logic in BADI "NOTIF_EVENT_POST" and I am not getting those M2: Engineering Man in this BADI.
    If anyone know Function Module to fetch Partner Functions at runtime please let me know.
    Thanks,
    Jay.

    Hello,
    Did you find any function module for updating the Partner address in the Notificaton
    Regards,
    sks.

  • Function Module in a Generic Function Module Extractor

    I want to use a generic function module (ZFM_CONNECTION_DETAIL) in a Generic Function Module based Extractor.
    After Creating, I have checked it in RSA3... Data is showing properly on the Extractor Check.
    And replicated on BW side, after triggering the extractor using infopackageu2026 only one record is coming on the target side (BW).
    And one job is running endless on the source system.
    Generic extractor on the normal code is working properly on both sides.
    But problem occurs while I was using Function Module in the Generic function Module extractor.
    Waiting for a Reply with solution...........
    Hi Siegfried Szameitat,
    I have searched a lot to find out the solution of my Question (Problem). But there is no solution for the problem I have.
    Please let me to find out a proper solution of my issue....
    Thanks

    FUNCTION zcrm_questionnaire.
    Its a full Load...
    Codes are as followed..........
      DATA:lv_times     TYPE i.
      DATA:lv_datapakid TYPE numc4.
      CLEAR:lv_datapakid,lv_times .
      STATICS: s_s_if TYPE srsc_s_if_simple,
               sd_no_more_data  TYPE flag.
      DATA: l_s_select TYPE srsc_s_select.
      DATA :  s_counter_datapakid LIKE sy-tabix,
              s_cursor TYPE cursor.
      RANGES :  date  FOR  zresult_lt-date.
      DATA: lv_count TYPE i VALUE 1.
      IF i_initflag = sbiwa_c_flag_on.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    Check InfoSource validity
        CASE i_dsource.
          WHEN 'ZCRM_QUESTIONNAIRE'.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE e009(r3). ENDIF.
            log_write 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      i_dsource            "message variable 1
                      ' '.                 "message variable 2
            RAISE error_passed_to_mess_handler.
        ENDCASE.
        APPEND LINES OF i_t_select TO s_s_if-t_select.
        s_s_if-requnr    = i_requnr.
        s_s_if-dsource   = i_dsource.
        s_s_if-maxsize   = i_maxsize.
        APPEND LINES OF i_t_fields TO s_s_if-t_fields.
      ELSE.                 "Initialization mode or data extraction
        IF NOT sd_no_more_data IS INITIAL.
          RAISE no_more_data.
        ENDIF.
        LOOP AT s_s_if-t_select INTO l_s_select .
          MOVE-CORRESPONDING l_s_select TO date.
        ENDLOOP.
        DATA : v_questionire  TYPE  crm_svy_db_sid.
        DATA : itab_questionire TYPE zsurveyid.
        DATA : e_tt_data_get TYPE  zresult_lt OCCURS 10.
        v_questionire = 'CALL CENTER'.
        APPEND v_questionire TO itab_questionire.
        v_questionire = 'METER INSTALLATION TEAM'.
        APPEND v_questionire TO itab_questionire.
        v_questionire = 'METER READING & BILLING'.
        APPEND v_questionire TO itab_questionire.
        v_questionire = 'NO SUPPLY'.
        APPEND v_questionire TO itab_questionire.
        v_questionire = 'CASH COLLECTION CENTER'.
        APPEND v_questionire TO itab_questionire.
        v_questionire = 'STREET LIGHT'.
        APPEND v_questionire TO itab_questionire.
        v_questionire = 'CONSUMER CARE CENTER'.
        APPEND v_questionire TO itab_questionire.
        v_questionire = 'WEBSITE'.
        APPEND v_questionire TO itab_questionire.
        DATA : counter TYPE i,
              high  LIKE sy-datum,
               low LIKE sy-datum.
        CONCATENATE
        l_s_select-high+6(4)
        l_s_select-high+3(2)
        l_s_select-high+0(2)
        INTO
        high.
        CONCATENATE
        l_s_select-low+6(4)
        l_s_select-low+3(2)
        l_s_select-low+0(2)
        INTO
        low.
        BREAK-POINT.
       do i_maxsize times.
        CALL FUNCTION 'ZCRM_SURVEY_REPORTING'
          EXPORTING
            e_date_frm    = low
            e_date_to     = high
            e_questionire = itab_questionire
          CHANGING
            it_result     = e_tt_data_get.
        IF sy-subrc IS INITIAL.
          e_t_data[] = e_tt_data_get[].
          APPEND e_t_data.
        ELSE.
          EXIT.
        ENDIF.
         sd_no_more_data = 'X'.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.
    lk

  • Difference between BAPI Function Module and Remote Enable Function Module

    Dear Experts,
        I want to know the main difference between BAPI Function Module and Remote Enable Function Module ?
    One main difference that I know is BAPI FM are declared in Methods of Business Object  ie BAPI are methods of BOR where as Remote Enabled FM are not. What are other differences? Is it possible to convert a Remote Enable FM to BAPI FM .
    regards
    Manish

    Hello,
    Did u create any ZBAPI?
    The Procdure for Creating the Customer BAPI is Create a Remote Enabled Function module and then goto the tcode BAPI.
    Once u go in to that just take the Project tab and enter the details.
    by this way u can create a Customer BAPI.
    With Regards,
    Sumodh.P

  • Function module for sales office and group of an organization

    Hi we are using enhanced organizational model in CRM 5.0.
    Is there any function module to find the assigned sales office and group of an organizational unit?
    Thanks a lot.

    Nigne,
    During transactional processing you can use the function module CRM_ORGMAN_READ_OW to read the selected organization unit on the business transaction, and it will contain data populated for these values.
    My only guess outside of transactional processing is using FM:
    CRM_ORGMAN_ATTRIB_READ or CRM_ORGMAN_SA_SE_ATTRIB_GET.
    Good luck,
    Stephen

  • Function module to read the target groups associated to a profile

    Hi all,
    In a profile set, there can be number of profiles associated with  the profile set. FM BAPI_PROFILESET_GETDETAIL gives the list of description and guid of the profiles associated with the profile set. Now, a number of target groups can be associated with a profile. How can we get the list of target groups associated with a cretain profile? is there any standard function module to serve this purpose?

    Hi,
    you should use CRM_MKTTG_TG_GETLIST and fill the profile GUID as IV_PF_GUID.
    hope that helps
    --klaus

  • Function Module Extractor with Delta Functionality

    Hi Friends,
         I have to extract the entire data of CDPOS table in R/3 , as its a cluster table I am unable to build a view, I am planning to go for FM extraction, Could someone help me as how to build it with Delta Functionality.
    I think I need to develop the Datasource, with Extract Structure,( Do I need to create a Structure in SE11)  Please help me out .
    Thanks,
    Krish

    Hi,
    you can either use an existing structure or else create one on your own. (SE11).
    The DeltaHandlig fairly easy.
    When having finished the extractor (FunctionModule, Structur and DatasSource), go to the "generic Delta" button and select the relevant field.
    The Generic Delta and its DeltaPointer is managed within the DeltaQueue (RSA7) and works more or less like a selection. Don't think too hard about it in your function module except taht you need to select by this field in your FM.
    Did that come clear?
    hth
    Cheers
    Sven

  • Creating BW Function module to extract R3 Function module data.

    Could you tell me how to create a BW Function Module to Extract data from  R/3 Function module?.
    Also, the BW function module needs to pass a date/time filter to R/3 function module basis which the R/3 function module passes the date/time restricted data to BW function module.
    Thanks,
    Gautam

    You will have to create a function module in R/3 and then call the same in BW using the RFC call function option.
    Please do not raise separate threads for each question - you have asked the same question in another post of yours..
    bw extraction using function module
    http://tinyurl.com/lwhtk8
    this will give you an idea on how you can achieve this.

  • Initializing Function Module used in Planning function in BPS0

    Hi Everybody,
                       I have been assigned to create a function module which will be used for initialization purpose in BPS planning function. Whenever the user will change values of variable, even if user sets a data for a particular variable whose record does not exist in Cube, default values for keyfigyures should be shown after executing the planning function. How to achieve it? Eagerly waiting for your precious reply.
    Warm Regards
    Pulokesh

    Hi Everbody,
                    For a long time i have waited for somebody to answer my query. But after having all sorts of RNDs I came up with a sample code given below, and its also working properly....
    FUNCTION ZKEYFIGURE_VALUE_DEFLT
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_AREA) TYPE  UPC_Y_AREA
    *"     REFERENCE(I_PLEVEL) TYPE  UPC_Y_PLEVEL
    *"     REFERENCE(I_METHOD) TYPE  UPC_Y_METHOD
    *"     REFERENCE(I_PACKAGE) TYPE  UPC_Y_PACKAGE
    *"     REFERENCE(I_LAYOUT) LIKE  UPP_PARAM-PARAM DEFAULT 'INPUT'
    *"     REFERENCE(IT_EXITP) TYPE  UPF_YT_EXITP
    *"     REFERENCE(ITO_CHASEL) TYPE  UPC_YTO_CHASEL
    *"     REFERENCE(ITO_CHA) TYPE  UPC_YTO_CHA
    *"     REFERENCE(ITO_KYF) TYPE  UPC_YTO_KYF
    *"  EXPORTING
    *"     REFERENCE(ET_MESG) TYPE  UPC_YT_MESG
    *"     REFERENCE(ETO_CHAS) TYPE  ANY TABLE
    DATA: LR_WA TYPE REF TO DATA.
      DATA: T_SUBRC TYPE SY-SUBRC,
            LS_MESG TYPE UPC_YS_MESG,
            WA_COMDTY LIKE /BIC/PZCOMDTY.
      DATA: L_COMDTY  TYPE CHAR4,         "Comodity value
            LS_CHASEL TYPE UPC_YS_CHASEL, "Line of characteristic selection table
            LT_CHARNG TYPE UPC_YT_CHARNG, "Selection table for char value
            LS_CHARNG TYPE UPC_YS_CHARNG, "line of selection table for char value
            L_VENDOR  TYPE CHAR10,        "VENDOR value
            LA_CHASEL TYPE UPC_YS_CHASEL, "Line of characteristic selection table
            LV_CHARNG TYPE UPC_YT_CHARNG, "Selection table for char value
            LA_CHARNG TYPE UPC_YS_CHARNG. "line of selection table for char value
      FIELD-SYMBOLS:  <LS_DATA>   TYPE ANY,
                      <CL_VEND>   TYPE ANY,
                      <CL_COMDTY> TYPE ANY,
                      <KY_DATA>   TYPE ANY,
                      <S_CHAS> TYPE ANY,
                      <FS_VEND> TYPE ANY,
                      <FS_COMM> TYPE ANY.
      IF T_SUBRC = 0.
    *Get the comodity of the data begin processed
        READ TABLE ITO_CHASEL WITH KEY CHANM = 'ZCOMDTY3' INTO LS_CHASEL.
    *Get the selection criteria comodity to be processed
        READ TABLE LS_CHASEL-T_CHARNG INDEX 1 INTO LS_CHARNG.
    *Read the comodity from the selection criteria
        L_COMDTY = LS_CHARNG-LOW.
    *Get the VENDOR of the data begin processed
        READ TABLE ITO_CHASEL WITH KEY CHANM = 'ZSS_VEND3' INTO LA_CHASEL.
    *Get the selection criteria VENDOR to be processed
        READ TABLE LA_CHASEL-T_CHARNG INDEX 1 INTO LA_CHARNG.
    *Read the VENDOR from the selection criteria
        L_VENDOR = LA_CHARNG-LOW.
    create structure for the selection criteria
        CREATE DATA LR_WA LIKE LINE OF ETO_CHAS.
        ASSIGN LR_WA->* TO <S_CHAS>.
        ASSIGN COMPONENT 'ZSS_VEND3' OF STRUCTURE <S_CHAS> TO <FS_VEND>.
        IF SY-SUBRC EQ 0.
          MOVE L_VENDOR TO <FS_VEND>.
        ENDIF.
        ASSIGN COMPONENT 'ZCOMDTY3' OF STRUCTURE <S_CHAS> TO <FS_COMM>.
        IF SY-SUBRC EQ 0.
          MOVE L_COMDTY TO <FS_COMM>.
        ENDIF.
        COLLECT <S_CHAS> INTO ETO_CHAS.
      ELSE.
        LS_MESG-MSGTY = 'W'.
        LS_MESG-MSGID = 'upf'.
        LS_MESG-MSGNO = '001'.
        LS_MESG-MSGV1 = 'Failed to get data from Layout'.
        APPEND LS_MESG TO ET_MESG.
      ENDIF.
    ENDFUNCTION.

  • Function  module to convert ( partner function - vbpa-parvw to origin value

    hi
    i need to use the function module which can conver the vbpa - parvw : partner function to its original value in the programe, can any one tell the which function module need to be used for this.

    Use the following conversion routines.
    CONVERSION_EXIT_PARVW_INPUT
    CONVERSION_EXIT_PARVW_OUTPUT
    Edited by: Naren Someneni on Feb 22, 2008 8:30 AM

  • Call a function module inside of another function module

    Has anyone ever called a function module inside of a remote enabled function module?  Maybe this needs to be accomplished inside of an include.  Just wondering.
    Thanks!

    Hi
    No u can't do it because the RE_LAST_DAY_OF_MONTH  is not remote function module.
    If you need to call it u should insert it in a RFC, so u should create in R/3 a new RFC calling both fms: RE_LAST_DAY_OF_MONTH and the remote one.
    And so call this new rfc instead of the other one.
    Max

  • How to create function module step by step

    hi experts,
    i am new to ABAP.
    can anybody tell me the step by step process on how to create a function module for adding two numbers without using editor screen.
    ex: 2+3=5.

    Hi,
    You can only create function modules and function groups using the Function Builder in the ABAP Workbench. For further information, refer to Creating New Function Modules. This section uses an example to illustrate how a function module is created from the point of view of ABAP programming.
    Function Groups and Function Modules:
    Firstly, we create a new function group DEMO_SPFLI to hold the function module. Then, we can create the new function module.
    Parameter Interface:
    You can specify the types of interface parameters in function modules in the
    same way as the parameter interfaces of subroutines. Since function
    modules can be used anywhere in the system, their interfaces can only contain
    references to data types that are declared systemwide. These are the elementary
    ABAP data types, the systemwide generic types, such as ANY TABLE, and types
    defined in the ABAP Dictionary. You cannot use LIKE to refer to data types
    declared in the main program.
    Exceptions:
    Our function module needs an exception that it can trigger if there are no entries
    in table SPFLI that meet the selection criterion. The exception NOT_FOUND
    serves this function.
    Source Code:
    Having defined the parameter interface and exceptions, we can now write the
    source code of our function module. To do this, choose Source code in the
    Function Builder. This opens the ABAP Editor for the include program
    L<fgrp>U<xx> (see Function Groups). This is the include that will
    hold the program code for the function module;
    Data in Function Modules
    You can use the TYPES and DATA statements to create local data types and
    objects. The interface parameters also behave like local data objects. In
    addition, you can access all of the global data of the main program. This data is
    defined in the include program L<fgrp>TOP. To open this include, choose Goto
      Global data. The global data behaves like the instance attributes of a class.
    The first time you call a function module in a particular function group, the data is
    loaded into memory. It can then be accessed and changed by all of the function
    modules in the group. The system retains the values until the next time a function
    module is called.
    Calling Subroutines
    You use subroutines for local modularization. Function modules can
    also use this technique. The function module that they call are defined in the
    corresponding main program.
    If you only want to call a subroutine from a single function module, it is best to
    define them in the same include program as the function module itself, directly
    after the ENDFUNCTION statement. These subroutines can be called from all
    function modules in the function group, but for clarity, they should only be called
    from the function module that precedes them.
    If you want to define a subroutine that will be called from several different function
    modules, you can define a special include program for it with the name
    L<fgrp>F<xx>.
    Raising Exceptions
    There are two ABAP statements for raising exceptions. They can only be used in
    function modules:
    RAISE <except>.
    and
    MESSAGE..... RAISING <except>.
    The effect of these statements depends on whether the calling program handles
    the exception or not. If the name <except> of the exception or OTHERS occurs
    in the EXCEPTIONS addition of the CALL FUNCTION statement, the exception is
    handled by the calling program.
    If the calling program does not handle the exception
      The RAISE statement terminates the program and switches to debugging mode.
      The MESSAGE ..... RAISING statement display the specified message. How the
    processing continues depends on the message type.
    If the calling program handles the exception, both statements return control to the
    program. No values are transferred. The MESSAGE ..... RAISING statement
    does not display a message. Instead, it fills the system fields SY-MSGID, SYMSGTY,
    SY-MSGNO, and SY-MSGV1 to SY-MSGV4.
    Source Code of READ_SPFLI_INTO_TABLE
    The entire source code of READ_SPFLI_INTO_TABLE looks like this:
    FUNCTION READ_SPFLI_INTO_TABLE.
    ""Local interface:
    *" IMPORTING
    *" VALUE(ID) LIKE SPFLI-CARRID DEFAULT 'LH '
    *" EXPORTING
    *" VALUE(ITAB) TYPE SPFLI_TAB
    *" EXCEPTIONS
    *" NOT_FOUND
    SELECT * FROM SPFLI INTO TABLE ITAB WHERE CARRID = ID.
    IF SY-SUBRC NE 0.
    MESSAGE E007(AT) RAISING NOT_FOUND.
    ENDIF.
    ENDFUNCTION.
    The function module reads all of the data from the database table SPFLI where
    the key field CARRID is equal to the import parameter ID and places the entries
    that it finds into the internal table SPFLI_TAB. If it cannot find any entries, the
    exception NOT_FOUND is triggered using MESSAGE...RAISING. Otherwise, the
    table is passed to the caller as an exporting parameter.
    Regards,
    Chandru

  • How to log input parameters for Function Modules?

    Hi,
    I need to create a Logging system to trace input parameters for function modules.
    The log functionality could be done by developing a class method or a function module (For example 'write_log'), and calling it within each function module that I want to log. The 'write_log' code should be independent from the interface of the Function Module that I want to log.
    For example, I'd like to write a function/class method that can log both these functions modules:
    Function DummyA
       Input parameters: A1 type char10, A2 type char10.
    Function DummyB
       Input parameters: B1 type char20, B2 type char20, B3 type char20, B4 type Z_MYSTRUCTURE
    Now the questions...
    - Is there a "standard SAP" function that provide this functionality?
    - If not, is there a system variable in which I can access runtime all parameters name, type and value for a particular function module?
    - If not, how can I loop at Input parameters in a way that is independent from the function module interface?
    Thank you in advance for helping!

    check this sample code. here i am capturing only parameters (import) values. you can extend this to capture tables, changin, etc.
    FUNCTION y_test_fm.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(PARAM1) TYPE  CHAR10
    *"     REFERENCE(PARAM2) TYPE  CHAR10
    *"     REFERENCE(PARAM3) TYPE  CHAR10
      DATA: ep TYPE STANDARD TABLE OF rsexp ,
            ip TYPE STANDARD TABLE OF rsimp ,
            tp TYPE STANDARD TABLE OF rstbl ,
            el TYPE STANDARD TABLE OF rsexc ,
            vals TYPE tihttpnvp ,
            wa_vals TYPE ihttpnvp ,
            wa_ip TYPE rsimp .
      FIELD-SYMBOLS: <temp> TYPE ANY .
      CALL FUNCTION 'FUNCTION_IMPORT_INTERFACE'
        EXPORTING
          funcname                 = 'Y_TEST_FM'
    *   INACTIVE_VERSION         = ' '
    *   WITH_ENHANCEMENTS        = 'X'
    *   IGNORE_SWITCHES          = ' '
    * IMPORTING
    *   GLOBAL_FLAG              =
    *   REMOTE_CALL              =
    *   UPDATE_TASK              =
    *   EXCEPTION_CLASSES        =
        TABLES
          exception_list           = el
          export_parameter         = ep
          import_parameter         = ip
    *   CHANGING_PARAMETER       =
          tables_parameter         = tp
    *   P_DOCU                   =
    *   ENHA_EXP_PARAMETER       =
    *   ENHA_IMP_PARAMETER       =
    *   ENHA_CHA_PARAMETER       =
    *   ENHA_TBL_PARAMETER       =
    *   ENHA_DOCU                =
       EXCEPTIONS
         error_message            = 1
         function_not_found       = 2
         invalid_name             = 3
         OTHERS                   = 4
      IF sy-subrc = 0.
        LOOP AT ip INTO wa_ip .
          MOVE: wa_ip-parameter TO wa_vals-name .
          ASSIGN (wa_vals-name) TO <temp> .
          IF <temp> IS ASSIGNED .
            wa_vals-value = <temp> .
          ENDIF .
          APPEND wa_vals TO vals .
        ENDLOOP .
      ENDIF.
    ENDFUNCTION.

Maybe you are looking for

  • Checking cluster ocfs2 is offline,Starting cluster ocfs2: Failed

    Checking cluster ocfs2 is offline. And when I online the ocfs2 ,display the following error message,who can tell me what's wrong with the ocfs2? thanks!!!! # /etc/init.d/o2cb status Module "configfs": Loaded Filesystem "configfs": Mounted Module "ocf

  • IPhoto '11 won't import 3gp files, but iPhoto '09 did. Help!

    I had iPhoto '09, which imported 3gp video files from my android phone just fine.  Then I upgraded to iPhoto '11, and suddenly I can't import them; they're an "unrecognized file format" WTH? Why, Apple, why? Just to add insult to injury, the old 3gp

  • I forgot my passcode on my iPhone

    i forgot my passcode, i had lost my iphone for a few months-now that i found it, i cant unlock it- i would restore it to itunes if only this laptop had itunes software on it. is there anything i can do? like send my passcode to my email?

  • Harmon Kardon AVR 430 and Audigy

    I'm trying to run MP3's through my HK reciever (It has a built in decoder). It looks like it should be straight forward enough. As I understand, I can use a stereo or mono miniplug out of the sound card and crossover to RCA plug for the reciever. I'v

  • How to Recover database from old backup and full archive log file

    Hi Oracle expert! I met problem when restore my oracle database. In my case: - My database version: 10.2.0.2 - I have a database full backup (01-Nov) - I have all Archived log file from (01-Nov -> 05-Nov) - My database drop in 05-Nov with disk error