How to get type any table in function module... or something

Moderator message: Please use a more informative subject in future, and NOT IN ALL CAPITALS.
Hi experts,
how to get type any table option.
in source code.
*"  CHANGING
*"     REFERENCE(S_EKORG) TYPE  ANY TABLE OPTIONAL
Thank you.
Edited by: Matt on Feb 17, 2009 2:27 PM - subject edited

In Function module...... Under changing tab, give the parameter name and type enter associated type any.... You would get that same in the source code and also choose Optional check box.....
You will see exact code in the FM source code

Similar Messages

  • How to get sysnr value in a Function Module

    Hi all,
    I need to get the sysnr(system number) value of the R/3 system. I execute a RFC function module and need to get the value of sysnr of the system it executes in as a return parameter. Can somebody tell me how to get this value in the function module and return it.
    Thanks and Regards,
    Pratik

    Hello Pratik
    The system number has to be defined in the RFC destination. Thus, select on your local system (where you call the RFC function module) the corresponding RFC destination from table <b>RFCDES</b>. In field RFCDES-RFCOPTIONS you will find a string like this:
    H=<ip address>,S=21,R=N, ...
    S=system number
    Regards
      Uwe

  • Syntax Error with Table Parameter (type: ANY) when Creating Function Module

    Hello experts,
    I want to create a function module with a table parameter and table type is ANY. But when I check (Ctrl+F7) this function module, syntax error occurs - "In this statement, the internal table "MSG_TABLE_ITEM" must have the type "STANDARD TABLE"."
    Could anyone tell me what the wrong is? And how can I fix it?
    Thanks,
    Shelwin

    Hi,
    For table parameters, you can only pass
    MSG_TABLE_ITM   TYPE STANDARD TABLE
    or
    MSG_TABLE_ITM  ( don't fill other columns TYPING ASSOCIATED TYPE  ).
    For reference check FM 'GUI_UPLOAD' - Table parameters
    Regards,
    DPM

  • Is there any tables or function modules for getting currency units.

    Hi,
    I am working in smartforms.My requirement is I want to print the russian currency.
    For example if there is 100,25 .I want to get 100 rub 25 kop ( kopecks) like paises for INR.
    Thanks,
    Saravanakumar V.

    Hi
    Try to use this code
    Write a FM like ZSPELL_AMOUNT
    IMPORTING
    *"     REFERENCE(AMOUNT) TYPE  BF_RWBTR
    *"     REFERENCE(IND) TYPE  CHAR1 DEFAULT 'X'
    *"  EXPORTING
    *"     REFERENCE(WORD) TYPE  IN_WORDS
    TABLES: spell.
      CALL FUNCTION 'SPELL_AMOUNT'
           EXPORTING
                language = 'R'
                currency = 'RUB'
                amount   = amount
           IMPORTING
                in_words = spell.
    CONCATENATE spell-word spell-decword INTO word SEPARATED BY space.
    ELSE.
    data: l_word1(255).
    data: l_word2(255).
    CLEAR:L_WORD1,L_WORD2.
    split spell-word at 'Py'into l_word1 l_word2.
    WORD = L_WORD1.
    ENDIF.
    ENDFUNCTION.
    thank You
    Surya

  • How to know whether the tables in function module is importing or exporting parameter?

    Hi guys,
    Why the tables are used in function modules, I knw it transfers internal tables, but thing is that how would i know instantly that whether table is getting imported or exported to the funtion module? Do i need to go through program flow or can we know just by seeing the function module?

    Hi anjali,
                   Tables are like multi line containers ,which can act as both import and export parameters .
                   means,the data in the table can be used by the function module during  its execution and the                same table can be populated with result after the fm execution .
      you can also refer :http://help.sap.com/saphelp_erp60_sp/helpdata/en/d1/801ece454211d189710000e8322d00/content.htm 
    Regards,
    Krishna.

  • How to get structure from Idoc using function module?

    Hi all,
    I am looking for a function module in order to get the structure of a message type used for iDoc. The aim is to get the data element from the different fields in order to check authority if the data element is BUKRS.
    Thanks for your help!
    David

    Hi David,
    You can use the FM "IDOC_TYPE_COMPLETE_READ" which will get you the complete details of the IDOC type along with data elements referred for each fields in the segments.
    The aim is to get the data element from the different fields in order to check authority if the data element is BUKRS.
    Not sure if i understood the above requirement, if you could provide more info on the requirement, i guess you might get better a better solution from the forum. As there are other data elements with different names for company code (just look up *BUKRS* in SE11 under Data Elements to see what i mean), not sure if you can cover it all.
    Regards,
    Chen

  • Problem in passing select-options to class meathods , type any table

    <h1>how to pass type any table to class meathod</h1>
    <h3>hi all
           i'm trying to build class to validate the selection screen , like select-options and parameters
           while writing meathod to validate the select-options
           its throwing parameter mismath error</h3>
    <h4>i tried like made import parameter in class meathod as 'TYPE ANY TABLE' and tried to pass select-options from my program it is saying type mismatch , how to overcome this problem </h4>
    <h4>and i want to pass any select option , either of type lfa1-lifnr or mara-matnr or any other</h4>
    Moderator message : Don't shout, use proper font size for explaining the question. This has been discussed in ABAP forums before. Search for available information. Thread locked.
    Edited by: Vinod Kumar on Sep 14, 2011 11:20 AM

    hI
    Triggering and Handling events
    At the moment of implementation, a class defines its:
             Instance events (using the EVENTS statement)
            Static events (using the CLASS-EVENTS statement)
    Classes or their instances that receive a message when an event is triggered at runtime and want to react to this event define event handler methods. Statement: METHODS
    CLASS IC1_VEICHLE DEFINATION.
    PUBLIC SECTION.
    METHOD CONSTRUCTOR IMPORTING
    EVENTS VEICHEL_CREATION.
    ENDCLASS
    CLASS LC1_VEICHLE IMPLIMENTATION.
    METHOD CONSTRUCTOR
    RAISE EVENT VEICHLE_CREATION.
    REWARD IF USEFULL

  • ConfigurableVariant materialclassification values-Tables or Function module

    Hi All,
    We have a configurable material (say M01) with Class type 300 and have various characteristics assigned to the class.  We have a variant material (say 234567) assigned to the configurable material M01. In the Characteristic values assignment screen we assign a value (say 123) to the characteristic Paper material.
    Now my question is how to get the link between characteristic Paper material (123) and variant material (234567). We have a transaction CL31 where you can get variant material if you give the paper material characteristic. I want to know if there is any table or Function module available to get the link.
    Appreciate your reply.
    Thanks,
    Srinivas

    this type of setting is in the item category settings from sales order.
    if your selction criteria (values ) matches with the exiting material code which got same charectristic valeus as that of selection in Sales order, that material will be replace by exiting material code.
    you can see that setting in spro>Sales and Distribution>Sales>Sales Documents>Sales Document Item-->Define Item Categories  here indicator variant maching should be ticked and Mat. Variant Action as 2 or 4.
    Regards,
    Pravin Mukkawar

  • Exporting Custom table through function module

    <b>How can i Export Custom table through function module.</b> when we add some table in the function module table tab it asks for a ref. table which is some table in database .. but i want to add some custom table with some user defined column names..how can i do this
    <b>n plz tell me how to loop thru select options</b>
    i have to loop thru select option and assign all the values to a variable.
    plz help me out
    Message was edited by:
            Karan Chopra

    Hi Karan,
    Do one thing, Just in the tables tab give the name of the table and don't write anything else. no TYPE and no ANY.
    Hope it will resolve issue.
    reward points if useful.
    Regards,
    Atish

  • CRM Tables or Function Module in SAP CRM related Contract Account ot MPAN no.

    Hi Team,
    Could you please tell me  Any table or Function Module in CRM which is related to Contract Accont or MPAN Number( ISU).
    My Query is- Just I want to confirm that Data are exist in CRM system on the  basis of Contract Account or MPAN Number.
    Regards,
    Arif 

    Hi Mohd,
    Table for Contract Account in CRM is Business Agreement Table CRMM_BUAG & CRMM_BUAG_H
    To get the BP linkage CRMV_BUAG_ATTR
    Regards,
    Naresh

  • Is there any BAPI or function module  to delete entries from a table (VBAK)

    Hi Everybody,
    this is my first thread in SDN...
    my problem follows...
    A report is be created that selects all sales orders created by e-Sales that are more than 20 minutes old and still have a delivery block:
    tables:
    VBAK     sales document: header data
    selection fields:
    VBAK-LIFSK      &#8800;     <BLANK>
    VBAK-ERNAM     =     userID used by e-Sales / IVE
              (EP-BATCH / EAI-BATCH)
    VBAK-ERDAT      <=     Current system Date
    VBAK-ERZET     <=     Current system Time - 20 minutes
    These orders should be deleted from SAP system.
    This report should be scheduled to run regularly every 10 minutes.
    my doubt : is ther any BAPI or Function module to delete entries from a standard table...if no what is the way to delete the enteries from a std table...
    best replies will be rewarded....
    regards
    Reddy

    Hi Vasanth ,
    thanks for your reply.
    i tried in the same manner what u mentioned.
    but how to pass only one parameter to the functionmodule..
    here in this case we have to pass only update flag as 'D'..
    i did the same it giving dump..
    An exception occurred that is explained in detail below.                          
    The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was      
      not caught and                                                                   
    therefore caused a runtime error.                                                 
    The reason for the exception is:                                                  
    The call to the function module "BAPI_SALESORDER_CHANGE" is incorrect:                                                                               
    In the function module interface, you can specify only                            
    fields of a specific type and length under "ORDER_HEADER_INX".                    
    Although the currently specified field                                            
    "INT_ORDER_HEADER_INX" is the correct type, its length is incorrect.              
    my pgm :
    *& Report  YNEW_ORDER_DELETION
    REPORT  ynew_order_deletion.
    TABLES:vbak.
    PARAMETERS:
         p_lifsk LIKE vbak-lifsk DEFAULT '02'.
    SELECT-OPTIONS:
       s_lifsk FOR vbak-lifsk DEFAULT '10',
        s_ernam FOR vbak-ernam,
        s_erdat FOR vbak-erdat,"DEFAULT sy-datum.
        s_erzet FOR sy-uzeit.
    *PARAMETERS:
    p_erzet LIKE sy-uzeit.
       s_erdat like vbak-erdat,
       s_erzet like vbak-erzet.
    DATA:
       BEGIN OF int_final OCCURS 0,
            w_vbeln TYPE vbak-vbeln,
       END OF int_final.
    DATA:
      int_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: int_order_header_inx LIKE bapisditmx OCCURS 0 WITH HEADER LINE.
    DATA:
      wf_time TYPE sy-uzeit.
    INITIALIZATION.
      s_ernam-low = 'KULKARMA'.
      s_ernam-sign = 'I'.
      s_ernam-option = 'EQ'.
      APPEND s_ernam.
    s_ernam-low = 'EAI-BATCH'.
    s_ernam-sign = 'I'.
    s_ernam-option = 'EQ'.
    APPEND s_ernam.
    wf_time = sy-uzeit - 1200.
    p_erzet = sy-uzeit - 1200.
    p_erzet-low = wf_time.
    APPEND s_erzet.
      int_order_header_inx-updateflag = 'D'.
      APPEND int_order_header_inx.
    START-OF-SELECTION.
      SELECT vbeln FROM vbak
                       INTO TABLE int_final
                       WHERE lifsk EQ p_lifsk
                         AND ernam IN s_ernam
                         AND erdat IN s_erdat
                         AND erzet IN s_erzet.
      IF sy-subrc = 0.
        LOOP AT int_final.
          CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
            EXPORTING
              salesdocument         = int_final-w_vbeln
      ORDER_HEADER_IN             =
        order_header_inx            = int_order_header_inx
      SIMULATION                  =
      BEHAVE_WHEN_ERROR           = ' '
      INT_NUMBER_ASSIGNMENT       = ' '
      LOGIC_SWITCH                =
      NO_STATUS_BUF_INIT          = ' '
            TABLES
              return                      = int_return
      ORDER_ITEM_IN               =
      ORDER_ITEM_INX              =
      PARTNERS                    =
      PARTNERCHANGES              =
      PARTNERADDRESSES            =
      ORDER_CFGS_REF              =
      ORDER_CFGS_INST             =
      ORDER_CFGS_PART_OF          =
      ORDER_CFGS_VALUE            =
      ORDER_CFGS_BLOB             =
      ORDER_CFGS_VK               =
      ORDER_CFGS_REFINST          =
      SCHEDULE_LINES              =
      SCHEDULE_LINESX             =
      ORDER_TEXT                  =
      ORDER_KEYS                  =
      CONDITIONS_IN               =
      CONDITIONS_INX              =
      EXTENSIONIN                 =
        ENDLOOP.
        LOOP AT int_return.
          WRITE:/ int_return-type,
                  int_return-id,
                  int_return-number,
                  int_return-message.
        ENDLOOP.
      ENDIF.
    please help me ..its a very urgent issue to be solved...
    am waiting for ur reply...
    regards
    gangareddy

  • Modify Syntax on Internal table of type ANY TABLE

    Hi,
    I have declared one internal table which is of type ANY TABLE.
    In the Loop statement, I am trying to Modify that Internal table from WA.
    Then I am getting one Error message
    "You cannot use explicit or implicit index operations on tables with types "HASHED TABLE" or "ANY TABLE". "C_T_DATA" has the type "ANY TABLE".
    Above code I have placed in method of a corresponding Class.
    Can u please advise me on this..How to modify the Intenal table .
    Thanks and Regards,
    K.Krishna Chaitanya.

    Hi Krishna,
    the modify statement is obsolete.
    You can always LOOP AT [itab] ASSIGNING <field-symbol>.
    This makes the loop never slower, depending on the table structure faster or much faster.
    If you know the table structure at run time, you can use a field-symbol of that type. If not, you can use a field-symbol TYPE any. Then you have to assign the components to field-symbol to modify them, i.e.
    field-symbols:
      <table_line> type any,
      <matnr>        type mara-matnr.
    loop at itab assigning  <table_line>.
      assign component 'MATNR' of structure <table_line> to <matnr>.
      clear <matnr>.
    endloop.
    This technique (available more than ten years) works incredibly fast. My estimate is that if SAP would change all the old standard programs that way and use it consequently in the new ones, the whole system would be 20 % faster because myriads of unnecessary copy operations of LOOP INTO would not happen.
    Regards,
    Clemens.

  • How java gets objet collections from DB function

    This is database function. my question is how java get those values from the function.
    Could you please post some sample code also?
    CREATE OR REPLACE
    Type T_PREO_RoleINFO is Object
    ROLE_ID NUMBER(10),
    ROLE_NAME VARCHAR2(20))
    CREATE OR REPLACE
    TYPE T_RoleInfo IS TABLE OF PREORDER.
    T_PREO_RoleINFO
    Function F_GetUserRole(Userid in number)
    return T_RoleInfo as
    V_Role T_RoleInfo;
    begin
         select T_PREO_RoleINFO(PREO_Role.ROLE_ID,PREO_Role.ROLE_NAME)
         BULK COLLECT INTO V_Role
         from preorder.PREO_Role, preorder.PREO_User_Role
         where PREO_Role.Role_id = PREO_User_Role.Role_id
         and PREO_User_Role.user_id = userid;
         return V_Role;
    end;

    check this out
    http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20878677.html

  • How to get the plsql table data into output cursor

    Hi,
    Could anybody please help me.
    Below is an example of the scenario..
    CREATE OR REPLACE PACKAGE chck IS
    PROCEDURE getdata(dept_no IN VARCHAR2,oc_result_cursor OUT sys_REFCURSOR);
    TYPE get_rec is record (ename varchar2(20),
    eno number(12));
    TYPE t_recs IS TABLE OF get_rec INDEX BY BINARY_INTEGER;
    emp_tab t_recs;
    END chck;
    CREATE OR REPLACE PACKAGE BODY chck AS
    PROCEDURE getdata(dept_no IN VARCHAR2,oc_result_cursor OUT sys_REFCURSOR)
    is
    BEGIN
    select ename, eno
    bulk collect into emp_tab
    from emp;
    open oc_result_cursor for select * from table(emp_tab); -- I believe something is wrong here ....
    END;
    END chck;
    the above package is giving me an error:
    LINE/COL ERROR
    10/29 PL/SQL: SQL Statement ignored
    10/43 PL/SQL: ORA-22905: cannot access rows from a non-nested table
    item
    let me know what needs to be changed
    Thanks
    Manju

    manjukn wrote:
    once i get the data into a plsql table, how to get this plsql table data into the cursor?There is no such thing as a PL/SQL table - it is an array.
    It is nothing at all like a table. It cannot be indexed, partitioned, cluster, etc. It does not exist in the SQL engine as an object that can be referenced. It resides in expensive PGA memory and needs to be copied (lock, stock and barrel) to the SQL engine as a bind variable.
    It is an extremely primitive structure - and should never be confused as being just like a table.
    Its use in SQL statements is also an exception to the rule. Sound and valid technical reasons need to justify why one want to push a PL/SQL array to the SQL engine to run SELECT 's against it.

  • How  to get  response from such a  function

    How  to get  response from such a  function (in MODULE USER_COMMAND_0010 INPUT I get "ODGOVOR" 'X'
    FUNCTION Z_SEENKRAT.
    ""Local Interface:
    *"  EXPORTING
    *"     REFERENCE(ODGOVOR) TYPE  MSEG-KZEAR
    DATA ok_code LIKE sy-ucomm.
    DATA: test like mseg-kzear.
    BREAK-POINT.
    call screen 10.
    test = ODGOVOR.
    ENDFUNCTION.
    *&      Module  CLEAR_OK_CODE  OUTPUT
          text
    MODULE clear_ok_code OUTPUT.
      CLEAR ok_code.
    ENDMODULE.                 " CLEAR_OK_CODE  OUTPUT
    *&      Module  USER_COMMAND_0010  INPUT
          text
    MODULE USER_COMMAND_0010 INPUT.
    DATA odgovor LIKE mseg-KZEAR.
    CASE ok_code.
        WHEN 'DA'.
        ODGOVOR = 'X'.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0010  INPUT

    Hi,
    You need to declare the ODGOVOR variable in the TOP include, then you will get the value
    Regards
    Sudheer

Maybe you are looking for

  • Issue with Quicklook in toast 9

    I am having an issue with Quicklook in Toast 9 just in my user account. Any ideas on why? I have removed and re-installed all Toast 9 files, prefs, etc... The issue is only in my user account.

  • Interactive reports grouping issue.

    Hi I have a few interactive reports. I need to be able to remove the GROUP BY clause on any field when that field is removed from view by using the Select Fields feature in interactive reports. How can this be achieved? Regards Adam

  • Webhelp topic not opening in Safari directly

    In an application that runs in Safari and has Webhelp, when you click the app's Help button from a page (.NET) in the app, the page's help topic should open. Instead, the help's TOC page opens instead. Help is developed in RoboHelp x5. Is some change

  • IPhoto 11 - Mat format is not available for a 4 photo page

    When adding new pages or modifying existing pages in an IPhoto book, there is no option for "Matting" a four picture spread. Also, just for drill, the conversion from IPhoto 9 to IPhoto 11 did a poor job of converting books.

  • Wrong date but good time!

    Hi, I got a small but annoying problem. I set "automaticly set date and time" and I have good time (I mean hour) but wrong date.. I know I can set it by myself, but if its automatic it should be ok, but it isnt. Where is the problem? Something with p