Problem in creating Function Module

Hi,
  while creating a function (Z_SPELL_AMOUNT_INDIA) one error is coming . the error  <b>'SPELL not declared</b> ' is coming. already the Function module is running correctly in different client(another client's place) i am just download the Function module from the existing implementation site and upload the function module in new client's place. both the Projects are mySAP ECC 5.0.
  Here first i have created a function group and under the Function group itself i am uploading the FM.
  How can i declare the SPELL?
is there any rules to be follow while creating the Function Group?
Thanks,
Neptune.M

Before you copy the function module check the following
1. Check the TOP include copied properly or not
2. Check any form routine (if existing) copied or not
3. In the Import, Export & tables if you are pointing to any DDIC structures, check whether they are copied or not.
While activating the function module CHOOSE ALL THE INCLUDES AND FUNCTION GROUP AT A TIME, AND THEN ACTIVATE ALL.
I hope this helps you.
- Raj

Similar Messages

  • Problem while creating Function module

    Hi All,
                   I created a TABLE and am using this table in a FUNCTION MODULE as a reference for declaring an internal table in TABLES tab in the function module  .
    But when i click on the table name its giving an error "TABLES parameters are obsolete! "
    Can any one figure out the reasons .....and help me out!!!
    Deepika K

    Hi Deepika,
       Tables option is said to be Obsolete because these days we use internal tables without header line...
    Tables Option in FM considers internally that the table name you mentioned is with a header line and the structure of the internal table will be acting as work area.
    It is still included in new version because for Upward compatibility...
    As we still use the predefine function modules so they should be even compatible with newer versions so its still there..
    But for normal practice it can be used but preferably not to use.. rather you use EXPORT parameter and include internal table like field...
    Create a structure first and then a Table type which include the previously defined structure in  SE11 and the assign the Table type to the field in EXPORT parameter with TYPE..
    Hope this would help u.
    Regards
    Narin Nandivada.

  • Problem in creating Function Modules

    At present i am using ECC 6.0 version.
    Now i want to write a function module for inserting data  into function module.
    When i try to declare internal table usingTABLES keyword.it is giving error "TABLE PARAMETERS ARE OBSOLUTE".so for this i declared an internal table using CHANGING tab.
    But when i try to activate my function module i am getting an error saying that "internal table declaration must include occurs ".
    How can i proceed further.........Can anyone give the source code for function module for inserting data into data base table?

    HI.
    the message TABLE PARAMETERS ARE OBSOLUTE". is just a warning. you can hit enter and continue with the coding using Tables statemnt
    If you wish to use changing  create a internal table in a type group (EX fieldcat of slis ) and use it in refering with TYPE keyword
    regards
    prasanth
    Edited by: prasanth kasturi on Jun 26, 2008 10:05 AM

  • Problem while creating Functional module

    Hi Experts.
    I was trying to create one FM for currency conversion purpose.The code as follows.
    FUNCTION Z_TEST_CUR_RATE.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(TYPE_OF_RATE) LIKE  TCURR-KURST
    *"     VALUE(DATE) LIKE  SY-DATUM
    *"     VALUE(FOREIGN_CURRENCY) LIKE  TCURR-FCURR
    *"     VALUE(LOCAL_CURRENCY) LIKE  TCURR-TCURR
    *"  EXPORTING
    *"     VALUE(RATE) TYPE  TCURR-UKURS
    *"     VALUE(TEST) TYPE  C
    data: rate1 like TCURR-UKURS.
          Select SINGLE UKURS from TCURR into RATE1
                              where KURST = 'TYPE_OF_RATE' and
                                    FCURR = 'FOREIGN_CURRENCY' and
                                    TCURR = 'LOCAL_CURRENCY'  and
                                    GDATU = DATE.
    if sy-subrc = 0.
    rate = rate1.
    else.
    rate = 1.
    ENDFUNCTION.
    When ever  I try to run this program I am getting the output as rate = 1.I mean to say that the select statement is not at all executed....Can any expects help me out.....
    Thanks In advance
    Regards,
    Bala

    Hi
    Try without using the variable RATE1,,and remove the quotes
    Select SINGLE UKURS from TCURR into (TCURR-UKURS)
    where KURST = TYPE_OF_RATE'and
    FCURR = FOREIGN_CURRENCY and
    TCURR = LOCAL_CURRENCY and
    GDATU = DATE.
    regards
    Mahesh

  • Problem facing in Function module.

    Hi friends,
    Happy New year to all.
    I am facing the problem while crating Function module.
    As my requirement:
    I need to call this Function module in SAP-BW application area. I am creating this in BW side(SE37).
    The intenal table which i am passing to the function module will vary. The structure is not constant.
    Data is flowing from one table(source table) to another table(Destination table) . In BW if we want to refer the data in source table in START ROUTINE while loading, we use SOURCE_PACKAGE internal table.
    1) I am passing Source_package internal table as ITAB_SOURCE_PACKAGE. (this source_package strucute also not canstant, it will vary)
    2) passing second internal table as ITAB1, this structure also vary. I will declare this structure before calling the function module.
    In Function module Table tab i given as
    PARAMETER       TYPE           Associated Type
    ITAB1                   LIKE           ANY     
    ITAB_SOURCE_PACK   LIKE      ANY
    In Import tab:
    SOURCEINFOOBJECT           pass value
    In source code i written as
    DATA: WA_SOURCE_PACK like line of ITAB_SOURCE_PACK.
    DATA: WA_ITAB1 like line of ITAB1.
    LOOP AT ITAB_SOURCE_PACK INTO WA_SOURCE_PACK.
      READ TABLE ITAB1 WITH KEY SOURCEINFOOBJECT = WA_SOURCE_PACK-SOURCEINFOOBJECT
      INTO WA_ITAB1.
      IF SY-SUBRC NE  0.
        WA_ITAB1-SOURCEINFOOBJECT = WA_SOURCE_PACK-SOURCEINFOOBJECT.
        INSERT WA_ITAB1 INTO TABLE ITAB1.
      ENDIF.
    ENDLOOP.
    (Note: this is piece of code)
    While checking i am getting as error
    Field "ANY" is unknown. It is neither in one of the specified tablesnor defined by a "DATA" statement. "DATA" statement. "DATA" statement.
    For this what i need to do.
    As i am not very good in ABAP, pls help me.
    Thanks & Regard
    MRK

    Hi,
    u have to do like this..decalre itab1 and ITAB_SOURCE_PACK in the tables parameter...
    so change like this
    In Function module Table tab do like this
    PARAMETER TYPE Associated Type
    ITAB1
    ITAB_SOURCE_PACK
    In Import tab:
    SOURCEINFOOBJECT pass value
    In source code i written as
    DATA: WA_SOURCE_PACK type ITAB_SOURCE_PACK.
    DATA: WA_ITAB1 type ITAB1.
    LOOP AT ITAB_SOURCE_PACK INTO WA_SOURCE_PACK.
    READ TABLE ITAB1 WITH KEY SOURCEINFOOBJECT = WA_SOURCE_PACK-SOURCEINFOOBJECT
    INTO WA_ITAB1.
    IF SY-SUBRC NE 0.
    WA_ITAB1-SOURCEINFOOBJECT = WA_SOURCE_PACK-SOURCEINFOOBJECT.
    INSERT WA_ITAB1 INTO TABLE ITAB1.
    ENDIF.
    ENDLOOP.
    Regards,
    Nagaraj

  • Doubt in  export, import and table para when creating Function Module

    Dear fellow ABAPers,
    I have a doubt in defining export, import and table parameter while creating a function module.
    I am calling a function module inside a user exit. Now in the user exit the SAP fills an internal table called i_lfa1 with all the data user has eneterd.
    Now I want to pass this whole internal table to function module and the perform some checks on the values of internal table.
    After that function module fills an error structure with values depending on some check.
    1)
    How do I pass this internal table to function module ? 
    When I am creating function module in se37 where do I define this iternal table type ? Is it in Import or Table parameter during function module creation?
    2)
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Please clear my doubt..
    Relevant points will be awarded.
    Regards,
    Tushar.

    Hi Tushar,
    1. How do I pass this internal table to function module ?
       I assume u are creating your own Y/Z FM.
       Pass it thru TABLES parameter.
    2. When I am creating function module in se37 where do I define this iternal table type
       Define this in TABLES interface.
       What Type ?
       THE SAME TYPE WHICH HAS BEEN DEFINED
        WHILE PASSING IN THE USER-EXIT FUNCTION MODULE.
       IF U SEE THE FM OF THE USER-EXIT,
       U WILL COME TO KNOW.
    3.
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Define it in TABLES interace. (not in export, import)
      (Since what u are going to return is an internal table)
      U can take for eg. BDCMSGCOLL.
      OR u can create your own Y/Z structure
    for the same purpose.
      (or u can use the structure type T100)
    I hope it helps.
    Regards,
    Amit M.

  • Problem in  using function module parameters in abap program

    i want to use the coding present in on one of the function module 'AS_API_INFOSTRUC_FIND'  i got the problem using the function module parameters in my abap program.
    these are the parameters inside fm
    ""Lokale Schnittstelle:
    *"       IMPORTING
    *"             VALUE(I_FIELDCAT) TYPE  AIND_FCAT
    *"             VALUE(I_FIELDS) TYPE  TABLE OPTIONAL
    *"             VALUE(I_OBLIGATORY_FIELDS) TYPE  TABLE OPTIONAL
    *"       EXPORTING
    *"             VALUE(E_INFOSTRUC) TYPE  AIND_DESC
    *"             REFERENCE(E_ALL_FIELDS) TYPE  TABLE
    *"             REFERENCE(E_MATCHING_FIELDS) TYPE  TABLE
    *"       EXCEPTIONS
    *"              NO_INFOSTRUC_FOUND
    i want to declare     E_ALL_FIELDS  parameter    in my abap program,
    i have declared as 
    data: E_ALL_FIELDS TYPE TABLE.
    but   the system throws error that
    'type of field 'TABLE'  is generic .no table line has been specified'.
    i want to use it in my abap program how can i declare in my abap program .

    You have to declare the table using any specific type.
    The type table in the FM is generic so you can pass any type you need.
    For instance:
    TYPES: BEGIN OF ty_fields,
             fieldname LIKE dfies-fieldname,
           END OF ty_fields,
    TYPES: TY_T_GLU1              LIKE GLU1                     OCCURS 0,
           ty_t_fields            type ty_fields                occurs 0.
      DATA: lt_info_struct_fields TYPE ty_t_fields WITH HEADER LINE,
            lt_matching_fields    TYPE ty_t_fields WITH HEADER LINE.
        CALL FUNCTION 'AS_API_INFOSTRUC_FIND'
             EXPORTING
                  i_fieldcat         = ft_fieldcat-fieldcat
                  i_fields           = ft_fields_filled[]
             IMPORTING
                  e_infostruc        = lv_info_struct_name
                  e_all_fields       = lt_info_struct_fields[]
                  e_matching_fields  = lt_matching_fields[]
             EXCEPTIONS
                  no_infostruc_found = 1.

  • How to create function module for getting customer name

    Hi Experts,
                   How to create function module?  when in import parameter kunnr values to be passed it must give name1 details according to the customer number...
    how to write the logic in source code....
    Regards,
    Thiru. R

    1. First of all create function group.
    2. Create function module using this function group.
    3. If only one kunnr is needed at a time, create import parameter for it. But if many kunnr to be entered at a time,use table.
    4. Fetch name1 for each kunnr from KNA1 table.
    "->> if many kunnr
    if not t_kunnr[] is initial.
    select kunnr as kunnr name1 as name1
    into table t_kunnr_name1
    from kna1
    for all entried in table t_kunnr
    where kunnr = t_kunnr-kunnr.
    endif.       
    sort t_kunnr_name1 by kunnr name1.
    delete adjacent duplicates from t_kunnr_name1 comparing kunnr name1.
    table t_kunnr_name1 will contain kunnr and its name1.
    I hope logic is clear for you now.
    Regards,
    Aparna

  • How to create function module in real time

    hi experts,
    can somebody explain a real time requiremwnt , to create a function module.
    its very urgent.
    i want elaborately.
    regards,
    subhasis.

    hi,
    In real time
    1. as per my knowledge we create function modules to Inbound IDOC /outbound processing..
    2.Interface between a program..
      Example we need to take some data from a report say materials and plant and process some bapi and return logfiles to the report we can use FM here too.
    To create a function module
    First you need to create a function group (function group holds a number of function modules relevant)
    SE37>goto>function groups-->create group ..click this create group..
    Now in the pop up enter the function groupname Eg: ZW_FG1 plus short text and saveit
    Now again goto SE37--> enter new Function module name eg:ZW_FM1
    and press F5.
    Now again a popup you need to enter
    function group name : ZW_FG1
    and short test and save it..
    Now the Function module is created under the Function group ZW_FG1.
    write your export import table parameters and you source code.
    rewards if useful
    regards,
    nazeer
    Message was edited by:
            nazeer shaik

  • How to create function module in abap for VirtualProvider in bi

    how to create function module in abap for VirtualProvider in bi ???????????????
    can any one help me with simple example ?????????????????
    Moderator message : Duplicate post locked. Read forum rules before posting.
    Edited by: Vinod Kumar on Jun 15, 2011 4:40 PM

    Hi ,
    Thanks for replies about my question??.
    If i am using the exit in my char relation ship how can i debugg that exit???
    if i am using BPS0 how to do it???If i am using BPS_WB how to do it??
    Case1.Variable (type Exit) I known how to do debugg this one in BPS0 but i'm not sure in BPS_WB??
    Case2:Char Relation Ship(Type Exit) how to do in BPS0 and BPS_WB??.
    Thanks.

  • 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

  • Problem in executing function module: ERROR_IN_PDO: ERROR_IN_PDO

    Hi all,
    I am getting an error I can't solve until now.. Who can help?
    The Default Trace in the EP 7.0/NWA gives the following information:
    Severity:  Error
    Message: Problem in executing function module:[date]:com.sap.mw.jco.JCO$AbapException: (126) ERROR_IN_PDO: ERROR_IN_PDO
    Category:  /uwl/service
    Location:  com.sap.netweaver.bc.uwl.core.connect.abap.FunctionModuleActionHandler
    Application:  sap.com/tcwddispwda
    The UWL connection tests are correct! So, who can help!
    There is nothing to find in sap notes or sdn forum
    Best regards,
    G. Leurs

    Hi john,
    I am also facing hte same issue.
    when the user is trying to approve the Compleated shopping cart from  the button availble in  the UWL preview , I am getting the below error.
    Exception type:com.sap.netweaver.bc.uwl.connect.ConnectorException Message:Wed Aug 25 12:16:52 CEST 2010 (Connector) :com.sap.netweaver.bc.uwl.connect.ConnectorException:Wed Aug 25 12:16:52 CEST 2010 (Connector) :com.sap.mw.jco.JCO$AbapException:ERROR_IN_PDO
    we are not passing any ABAP role from teh SRM system.
    it would be great if you can share  your views regarding this.
    Raji

  • How to delete Thr created functional module dynamically

    Hi All,
    How to delete Thr created functional module dynamically
    Regards,
    Lisa
    Message was edited by:
            Lisa Roy

    Hi,
    You can use the function module RS_FUNCTION_DELETE to do that.
    Make sure you are not deleting any standard FM's.
    Example
          call function 'RS_FUNCTION_DELETE'
               exporting
                    funcname          = 'ZFM_NAME" " Function modue name
                    suppress_popups   = 'X' " TO suppress any pop-ups that come when you delete
               exceptions
                    error_message     = 1
                    cancelled         = 2
                    function_released = 3
                    others            = 4.
    Regards,
    Sesh

  • Creating function modules with step by step

    Hi,
       plz provide me the material for creating function modules with step by step.

    Hi Nagaraju,
    Step 1.
    GO to transaction SE80.In the drop box list select function group enter your Z Function group name.Press enter it will ask for creating the function group.Create your function group.
    OR
    In SE37 transaction,in the menu bar Goto - > Function Group - > Create Group.Your Function Group will be created.
    Step 2.
    Go to transaction SE37.Enter your Z Function module name,your recently created function group name and the description.Press Enter.Now your FM is created.
    Step 3.
    Enter Export,Import parameters.In the source code tab write the code what you want to write.If any exception write in the exception tab.
    Method 2)
    First u have to create Function Group.
    1.se37->Goto->Function Group--->Create.
    2.Create FM.
    3.maintain import /export parameters and tables , exceptions.
    4.based on the ur requirement u have to bulid ur logic in Source Code by using there Import parameters and u can pass the results by using Export or table.
    5.u can raise error by using exception.
    Reward if useful.
    Thanks
    Aneesh.

  • Performance problem with OLE_FLUSH_CALL function module

    Hello Everyone,
    I am facing problem with OLE_FLUSH_CALL function module (execution is taking long time which is going to be dump error).
    Could you please help me in knowing solution for this problem?
    Thanking you in advance.
    Srinivas

    Hi Srinivas,
    the OLE_FLUSH_CALL does an RFC from ABAP backend to frontend UI. So high execution time could result from high network time, for example latency between UI and backend server.
    How many UI interaction steps did you measure for the trace above? Ideally, there should only be one OLE_FLUSH_CALL per user interaction step. If its more, the application is not written in an optimized way.
    Best Regards, Randolf

Maybe you are looking for

  • I need a new Macbook but -.I need advice regarding the new fixed configurations

    I have a MacBook from 2007 and it probably needs replacing as I'm starting to see problems, little hints that any day it might completely stop working.  I was ready to buy a new computer but after reading about the new MacBook Pros, it seems like App

  • Need exit for ME51N G/L account number automatically populated

    Hi , i have the issue with  Enhancement. <b>The requirement is   in the tcode ME51N or ME52N .</b>    They will enter maerial and Qty ,Plant, Purchase group.    i need to get G/L account number with respect to Purchase group automatically.    pls do

  • Stucked in error

    Hi experts, workflow is stucked in error.what i need to do here.can i strart the workflow after the error.if yes how to do this... please help me on this..

  • IWeb ignores Dreamweaver templates. do we just need to ban IWeb users?

    Just did a new site in Dreamweaver. Then a guy came in with iWeb and mangled it. iWeb completely ignores the template tags in the file. the web pages were damaged. Do we just need to ban cheap programs like iWeb that hide the HTML to make it "user fr

  • ERP Integrator: Data Rows Marked as Invalid

    Hi, I executed data write-back rules with "Import from source" option and met this warning: "ERPI Process Start, Process ID: 19 ERPI Logging Level: DEBUG (5) ERPI Log File: /tmp/aif_19.log Jython Version: 2.1 Java Platform: java1.4.2_14 COMM Writebac