"IT_SPFLI" is not an internal table "OCCURS n" specification is missing.

I follow this tutorial. I replaced the 2  tables into sflight and spfli table.
http://www.****************/Tutorials/BSP/UsingTableView/demo.htm
and this error occurred.
"IT_SPFLI" is not an internal table "OCCURS n" specification is missing.

You'll need to create a table type for spfli and sflight. If you check the tutorial, the two tables it_vbak and it_vbap are typed on zvbak and zvbap respectively, not vbak and vbap. Here, zvbak and zvbap have presumably already been defined in the DD as table types for vbak and vbap.
Regards,
Trond

Similar Messages

  • Internal table occurs 0 --------- why obsolate?

    Hi,
    Can anybody tell why the declaration of internal table occurs 0 and internal table with header line is obsolate now?
    Explain the adavantages of newer one.
    is there any performance related issue?
    Thanks in advance
    Debjani Lahiri

    Hi,
    Like all other data objects, you can declare internal table objects using the LIKE or TYPE addition of the DATA statement.
    DATA <itab> TYPE <type>|LIKE <obj> [WITH HEADER LINE].
    Here, the LIKE addition refers to an existing table object in the same program. The TYPE addition can refer to an internal type in the program declared using the TYPES statement, or a table type in the ABAP Dictionary.
    You must ensure that you only refer to tables that are fully typed. Referring to generic table types (ANY TABLE, INDEX TABLE) or not specifying the key fully is not allowed (for exceptions, refer to Special Features of Standard Tables).
    The optional addition WITH HEADER line declares an extra data object with the same name and line type as the internal table. This data object is known as the header line of the internal table. You use it as a work area when working with the internal table (see Using the Header Line as a Work Area). When you use internal tables with header lines, you must remember that the header line and the body of the table have the same name. If you have an internal table with header line and you want to address the body of the table, you must indicate this by placing
    brackets after the table name (<itab>[]). Otherwise, ABAP interprets the name as the name of the header line and not of the body of the table. You can avoid this potential confusion by using internal tables without header lines. In particular, internal tables nested in structures or other internal tables must not have a header line, since this can lead to ambiguous expressions.
    Before Release 3.0, internal tables all had header lines and a flat-structured line type. There were no independent table types. You could only create a table object using the OCCURS addition in the DATA statement, followed by a declaration of a flat structure:
    DATA: BEGIN OF <itab> OCCURS <n>,
    <fi> ...,
    END OF <itab>.
    This statement declared an internal table <itab> with the line type defined following the OCCURS addition. Furthermore, all internal tables had header lines.
    The number <n> in the OCCURS addition had the same meaning as in the INITIAL SIZE addition from Release 4.0. Entering ‘0’ had the same effect as omitting the INITIAL SIZE addition. In this case, the initial size of the table is determined by the system.
    Regards,
    Bhaskar

  • Internal Table : occurs statement

    What is the meaning of using "occurs" statement in Internal Table. What does it imply?
    DATA: BEGIN OF ITAB OCCURS 10,
             END OF ITAB.
    What difference it will make if suppose I use "OCCURS 0" or "OCCURS 10" ?

    Hi yogesh for more clearification
    difference b/w occurs 0 & occurs n
    The number <N> indicate how many lines has to have the table in initialization time: i.e. when the program is loaded in memory, the space for the table depends on the initialization numbers of the records.
    AT run time if the table needs more space, this'll automatically be enhanced.
    But If you know your table can have a certain numbers of records, you can indicate it in the defination, what'll improve the performance:
    all the space the table needs is taken at the beginin, so it doesn't need to enhance the space at run time.
    When this initial area is full, the system makes twice as much extra space available up to a limit of 8KB. Further memory areas of 12KB each are then allocated.
    You can usually leave it to the system to work out the initial memory requirement. The first time you fill the table, little memory is used. The space occupied, depending on the line width, is 16 <= <n> <= 100.
    It only makes sense to specify a concrete value of <n> if you can specify a precise number of table entries when you create the table and need to allocate exactly that amount of memory (exception: Appending table lines to ranked lists). This can be particularly important for deep-structured internal tables where the inner table only has a few entries (less than 5, for example).
    To avoid excessive requests for memory, large values of <n> are treated as follows: The largest possible value of <n> is 8KB divided by the length of the line. If you specify a larger value of <n>, the system calculates a new value so that n times the line width is around 12KB."
    and it is better to use occus 0 inplace of occurs  n    because of above specified reasons
    while it is not recommended to use occurs for internal table declaration  and it has become obselete
    reward if helpful

  • Internal table occurs

    hi
    wht is the diff b/w occurs <b>'n'</b> in the declaration of Internal table.....
    i know that occurs 0 will give 8kb of size, then wht is occurs 1, 2 .....
    is it goes with multiples of 8 i mean 1 implies 16kb or 64 kb
    plz clear,
    thanks in advance
    ganesh

    hi,
    Occurs means it holds the records of the internal table n by default its size is 8kb.if we take it as occurs 1 then it occupies the space required for one record by doubling the size. if field string size is 30 n boby size is 8 kb n if we have given occurs 1 then the body size becomes 30.if we give occurs 2 then it doubles ...then the fieldstring n body size will be 60 kb.......hope u understood this.
    if it has solved ur problem then dont forget to reward with points.
    with regards,
    madhuri.

  • Internal Table occurs n Error - BSP

    I have declared a type as
    Types: BEGIN OF ty_mara
           MATNR TYPE MARA-MATNR,
    ENDOF ty_mara.
    Problem is it is giving me error that "NO INTERNAL TABLE IS CREATED, OCCURS N SPECIFICATION".
    Need Directions.
    Edited by: NiksRules on Feb 14, 2011 6:25 AM

    Hi,
    I assume that you declared the types in "Type definitions" and trying the use this in page attributes for an internal table.
    Is this correct?
    If so, you need to have another type declaration like
    types: ty_mara_table type table of ty_mara.
    use the type ty_mara_table in the page attributes.
    Regards,
    Ravi.

  • Grid with classes not updating Internal Table

    Hi everyone
    I´m developing a Grid with classes.
    The first field in the Grid is a checkbox, I want it to response like a User action when I select or deselect it, but it´s not working. The Internal Table data isn´t updating the info in this field.
    Can someone give me some light please??
    Also I´m thinking in Add a Button like a Submit, so when the user clicks it I can get the last data captured in all fileds. Do you think it may be better??
    Thanks in advanced.
    Emmanuel

    Welcode to SCN
    Please check this link

  • REUSE_ALV_LIST_DISPLAY does not display internal table contents

    Hi,
    Im having a weird problem at my hand. Im using the function module REUSE_ALV_LIST_DISPLAY to display a basic list. I have the contents in an internal table. I have built a field catalog and its working fine. Im passing the internal table to the FM, but in the output I can't see any of the table entries.
    Im new to ALV programming. Please guide me in this regard. Also I would be thankful, if I could be provided with some links for learning more about 'ALV Lists'.

    Hi,
    Check out whether the data is present in the intenaltable or not. Try to debug ur program where it is not processing.
    If the problem persists try to post ur code  in this thread. Let me check it.
    ALV programs.
    http://www.geocities.com/mpioud/Abap_programs.html
    . How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    ALV
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - http://www.sapgenie.com/abap/reports.htm
    http://www.allsaplinks.com/material.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Regards,
    Priyanka.

  • Insert specific line in an internal table at a specific place

    Hi
    i have an internal table (itab) let's say
    Name1 Name2 NUM1 NUM2 NUM3
    Which already populater with data.
    i have to do a subtotal for every NAME1 and insert a line just after the NAME1 in the internal table
    and another subtotal by every NAME1 NAME2 and insert a line just after every NAME1 and NAME2 in the internal table
    then another Grand total at the end of the table
    My psudeo code is a bit like that but the insert is done in the wrong row
    Index=1
    LOOP at itab index
    if itab-name1 NE old
      insert structure in itab index
    elseif itab-name1 NE old and itab-name2 NE old
      insert structure in itab index
    elseif itab EQ last line
      insert structure in itab index
    else
      structure-num1 = structure-num1 + itab-num1
      structure-num2 = structure-num2 + itab-num2
    endif
    index = index + 1
    endloop
    Do you think i need to use a temporary table here. can u guide me in code plz..

    sort internal table by name1 and name2. <b>Have name1 and name2 as the first two variables in the internal table</b>
    declare a work area and an internal table with the same structure as internal table.
    declare num1 as type itab-num1.
    num2 and i_num2 type itab-num2.
    sort itab by name1 and name2.
    loop the internal itab1.
    append itab1 to itab2.
    wa-num1 = structure-num1 + itab-num1
    wa-num2 = structure-num2 + itab-num2.
    i_num2 = i_num2 + itab-num2.
    num1 = num1 + itab-num1.
    num2 = num2 + itab-num2.
    at end of name2.
    append wa to itab2.
    clear wa_name2.
    endat.
    at end of name1.
    wa-num2 = i_num2.
    append wa to itab2.
    clear: i_num2, wa.
    endat.
    at last.
    wa-num1 = num1.
    wa-num2 = num2.
    append wa_itab2.
    endat.
    endloop.
    Thanks.

  • Question in ABAP syntax, read & insert data from internal table, while loop

    Hi, SDN Fellow.
    I am from Java background and learnt ABAP, I don't usually write much ABAP code.
    I am trying to implement the following logic in a RFC now.
    I have one z-custom database table, the structure as the following:
    It has two columns, with these sample data.
    Says datable table is ZEMPMGRTAB.
    EmployeeID,ManagerID
    user10,user1
    user9,user1
    user8,user1
    user7,user2
    user6,user2
    user5,user2
    user4,user2
    user2,user1
    The logic is this:
    I have a input parameter, userid. I am using this parameter to have a select statement to query the record into export table,EXPTAB 'LIKE' table ZEMPMGRTAB.
    SELECT * FROM  ZEMPMGRTAB
      into table EXPTAB
       WHERE  EMPLOYEEID  = USERID.
    Say, my parameter value, USERID ='USER4'.
    Referring to the sample data above, I can get the record of this in my EXPTAB,
    EmployeeID,ManagerID
    user4,user2
    Now, I want to iterately use the EXPTABLE-ManagerID
    as the USERID input in SELECT statement, until it has no return result. Then, insert the new records in
    EXPTAB.
    In above new loop case, we will get this table content in EXPTAB,
    EmployeeID,ManagerID
    user4,user2
    user2,user1
    I kind of think of the pseudocode logic as below:
    (These may not be a valid ABAP code, so I need help to convert/correct them)
    DATA:
    IWA TYEP ZZEMPMGRTAB,
    ITAB
    HASHED TABLE OF ZZEMPMGRTAB
    WITH UNIQUE KEY EMPLOYEEID.
    SELECT * FROM  ZEMPMGRTAB
      into table ITAB
       WHERE  EMPLOYEEID  = USERID.
    *Question 1: I cannot insert a internal table to export table, it is *incompatible type, what is the alternative way fo this?
    *Question 2: How can I access thedata of the internal table like this,ITAB-MANAGERID? As if I can, I would do this:
    * IWA-EMPLOYEEE = ITAB-EMPLOYEEID. IWA-MANAGERID = IWA-MANAGERID. INSERT IWA INTO TABLE EXPTAB.
    * Question 3: Is the 'NE NULL' - 'not equal to NULL' is right syntax?
    IF ITAB NE NULL.
    INSERT ITAB INTO EXPTAB.
    ENDIF
    * Question 4: Is my WHILE loop setup right here? And are the syntax right?
    WHILE ITAB NE NULL.
    SELECT * FROM  ZEMPMGRTAB
      into table ITAB
       WHERE  EMPLOYEEID  = ITAB-MANAGERID.
    IF ITAB NE NULL.
    INSERT ITAB INTO EXPTAB.
    ENDIF
    REFRESH ITAB.
    ENDWHILE.
    Assume all the syntax and logic are right, I should get this result:
    EmployeeID,ManagerID
    user4,user2
    user2,user1
    If I have a new entry in datable table,ZEMPMGRTAB like this:
    user1,user0
    My pseudocode logic will get this result:
    EmployeeID,ManagerID
    user4,user2
    user2,user1
    user1,user0
    I truly appreciate if you can help me to validate the above syntax and pseudocode logic.
    Thanks in advance.
    KC

    Hi,
    FUNCTION ZGETSOMEINFO3.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(USERID) TYPE  AWTXT
    *"     VALUE(FMTYPEID) TYPE  AWTXT
    *"  EXPORTING
    *"     VALUE(RETURN) TYPE  BAPIRETURN
    *"  TABLES
    *"      APPROVERT STRUCTURE  ZTAB_FMAPPROVER
    *"      ACTOWNERT STRUCTURE  ZTAB_FMACTOWNER
    DATA: T_RESULT TYPE STANDARD TABLE OF ZTAB_FMAPPROVER.
    **Question 1: For this line, I got an error says "Program ''USERID" *not found. Is the syntax right, as the USERID is a parameter for the function.
    perform add_line(USERID).
      ENDFUNCTION.
    form add_line using i_user type ZTAB_FMAPPROVER.EMPLOYEEID
                        changing T_RESULT TYPE ZTAB_FMAPPROVER.
    data: ls_row type ZTAB_FMAPPROVER.
    * Get record for i_user
    select single * into ls_row from ZTAB_FMAPPROVER
    where EmployeeID = i_user.
    if sy-subrc NE 0.
    * Do nothing, there is not manager for this employee
    else.
    * Store result
    QUESTION 2: I am still got stuck on this line of code. It still *says that "T_RESULT" is not an internal table "OCCURS n" *specification is missing. I thought the line: "T_RESULT TYPE *ZTAB_FMAPPROVER" means declare internal table, T_RESULT as type of ZTAB_FMAPPROVER". Am I understand it wrongly?
    append ls_row to t_result.
    * Call recursion
    perform add_line using ls_row-ManagerID
                              changing t_result.
    endif.
    endform.
    Thanks,
    KC

  • Internal table when creating a class

    Hi everybody
    im defining parameters when defining a class
    one of the parameters is IT_MARA, of type MARA
    Ive declared a method - SELECT_DATA, where the code is
    SELECT * FROM MARA
    INTO TABLE IT_MARA....
    When activating it
    Im getting the error - IT_MARA is not an internal table 'OCCURS n ' specification is missing
    anybody knows how to solve that issue?

    Hi Anjali,
    I figure out you are having trouble passing an internal table out of a method of a class.
    The error you get is because the parameter you have declared using TYPE MARA actually creates a line type and not an internal table in the signature of the method.
    You have to declare the parameter with a 'table type' rather, and it will create an internal table.
    You could use either a global table type or a local one.
    Please have a look at the code below using a local table type for this problem:
    CLASS a DEFINITION.
      PUBLIC SECTION.
        TYPES ty_mara TYPE TABLE OF mara.     "Local Table Type
        METHODS meth EXPORTING et_mara TYPE ty_mara.   "This makes an internal table
    ENDCLASS.
    CLASS a IMPLEMENTATION.
      METHOD meth.
        SELECT * FROM mara INTO TABLE et_mara UP TO 10 ROWS.
      ENDMETHOD.
    ENDCLASS.
    START-OF-SELECTION.
      DATA lt_mara TYPE TABLE OF mara.
      DATA lr_a    TYPE REF TO a.
      CREATE OBJECT lr_a.
      CALL METHOD lr_a->meth
        IMPORTING
          et_mara = lt_mara.
      BREAK-POINT.

  • Error in passing internal table as returning parameter

    Hi
    Im new to ABAP OO.
    I declared a parameter ret_kna1 Returning Type KNA1.
    Inside the method, I am retrieving data from table KNA1 into internal table and then I want return the interal table value.
    But Im not able to assing the internal table for eg : code
    method READ_CUSTOMER_LIST.
    data: lt_kna1 type TABLE OF kna1,
          wa_kna1 LIKE LINE OF lt_kna1.
    data: lv_kunnr type kna1-kunnr,
          lv_land1 type kna1-LAND1.
    SELECT * FROM kna1
    INTO TABLE lt_kna1
    WHERE land1 eq lv_land1.
    insert LINES OF lt_kna1 INTO TABLE ret_kna1.
    endmethod.
    when I try to activate the error says 'ret_kna1 is not an internal table  "OCCURS n" specification is missing.
    but I can not declare the internal table 'ret_kna1' once again in the code, as it already defined in the parameter as type KNA1.
    please help me how to assign internal table values to the returing structur.

    Are you passing it as an EXPORT parameter?
    use and define it in the TABLES section of your function module as so:
    *"  IMPORTING
    *"     VALUE(INCLUDE_X_LEVELS) TYPE  CHAR1 OPTIONAL
    *"  TABLES
    *"      I_SELECTED_OU STRUCTURE  HRROOTOB
    *"      I_SELECTED_EE STRUCTURE  OBJEC
    *"      E_VIP_EPM_DISTR STRUCTURE  ZHR_VIP_EPM_DISTR
    *"      E_RETURN STRUCTURE  BAPIRET1
    That way you can pass value in the table (if needed) and then pass the table with your values based on your own logic

  • How to Define Internal Table in Smartform

    Hello,
    I have some problem on define Internal Table in Smartform
    I define a Temp_IT_Gen Type LBBIL_IT_GEN in Global Definiations
    but i find that it is not available for me to append data into it,
    the error message is Temp_IT_Gen is not a Internal Table - the Occurs n Specification is missing
    so how can i solve it?
    i want to use the internal table in the hold program.
    Thanks a lot in advance.

    Hi,
    First U define the Table type in 'TYPES' tab of Global Definitions and then assing that table type to Internal table in 'Global Data' tab.
    Eg:
    define the Table Type like below in TYPES tab.
    TYPES:BEGIN OF ty_TEMP.
            INCLUDE STRUCTURE XXXXXXX.
    TYPES:END OF ty_TEMP.
    TYPES: g_t_temp TYPE STANDARD TABLE OF ty_TEMP .
    Now, define the Internal table in Global Data tab like below:
    Variable Name    Type assignment    Associated Type
    G_T_ITEM_1       TYPE                    G_T_TEMP
    NOTE: whatever U define in Global Definitions can be used only in SMARTFORM, if u want to use it in Program U must define in Form Interface.
    Hope it helps!!
    Rgds,
    Pavan

  • How to use internal table in Exporting Parameter of method.

    Hi Friends,
    I am new to abap oops and using the following code to read a select-option and pass the data in an internal table but on defining
    internal table of a standard  type it is giving me following error :
    ITAB is not an internal table - the OCCURS n specification is missing.
    code
    ====
      class lcl_get_details DEFINITION.
        PUBLIC SECTION.
          types : r_carrid type RANGE OF sflight-carrid.
          data  : itab type STANDARD TABLE OF sflight.
          METHODS : get_data IMPORTING s_carrid type R_carrid
                             EXPORTING itab type sflight.
      ENDCLASS.   
    class lcl_get_details IMPLEMENTATION.
      METHOD get_data.
        select *
        from sflight
        into table itab
        where carrid in s_carrid.
        if sy-subrc eq 0.
          sort itab by carrid.
        endif.
      endmethod.   
    ERROR : ITAB is not an internal table - the OCCURS n specification is missing.
    Kindly help.

    Hi,
    I think your problem is, because you use 2 variables named ITAB in method get_data.
    Instance-variable ITAB is defined as STANDARD TABLE OF sflight.
    Exporting-parameter ITAB is defined as sflight.
    It seems like in implementation of get_data exporting-parameter ITAB is used.
    Try this implementation:
    METHOD get_data.
      select * from sflight into table me->itab
       where carrid in s_carrid.
      if sy-subrc eq 0.
      sort me->itab by carrid.
      endif.
    ENDMETHOD.
    This should solve your compiler error.
    Nether the less, get_data will yield an empty structure as result.
    Regards, Hubert
    Edited by: Hubert Heitzer on Feb 24, 2010 10:22 AM

  • Issue with internal table in object oriented ABAP.

    Hello Gurus,
    I am having trouble defining internal table in Object oriented ABAP. for following:
    DATA: BEGIN OF IT_TAB OCCURS 0.
            INCLUDE STRUCTURE ZCUSTOM.
    DATA    tot_sum   TYPE char40.
    DATA END OF IT_TAB.
    Can someone help ?
    Regards,
    Jainam.
    Edited by: Jainam Shah on Feb 5, 2010 8:33 PM
    Edited by: Jainam Shah on Feb 5, 2010 8:33 PM
    Moderator message - Please post in the correct forum. You can easily find out for yourself by looking at SAP help for internal tables using OOP - thread locked
    Edited by: Rob Burbank on Feb 5, 2010 2:49 PM

    No, you can not declare internal table with header line in OO context. You have to declare the work are/header line separately
    Example:
    TYPES: BEGIN OF ty_it_tab.
            INCLUDE STRUCTURE mara.
    TYPES:  tot_sum TYPE char40.
    TYPES: END OF ty_it_tab.
    DATA: it_tab TYPE STANDARD TABLE  OF ty_it_tab.
    DATA: wk_tab TYPE ty_it_tab.
    LOOP AT it_tab INTO wk_tab.
    ENDLOOP.
    Edited by: Dean Q on Feb 5, 2010 8:50 PM

  • How to handle field symbols internal table values?

    HI all,
              I declared field string as below.The below code is working fine.
    Data : ITAB TYPE STANDARD TABLE OF YAPOPLN, (Custom table).
              wa_itab like line of ITAB.
    field-symbol : <fs> type ITAB.
    ASSIGN PARAM TO <FS>
    LOOP AT <FS> INTO WA_ITAB.
    WRITE:/ 'ABC'.
    ENDLOOP.
    But my requirement is that I dont want all the fields of the table YAPOPLN.My output contains only 2 fields of the table YAPOPLN,which contains total 4 fields.According to my requirement only 2 fields will be getting into one parameter PARAM(this is function module parameter,which is from ALV classes) from the user entered output,which contains only 2 fields.So the above code is not working properly because wa_itab contains 4 fields and giving short dump.
    If I am declaring the internal table with the required fields(only 2 fields) and referring that internal table to field symbol <FS>
    Data : BEGIN OF ITAB1 OCCURS 0,
             FIELD1 LIKE YAPOPLN-FIELD1,
             FIELD2 LIKE YAPOPLN-FIELD2,
             END OF ITAB1.
    field-symbol : <fs> LIKE ITAB1 OR  <FS> TYPE ANY.
    DATA :WA_ITAB1 LIKE LINE OF ITAB1.
    ASSIGN PARAM TO <FS>
    LOOP AT <FS> INTO WA_ITAB.
    WRITE:/ 'ABC'.
    ENDLOOP.
    But when I am compiling this code i am getting the below error.I am gettting the same below error when even <FS> is also declared as <FS> TYPE ANY.
    .'FS' is not an internal table or defined in TABLES.
    Can anyone help me in this regard?
    Thanks,
    Balaji

    Hello,
    Try this way:
    If both the type of internal tables are same then you can directly assign dynamic internal table to static internal table.
    itab = <itab>.
    Suppose you have field symbol internal table <itab> which is different in structure from ITAB.
    Now, you can create <wa> as follow:
    FIELD-SYMBOLS <wa>.
    DATA wa TYPE REF TO DATA.
    CREATE DATA wa TYPE LINE OF <itab>.
    ASSIGN wa->* to <wa>.
    This way your work area is read.
    Using [ASSIGN COMPONENT|http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3923358411d1829f0000e829fbfe/content.htm] syntax you can read required component of <wa>.
    Finally you can use that value to load static internal table.
    You can also refer to my thread on [Dynamic table|Re: Creating Dynamic table].
    Hope this helps!
    Thanks,
    Augustin.
    Edited by: Augustarian on Aug 20, 2009 10:06 AM

Maybe you are looking for

  • Installation of Adobe Indesign CS3 on Windows Vista Home Premium

    Hello, I can not install Indesign CS3 on my Notebook. The operating system is Windows Vista Home Premium SP1. The error message contains: "Internal Error 2739". It is coming at the beginning of the installation. Can anybody please help me? Alois Blai

  • Using JSF and IFRAMEs

    I have a basic JSF app that takes some input, does a request and creates a table on output. What I need to do with it now is to have the query "page" and results "page" in two iframes on the same page. Before the query has been run the second iframe

  • Vlookup in XL reporter

    Hi, all! Can you tell me about using Vlookup in XL reporter. Now, i don't get data when i use Get other data function. How to use it?Thank you!

  • Error: 'The File exists 0x80070050' when updating a MVC5 app to Microsoft Azure Tools 2.5

    I've a MVC5 app that uses Microsoft Azure Tools v2.4. I want to update the Azure Tools to 2.5. I'm using Visual Studio Community 2013. When I go to the properties of the Azure project, select the Application tab and then click upgrade I get the error

  • Mobile phone not working in France

    Can only dial French landlines not UK, no mobiles either in ,France or abroad