TABLE parameter in FUnction module

Hi Experts
Iam modifying a FM, i have 10 fileds in export parameters,
filed1
filed2
filed3
filed 10.
as per the requirement i need to display the same parameters in table form
suppose the rows of table is like
filed1filed2filed3
filed4filed5filed6
filed7filed8filed9filed10
so iam planing to create internal table and pass it TABLE parameter option in FM
please tell me is it make sense and how to define TABLE parameter in FM, and how to pass data to it
thanks
vasavi

inside the fm you can declare some thing like this.. have a table parameter name some thing don't reference to any data type.
and also you have 10 importing parameters.
function ztest_function.
data: begin of itab occurs 0,
         field1 type <datatype>,
         field2..
        field10,
      end of itab.
"passing importing parameters
itab-field1 = i_field1. "these are importing parameters
itab-field2 = i_field2.
itab-field10 = i_field10.
append itab.
table_parameter[] = itab[].
endfunction.

Similar Messages

  • Tables-Parameter in Function module

    Hello together,
    i created a new function module in CRM with one "Tables"-Parameter. The parameter will be filled in debugging but if i call the fm in SAPRFC test script the table is empty. Do have any idea how i could solve this?
    Best regards
    Sascha

    Changing parameters can be used as work areas as well as tables, tables can not be used as work areas.
    Reference    Difference between changing and table parameters in Function Modules SAP ABAP - Modularization techniques in SAP ABAP | at SAPNuts.com

  • Fetch data from table(ET_) which is exporting parameter of function module

    Hi,
    I m new to ABAP programming.
    I have to develop a smartform that has to be filled in with fields from few tables.
    These tables have the naming convention ET_<XXX> (i.e. exporting parameter of function module).
    I m not able to directly view its contents in se11 or use select query for it.
    I have a report program which i can execute to view these parameter names.
    Now, how do i fetch data from these parameters/tables and pass it from my driver program to smartform??
    Someone pls guide me...
    Thank You.

    Hi,
    I have done that using Field-Symbols.
    Thanks,
    Preetha

  • Dynamic Export table of a function Module

    Hi Friends,
    I have a requirement where fields of  Export table of my function Module is dynamic. It is like the Fields to be expoerted by the Function Module would be stored in a seperate Z table
    The Z table would contain the records as follows .
    Table Name              FieldName
    =========     
    MARA                      MATNR
    MARC                      WERKS
    and So on..
    . How can I define my Export table in Function module dynamically so that the structure of my Export Function Module would be same as that of the Fieldnames in Z table..
    Thanks

    Just declare the associate type as "ANY TABLE" in the exporting parameter.
    FUNCTION ZTEST.
    *"*"Local Interface:
    *"  EXPORTING
    *"     REFERENCE(IT_TAB) TYPE  ANY TABLE

  • Passing parameter in function module

    hi friends,
    I have created one function module in which i need to pass PO/SO number from standard EKKO/VBAK tables through the select option parameter S_POSONO. Inside the function module I have a select query which fetches the records from a Z-table which has a field called 'REFERENCE' which is 16-char long. Hence the length mismatches with PO/SO no which is 10-char long. the first 10-char from 'REFERENCE' is PO/SO number, next 3-char is line-item num, and the last three char is schedule item num. It is required to match only first 10-char with the parameter passed i.e, S_POSONO and display only those datas.
    The function module is as follows.....
    Function :
    CALL FUNCTION 'YFIIN_RETRIEVE_SOURCE_DATA'
    EXPORTING
       LT_RANGE_BUKRS          = S_BUKRS[]
       LT_RANGE_DOCNO          = S_POSONO[]
       LT_RANGE_DOCDATE        = S_DATUM[]
       LT_RANGE_CURRENCY       = S_FCURR[]
      TABLES
        IT_TEMEXPOSU            = LT_TEMEXPOSU
    EXCEPTIONS
       INVALID_SELECTION       = 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.
    Source code inside function module:
      SELECT * FROM ZFIGL_TEMEXPOSU INTO  TABLE IT_TEMEXPOSU
                                     WHERE   COMPANY_CODE IN LT_RANGE_BUKRS
                                     AND  currency in LT_RANGE_CURRENCY
                                     and  REFERENCE in LT_RANGE_DOCNO
                                     and  doc_date in LT_RANGE_docdate.
    IF SY-SUBRC = 0.
    SELECT COMPANY_CODE ATTRIBUTE_01 REFERENCE CREATION_DATE FOREIGN_CURR                                                               
               FROM TEMT_RAWEXPOS APPENDING CORRESPONDING FIELDS OF
                   TABLE IT_TEMEXPOSU WHERE COMPANY_CODE IN  LT_RANGE_BUKRS
                                     AND REFERENCE in LT_RANGE_DOCNO
                                     AND CREATION_DATE IN  LT_RANGE_DOCDATE
                                     AND FOREIGN_CURR IN LT_RANGE_CURRENCY.
       ENDIF.
    Import Parameter of Function Modules :
    LT_RANGE_BUKRS   - type - BUKRS
    LT_RANGE_DOCNO  - type - EBELN
    LT_RANGE_DOCDATE - type - DOKDATS
    LT_RANGE_CURRENCY - type - WAERS
    please help me to solve this problem..

    Hi Ram Tej,
    Try this.
    First Read all the records without Checking REFERENCE field with LT_RANGE_DOCNO into an internal Tbale.
    Then looping at that internal table delete records from the same internal table where REFERENCE(10) <> LT_RANGE_DOCNO.
    Hope this may help ur requirement.
    Award points if useful.

  • Checkbox as import parameter in function module

    Hi all,
    how to create a checkbox as import parameter in function module,
    thnx in advance

    ?? Function modules don't have screens...they do have import, export parameters.
    If you look at how "checkboxes" are stored in db tables, you'll see that the previous replies are precisely correct.  A check box is a char1 field...it is on when 'X' (ABAP_TRUE) and off when blank (initial)....you would call your FM with an import field of type char1 set to 'X' or set to space, and handle accordingly in your FM code.
    If you have a checkbox on a selection screen, then the value of that parameter is either 'X' or space, depending upon whether or not the user checked the box.

  • Table Name or Function Module to find out all the Screens & Subscreens for

    Hello Experts,
          Table Name or Function Module to find out all the Screens & Subscreens for all T-Codes
    Helpful Answer will b rewarded
    Arif Shaik

    Hi Balaji,
       But TSTC only Gives the Program Name , T-Code and Screen but not all the Subscreen details
    Any other which U know

  • Reg : Table name of Functional Module

    Can some one sent me the table name where functional module details get stored

    HI,
    Check for Function Module.
    Tables
    TFDIR----
    > Table contains Function Modules.
    TFTIT----
    >Table contains Function Module Short Text.
    ENLFDIR-----> Additional Attributes for Function Modules.
    rewards if useful,
    regards,
    nazeer

  • Add parameter in Function Module

    hi all,
    I'm trying to add a parameter to function module HRGPBS_HER_GET_SURNAME_NINO.
    However, the system is telling me to carry out modification comparison first.
    Can someone guide me on using SPAU or SE95, as I don't understand what to enter in the selection area?
    thanks

    If you go to transaction code: SPAU, you can find the item (program, function module, screen, etc) in question, open the tree to the lower levels. On the lower item, you can choose to save your changes or revert back to original.
    The developers should be able to tell what has been changed. In most cases, we wanted to keep our changes with the exception of when a change was made and later a note was released to produce the same result or if new functionality is released related to the item in question.
    Hope this helps.

  • Add entries to database tables using update function module

    Hi All,
    I have a small requirement, in which I need to update Z-tables usimg update function module in update task. In the calling program, I have gathered the data in a field symbol value of type any. I need to pass the same to that function module to update the data which is in the field symbol.
    Please guide me how to achieve this technically.
    Thanks in advance,
    Pradipta .

    Hi,
    I believe you already have evrything with you.....Start Coding the same and come back with any Coding issue.
    I believe you will not be able to pass the Field Symbol in FM Interface.....You need to pass the Variable which Field Symbol is referring....

  • (internal) Tables obsolete as parameter in function modules,

    Hi
    As you probably can see by the question, my ABAP Knowledge isn't exactly overwhelming !
    <i>anyway:</i>
    I'm trying to create a function module in NW2004s, This functionmodule should take an internal table, based on a structure as (import) parameter.
    In the earlier version, I've done this by defining it under the TAB 'Tables' in the function builder - But know its telling me that "<i>Tables Parameters are obsolete</i>", and that I should define it under "Changing" instead.
    I have tried that, but I'm only allowed to pass a single line, and if I try to do a Loop, in the function module, it tells me that ity isn't created as an internal table.
    So please - what is the "best practice" here ?
    Regards
    Morten Nielsen

    Hi All,
    I followed Steps 1 and 2 but when I use the following select statement I get a dump with the error enclosed.
    Step1. Created a structure ZDFKKCOHI which is a replica of DFKKCOHI.
    Step2. Created a table type ZDFKKCOHITABLE with line type as ZDFKKCOHI.
    Step3. In my function module I have a changing parameter ZDFKKCOHIPARAM of type ZDFKKCOHITABLE.
    Step 4. When I use the following select clause I am getting a dump.
    DATA: wa_zdfkkcohi LIKE LINE OF zdfkkcohiparam.
      SELECT *
      FROM dfkkcohi
      INTO  CORRESPONDING FIELDS OF TABLE zdfkkcohiparam
      WHERE cotyp EQ zcotyp
      AND gpart EQ zgpart
      AND corr_status EQ zcorr_status.
      LOOP AT zdfkkcohiparam INTO wa_zdfkkcohi.
    *Move IT_ZDFKKCOHI to ZDFKKCOHIOUT.
    *Append ZDFKKCOHIOUT.
    *Clear IT_ZDFKKCOHI.
      ENDLOOP.
    What could be wrong?
    Thanks for all your help in advance.
    Regards,
    Divya

  • (internal) Tables obsolete as parameter in function modules in ECC 6.0

    Hi All,
    I followed Steps 1 and 2 in the thread  but when I use the following select statement I get a dump with the error enclosed.
    Step1. Created a structure ZDFKKCOHI which is a replica of DFKKCOHI.
    Step2. Created a table type ZDFKKCOHITABLE with line type as ZDFKKCOHI.
    Step3. In my function module I have a changing parameter ZDFKKCOHIPARAM of type ZDFKKCOHITABLE.
    Step 4. When I use the following select clause I am getting a dump.
    DATA: wa_zdfkkcohi LIKE LINE OF zdfkkcohiparam.
    SELECT *
    FROM dfkkcohi
    INTO CORRESPONDING FIELDS OF TABLE zdfkkcohiparam
    WHERE cotyp EQ zcotyp
    AND gpart EQ zgpart
    AND corr_status EQ zcorr_status.
    LOOP AT zdfkkcohiparam INTO wa_zdfkkcohi.
    *Move IT_ZDFKKCOHI to ZDFKKCOHIOUT.
    *Append ZDFKKCOHIOUT.
    *Clear IT_ZDFKKCOHI.
    ENDLOOP.
    Error: Das laufende ABAP-Programm wollte eine Open SQL-Anweisung ausführen,
    bei der die Treffermenge mit 'INTO CORRESPONDING FIELDS' in
    namensgleiche Felder der Zielbereichs gestellt werden soll. Hierbei
    müssen die namensgleichen Felder des Zielbereichs einen flachen Typ
    haben, oder vom Typ STRING oder XSTRING sein.
    Im vorliegenden Fall enthält der Zielbereich " " aber ein
    namensgleiches Feld "MANDT " mit dem verbotenen internen Typ "l".
    What could be wrong?
    Thanks for all your help in advance.
    Regards,
    Divya

    Translating the error message -;)
    The running ABAP-program wanted to carry out an opus SQL-direction, with which the hit quantity with 'INTO
    CORRESPONDING FIELDS' is supposed to be placed into name same fields the goal area.  Herewith the name same
    fields of the goal area must have be a flat type, or of the type STRING or XSTRING. 
    In the existing case, the goal area "" contains however a name same field "MANDT" with the forbidden internal type "l".
    You should check you structures and assign the correct TYPE to the fields -:)
    Greetings,
    Blag.

  • Passing selection table as parameter to function modules

    i tried to pass a selection table as a parameter to a function module but there is a problem stating the eror the table length is different.
    *& Report  ZSFSELECT_OPTIONS_PGM
    REPORT  zsfselect_options_pgm.
    TABLES zselect_options.
    SELECT-OPTIONS sop FOR zselect_options-id.
    DATA  : fname(15) TYPE c.
    *CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
       formname                 = fname
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
    IMPORTING
      FM_NAME                  =
    EXCEPTIONS
      NO_FORM                  = 1
      NO_FUNCTION_MODULE       = 2
      OTHERS                   = 3
    *IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    DATA lth(2) TYPE c.
    DATA ty TYPE i.
    DATA o TYPE i.
    DATA l TYPE i.
    DATA k TYPE c.
    DESCRIBE FIELD sop-sign TYPE lth LENGTH ty IN CHARACTER MODE.
    CALL FUNCTION fname
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
      TABLES
        sf_sop                     =sop
    EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR             = 2
      SEND_ERROR                 = 3
      USER_CANCELED              = 4
      OTHERS                     = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    in the smart form i have tried to pass the sp as the table.
    i have created a program line node
    :SELECT * FROM zselect_options INTO TABLE it_tab WHERE id IN sf_sop.

    Hi,
    If i understand ur problem correctly u r trying to pass a select-option to Tables for a smartform function module. It gives an error & it correct.
    If u understand the structure of a select option, it will have 4 fields in it & the structure will be
    SIGN                   CHAR1
    OPTION               CHAR2
    LOW                   Type Zfield
    HIGH                   Type Zfield
    But ur receiving Table paramter of the smnartform FM will be having only 1 field - Type Zfield
    So this mismatch gives u an error.
    Solution:
    Case1:
    Write code outsied th FM in ur program to get all the values & build an internal table & pass that to the FM.
    Case2:
    Define the Structure of table in the smartforms as tols earlier & then try passsig the Select option.
    Thanks & Regards,
    Bhargava

  • Error while passing a table to a function module

    Hi Iam passing a table g_tab of length 376 flat structure to the function module..under TABLES section parameter.
    Changedocument_read_headers.
    iam getting a complile time error like the below displayed thing. Can u tell me how to solve this ?
    In the function module interface, you can specify only
    fields of a specific type and length under "I_CDHDR".
    Although the currently specified field
    "G_CDHDR_TAB" is the correct type, its length is incorrect.
    Edited by: kiran kumar on Jul 7, 2008 8:53 AM

    probably u making a mistake while declaring the table
    declare it like this in the tables section:
    S_JOB     LIKE     RNGE_OBJID
    where s_job is the internal table name and RANGE_OBJID is a structure type and NOT an internal table type.

  • Populating the output parameter in function module.

    Hi Experts,
       I have written a function module,with material number,BEZEI as input and mvgr2 as output from table tvm2t.I am facing a problem in populating the material number as well in outputtable.The material number in input is nothing to do with output.
    please help me at the earliest.
    Regards,
    Sridevi.

    Hmmm, you wrote that the output is 'table parameter' but you mention 2 single fields. If you expect a good reply here, it helps to mention how you defined the table and how you select the data for the output. For example: input is matnr and you select the material group of this matnr. Output is all other matnr of this material group. Then we would know what you want to do here.
    So please describe what you need and give us the table description.
    Regards
    Nicola

Maybe you are looking for

  • Encrypt and decrypt using dbms_crypto.hash

    hi to all i am newbie here and i've just want to ask if how can i decrypt the encryted password. v_pass_string = 'qwerty'; lower(dbms_crypto.hash(to_clob(v_pass_string),3)) The out is: b1b3773a05c0ed0176787a4f1574ff0075f7521e and i want to output it

  • How to install Office 365 Pro Plus Ms office 2013 Offline through MDT Task Sequence

    Hi  How can i deploy the Office 365 pro Plus Ms Office 2013 (that come with Office 365 E3 License) offline to Client Machines through MDT Task Sequence? Shailendra Dev

  • Efficient use of CURSOR?

    We are using queries that if we want to be able to utilize the XSU, require that we use several CURSORs within the query to maintain the hierarchical structure. The problem, however, is that the use of cursors seems to be hosing performance. A query

  • Exchange 2010 to 2013 migration: Mailbox move requests are journaled.

    Hello, I've installed Exchange 2013 into Exchange 2010 infrastructure [ single Exchange 2010 server; single AD site; AD = 2003 ], Exchange 2010 has 2 databases: 1. Database with users mailboxes;    Journaling YES: Journal account. 2. Database with 1

  • Dynamic data in Composite Test Framework Input Request

    Hi All, I have created composite test framework test suites to test existing soa11g bpel composite. I have a requirement to have unique id in its input elemnt every time I test a BPEL service. <input> <ID>unique id</ID> </input> Can we generate uniqu