Problem in Passing internal table Function module

Hi experts,
I am new to creating function module and needed certain suggestions.
I have created a type inside the FM
types: begin of T1
field A
field  B
end of T1.
Now, i have populated the internal table of this type but how to send it through the tables tab of my FM.
IN the parameter, i can write my internal table name but what should be associated type ...
Please give some suggestions

Hi,
  Not required.
Table parameter will behave like type table of Z_sturcture. So just define the structure and use it in the TABLE parameter.It will convert that into internal table..
Example :
Parameter name         Typing                Associated type
T_RETURN                  LIKE                   your Z_structure
If you want to give table in the import parameter, then you need to create the table type for the structure.....

Similar Messages

  • Dynamic internal table+function module

    Hi guys,
    I need a help.Could u plz tell me how to pass a field symbol contexts inside an export parameter?
    Points will be rewarded for helpful answers....

    Hi,
    You can use the TYPE TABLE in the exporting parameters..If you use TABLE it assumes an internal table.
    Ex..
    ITAB    TYPE    TABLE
    Thanks
    naren

  • Pass internal tables in Export  Parameters of  Function Module

    Hi
    How to pass internal tables through export parametes of the calling function module. i
    think i can pass it by reference ....
    if so can anyone suggest how to do it?

    Hi,
    You can Export values of an Internal table in two ways, by :
    1) specifying in Tables tab
    (Not recommended since it's an obsolete in ECC 6.0)
    If used, will reduce the performance of the FM
    Tables are always passed by reference
    2) specifying in Exports tab.
    The parameter should be a Table type (created in se11)
    having a Line type that refers to the structure of the data.
    Pass by Value is not used for Normal Function modules.
    Used usually for RFC enabled FMs.
    Cheers,
    Remi

  • How to pass internal table to form routine..?

    Gurus,
    I am creating a custom Function module in which i have declared few perform statements and passing internal table to it..but when i declare the form it gives me error that the internal table is unknown...Can u please suggest me what am i doing wrong...
      DATA: Begin of tb_set_values occurs 0.
            include structure rgsb4.
      DATA: End of tb_set_values.
    PERFORM read_sets_with_values USING wa_setheader CHANGING tb_set_values[].
    FORM read_sets_with_values USING value(rwa_setheader) LIKE setheader
                               CHANGING rtb_set_values LIKE tb_set_values[].
    DATA: v_setid TYPE setid.
    *DATA: Begin of rtb_set_values occurs 0.
         include structure rgsb4.
    *DATA: End of rtb_set_values.
      CALL FUNCTION 'G_SET_GET_ID_FROM_NAME'
        EXPORTING
          SHORTNAME = rwa_setheader-setname
        IMPORTING
          NEW_SETID = v_setid.
      CALL FUNCTION 'G_SET_GET_ALL_VALUES'
        EXPORTING
          SETNR      = v_setid
        TABLES
          SET_VALUES = rtb_set_values.
    ENDFORM.
    What can be the error..please help

    Well actually, I just tested it and it works fine as you have written it in my test program, so not sure what you are doing wrong. This was tested in NW 7.0
    REPORT rich_0001.
    DATA: setheader TYPE string.
    DATA: wa_setheader TYPE string.
    DATA: BEGIN OF tb_set_values OCCURS 0.
            INCLUDE STRUCTURE t000. "<<-- Test with T000 instead    "rgsb4.
    DATA: END OF tb_set_values.
    SELECT * INTO TABLE tb_set_values  FROM t000.
    PERFORM read_sets_with_values USING wa_setheader
                                  CHANGING tb_set_values[].
    *&      Form  read_sets_with_values
    *       text
    *      -->VALUE(RWA_SETHEADER)  text
    *      -->RTB_SET_VALUES        text
    FORM read_sets_with_values USING value(rwa_setheader) LIKE setheader
                               CHANGING rtb_set_values LIKE tb_set_values[].
      DATA: ls_set_values LIKE LINE OF rtb_set_values.
      LOOP AT rtb_set_values INTO ls_set_values.
        WRITE:/ ls_set_values.
      ENDLOOP.
    ENDFORM.                    "read_sets_with_values
    Regards,
    RIch Heilman

  • PASSING INTERNAL TABLE

    I CREATED INTERNAL TABLE ITAB WITH 2 FIELDS EBELN , BUKRS.
    I WANT TO USE FUNCTION MODULE .
    I CAN PASS EBELN , BUKRS AS EXPORT PARAMETERS .
    HOW CAN I PASS ITAB TO FUNCTION MODULE . SHOULD I DECLARE OF TYPE ITAB IN EXPORT PARAMETER LIST IN FUNCTION MODULE .....
    I DECLARED JTAB TYPE ITAB IN EXPORT PARAMETER . BUT WHEN I AM WRITING QUERY IN THE SOURCE CODE OF FUNCTION MODULE , IT IS NOT IDENTIFYING JTAB AS THE INTERNAL TABLE .
    I WANT TO PROCESS SOME DATA AND EXPORT JTAB BACK TO ABAP PROGRAM .
    AM I GOING RIGHT...?

    hi Rajesh,
    While creating a FM and passing Table to it. u can not use Internal table as type. Instead u need to create a structure in Database and then give the type of table as the Structure type.
    Hope this helps u.
    <REMOVED BY MODERATOR>
    Regards,
    Preeti
    Edited by: Alvaro Tejada Galindo on Feb 14, 2008 4:37 PM

  • Not able to Access R/3 Tables, Function Modules through Crystal Reports

    Hi Gurus,
    I am working on Crystal Reports 2008 - V12.2.0,  When I am trying to connect SAP R/3 system through the Data  connectivity SAP Table,Cluster or FM, 
    I could see only the very few tables ,  and cannot see all Tables and not any Info sets or Function Modules, 
    But, I can access BW system,  problem facing only with SAP R/3 system,
    Suggest me on this,
    Thanks
    Siva

    Hey here..,,
    There is a limitation to show all Tables, Function Modules in Crystal reports for R/3. To see them,
    In Options:
    You will see Table_Name Like%: Text box, go there and give the starting or ending characters of FM's.
    Eg: Z% or %Z
    Then Click on Ok.
    Now try to connect to R/3 again or Refresh the Connection, it will list out as you opted.
    Hope it should help you.
    Thank You!!

  • ABAP OO - Passing Internal Tables from Method to Method

    I'm new to writing methods.
    I have a need to build an internal table in METHOD1 and pass the internal table to METHOD2. I'm confused how to declare the table in 'Parameter' section of the METHOD2. I have specified the following:
    Parameter = WTAB1
    Type = Import
    Pass value = blank
    Optonal = Blank
    Typing Method = Type
    Associated type =  ZSCIW and this is declared in DDIC as a data type with fields ZZLINE(72) and ZZPOS(4)
    Default value = blank
    METHOD1 (simplified example)
    method METHOD1.
    Table of individual words from source code
      types: begin of wline,
               WORD(72),
               POSN(4),
             end of wline,
             wlines     type standard table of wline  with default key.
      data:  wx          type wlines,
               wa          like line of wx.
    Clear past results
      REFRESH: Wx.
    Look through source code...
      LOOP AT ref_include->lines into wa.
        APPEND wa.
      ENDLOOP.
    Call METHOD2 and pass internal table wa
    METHOD2 ( ).
    1. How to you define the parameters in METHOD2.
    2. What is the coding in METHOD1 to call METHOD2.
    Your help will really be appreciated.
    Thanks.
    Soyab

    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    Check these links.
    http://www.henrikfrank.dk/abapuk.html
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
    Go through the below links,
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    OO ABAP links:
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    go through these links
    http://www.erpgenie.com/abap/index.htm
    http://sic.fh-lu.de/sic/bic.nsf/(vJobangebote)/EC8AD2AE0349CE92C12572200026FDB8/$File/Intern%20or%20Working%20Student%20as%20ABAB%20OO%20Developer.pdf?Open
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    ABAP_OBJECTS_ENJOY_0 Template for Solutions of ABAP Object Enjoy Course
    ABAP_OBJECTS_ENJOY_1 Model Solution 1: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_2 Model Solution 2: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_3 Model Solution 3: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_4 Model Solution 4: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_5 Model Solution 5: ABAP Objects Enjoy Course
    DEMO_ABAP_OBJECTS Complete Demonstration for ABAP Objects
    DEMO_ABAP_OBJECTS_CONTROLS GUI Controls on Screen
    DEMO_ABAP_OBJECTS_EVENTS Demonstration of Events in ABAP Objects
    DEMO_ABAP_OBJECTS_GENERAL ABAP Objects Demonstration
    DEMO_ABAP_OBJECTS_INTERFACES Demonstration of Interfaces in ABAP Objects
    DEMO_ABAP_OBJECTS_METHODS Demonstration of Methods in ABAP Objects
    DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    <b>good book on ABAP objects(OOPS)
    http://www.esnips.com/doc/bc475662-82d6-4412-9083-28a7e7f1ce09/Abap-Objects---An-Introduction-To-Programming-Sap-Applications</b>
    Rewards if useful..............
    Minal

  • Pass Internal Table to Memory

    Dear Experts.
    I have the following problem.
    I am using a User-Exit for Travel  that is called from a program standard with use the T.Code TRIP. The program standard use a structure that when entry in the user exit not is. I need use this structure in the user exit. (p_t_req_head).
    I had read abour SAP and ABAP Memory but from the program standar How can Pass Internal Table to Memory SAP or ABAP from the program standard to user-exit?
    When I am doing debugging in the program Standard and this call to the user exit, I use ()namestructure for example ()p_t_req_head  and I get the datas of the structure, But In the Source Code ABAP, How can do this with instructions?
    Regards

    Hi,
    You try with Import & Export Statements as follows ---
    DATA : t_itab LIKE TABLE OF spfli.
    EXPORT t_itab TO MEMORY ID 'ABCD'.
    After sending the internal table to ABAP memory you need to get that by IMPORT in the called session.
    IMPORT t_itab FROM MEMORY ID 'ABCD'.

  • Passing values to function module

    Hello Everybody!
         I have defined a function group ZSUB_FGROUP1 and within that, I have defined a function module ZSUB_FMOD1. I wish to pass one set of values of following types:
    VBELN, POSNR, MATNR, ARKTX, KWMENG, VRKME, NETWR   from VBAP
    and  WAERK from VBAK.
    from my main report ZSUB_REP1 to ZSUB_FMOD1, which will then print those values in the form of a list. When I processed the list from within the main report, I used regular methods like top-of-page and all. But, I am not sure how to handle things from within the function module. Please help!

    Hi...
    When u create the function module , we generally provide the import and export parameters....
    <b>Import parameters :</b> Which we pass to the function module ..
    <b>Export parameters:</b> Which we receive from the function module...
    <b>Tables parameters:</b> Tables to pass and to receive to and from the function module...
    <b>Changing Parameters:</b> Which we pass to the function module and change these values in the function module and receive those from function module...
    So define the fields
    VBELN, POSNR, MATNR, ARKTX, KWMENG, VRKME, NETWR ,WAERK in the import parameters with LIKE declaration and corresponding type..
    <b><u>Field  ||  Type  || Associated Type || Optional || Default ||</u></b>
    vbeln  || like  ||  vbak-vbeln ||
    <b>Optional : </b>If u check this then this field is not mandatory to receive the value..
    If uncheck then we have to pass value to this field from the program !! otherwise it gives an error.
    In the <b><u>source code</u></b> tab u can write the list output related code with these imported and exported parameters !!
    To call the function module we use<b> PATTERN </b>which is present on the application tool bar of the SE38-Editor screen..
    Click on this .. u will get a popup ..IN this check the <b>CALL FUNCTION</b> and in the input field of this,, give the function module name... and press enter ...Here u can give values for these imported fields...
    reward if it helps u...
    sai ramesh

  • Passing Internal tables between pages (in stateless appl.)

    hi BSP gurus,
    how do I pass internal tables from one BSP page to another. The problem is that the appl. is stateless and hence I am not able to use the appl. class.
    thanks in advance,
    Ashish Walke

    Hi Ashish,
    In the onInputProcessing event of the first page , write the following code...
    call method NAVIGATION->SET_PARAMETER exporting
    name = 'filled_table'
    value = filled_table.
    Here filled_table is internal table.
    NAVIGATION->GOTO_PAGE('second.htm').
    In the next page , you can make the internal table as auto in the attributes.
    Since you have made the itab as auto transfer , you can directly access the itab in the initialization event of the next page if it is stateless.
    Regards,
    Aashish Garg

  • Passing Internal tables to Workflow

    Hello all,
    I learning workflow and have a small doubt related to passing internal table as parameter to workflow when it is triggered by a report program explicitely.
    I wrote a prog to upload data from flat file into internal table and by passing this ITAB to the workflow for futher processing. <b>Actually i succeeded in this with only one field in my flat file (lfa1-lifnr).</b>
    <b>what if my flat file contains more than one field? (i.e., lifnr, name1, city, county) how should i declare the parameters for my EVENT (triggering event) and same with my container declaration?</b>
    Any inputs in this regards are welcome.
    Thank you in advance,
    Lakshmi Narayana

    Hi Lakshmi,
    Create Workflow container
      swc_container        lt_container.
      swc_create_container lt_container.
    Fill internal table with data
    The container type and the internal table type should be same, U can use a structure to define both.
    Declare a structure with all the fields.
    Define a conatiner of same type of structure in worklow and set it in <b>wait for event</b> setp.
    swc_set_table lt_container '<container_name>' lit_int_data.
    CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype           = lc_objtyp
          objkey            = lv_objkey
          event             = lc_event
        IMPORTING
          event_id          = lv_eventid
        TABLES
          event_container   = lt_container
        EXCEPTIONS
          objtype_not_found = 1
          OTHERS            = 2.
    Rgds,
    Prakash
    Message was edited by: Prakashsingh Mehra

  • To pass internal table data(including subtotal) to dynamic internal table

    here i am displaying the dynamic internal table in alv grid.
    i followed like this but i am unable to get the subtotal form the internal table.
    LOOP AT ITAB1. " assigning <fs_itab1>.
        ASSIGN COMPONENT 'RACCT' OF STRUCTURE <DYN_WA> TO <DYN_FIELD>.
        <DYN_FIELD> = ITAB1-RACCT.
        ASSIGN COMPONENT 'ERGSL' OF STRUCTURE <DYN_WA> TO <DYN_FIELD>.
        <DYN_FIELD> = ITAB1-ERGSL.
        ASSIGN COMPONENT 'TEXT' OF STRUCTURE <DYN_WA> TO <DYN_FIELD>.
        <DYN_FIELD> = ITAB1-TEXT.
        I = 4.
        CLEAR COMP_ITAB.
        LOOP AT COMP_ITAB.
          ASSIGN COMPONENT I OF STRUCTURE <DYN_WA> TO <DYN_FIELD>.
         LOOP AT ITAB WHERE RACCT = ITAB1-RACCT.
           IF ITAB-RBUKRS EQ COMP_ITAB-RBUKRS.
          IF ITAB1-RBUKRS EQ COMP_ITAB-RBUKRS.
            <DYN_FIELD> = ITAB1-REPVAL.
            SUB_TOT = ITAB1-REPVAL.
          ELSE.
            <DYN_FIELD> = 0.
            SUB_TOT = 0.
          ENDIF.
         ENDLOOP.
          I = I + 1.
          TOTAL = TOTAL + SUB_TOT.
        ENDLOOP.
        ASSIGN COMPONENT I OF STRUCTURE <DYN_WA> TO <DYN_FIELD>.
        <DYN_FIELD> = TOTAL.
        APPEND <DYN_WA> TO <DYN_TABLE>.
        CLEAR <DYN_WA>.
        TOTAL = 0.
      ENDLOOP.
    Thanks,
    sridhar.

    Hi Rakesh,
    We pass internal tables for the smartform are shown in bold in below code,
    CALL FUNCTION LF_FM_NAME
        EXPORTING
          ARCHIVE_INDEX      = TOA_DARA
          ARCHIVE_PARAMETERS = ARC_PARAMS
          CONTROL_PARAMETERS = LS_CONTROL_PARAM
          MAIL_RECIPIENT     = LS_RECIPIENT
          MAIL_SENDER        = LS_SENDER
          OUTPUT_OPTIONS     = LS_COMPOSER_PARAM
          USER_SETTINGS      = ' '               
          ZXEKKO             = L_DOC-XEKKO
          ZXPEKKO            = L_DOC-XPEKKO
          ZNAST              = NAST
        IMPORTING
          DOCUMENT_OUTPUT_INFO = IT_DOCUMENT
          JOB_OUTPUT_INFO      = IT_OUTPUT_INFO
          JOB_OUTPUT_OPTIONS   = IT_JOB_OUTPUT
        <b>TABLES
          L_XEKPO            = L_DOC-XEKPO[]
          L_XEKPA            = L_DOC-XEKPA[]
          L_XPEKPO           = L_DOC-XPEKPO[]
          L_XEKET            = L_DOC-XEKET[]
          L_XTKOMV           = L_DOC-XTKOMV[]
          L_XEKKN            = L_DOC-XEKKN[]
          L_XEKEK            = L_DOC-XEKEK[]
          L_XKOMK            = L_XKOMK</b>  
    EXCEPTIONS
          FORMATTING_ERROR   = 1
          INTERNAL_ERROR     = 2
          SEND_ERROR         = 3
          USER_CANCELED      = 4
          OTHERS             = 5.
    Regards,
    Azaz Ali.

  • How to find out the Area Menu for a Report/ Table/Function Module

    Hi,
    Is there any procedure to find out the <b>"AREA MEANU"</b> for a Report/Table/Function Module...
    Or is there any Transaction code / Report is available to find out all the report for a particular "AREA MENU".
    Thank you for your quick response...
    Regards,
    Thiru
    <b></b>

    Hi,
    Check these below threads:
    user log in & log out time SAO
    How to find user log-out time ?
    Regards,
    Nitin

  • How to pass internal table to method of class

    Hi all,
    I am new to abap objects, i want to pass one internal table to class.
    i am trying in this way.
    class c1 definition.
    method get_material importing t_stpo  type any table
                                   exporting t_mast type any table.
    endmethod.
    endclass.
    class c1 implementation.
    method get_material.
    select f1 f2 f3 from <tab> into table t_mast
            for all entries in t_stpo
            where stlnr = t_stpo-stlnr.
    endmethod.
    endclass.
    ERROR:
    "stlnr" is not available
    if i use this way. its not giing error.
    class c1 definition.
    method get_material exporting t_mast type any table.
    endmethod.
    endclass.
    class c1 implementation.
    method get_material.
    select f1 f2 f3 from <tab> into table t_mast
            for all entries in it_stpo
            where stlnr = it_stpo-stlnr.
    endmethod.
    endclass.
    how to pass internal table with some specific reference may be using like or type <it_xxxx>
    thanks

    Try this.
    TYPES : BEGIN OF ty_stpo,
             stlnr TYPE stpo-stlnr,
             idnrk TYPE stpo-idnrk,
             menge TYPE stpo-menge,
            END OF ty_stpo,
            BEGIN OF ty_mast,
             matnr TYPE mast-matnr,
             werks TYPE mast-werks,
             stlnr TYPE mast-stlnr,
            END OF ty_mast,
            tt_stpo TYPE TABLE OF ty_stpo,
            tt_mast TYPE TABLE OF ty_mast.
    DATA : it_stpo TYPE tt_stpo,
           it_mast TYPE tt_mast.
    *       CLASS c1 DEFINITION
    CLASS c1 DEFINITION.
      PUBLIC SECTION.
        METHODS : get_bom_numbers EXPORTING ex_stpo type tt_stpo,
                  get_parent_material IMPORTING im_stpo TYPE tt_stpo
                                      EXPORTING ex_mast TYPE tt_mast.
        endclass.
    *       CLASS c1 IMPLEMENTATION
    CLASS c1 IMPLEMENTATION.
      METHOD get_bom_numbers.
      ENDMETHOD.                    "get_bom_numbers
      METHOD get_parent_material.
      ENDMETHOD.                    "get_parent_material
    START-OF-SELECTION.
      DATA : obj TYPE REF TO c1.
      CREATE OBJECT obj.
      CALL METHOD obj->get_bom_numbers
        IMPORTING
          t_stpo = it_stpo.
      CALL METHOD obj->get_parent_material
        EXPORTING
          im_stpo = it_stpo
        IMPORTING
          ex_mast = it_mast.
    Regards,
    Rich Heilman

  • Can I pass a table function parameter like this?

    This works. Notice I am passing the required table function parameter using the declared variable.
    DECLARE @Date DATE = '2014-02-21'
    SELECT
    h.*, i.SomeColumn
    FROM SomeTable h
    LEFT OUTER JOIN SomeTableFunction(@Date) I ON i.ID = h.ID
    WHERE h.SomeDate = @Date
    But I guess you can't do this?... because I'm getting an error saying h.SomeDate cannot be bound. Notice in this one, I am attempting to pass in the table function parameter from the SomeTable it is joined to by ID.
    DECLARE @Date DATE = '2014-02-21'
    SELECT
    h.*, i.SomeColumn
    FROM SomeTable h
    LEFT OUTER JOIN SomeTableFunction(h.SomeDate) I ON i.ID = h.ID
    WHERE h.SomeDate = @Date

    Hi
    NO you cant pass a table function parameter like this?
    As When you declare @date assign value to it and pass as a parameter it will return table which you can use for join as you did it in first code 
    But when you pass date from some other table for generating table from your funtion it doesnt have date as it is not available there
    Ref :
    http://www.codeproject.com/Articles/167399/Using-Table-Valued-Functions-in-SQL-Server
    http://technet.microsoft.com/en-us/library/aa214485(v=sql.80).aspx
    http://msdn.microsoft.com/en-us/library/ms186755.aspx
    https://www.simple-talk.com/sql/t-sql-programming/sql-server-functions-the-basics/
    http://www.sqlteam.com/article/intro-to-user-defined-functions-updated
    Mark
    as answer if you find it useful
    Shridhar J Joshi Thanks a lot

Maybe you are looking for

  • Can't install adobe photoshop elements on my new HP computer with windows 8

    Can't install adobe photoshop elements on my new HP computer with windows 8.

  • First Row Record is not inserted from CSV file while bulk insert in sql server

    Hi Everyone, I have a csv file that needs to be inserted in sql server. The csv file will be format will be like below. 1,Mr,"x,y",4 2,Mr,"a,b",5 3,Ms,"v,b",6 While Bulk insert it coniders the 2nd column as two values (comma separte) and makes two en

  • Documents not printing correctly

    We recently upgraded our marketing department from CS4 Design Standard to CS5.5 on to CS6 and now a printing problem has cropped up, starting in CS5.5. When printing a document with a lot on it most of the graphics are missing. The only way to get th

  • Problems installing FW CS3 on Vista Business

    Hi everyone, I was wondering if anyone has come up with this problem. Actually I have it with both, Fireworks and Dreamweaver. I'm currently running my machine with Windows Vista Business, and when trying to install, it does nothing. I double click t

  • Logical Model vs. Process Model

    Some questions on SDDM 3.1.4 support for internal consistency of a design: 1. Can I have the same Information Store on more than one Data Flow Diagram (in the same design)? When I try this, either by creating a new one on the second DFD and trying to