For all entries table handled by Tables parameter of Subroutine!

Hi....
See my code...
Dont leave as it seems very big code... Actually its very small one...
In sourse code of function module...
data:itab1  type standard table of <local structure of top include> with header line,
                 itab2 type standrad table of knvp with header line.
perform routine_data tables  itab1
                      using    p_var
Subroutine code, saved in F include of that function group...
form routine_data  tables itab1 type standard table
                           using    p_var
  select * from <db table>
              into corresponding fields of table itab
              where <keyfield> = p_var.
endform.
Back to source cod eof Function module..
if sy-subrc is = 0.
    select parvw kunn2 kunnr from knvp
                        into corresponding fields of table itab2 for all entries in itab1
                         where kunnr = itab1-kunnr
                         and ( parvw = 'WE' or parvw = 'RE' or parvw = 'RG').
endif.
This code is working fine......
==================Now coming to my problem==========================
In source code of function module...
data:itab1  type standard table of <local structure of top include> with header line,
                 itab2 type standrad table of knvp with header line.
perform routine_data tables  itab1
                               using    p_var
Subroutine code, saved in F include of that function group...
form routine_data  tables itab1 type standard table
                           using    p_var
  select * from <db table>
              into corresponding fields of table itab
              where <keyfield> = p_var.
endform.
Function module source code...
perform routine2_data tables itab1
                                 itab2.
F include coding part for above subroutine....
form routine2_data  tables itab1 type standard table
                                      itab2 type standard table
    select parvw kunn2 kunnr from knvp
                        into corresponding fields of table itab2 for all entries in itab1
                         where kunnr = itab1-kunnr                                         <-----causing error
                         and ( parvw = 'WE' or parvw = 'RE' or parvw = 'RG').
endform.
Giving error message....
>>> The specified type has no structure and therefore no component called 'KUNNR".....
So here the problem is there is a incorrect way to declare parameters....
Plz remind that SUBROUTINES OF FUNCTION MODULES SAVING IN INCLUDE PROGRAMS, because they making some deffenrce with normal external subroutines...
also...
Here for all entries is mandatory!
And Two sub routines are mandatory!
Thanks for your attention...
Naveen Inuganti.

Hi ,
Use the below  syntax to pass the tables as parameters
*The below perform is in the source code of the F.M
PERFORM goods_movement_post TABLES itab1
                                   itab2
                                   itab3
                               USING ls_goodsmvt_header
                                     g_mov_code.
suppose u are using the itab1 & itab2 tables data to get the itab3 Data 
And The below code is in the Frms include
FORM goods_movement_post
                  TABLES
                     pt_itab1 STRUCTURE vbak
                     pt_itab2 STRUCTURE vbap
                     pt_itab3 STRUCTURE bapiret2
                  USING
                     p_ls_goodsmvt_header STRUCTURE bapi2017_gm_head_01
                     p_g_mov_code.
ENDFORM
Thanks & Reagrds
Mallikharjuna Reddy

Similar Messages

  • Extract Cube data for all entries of an internal table

    Hi
    I want to fetch the data from the cube for all entries of another internal table.
    Scenario : Fetching the COMPANY_CODE and DATE into an internal table and for those company codes and Dates, I have to fetch the records of the Cube.,
    I am using the Function Module : RSDRI_INFOPROV_READ
    But not sure how to accommodate the multiple selections condition for this.
    Selection Required:
                                    *For all entries of it_cc
                                      where comp_code = it_cc-comp_code and
                                                  date = it_cc-date.*
    Please help me how to such multiple conditions and "for all entries" functionality for fetching the data from the cube.
    Thanks.
    Veera Karthik G

    HI
    You can try like this
    LOOP AT lt_donotcall_old .
    <ls_donotcall>-examination_date = sy-date.
    <ls_donotcall>-examination_time = sy-time.
    ENDLOOP.
    append it_donotcall_old.
    Reward all helpfull answers
    Regards
    Pavan

  • Using for all entries of two internal tables in where clause of the select

    Hi experts,
    My requirement is, need to select Marc-minbe and wrpl-sobst, for all the entries of the two internal tables it_mara , and it_t001w.
    here is the select queries i have used,
    select matnr normt from  mara into it_mara for all entries in it_data where normt = it_data-normt.
    select konnr werks from t001w into it_t001w for all entries in it_data where konnr = it_data-konnr.
    now i need to select minbe of marc table and sobse of wrpl table for all the entries of above internal tables, it_mara and it_t001w, using both matnr of it_mara and werks of it_t001w in where condition.
    Pls advise how i can do it.
    Thanks.
    Moderator message: very basic, please work on this yourself first, these forums are not a substitute for ABAP training.
    Edited by: Thomas Zloch on Dec 6, 2010 9:38 AM

    Hi
    call SE16 with table TFTIT in order to get a full list (it will be long...)
    A list of FMs with parameters can be found in table FUNCT.
    Finally go to sm37rsdf4
    that will give you all the function modules with description
    Here is the list:
    http://www.erpgenie.com/abap/functions.htm
    hope this helps...
    Regards
    CSM Reddy

  • FOR ALL ENTRIES IN with two tables

    Hi Guy's,
    I have two int. tables, gt_likp, gt_lips.
    I need to use "FOR ALL ENTRIES IN" with this two tables.
      SELECT matnr
             vkorg
             vtweg
             ypcogsl
        FROM mvke
        INTO TABLE gt_mvke
    <b>    "FOR ALL ENTRIES IN gt_likp gt_lips"</b>
        WHERE matnr = gwa_liefpos_tab-matnr
        AND vkorg = gt_likp-vkorg
        AND vtweg = gt_lips-vtweg.
    How to do this?
    Please Help.
    Thanks in Advance.

    Hi,
    Fill gt_likp-vkorg values in a range(r_vkorg). Use gt_lips in FOR ALL ENTRIES.
    Basically you can use only 1 internal table with FOR ALL ENTRIES statement.
    SELECT matnr
    vkorg
    vtweg
    ypcogsl
    FROM mvke
    INTO TABLE gt_mvke
    FOR ALL ENTRIES IN gt_lips
    WHERE matnr = gwa_liefpos_tab-matnr
    AND       vkorg in r_vkorg
    AND       vtweg = gt_lips-vtweg.
    - SRao

  • For all entries with 2 internal table

    HI experts.
    How to use  2 for all entries in a select statement.
    Below refer to my below code.
    select vbeln matnr lfimg vgbel posnr from lips into corresponding fields of table
      it_lips for all entries in  it_likp   where
                  vbeln = it_likp-vbeln and
                  matnr = it_mara-matnr.
    I want to add another for all entries it_mara.
    Please help me .Thanks in advanced.

    hi,
    it is possible....
    use this query...
    declare another internal table of the same type as it_lips.
    data : it_lips_final like it_lips.
    select vbeln matnr lfimg vgbel posnr from lips into corresponding fields of table
    it_lips for all entries in it_likp where
    vbeln = it_likp-vbeln .
    loop at it_lips.
      read table it_mara into it_mara with key matnr = it_lips-matnr.
      if sy-subrc = 0.
        append it_lips to it_lips_final.
      endif.
    endloop.
    refresh it_lips[].
    it_lips[] = it_lips_final[]
    what the above code does is selects all the entries of vbeln from lips and filters it in the loop reading it from mara checking for matnr value and finally
    all the entries according to your requirement is there in it_lips_final which we move it to it_lips again...
    this is something similar to writing a for all entries for 2 table.... but in another fashion
    Regards
    Siddarth

  • Use of for all entries in abap

    Please tell me how to use "for all entries" in linking two
    tables for retrieve informations by using corresponding fields in both the tables.plz send the codings.

    REPORT  YVCHIERSEQ                              .
    TYPE-POOLS:SLIS.
    DATA:T_VBAK TYPE STANDARD TABLE OF VBAK INITIAL SIZE 0,
         T_VBAP TYPE STANDARD TABLE OF VBAP INITIAL SIZE 0,
         W_VBAK TYPE VBAK,
         W_VBAP TYPE VBAP,
         G_VBELN TYPE VBAK-VBELN,
         W_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
         T_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
         W_KEYINFO TYPE SLIS_KEYINFO_ALV.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    SELECT-OPTIONS:S_VBELN FOR G_VBELN.
    SELECTION-SCREEN END OF BLOCK B1.
    INITIALIZATION.
    CLEAR:W_VBAK,
          W_VBAP.
    REFRESH:T_VBAK,
            T_VBAP.
    START-OF-SELECTION.
    PERFORM SUB_GET_VBAK.
    PERFORM SUB_GET_VBAP.
    PERFORM SUB_DISP_OUTPUT.
    FORM SUB_GET_VBAK.
    SELECT * FROM VBAK INTO TABLE T_VBAK WHERE VBELN IN S_VBELN.
    ENDFORM.
    FORM SUB_GET_VBAP.
    SELECT * FROM VBAP INTO TABLE T_VBAP FOR ALL ENTRIES IN T_VBAK WHERE
    VBELN = T_VBAK-VBELN.
    ENDFORM.
    FORM SUB_DISP_OUTPUT.
    W_FIELDCAT-COL_POS = 1.
    W_FIELDCAT-FIELDNAME = 'VBELN'.
    W_FIELDCAT-SELTEXT_M = 'SALESORDER'.
    W_FIELDCAT-TABNAME = 'VBAK'.
    APPEND W_FIELDCAT TO T_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_FIELDCAT-COL_POS = 2.
    W_FIELDCAT-FIELDNAME = 'ERNAM'.
    W_FIELDCAT-SELTEXT_M = 'NAME'.
    W_FIELDCAT-TABNAME = 'VBAK'.
    APPEND W_FIELDCAT TO T_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_FIELDCAT-COL_POS = 3.
    W_FIELDCAT-FIELDNAME = 'VBTYP'.
    W_FIELDCAT-SELTEXT_M = 'SD CATEGORY'.
    W_FIELDCAT-TABNAME = 'VBAK'.
    APPEND W_FIELDCAT TO T_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_FIELDCAT-COL_POS = 4.
    W_FIELDCAT-FIELDNAME = 'KUNNR'.
    W_FIELDCAT-SELTEXT_M = 'SOLD TO PARTY'.
    W_FIELDCAT-TABNAME = 'VBAK'.
    APPEND W_FIELDCAT TO T_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_FIELDCAT-COL_POS = 5.
    W_FIELDCAT-FIELDNAME = 'NETWR'.
    W_FIELDCAT-SELTEXT_M = 'NET VALUE'.
    W_FIELDCAT-TABNAME = 'VBAK'.
    APPEND W_FIELDCAT TO T_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_FIELDCAT-COL_POS = 1.
    W_FIELDCAT-FIELDNAME = 'POSNR'.
    W_FIELDCAT-SELTEXT_M = 'SALES ITEM'.
    W_FIELDCAT-TABNAME = 'VBAP'.
    APPEND W_FIELDCAT TO T_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_FIELDCAT-COL_POS = 2.
    W_FIELDCAT-FIELDNAME = 'MATNR'.
    W_FIELDCAT-SELTEXT_M = 'MATERIAL NO'.
    W_FIELDCAT-TABNAME = 'VBAP'.
    APPEND W_FIELDCAT TO T_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_FIELDCAT-COL_POS = 3.
    W_FIELDCAT-FIELDNAME = 'MATKL'.
    W_FIELDCAT-SELTEXT_M = 'MAT GROUP'.
    W_FIELDCAT-TABNAME = 'VBAP'.
    APPEND W_FIELDCAT TO T_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_FIELDCAT-COL_POS = 4.
    W_FIELDCAT-FIELDNAME = 'NETWR'.
    W_FIELDCAT-SELTEXT_M = 'NET VALUE'.
    W_FIELDCAT-TABNAME = 'VBAP'.
    APPEND W_FIELDCAT TO T_FIELDCAT.
    CLEAR W_FIELDCAT.
    W_KEYINFO-HEADER01 = 'VBELN'.
    W_KEYINFO-ITEM01   = 'VBELN'.
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
      EXPORTING
      I_INTERFACE_CHECK              = ' '
        I_CALLBACK_PROGRAM             = SY-CPROG
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
      IS_LAYOUT                      =
        IT_FIELDCAT                    = T_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
      IT_EVENTS                      =
      IT_EVENT_EXIT                  =
        i_tabname_header               =   'VBAK'
        i_tabname_item                 = 'VBAP'
      I_STRUCTURE_NAME_HEADER        =
      I_STRUCTURE_NAME_ITEM          =
        is_keyinfo                     = W_KEYINFO
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      tables
        t_outtab_header                = T_VBAK
        t_outtab_item                  = T_VBAP
    EXCEPTIONS
      PROGRAM_ERROR                  = 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.
      ENDFORM.

  • Advice required on a select statement using "FOR ALL ENTRIES"

    Hi,
    this is really intresting ...
    I have a small requirement where in i have to find out
    the valid entries in my internal table (T_MATNR) by using a select statement to a check table (MARA) which has all the fields present in the internal table T_MATNR.
    Select statement is
    SELECT MATNR
           MTART
           from MARA
           for all entries in T_MATNR
           into table T_MATNR
           where matnr eq T_MATNR-MATNR.
    If you observe the itab in the option 'FOR ALL ENTRIES' and the destination table is the same. I want to know whether this is correct? will it cause any performance issue? right now this statement is working fine for me.

    Hi,
    U have to use
    SELECT MATNR
    MTART
    from MARA
    <b>into table I_MATNR(different table)</b>
    for all entries in T_MATNR
    where matnr eq T_MATNR-MATNR.
    If u r specifying both same table name then for what entries it will retrieve, if u have alreay selected some entries and appending u can use
    SELECT MATNR
    MTART
    from MARA
    <b>into table T_MATNR</b>where matnr eq T_MATNR-MATNR.
    then
    SELECT MATNR
    MTART
    from MARA
    <b>appending table T_MATNR</b>
    for all entries in T_MATNR
    where matnr eq T_MATNR-MATNR.
    In this way u can do.
    Hope u got it.

  • 2 for all entries with different condition

    Hi
    i have an internal 2 internal table which have the following field
    ITAB1 : Stock category, plant, storage location , SKU code   (those value are given though flat file)
    ITAB2 : Grid value , meterial NO, SKU code  (those values are determine through a FM where we export the SKU code and it will retreive the matnr and grid value in an ITAB2)
    I have to do select FROM database MCHB
    with the condition Grid value , material NO , Stock category, plant, storage location
    Note that gris value and matnr are found in two different internal table i was thinking of doing for all entries but
    is it possible to do for all entries from 2 internal table
    SELECT FOROM MCHB
    FOR ALL ENTRIES in ITAB1
    FOR ALL ENTRIES in ITAB2
    WHERE
    grid value = itab2-gridvalue
    matnr = itab2-matnr
    stock cat = itab1-stock cat
    plant = itab1-plant
    storage location = itab1-storage location
    Please help on how to tackle this?

    Hi,
    You have to create a new third internal table with the fields matnr, grid value, stock category, plant and storage location....
    Then process the itab1 and get the process the itab2 for the corresponding SKU Code (which I believe is the common field for both of the internal tables) and then populate the third internal table itab3...
    Then use the itab3 for the FOR ALL ENTRIES.
    Thanks
    Naren

  • For all entries with large sets

    Hello All,
    Does for all entries have restriction that the itab should not exceed the maximum entries? Look at code below:
      select pernr raufpl raplzl catshours
             from catsdb
             into corresponding fields of table lit_catshrs
             for all entries in itab
             where pernr = itab-pernr
               and status in ('10', '20', '30')
               and workdate in s_date.
    if itab have 7000 entries in production system, will the select statement cause a short dump such as DBIF_RSQL_INVALID_RSQL?
    Thanks,
    Alex M

    Hi,
    check the sequence of the fields in the internal table lit_catshrs
    Because RSQL error occurs because of this.
    and Whenevr you use for all entries of some Internal Table it is a must to check that
    IF not ITAB[] Is initial.
    < write the select>
    endif.
    Other performance related thing w.r.t to ABAP are
    1) Dont use nested seelct statement
    2) If possible use for all entries in addition
    3) In the where addition make sure you give all the primary key
    4) Use Index for the selection criteria.
    5) You can also use inner joins
    6) You can try to put the data from the first select statement into an Itab and then in order to select the data from the second table use for all entries in.
    7) Use the runtime analysis SE30 and SQL Trace (ST05) to identify the performance and also to identify where the load is heavy, so that you can change the code accordingly
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5d0db4c9-0e01-0010-b68f-9b1408d5f234
    reward if useful
    regards,
    Anji

  • Here iam using for-all-entries.

    Hi...
    2....here iam using for-all-entries.
    if the internal table is empty.then what will happen for next select statement.
    thanks and regards,
    k.swaminath

    Hi
    if you write like this
    <b>select data from table into itab where condituioj
    select data from table into itab1 for all entries in itab where condition</b>
    with out checking the weather the above select statement have data or not then it will give all the data which eist in that table
    <b>select data from table into itab where condituioj
    if not itab[] is initial
    select data from table into itab1 for all entries in itab where condition
    endif.</b>
    in this sitvation you don't get any data
    reward if usefull

  • Join 3 tables using FOR ALL ENTRIES

    Hi,
    I want to join 3 tables and show their result in a text file delimited by comma.
    ITs a download program.Can someone tell me how to how to join the three table using for all entires instead of inner join.please give step  by step illustration

    Hi,
    Please check below code which downloads records from 3 tables into excel file.
    if you want other file means you can specify other file type in the fm parameter
    REPORT zstemp_qty2_  LINE-SIZE 255 .
    DATA:it_vbak LIKE vbak OCCURS 0 WITH HEADER LINE.
    DATA:v_file1 LIKE rlgrap-filename.
    DATA:v_file2(80) TYPE c.
    DATA:it_vbap LIKE vbap OCCURS 0 WITH HEADER LINE.
    DATA:it_mara LIKE mara OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
      SELECT * FROM vbak INTO TABLE it_vbak UP TO 100 ROWS.
      IF NOT it_vbak[] IS INITIAL.
        SELECT * FROM vbap INTO TABLE it_vbap
        FOR ALL ENTRIES IN it_vbak
        WHERE vbeln = it_vbak-vbeln.
      ENDIF.
      LOOP AT it_vbap.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
                  input  = it_vbap-matnr
             IMPORTING
                  output = it_vbap-matnr.
        MODIFY it_vbap TRANSPORTING matnr.CLEAR it_vbap.
      ENDLOOP.
      IF NOT it_vbap[] IS INITIAL.
        SELECT * FROM mara INTO TABLE it_mara
        FOR ALL ENTRIES IN it_vbap
        WHERE matnr = it_vbap-matnr.
      ENDIF.
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         program_name        = sy-cprog
         dynpro_number       = sy-dynnr
      FIELD_NAME          = ' '
       IMPORTING
         file_name           = v_file1          .
      v_file2 = v_file1.
      CALL FUNCTION 'WS_DOWNLOAD'
       EXPORTING
      BIN_FILESIZE                  = ' '
      CODEPAGE                      = ' '
         filename                      = v_file2
         filetype                      = 'WK1'
      MODE                          = ' '
      WK1_N_FORMAT                  = ' '
      WK1_N_SIZE                    = ' '
      WK1_T_FORMAT                  = ' '
      WK1_T_SIZE                    = ' '
         col_select                    = '1'
      COL_SELECTMASK                = ' '
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
        TABLES
          data_tab                      = it_mara
      FIELDNAMES                    =
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_WRITE_ERROR              = 2
      INVALID_FILESIZE              = 3
      INVALID_TYPE                  = 4
      NO_BATCH                      = 5
      UNKNOWN_ERROR                 = 6
      INVALID_TABLE_WIDTH           = 7
      GUI_REFUSE_FILETRANSFER       = 8
      CUSTOMER_ERROR                = 9
      OTHERS                        = 10
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT it_mara.
        WRITE:/ it_mara-matnr.
      ENDLOOP.
    Regds
    Sivaparvathi
    Please reward points if helpful.....

  • Performance Problems with "For all Entries" and a big internal table

    We have big Performance Problems with following Statement:
    SELECT * FROM zeedmt_zmon INTO TABLE gt_zmon_help
      FOR ALL ENTRIES IN gt_zmon_help
        WHERE
        status = 'IAI200' AND
        logdat IN gs_dat AND
        ztrack = gt_zmon_help-ztrack.
    In the internal table gt_zmon_help are over 1000000 entries.
    Anyone an Idea how to improve the Performance?
    Thank you!

    >
    Matthias Weisensel wrote:
    > We have big Performance Problems with following Statement:
    >
    >  
    SELECT * FROM zeedmt_zmon INTO TABLE gt_zmon_help
    >   FOR ALL ENTRIES IN gt_zmon_help
    >     WHERE
    >     status = 'IAI200' AND
    >     logdat IN gs_dat AND
    >     ztrack = gt_zmon_help-ztrack.
    >
    > In the internal table gt_zmon_help are over 1000000 entries.
    > Anyone an Idea how to improve the Performance?
    >
    > Thank you!
    You can't expect miracles.  With over a million entries in your itab any select is going to take a bit of time. Do you really need all these records in the itab?  How many records is the select bringing back?  I'm assuming that you have got and are using indexes on your ZEEDMT_ZMON table. 
    In this situation, I'd first of all try to think of another way of running the query and restricting the amount of data, but if this were not possible I'd just run it in the background and accept that it is going to take a long time.

  • How to use single buffered table with FOR ALL ENTRIES KEYWORD

    Hai,
    I'm Using TJ02T Database table, It is single buffered table but at the same time I want to use FOR ALL ENTRIES KEYWORD , Please Help me.
    Regards,
    S.Janani

    Hi,
    FOR ALL ENTRIES will not depend on the buffering nature of the table. The single buffered table will only only buffer one record into memory. You can still use the statement to query the values, but it may have performance problems if the data volume is high since the records are not completely buffered into memory, the time will spent in getting data from DB.
    Thanks..
    Preetham S

  • Max no of records in for all entries table

    Hello all,
    Hi have used for all entries in a select statement in BW extractor. This extractor is working fine for the test data. When i moved this code to pre-production for testing, there this extractor has to deal with thousands of records. In pre-prod , this select statement is not picking up all the records available in DB. Can any one give any idea on behavior of for all entries for large number of records. and is the any max limit for for all entries table.
    Thank you..correct answer will be rewarded.
    Regards
    Sravan

    Moderator message - Please search before asking and do not offer rewards (particularly since as far as I can see, you've awarded a total of two points in the last two years - post locked
    Rob

  • Dynamic Select Query including Dynamic Tables with For all Entries

    Hello everyone,
    I need to create a select query which involves using of Dynamic Tables.
    Suppose I have a dynamic table <d1> which consist of let say 10 records.
    Now i need to make a select query putting data into another dynamic table <d2>
    CONCATENATE keyfield '=' '<d1>' INTO g_condition SEPARATED BY space.
    CONCATENATE g_condition '-' keyfield INTO g_condition.
    SELECT * FROM (wa_all_tables-name) INTO CORRESPONDING FIELDS OF TABLE <d1>
            FOR ALL ENTRIES IN <d1>
    WHERE (g_condition).
    But it is giving dump.
    Please help me on this....

    Short text
        A condition specified at runtime has an unexpected format.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "ZNG_CUSTOMWRITE" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
         not caught in
        procedure "WRITE_ARCHIVE_PROD" "(FORM)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        The current ABAP program has tried to execute an Open SQL statement
        which contains a WHERE, ON or HAVING condition with a dynamic part.
        The part of the WHERE, ON or HAVING condition specified at runtime in
        a field or an internal table, contains the invalid value "ZCOURIER-ZCOURIERID".
    CONCATENATE keyfield '=' g_header INTO g_condition SEPARATED BY space.
    CONCATENATE g_condition '-' keyfield INTO g_condition.
    SELECT * FROM (wa_all_tables-name) INTO CORRESPONDING FIELDS OF TABLE <dyn_table1>
    FOR ALL ENTRIES IN <dyn_table>
      WHERE (g_condition).

Maybe you are looking for