Adapter Module Vs Function Module

We are creating a Adapter Module to process an Incoming File. The File contains the Material Master data. But there are many records are invalid due to various reasons. We need to strip the badrecords.
There are around 650 fields in each record and the condition are very complex to be validated in the XI message mapping. Thats were we decided to go with an Adapter Module.
But my question here is, can i write a Function Module in XI and send the File to the Function Module to validate them and there by strip the bad records, rather than writing an adapter module?
Any Suggestions

Hi Jenni,
I assume that, you are an ABAPer and you do not want to go for an adapter module creation. My suggession would be -
  Use the file adapter. use FCC and create the XML structure you need. Do not have any validations at this time. Just create the XML. Now you have two options -
  a. Create an ABAP mapping and pass this XML to the ABAP mapping. Implement all of you business validation rules here, and create the target structures only when everything looks good. Here you would have full control over the target message.
  b. If you are more interested in writing a FM. creating a function module (rather server synchronous proxy) then implement the logic here. The output structure of this proxy would be with all the good records. You would need to have BPM in this case.
I beleive I made some sense.
VJ

Similar Messages

  • Tracking later which RFC Modules or Function Modules were selected

    Hi!
    How can I to reproduce or track later which RFC Modules or Function Modules were selected.
    I can see only the Model Name and the classes but never the  RFC Modules or Function Modules
    inside of WebDynproExplorer or elsewhere.
    Regards
    sas

    Hello!
    I suppose my question was not understandable.
    Therefore I try to explain it.
    I mean how can I find out later which function modules have been choosen
    while importing adaptive RFC Model wizard. Imagine you have an existing
    webdynpro project made by your college or friends. And now you want to
    understand it. You look to Web Dynpro Explorer tree inside NWDS and
    open the folder "Models" and all what you see is a Modelname and some classes
    if a model has benn created before. In that case you can not reproduce exactly
    which  Function Modules or Function Module has been taken by the developer.
    I hope it clarifies the matter.
    Regards
    sas

  • Function modules in function module exits

    Hi,
    Could you please clarify the concepts of function moduels and funtion 'X' modules in function module exits.
    Thanks in advance.

    Hi mallela,
    1. in user-exits,
       this thing happens.
    a) the main program,
        somewhere in the code, (eg. before saving)
        calls the SPECIAL SYNTAX
       CALL CUSTOMER-FUNCTION '001'.
    b) This special syntax
       searches for a FM
       with the following format of name.
      'EXIT' +   CURRENT PROGRAMNAME + '001'
      c) This new found FM
        is called in which parameters  
        are imported/exported etc.
      d) THIS FM is called X FM for user-exit.
    2. This X FM is also but a simple FM,
       the only difference is
       a) its naming convention
       b) its detected by the special syntax
    regards,
    amit m.

  • Is it possible to call a adobe form inside a function module?

    Hi gurus,
    i am trying to generate the pdf data source inside a custom function module,
    the function module will call the FUNCTION 'FP_JOB_OPEN' , then call the function module of the pdf interface. then get the pdf data back and return.
    but at run time i got the error message:
    FPRUNX101, the job already started.
    then the program stopped.
    i checked the service market place, there is a note for that:858325 Message "Job already started" when you display PDF forms .
    according to the notes,it seems that it's only possible to call the pdf generated function module in a program.
    my question is , is there a way to call that in a funciton module?
    best regards.
    Jun
    the note states that:
    Reason and Prerequisites
    At runtime, a PDF-based form is called using a generated function module. If you use the new interface, it is necessary to set the function modules FP_JOB_OPEN and FP_JOB_CLOSE as control structures with one or several generated function modules. In order for the single test from Transaction SFP to work simultaneously, however, the system checks for the test environment of Transaction SE37 (in which the test ultimately runs) in the single test. In this case, the function modules FP_JOB_OPEN or FP_JOB_CLOSE are called automatically.
    If you then test a function module that calls a PDF based form and therefore calls the function module FP_JOB_OPEN itself, this leads to the error message mentioned above.
    Solution
    The test should be carried out using a program that in turn calls the function module to be tested.

    sorry, i found out the reason.
    the fm can not test direct in se37, it should be wrapped by a program.
    br.
    zj

  • Function module (Z_USR_INSTANT_CREATION1)

    Hi Experts,
    Please look into below coding and solve  my problem.
    FUNCTION Z_USR_INSTANT_CREATION1.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(USERNAME1) LIKE  BAPIBNAME-BAPIBNAME
    *"     VALUE(ACCTNO) TYPE  /BIC/OIZCUSTOMER
    *"     VALUE(LOGONDATA1) LIKE  BAPILOGOND STRUCTURE  BAPILOGOND
    *"     VALUE(PASSWORD1) LIKE  BAPIPWD STRUCTURE  BAPIPWD DEFAULT
    *"       'initpass'
    *"     VALUE(FIRSTNAME) TYPE  /BI0/OINAME
    *"     VALUE(LASTNAME) TYPE  /BI0/OINAME3
    *"     VALUE(ADDRESS1) LIKE  BAPIADDR3 STRUCTURE  BAPIADDR3 OPTIONAL
    *"     VALUE(REF_USER1) LIKE  BAPIREFUS STRUCTURE  BAPIREFUS OPTIONAL
    *"     VALUE(IP_V) TYPE  RSINFOPROV DEFAULT 'ZEX_DS01'
    *"     VALUE(IP_H) TYPE  RSINFOPROV DEFAULT 'ZEX_DS02'
    *"  EXPORTING
    *"     VALUE(CREATERRCODE) TYPE  RSRCHANGEFLAG
    *"     VALUE(ROLERRCODE) TYPE  RSRCHANGEFLAG
    *"  TABLES
    *"      RETURN1 STRUCTURE  BAPIRET2
    *"      PROFILES1 STRUCTURE  BAPIPROF
    *"      RETURN2 STRUCTURE  BAPIRET2
    *"      RETURN3 STRUCTURE  BAPIRET2
    *"      RETURN4 STRUCTURE  BAPIRET2
      DATA: NEWS(40), pwd(8).
      data : ZACTGRP like BAPIAGR occurs 0 with header line.
    Check if the user already exists.
      CALL FUNCTION 'BAPI_USER_EXISTENCE_CHECK'
        EXPORTING
          username = USERNAME1
        IMPORTING
          return   = RETURN1.
    WRITE: RETURN1-type, RETURN1-MESSAGE.
      IF sy-subrc EQ 0.
    Call Function module to create UserId
    *ADDRESS1-FIRSTNAME = 'Sreeni'.
    *ADDRESS1-LASTNAME = 'Varadha'.
        ADDRESS1-FIRSTNAME = FIRSTNAME.
        ADDRESS1-LASTNAME = LASTNAME.
       WRITE: /1 '*** FIRST AND LASTNAME PASSED BY JAVA: ', ADDRESS1-FIRSTNAME, ADDRESS1-LASTNAME.
        CALL FUNCTION 'BAPI_USER_CREATE1'
          EXPORTING
            USERNAME  = USERNAME1
            LOGONDATA = LOGONDATA1
            PASSWORD  = PASSWORD1
            ADDRESS   = ADDRESS1
            REF_USER  = REF_USER1
          TABLES
            RETURN    = RETURN2.
    *CREATE FAILURE ERROR TYPE IS SENT BACK TO PORTAL
        CREATERRCODE = RETURN2-TYPE.
    Call Function module to Deactivate Password
        CALL FUNCTION 'BAPI_USER_CHANGE'
          EXPORTING
            USERNAME  = USERNAME1
            LOGONDATA = LOGONDATA1
            ADDRESS   = ADDRESS1
            REF_USER  = REF_USER1
          TABLES
            RETURN    = RETURN3.
       WRITE: RETURN2-MESSAGE, CREATERRCODE.
       WRITE: RETURN3-MESSAGE.
      ELSE.
    User already Exists need to direct send back the return code to java.
       WRITE: RETURN1-MESSAGE.
        CREATERRCODE = RETURN2-TYPE.
      ENDIF.
      clear: zactgrp.
      refresh zactgrp.
      zactgrp-agr_name = 'ZPMUSA_STORE_USER'.
      Zactgrp-from_dat = sy-datum.
      zactgrp-to_dat  = '99991231'.
      append zactgrp.
    Call function module to assign role to the User Id
      CALL FUNCTION 'BAPI_USER_ACTGROUPS_ASSIGN'
        EXPORTING
          USERNAME       = USERNAME1
        TABLES
          ACTIVITYGROUPS = zactgrp
          RETURN         = RETURN4.
    *ROLE ASSIGN FAILURE ERROR TYPE IS SENT BACK TO PORTAL
      ROLERRCODE = RETURN4-TYPE.
    WRITE: ROLERRCODE.
    Code to Insert records into ZSTAODS
      DATA: ZSTAODS_ITAB LIKE /BIC/AZSTAODS00 OCCURS 0 WITH HEADER LINE.
      ZSTAODS_ITAB-TCTUSERNM = USERNAME1.
      ZSTAODS_ITAB-TCTADTO   = '99991231'.
      ZSTAODS_ITAB-TCTIOBJNM = 'ZCUSTOMER'.
      ZSTAODS_ITAB-TCTSIGN = 'I'.
      ZSTAODS_ITAB-TCTOPTION = 'EQ'.
      ZSTAODS_ITAB-TCTLOW = ACCTNO.
      ZSTAODS_ITAB-TCTHIGH = ACCTNO.
      ZSTAODS_ITAB-TCTOBJVERS = 'A'.
      ZSTAODS_ITAB-TCTADFROM = SY-DATUM.
      APPEND ZSTAODS_ITAB.
      MODIFY /BIC/AZSTAODS00 FROM TABLE ZSTAODS_ITAB.
      clear: ZSTAODS_ITAB.
    Code to Delete records from ZEX_DS01 & ZEX_DS02*
      DELETE FROM /BIC/AZEX_DS0100.
      DELETE FROM /BIC/AZEX_DS0200.
    Code to Insert records into ZEX_DS01*
      DATA: ZEX_DS01_ITAB LIKE /BIC/AZEX_DS0100 OCCURS 0 WITH HEADER LINE.
      ZEX_DS01_ITAB-TCTUSERNM = USERNAME1.
      ZEX_DS01_ITAB-TCTADTO   = '99991231'.
      ZEX_DS01_ITAB-TCTIOBJNM = 'ZCUSTOMER'.
      ZEX_DS01_ITAB-TCTSIGN = 'I'.
      ZEX_DS01_ITAB-TCTOPTION = 'EQ'.
      ZEX_DS01_ITAB-TCTLOW = ACCTNO.
      ZEX_DS01_ITAB-TCTHIGH = ACCTNO.
      ZEX_DS01_ITAB-TCTOBJVERS = 'A'.
      ZEX_DS01_ITAB-TCTADFROM = SY-DATUM.
      APPEND ZEX_DS01_ITAB.
      MODIFY /BIC/AZEX_DS0100 FROM TABLE ZEX_DS01_ITAB.
      clear: ZEX_DS01_ITAB.
    Code to Insert records into ZEX_DS02*
      DATA: ZEX_DS02_ITAB LIKE /BIC/AZEX_DS0200 OCCURS 0 WITH HEADER LINE.
      ZEX_DS02_ITAB-TCTUSERNM = USERNAME1.
      ZEX_DS02_ITAB-TCTADTO   = '99991231'.
      ZEX_DS02_ITAB-TCTIOBJNM = 'ZCUSTOMER'.
      ZEX_DS02_ITAB-TCTHIENM = 'RETAIL HIERARCHY'.
      ZEX_DS02_ITAB-TCTHIEVERS = 'A'.
      ZEX_DS02_ITAB-TCTHIEDATE  = '99991231'.
      ZEX_DS02_ITAB-TCTNIOBJNM   = 'ZCUSTOMER'.
      ZEX_DS02_ITAB-TCTATYPE = '1'.
      ZEX_DS02_ITAB-TCTACOMPM = '1'.
      ZEX_DS02_ITAB-TCTTLEVEL = '99'.
      ZEX_DS02_ITAB-TCTNODE = ACCTNO.
      ZEX_DS02_ITAB-TCTOBJVERS = 'A'.
      ZEX_DS02_ITAB-TCTADFROM = SY-DATUM.
      APPEND ZEX_DS02_ITAB.
      MODIFY /BIC/AZEX_DS0200 FROM TABLE ZEX_DS02_ITAB.
      clear: ZEX_DS02_ITAB.
    Code of RSSM_GENERATE_AUTHORIZATIONS to generate profile from ZEX_DS01 & ZEX_DS02
      TYPE-POOLS: rs.
    *TABLES: tobj.
      DATA: l_t_object TYPE rso_t_tlogo,
            l_s_object TYPE rso_s_tlogo.
    input parameters
    initialize
      DATA: l_display_log TYPE rs_bool.
      IF sy-batch IS INITIAL.
        l_display_log = rs_c_true.
      ELSE.
        l_display_log = rs_c_false.
      ENDIF.
      DATA: l_t_infoprov_auth TYPE rssbr_t_infoprov_auth,
            l_s_infoprov_auth TYPE rssbr_s_infoprov_auth.
      l_s_infoprov_auth-value = ip_v.
      l_s_infoprov_auth-hierarchy = ip_h.
      INSERT l_s_infoprov_auth INTO TABLE l_t_infoprov_auth.
    call the function module
      CALL FUNCTION 'RSSB_AUTH_GEN_FROM_INFOPROV'
        EXPORTING
          i_t_infoprov_auth      = l_t_infoprov_auth
          i_appl_log_initialized = rs_c_false
          i_display_log          = l_display_log
          i_detlevel             = '1'
          i_packagesize          = 10000.
    *PROFILE GENERATION FAILURE ERROR TYPE IS SENT BACK TO PORTAL
       PROFERRCODE = RETURN5-TYPE.
    ENDFUNCTION.
    Use of above function module:
    This function module is used to create user ID in the system. It checks whether the user exists already, if yes, then it would send back the message for the same. If it doesnu2019t then it would create the user in system. Assign roles, profiles and authorizations for the user.
    For ex:  If we have 2 users XXX and YYY in that XXX is existing user and YYY is new user, letu2019s see how this function module will work for these two users
    First, it uses BAPI_USER_EXISTENCE_CHECK function module to check whether the ID exists. If it exists(XXX), it would send back the message for the same. If not(YYY), it would go ahead to create the user id by the function module BAPI_USER_CREATE1. After creation of the id, message regarding the same would be sent at the end of execution of function module.
    Next it will go for assigning of the roles, generation of profile and authorization to the user ID. Once the function module is finished, it would send out the message for the execution of all functionalities in the output screen.
    My Requirement:
    what about the internal and DUA (Delegated  User Administrator)  users is that covered with this function module? if not what changes required to function module?
    Many thanks in advance
    David
    Edited by: david Rathod on Sep 24, 2010 10:11 AM

    Hello David,
    your question is really unreadable. Kindly format your question and resend.
    Regards,
    Satyam

  • Error while extracting data using function module

    Hello,
    I created one generic datasource and i want to extract data with the option "Extraction by Function Module".
    But when i specified function module name and was trying to save, it thrown a error message saying
    'The specified table does not exist'.
    What could be the reason?
    Please help me out.
    Thanks,
    Regards,
    Steve

    Hi Steve,
       Once you execute T.Code RSO2, you need to fill in the details and click Create, specify the Appl. Component and in Extraction by Function Module, give Function Module name and Extrct Structure in the given boxes.
    "This structure is used by a DataSource that was created using the transaction RSO2 (generic extraction) and selects data using a function module.
    The data must be transferred from this function module to an interface table E_T_DATA."
    I'll try to comeup with small piece of code to sort your issue.
    Hope it helps!!!!
    Amit

  • Handling 2 messages in a function module

    Hi ,
    I have a requirement where I need to trigger 2 messages if sy-subrc fails in a Function Module.
         Function module                              GET_JOB_RUNTIME_INFO
         IMPORTING
         JOB名(JOBNAME)=          P_WK_JOBNM
         Error(SY-SUBRC <> 0)
         Result message output
         (EN) Total : &1, Success : &2, Error : &3
         Type: u2019Su2019
         &1:u20190u2019      &2:u20190u2019     &3:u20190u2019
         Perform error handling(->Error Handling:030)
    Error Handling 30:  Error Handling as ABEND
    Show message (message type u2018Eu2019)
    (EN)Error was found in function module. Function module: &1 Returned value: &2 &3
    &1:'GET_JOB_RUNTIME_INFO'
    &2: Exception No
    I have written the code in the following way.
    CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
    IMPORTING
      EVENTID                       =
      EVENTPARM                     =
      EXTERNAL_PROGRAM_ACTIVE       =
      JOBCOUNT                      =
       JOBNAME                       = l_job_name
      STEPCOUNT                     =
    EXCEPTIONS
       NO_RUNTIME_INFO               = 1
       OTHERS                        = 2
    IF sy-subrc <> 0.
    message s010(zmm)  with c_zero c_zero c_zero.
    message e001(zmm) display like 'A'.
    ENDIF.
    But the above code is not working fine.  Only the second message ie [message e001(zmm) display like 'A' ] is being displayed.
    In debugging mode the cursor is passing to the first message but still it is not being displayed.
    Can any one help me in solving this problem
    Thanks in advance,
    Indira

    check this sample code
    here gt_return is of type bapiret2_t
        MOVE <fs_bank_details>-bankkey TO gv_msg_par1.
        MOVE <fs_bank_details>-bankname TO gv_msg_par2.
        PERFORM fm_format_message USING gc_msgno083
                                        gc_e.
    FORM fm_format_message  USING    pv_msgno TYPE sy-msgno
                                     pv_type TYPE bapi_mtype.
      DATA:ls_return TYPE bapiret2.
      CLEAR: ls_return.
      CALL FUNCTION 'BALW_BAPIRETURN_GET2'
        EXPORTING
          type   = pv_type   "Message type
          cl     = gc_bp     "Message class
          number = pv_msgno  "Message No
          par1   = gv_msg_par1 "value for place holder1
          par2   = gv_msg_par2 "value for place holder2
        IMPORTING
          return = ls_return.
      IF ls_return IS NOT INITIAL.
        APPEND ls_return TO gt_return.
      ENDIF.
    ENDFORM.                    " FM_FORMAT_MESSAGE

  • Parameter passing by value or by reference in function module

    hi everybody:
    Im a beginner for abap.
    Below description is described in online help.
    In function module, the CALL FUNCTION statement can pass import, export, and changing parameters either by value or by reference. Table parameters are always transferred by reference.
    I understand parameters passing by value means values carried by parameters are transferred, but I do not understand what is "by reference".
    Please kindly give me a explanation.
    Regards.
    Andy

    hi,
    Function modules are modular units with interfaces. The interface can contain the following elements:
    Import parameters are parameters passed to the function module. In general, these are assigned
    standard ABAP Dictionary types. Import parameters can also be characterized as optional.
    Export parameters are passed from the function module to the calling program. Export parameters
    are always optional and for that reason do not need to be accepted by the calling program.
    Changing parameters are passed to the function module and can be changed by it. The result is
    returned to the calling program after the function module has executed.
    Exceptions are used to intercept errors. If an error triggers an exception in a function module, the
    function module stops. You can assign exceptions to numbers in the calling program, which sets the
    system field SY-SUBRC to that value. This return code can then be handled by the program.
    By reference Passes a pointer to the original memory location.  Very efficient
    By value Allocates a new memory location for use within the subroutine. The memory is freed when the subroutine ends.  Prevents changes to passed variable
    By value and result Similar to pass by value, but the contents of the new memory is copied back into the original memory before returning.  Allows changes and allows a rollback
    When you pass a parameter by reference, new memory is not allocated for the value. Instead, a pointer to the original memory location is passed. All references to the parameter are references to the original memory location. Changes to the variable within the subroutine update the original memory location immediately.
    1  report ztx1804.
    2  data f1 value 'A'.
    3
    4  perform s1 using f1.
    5  write / f1.
    6
    7  form s1 using p1.
    8      p1 = 'X'.
    9      endform.
    The code in Listing produces the following output:
    X
    Hope this helps, Do reward.

  • Function module to copy INVOIC IDOC

    One of our customers use the IDOC message type INVOIC. When the IDOC are received and the proces has been started, we will like to make a copy of the IDOC with the status code 70.
    I know this functionality exist when we change the segment data using the transaction code BD87, and I have debugged this transaction, but the "copy" functionality are developed in the program SAPLEDI5 and not in a function module.
    I am looking for a function module to handle this functionality. Hope you can help me.
    Per Larsen

    To make a copy of idoc message type, you simply have to find the linked Function module of the Idoc. So for INVOIC, there would be a linked Function Module , you can copy the interface of the Function Module and build your own custom Function Module (Z function module) to attach it to the message type.
    So the steps to your problem would be:
    1. Copy the FM to attached mesaage type into a Z function module.
    2. Write the functionality you require in your Z function module.
    3. Attach the message type/ idoc type to this function module. The systematic steps to this can be simply carried out in the Transaction WEDI which is an area menu for EDI/IDOC . Depending on whether it is inbound/outbound, you can follow the steps.
    Cheers!
    Disha

  • Regarding the function modules

    Hi anybody pls tell me
    what are the scenarios for the creation of function module
    can you give me the some examples
    thanks in advance

    <b>Function Modules</b>
    Function modules are procedures that are defined in function groups (special ABAP programs with type F) and can be called from any ABAP program. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the  Function Builder.
    Function modules allow you to encapsulate and reuse global functions in the R/3 System. They are stored in a central library. The R/3 System contains a wide range of predefined function modules that you can call from any ABAP program. Function modules also play an important role in database updates and in remote communications between R/3 Systems or between an R/3 System and a non-SAP system.
    Unlike subroutines, you do not define function modules in the source code of your program. Instead, you use the  Function Builder. The actual ABAP interface definition remains hidden from the programmer. You can define the input parameters of a function module as optional. You can also assign default values to them. Function modules also support exception handling. This allows you to catch certain errors while the function module is running. You can test function modules without having to include them in a program using the  Function Builder.
    The  Function Builder also has a release process for function modules. This ensures that incompatible changes cannot be made to any function modules that have already been released. This applies particularly to the interface. Programs that use a released function module will not cease to work if the function module is changed

  • Use of function module

    can anyone explain me the use and the purpose of the following FM.
    1. EXIT_RSAQEXCE_001
    please explain it will be a great help for me.
    thanks,
    Phyrose

    Hello,
    Check this...
    Function Module EXIT_RSAQEXCE_001
    This section describes which parameters are transferred to the EXIT_RSAQEXCE_001 function module and how the values they contain are interpreted or processed. The following example is used:
    In client 03, user group RX, a user has created query X1. This query consists of a single-line basic list, a statistic, and a ranked list.
    In the basic list, the fields are displayed in the following sequence:
    KNA1-KUNNR
    Customer number
    KNA1-NAME1
    Name
    KNC1-FYEAR
    Fiscal year
    KNC1-UM01U
    Sales in posting period 1
    T001-CURRK
    Currency key
    In the statistics, the fields are displayed in the following sequence. For the field KNC1-UM01U, additional details are required about the number of records that have been read, the percentage share, and the average value.
    KNA1-CNTY1
    Country key
    KNC1-UM01U
    Sales in posting period 1
    In the ranked list, the fields are displayed in the following sequence:
    KNA1-KUNNR
    Customer number
    KNA1-NAME1
    Name
    KNC1-UM01U
    Sales in posting period 1
    Parameters of the EXIT_RSAQEXCE_001 function module
    The function module EXIT_RSAQEXCE_001 has the following parameters:
    PROGRAM
    The program that triggers the transfer
    LIST_ID
    The ID of the transferred sublist
    LISTTEXT
    The title of the transferred sublist
    DATATAB
    The data table
    LISTDESC
    The description table for the fields of the data table
    See also:
    Example: Implementing EXIT_RSAQEXCE_001
    Regards,
    Vasanth

  • NEED INFORMATION ABOUT "MAX_TEST" FUNCTION MODULE

    HI ABAPERS,
                      I need information about "MAX_TEST" function module . this function module is used in 4.6 version , now system have been shifted to 6.0.....here in 6.0 version this function module is not prasent.can any one tell me which new function module we can use in place of this function module, without changing the functionality........
             Thanks in advance
    regards,
    SUNIL

    The module is not very sophisticated. Profficiency in Java or ABAP will be a great bonus here. There are plenty of good materials regarding XI on SDN. I suggest to start with step-by-step guides and master all basic integration scenarios
    http://wiki.sdn.sap.com/wiki/display/XI/Step-by-Step+Guides
    Opportunities in industry are not bad also, cause PI is rather popular among customers. The best thing is that it fits any type of customer's business. Integration is demanded almost everywhere.

  • Regarding Function module call

    Hi Guru s
    Can any body explain  how many Function modules are stored in One function group.
         And What happen when I call 1 function module in a F.Group.
    Thanks in advance,
    Kumar.

    Hi,
    Function group can be defined it as collection of Function
    modules. This Function groups are presents in the Packages
    where we can create in the SE38. So,that all packages are
    consists in the Function Groups.All function groups are
    consists Function Modules.This function modules are created
    at enhancements/Exists.
    A function group can hav any no. of FM's.
    there is no restriction.
    reward if useful
    thanks and regards
    suma sailaja

  • Function Groups and Function Modules

    Hi,
    Can anyone give me the detail steps for creating Function Group and then from that function group creation of function module with example?
    Regards,
    Chandru

    Hi,
    Function Group creation -
           A function group is a program that contains function modules. With each R/3 system, SAP supplies more than 5,000 pre-existing function groups.
         In total, they contain more than 30,000 function modules. If the functionality you require is not already covered by these SAP-supplied function modules, you can also create your own function groups and function modules.
          We can put all the relevant function modules under one function group and all the global variables can be declared in this FG.
    FG Creation:
    1)     Function group can be created in SE80. There choose the 'Function Group' from the list of objects.
    2)    Then give a name for ur function group (starts with Y or Z) and press ENTER.
    3)   The click 'YES' in the create object dialog box and give a short desc. for this FG and save.
    Function Module:
                 A function module is the last of the four main ABAP/4 modularization units. It is very similar to an external subroutine in these ways:
    Both exist within an external program.
    Both enable parameters to be passed and returned.
    Parameters can be passed by value, by value and result, or by reference.
    The major differences between function modules and external subroutines are the following:
    Function modules have a special screen used for defining parameters-parameters are not defined via ABAP/4 statements.
    tables work areas are not shared between the function module and the calling program.
    Different syntax is used to call a function module than to call a subroutine.
    Leaving a function module is accomplished via the raise statement instead of check, exit, or stop.
    A function module name has a practical minimum length of three characters and a maximum length of 30 characters. Customer function modules must begin with Y_ or Z_. The name of each function module is unique within the entire R/3 system.
    Defining Data within a Function Module
    Data definitions within function modules are similar to those of subroutines.
    Within a function module, use the data statement to define local variables that are reinitialized each time the function module is called. Use the statics statement to define local variables that are allocated the first time the function module is called. The value of a static variable is remembered between calls.
    Define parameters within the function module interface to create local definitions of variables that are passed into the function module and returned from it (see the next section).
    You cannot use the local statement within a function module. Instead, globalized interface parameters serve the same purpose. See the following section on defining global data to learn about local and global interface parameters.
    Defining the Function Module Interface
    To pass parameters to a function module, you must define a function module interface. The function module interface is the description of the parameters that are passed to and received from the function module. It is also simply known as the interface. In the remainder of this chapter, I will refer to the function module interface simply as the interface.
    To define parameters, you must go to one of two parameter definition screens:
    1) Import/Export Parameter Interface
    2) Table Parameters/Exceptions Interface
    Then in the FM interface screen, give the following
    1) Import parameters
    2) Export parameters
    3) Changing parameters
    Then give
    1) Define internal table parameters
    2) Document exceptions
    You enter the name of the parameter in the first column and the attributes of the parameter in the remaining columns. Enter one parameter per row.
    Import parameters are variables or field strings that contain values passed into the function module from the calling program. These values originate outside of the function module and they are imported into it.
    Export parameters are variables or field strings that contain values returned from the function module. These values originate within the function module and they are exported out of it.
    Changing parameters are variables or field strings that contain values that are passed into the function module, changed by the code within the function module, and then returned. These values originate outside the function module. They are passed into it, changed, and passed back.
    Table parameters are internal tables that are passed to the function module, changed within it, and returned. The internal tables must be defined in the calling program.
    An exception is a name for an error that occurs within a function module. Exceptions are described in detail in the following section.
    Syntax for the call function Statement
    The following is the syntax for the call function statement.
    call function 'F'
        [exporting   p1 = v1 ... ]
        [importing   p2 = v2 ... ]
        [changing    p3 = v3 ... ]
        [tables      p4 = it ... ]
        [exceptions  x1 = n [others = n]].
    where:
    F is the function module name.
    p1 through p4 are parameter names defined in the function module interface.
    v1 through v3 are variable or field string names defined within the calling program.
    it is an internal table defined within the calling program.
    n is any integer literal; n cannot be a variable.
    x1 is an exception name raised within the function module.
    The following points apply:
    All additions are optional.
    call function is a single statement. Do not place periods or commas after parameters or exception names.
    The function module name must be coded in uppercase. If it is coded in lowercase, the function will not be found and a short dump will result.
    Use the call function statement to transfer control to a function module and specify parameters. Figure 19.9 illustrates how parameters are passed to and received from the function module.
    sample FM
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = ' '
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
      IT_FIELDCAT                       =
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          =
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Example
    1  report ztx1905.
    2  parameters: op1 type i default 2,   "operand 1
    3              op2 type i default 3.   "operand 2
    4  data rslt type p decimals 2.        "result
    5
    6  call function 'Z_TX_DIV'
    7       exporting
    8            p1      = op1
    9            p2      = op2
    10      importing
    11           p3      = rslt.
    12
    13 write: / op1, '/', op2, '=', rslt.
    Regards,
    Shanthi.P
    Reward points if useful ****
    Edited by: shanthi ps on Jan 26, 2008 12:03 PM

  • 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

Maybe you are looking for

  • Why can i not make a compilation (Also adding artwork sometimes doesn't work)

    Has anyone experienced this issue?                                                                                     I am on itunes 12.1.1.4 windows (64bt).  When making compilations (grouping songs together as one album) i found some would work an

  • ITunes library help - moved to external drive and now my apps are gone?

    I moved my iTunes library to an external drive, but now my apps are gone? I do have iTunes match and iCloud, so my songs are all on the cloud, but none of my apps are showing... I copied everything over, consolidated, but I must have messed something

  • Claims report, rpclmsu0, doesn't work correctly in ECC 6.

    Claims report is used to view the details of the components of the claims but all it is showing is the values /561 and /5py wage types. Since it isn't known what wage type generated the claim and what tax class it is under, claims can't be cleared. O

  • Air HTML/JS WinXP - Font specified in CSS doesn't work in App

    I have an app that runs on several machines... on one of them, however, the font has started failing to load in my app. The App loads a web page and displays it. The font is installed locally on the machine. I can use it in IE and Wordpad, but the Ap

  • Unlock to go to homescreen

    First of all: hi iphone user! i am from germany, so excuse my bad english... so here my question (ipnone 4, ios 4.3.5): when i unlock the lockscreen to use the homescreen, the display goes for a second to black before showing the homescreen ( but tim