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'.

Similar Messages

  • Exceptions  passing internal tables to memory...!

    code in program 1
    DATA :IT_FINAL2 LIKE WA_FINAL OCCURS 10 WITH HEADER LINE.
    DATA : I_SORT TYPE SLIS_T_SORTINFO_ALV  WITH HEADER LINE.
    DATA : I_FCAT   TYPE TABLE OF SLIS_FIELDCAT_ALV WITH NON-UNIQUE
                    DEFAULT KEY WITH HEADER LINE INITIAL SIZE 0,
      EXPORT (IT_FINAL2[]) TO MEMORY ID 'main'.
      EXPORT (I_FCAT[]) TO MEMORY ID 'i_fcat'.
      EXPORT (I_SORT) to MEMORY ID 'sort'.
    SY-SUBRC IS O FOR THE FIRST EXPORT.
    while exporting  the  other 2  tables the system is throwing exception whose analysis is as follows.
    Error analysis
        The table "(itab)" has an illegal row type at position "comp. 1" in statement
         "EXPORT (itab) TO ...".
        The following types are allowed:
        "C, CSTRING"
        However, the field "(itab)" has the type:
        8
        ( Meanings in type description:
          - Values in brackets: Type length in bytes
          - 'DEC'            : Number of decimal places at type P
          At the type description, there is partly only a technical type
          description displayed.)
    code in program 2  with same table declaration.
      import (I_FCAT_S) FROM MEMORY id 'i_fcat'.
      import (CH_ITAB) FROM MEMORY id 'main'.
      import (I_SORT_S) FROM MEMORY id 'sort'.
    Hey experts plz help me resolve this query .
    or suggest a alternative to pass the internal table from one program to another...
    Edited by: Anup Deshmukh on Jun 16, 2009 7:22 PM

    Hey Anup...just try as Rich had said...firstly remove the brackets....
    I tried your codes and it is working fine for me!
    DATA :IT_FINAL2 LIKE WA_FINAL OCCURS 10 WITH HEADER LINE.
    DATA : I_SORT TYPE SLIS_T_SORTINFO_ALV  WITH HEADER LINE.
    DATA : I_FCAT   TYPE TABLE OF SLIS_FIELDCAT_ALV WITH NON-UNIQUE
                    DEFAULT KEY WITH HEADER LINE INITIAL SIZE 0.
    EXPORT it_final2[] TO MEMORY ID 'main'.
    EXPORT i_fcat[] TO MEMORY ID 'i_fcat'.
    EXPORT i_sort TO MEMORY ID 'sort'.
    And while importing use like below:
    IMPORT i_fcat[] = i_fcat[]   FROM MEMORY ID 'i_fcat'.
    IMPORT it_final2[] = it_final2[]   FROM MEMORY ID 'main'.
    IMPORT i_sort = i_sort  FROM MEMORY ID 'sort'.
    And also remember to FREE the memory ID after importing..

  • Passing Dynamic Internal Tables to Memory

    I have a bit of a conundrum right now that I can't seem to correct. I am working on adding an ALV report to an existing report program. I was able to write a simple helper program that builds a custom object that I defined that translates my raw data into two seperate dynamic tables, and then builds an ALV grid and outputs it. The reason I wrote this in a simple helper program was so that I could use SUBMIT ... EXPORTING LIST TO MEMORY from my primary report program and capture the input so I can later write it out under our company's standard ABAP list format as if I were using WRITE statements.
    The output of the report itself is working beautifully. We have included functionality to automatically take the output, produce an HTML file from it, and then FTP it directly to a webserver so our clients can get easy access to it. What I want to be able to do though is give the clients two tab-delimited files that contain the raw data that was used to build the report. We have an interface in place to do that, but I somehow need to be able to pass these two dynamic internal tables which I have field-symbols to reference back to my calling program.
    Here is what I am trying to do:
    CALL METHOD OBJ_ALV_MR_EST_REASONS->PRODUCE_ESTIMATION_REPORT
        IMPORTING
          RPT_DATA_BY_REASON   = ref_it_estreason
          RPT_DATA_BY_DISTRICT = ref_it_district.
    *   Assign the field symbols
      ASSIGN ref_it_estreason->* TO <it_estreason>.
      ASSIGN ref_it_district->* TO <it_district>.
    * Export the two internal tables to memory so they can be
    * retrieved by the calling program
      EXPORT reason = <it_estreason>[]
             district = <it_district>[]
      TO MEMORY ID 'ZCR_ESTIMATION_REASON_RPT'.
    As you can see, my method returns two references to dynamic internal tables. I have used the memory debugger to see that these tables are being correctly written to the ABAP memory.
    However, back in my parent program when I try to do the following,
    CREATE DATA ref_it_estreason TYPE REF TO DATA.
          CREATE DATA ref_it_district TYPE REF TO DATA.
          ASSIGN ref_it_estreason->* TO <it_estreason>.
          ASSIGN ref_it_district->* TO <it_district>.
          IMPORT reason = <it_estreason>
                 district = <it_district>
          FROM MEMORY ID 'ZCR_ESTIMATION_REASON_RPT'.
    I get the REFS_NOT_SUPPORTED_YET exception which says that "For the statement Export/Import ..." object references, interface references, and data references are currently not supported".
    I have tried multiple other ways of defining my field-symbols or my reference pointers but they all result in exceptions of some sort. Is there any way for me to get this data passed back? It seems like there must be a way to get the data from memory since I know it's being correctly stored there.
    Thanks in advance.

    Shortly after posting this, I had an idea which I was able to implement to actually get this to work.
    I decided that I would simply pass the FIELDCAT tables for each of my dynamic tables into the same memory ID as the tables themselves.
      EXPORT reason_fcat = it_estreason_fcat
             district_fcat = it_district_fcat
             reason = <it_estreason>[]
             district = <it_district>[]
      TO MEMORY ID 'ZCR_ESTIMATION_REASON_RPT'.
    Then, back in my calling program I execute the following code. This retrieves the FIELDCAT tables, builds two empty dynamic table type reference variables and then lets me create field-symbols to reference those components.
    *     Retrieve the fieldcat internal tables first
          IMPORT reason_fcat = it_estreason_fcat
                 district_fcat = it_district_fcat
          FROM MEMORY ID 'ZCR_ESTIMATION_REASON_RPT'.
    *     Generate an internal table type assigned to each
    *     reference variable based on the fieldcat listings we
    *     retrieve
          CALL METHOD cl_alv_table_create=>create_dynamic_table
            EXPORTING
              it_fieldcatalog = it_estreason_fcat
            IMPORTING
              ep_table        = ref_it_estreason.
          CALL METHOD cl_alv_table_create=>create_dynamic_table
            EXPORTING
              it_fieldcatalog = it_district_fcat
            IMPORTING
              ep_table        = ref_it_district.
    *     Assign the field symbols
          ASSIGN ref_it_estreason->* TO <it_estreason>.
          ASSIGN ref_it_district->* TO <it_district>.
          CREATE DATA ref_wa_estreason LIKE LINE OF <it_estreason>.
          CREATE DATA ref_wa_district LIKE LINE OF <it_district>.
          ASSIGN ref_wa_estreason->* TO <wa_estreason>.
          ASSIGN ref_wa_district->* TO <wa_district>.
    *     Finally, we can retrieve the data from memory and assign
    *     to the internal tables referenced by our field-symbols
          IMPORT reason = <it_estreason>[]
                 district = <it_district>[]
          FROM MEMORY ID 'ZCR_ESTIMATION_REASON_RPT'.
    This worked beautifully and saved me from having to do a major redesign. I don't know how helpful it would be for ABAP Objects to be passed to memory (I believe some type of serialization would need to be in order there), but for dynamically typed internal tables it worked like a dream with little overhead.

  • 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

  • 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

  • Export internal table to memory in User Exit FM

    Hi all,
    My scenario here is to export an internal table in one user exit FM and import it back in another user exit FM.
    I was trying to use
    Export lt_table to memory id 'LABEL'.
    then
    Import lt_table from memory id 'LABEL'.
    But then i hit error in the import statement. How can I rectify this?
    Thanks. Answer will be rewarded.

    Refer to the below related threads
    Export an internal table to memory and import from memory into an internal
    http://help.sap.com/saphelp_erp2005/helpdata/en/fc/eb3bf8358411d1829f0000e829fbfe/frameset.htm
    Regards,
    Santosh

  • 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

  • Exporting an internal table to memory

    Hi
      I want to call an program from another program and want the values stored in an internal table used in the called program.
    how can i export an internal table to memory id an then import it.
    Regards
    Arun

    So to be clear, for your requirement it would be:
    * Towards the end of the called program
      EXPORT it_itab TO MEMORY ID 'ZZ_MEM_ID'.
    * And then from calling program after the submit zzzz and return statement
      IMPORT it_itab FROM MEMORY ID 'ZZ_MEM_ID'.
    Hope that helps.
    Brad
    Message was edited by: Brad Williams (put back intro text)
    Message was edited by: Brad Williams

  • Save Internal table to memory - problem

    Hi everybody ,
    I need to extract one Internal table to memory , every 1st in the Month .
    Then every day I will be reading this table for my report ( in order to avoid running every day same and same database selections) .
    My originall idea wos with EXPORT TO MEMORY ID , AND IMPORT
    but it does'nt work next day ... With Export data is cept only untill tthe end of the transaction ...
    Is there any way except of storing data in one Z_ database table ???
    Thanks in advance

    Hi,
    You can use the following code to export to memory
    *data variable required for background processing
    data: wa_indx type indx.
    *EXPORT Internal Table TO MEMORY ID 'XYZ'.
    *part for background processing
      export tab = <your table> to database indx(xy) from wa_indx client
      sy-mandt id 'XYZ'.
    the following code will import from Memory and clear memory
    *data variable required for background processing
    data: wa_indx type indx.
    imports from database the list sent by the calling program
    IMPORT tab = <your table> FROM DATABASE indx(xy) TO wa_indx CLIENT sy-mandt
    ID 'XYZ'.
    deletes the data to save wastage of memory
    DELETE FROM DATABASE indx(xy)
      CLIENT sy-mandt
      ID 'XYZ'.
    Regards,
    Samson Rodrigues.

  • Export internal table to memory.

    How can I export and import an internal table to memory?
    This:
    export messtab to memory id 'TAB'. (in program 1)
    import messtab=messtab from memory id 'TAB'. (in program 2)
    does not work.

    Even without the brackets it doesn't work.
    In program 1 I have:
        WRITE text-e21 TO messtab-message.
        messtab-type = c_tipo_error.
        APPEND messtab. CLEAR messtab.
        DELETE messtab WHERE message = space.
        EXPORT messtab[] TO MEMORY ID para.
        EXIT.
    The EXIT leads to program 2, from where I made a submit to program 1, and where I have:
    import messtab[] from memory id para.
    Where:
            DATA: para TYPE tpara-paramid VALUE 'MES',
            messtab  TYPE TABLE OF bapireturn WITH HEADER LINE.
    What's wrong?
    Thanks in advance.
    Oh, and I've checked the table in program 1 does have an entry.

  • Can we pass Internal tables to workflow container?

    workflow container has a size limitation, we need to pass any infotype to the workflow container, so can we pass internal tables to workflow container or is there any alternate solution?
    Thanks in Advance
    Hari

    Hi,
    Check the <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/a6/9bac935f2c11d194a40000e82dec10/frameset.htm">Multiline Container Element Definition.</a>
    Regards
    <i><b>Raja Sekhar</b></i>

  • It cannot reference the dynamic internal table in memory as an object.

    Hi,
    I am getting the syntax error in the second select. I guest it cannot reference the dynamic internal table in memory as an object.
    The internal table contains different fields from multiple tables and it gets created OK. Then the first select within the loop executes OK allowing me to read the multiple tables in ITABLES.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ifc
        IMPORTING
          ep_table        = dy_table.
    ***OK, the dynamic tables is created here
      assign dy_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data dy_line like line of <dyn_table>.
      assign dy_line->* to <dyn_wa>.
    loop at ITABLES.
    ***OK, no syntax errors in this select here
      select * appending corresponding fields of table <dyn_table>
                 from (ITABLES-TABNAME).
    endloop.
    data: ikonp like konp occurs 0 with header line.
    ***NOT OK, there is syntax errors
      select * into table ikonp
      from KONP for all entries in <dyn_table>
      where knumh = <dyn_table>-knumh.
    Some of the tables in ITABLES are pooled tables which does not allow me to use INNER JOINS. Therefore I need a second select in order to read the pricing table KONP.
    Thanks in advance for any hint.

    Hi Abel,
    You must be getting the syntax error that <dyn_table> does not contain the field knumh.
    try putiing the entire where clause in a char type variable say wa_char and then use in ur query as
    where (wa_char) .. it may work..
    concatenate 'knumh' '=' '<dyn_table>-knumh' INTO wa_char SEPARATED BY SPACES.
    SELECT ... from konp...
    where (wa_char).
    Revert if it doesnt work.

  • Passing internal tables as parameters to subroutines

    Hi,
    This was going to be a question but I just had it answered by someone. Hopefully, this piece of information is going to be useful to other people as well.
    I had a subroutine in my code which looks like this.
    form fr_sub_get_data USING uf_file
                                    TABLES ct_int_log STRUCTURE zinterface_log.
    endform.
    I was told by someone at work to change it as follows: -
    form fr_sub_get_data USING uf_file
                                    CHANGING ct_int_log type ty_tab_int_log.
    endform.
    The reason is that when using the tables' clause to pass internal tables as parameters, a header line is automatically created in the subroutine which lasts for as long as the subroutine is being excecuted. Its considered to be a bad practise to use header lines (Work-Areas are preferable).
    Another important point to remember is that the 'tables' clause can only be used to pass <b>standard</b> internal tables as parameters. It can not be used for internal tables of other types.
    Cheers!

    HI
    GOOD
    GO THROUGH THIS LINK
    http://www.abapforum.com/forum/viewtopic.php?t=1962&language=english
    THANKS
    MRUTYUN

  • 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 dynamically to a subroutine

    Hi All,
    How to pass internal tables dynamically to a subroutine?
    In subroutine logic i'm fetching data from MARA table for all entries in the internal table passed to the subroutine. Based on some condition the internal table varies. I'm placing the code below
    Both GT_AUFM & GT_AUFM1 are of 2 different structures having MATNR.
    IF WA_AUFM1-BWART EQ '261'.
        PERFORM GET_IF_SEMIFINISHED USING GT_AUFM1.
    ELSE IF WA_AUFM1-BWART EQ '262'.
        PERFORM GET_IF_SEMIFINISHED TABLES GT_AUFM.
    ENDIF.
    FORM GET_IF_SEMIFINISHED  USING P_TABLE TYPE ANY TABLE.
      REFRESH GT_MARA.
      SELECT MATNR FROM MARA INTO TABLE GT_MARA
                     FOR ALL ENTRIES IN P_TABLE
                     WHERE MATNR EQ P_TABLE-MATNR
                       AND MTART IN R_MTART.
      ENDFORM.
    With this logic i'm getting an error that the specified type has no structure and therefore no component called MATNR.
    Thanks,
    Anil.

    refer this link
    dynamic internal table

Maybe you are looking for

  • Bank statement: problem to load variable length field

    we have many bank accounts with different banks, and we would like to use the bank reconciliation module to do bank reconciliation. we have problem in load the MT940 bank statement. All these banks are providing so called standard SWIFT940 format, wh

  • G20-110: Burning recorded TV to DVD-RW?

    Hi, Does anyone know if this is possible? I've got a G20-110 and have tried to burn a programme, I have recorded, onto DVD-RW via 'Windows XP MCE', but when it gets to 4%, it spits the disc out??

  • How to update a template(word document)  dynamically.

    Hi guys, I am having an requirement to store details in a template,which is in word document dynamically and save it on the desktop. I can able to open a new word document dynamically. please give ur suggestions. Reagrds, Rajesh

  • Create and view PR attachment with FM

    Hi, i would like to know how to create and view attachment from PR number with a FM ? In fact I've already found the file name in SOOD table, but i don't how to link SOOD table with EBAN. Any idea ? Thanks in advance.

  • Shared calendars

    Hello everybody! Can shared calendars be used and modified by different users? for example: i have a shared calendar that syncs with .mac named "production" and 10 different user on that calendar. I want that the name of the editor to publish togethe