Doubt regd Field Symbols

Hi SDN's
I have createad dynamic internal table using the method cl_alv_table_create=>create_dynamic_table from the blog
/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
i am struck at the last point. what i wanted to know is the the internal table is in the form of a Field Symbol <FS> . But i have an internal table which already contains the data.. how do i move the data from internal tables to the Dynamic internal table.. I had already posted previously, but not able to understand .. can some body help me in understanding to get the data from Internal table to the dynamic internal table
<b>My internal table</b> is in the below format
Alloc no|ChargeCode     |Amount     |
A119     |301          |100     |
A119     |301          |200     |
A119     |302          |150     |
A119     |302          |250     |
A119     |303          |100     |
A229     |301          |100     |
A229     |321          |100     |
A239     |301          |100     |
A239     |303          |50     |
and i have the <b>dynaic internal table</b> format as below
Alloc No|301     |302     |303     |321     |
A119     |300     |400     |100     |NIL     |
A229     |100     |NIL     |NIL     |100     |
A239     |100     |NIL     |50     |NIL     |
Please help me in understanding to move the data in to the above format

Hi Pratyu Usha,
I started dealing with it recently, so I'll try to help...
I built the dynamic table row after row.
To do this efficiently, the static (non-dynamic) table must be sorted by "Alloc No".
Then you need a field-symbol for the work-area line of the dynamic table:
ASSIGN LOCAL COPY OF INITIAL LINE OF <dynamic-table> TO <line>.
where <dynamic-table> is the field-symbol representing your dynamic table.
then you loop at your static table, and for each line of the static table you assign the right column of the dynamic table's line to other field-symbol:
ASSIGN COMPONENT StaticTable-ChargeCode OF STRUCTURE <line> TO <field>.
where <field> is another field-symbol and StaticTable is your static table...
For example, suppose that you're currently in the first row of your static table - <field> will point to the column named "301" of the work-area of your dynamic table.
now you just put the value inside that column:
<field> = StaticTable-Amount.
OR if you want to sum the value:
ADD StaticTable-Amount to <field>.
Now, at end of "Alloc no", you need to add your dynamic work-area to the dynamic table:
APPEND <line> TO <dynamic-table>.
CLEAR: <line>.
There.
That should work.
Please let me know!
Alon

Similar Messages

  • Doubt in using a Field symbols

    Hi gurus,
    i want to use field symbols for a varying fields in a table.
    like my fields are ZPER01 SHKZG01
                              ZPER02 SHKZG02
                              ZPER03 SHKZG03
                             ......ZPER0N SHKZG0N        
    now i have to populate values in this using field symbols how do i do it.(These fields are in a custom table)
    thanks in advance,
    Vanathi
    Edited by: vanathi sekar on May 2, 2008 2:15 PM

    DATA: BEGIN OF text,
            word1 TYPE c LENGTH 4 VALUE 'AAAA',
            word2 TYPE c LENGTH 4 VALUE 'BBBB',
            word3 TYPE c LENGTH 4 VALUE 'CCCC',
            word4 TYPE c LENGTH 4 VALUE 'DDDD',
          END OF text.
    DATA: word  TYPE c LENGTH 4,
          char1 TYPE c LENGTH 1,
          char2 TYPE c LENGTH 1,
          leng TYPE i.
    FIELD-SYMBOLS <word> LIKE text-word1.
    DATA inc TYPE i.
    DESCRIBE FIELD text LENGTH leng IN CHARACTER MODE.
    leng = leng / 2.
    DO leng TIMES VARYING char1 FROM text(1)
                                NEXT text+2(1) RANGE text
                  VARYING char2 FROM text+1(1)
                                NEXT text+3(1) RANGE text.
      WRITE: char1, char2.
      char1 = 'x'.
      char2 = 'y'.
    ENDDO.
    DO 4 TIMES VARYING word FROM text-word1 NEXT text-word2.
      WRITE / word.
    ENDDO.
    DO.
      inc = sy-index  - 1.
      ASSIGN text-word1 INCREMENT inc TO <word> RANGE text.
      IF sy-subrc = 0.
        WRITE / <word>.
      ELSE.
        EXIT.
      ENDIF.
    ENDDO.
    Please assign  points.

  • Field-symbols as parameters to the method of a class

    Hi All,
    I am having an doubt regarding the field-symbols.Can we pass the field-symbols as a parameter to the method of a class.If yes can anyone tell me how to do this. Before posting I have searched regarding it in google but I did not find any better solution.Though I have seen some examples regarding the passing of field symbols as a parameter those scenarios does not match with my report as my report varies dynamically based on selection criteria.
    Below is the snippet of my code regarding the passing of field-symbols as a parameter.
    methods:  final_data importing <fs_h_line>TYPE any
                                                 <fs_h> TYPE STANDARD TABLE
                                   exporting <fs_f_line> TYPE any
                                                 <fs_f> TYPE STANDARD TABLE, 
    CALL METHOD l_obj->final_data exporting <fs_h_line> = <fs_header_line>
                                                                  <fs_h>      = <fs_header>
                                                   importing <fs_f_line> = <fs_final_line>
                                                                 <fs_f>      = <fs_final>.
    With the above code I am getting an error.Check whether it is correct or not.If not suggest the solution to resolve the issue.
    Regards,
    Chakradhar.

    Hi
    Maybe if you change this code below to field-symbol, it can work:
    DATA: tl_header_csv TYPE STANDARD TABLE OF yol_header_arquivo,
          tl_csv_aux    TYPE textline_t                          .
    DATA: wl_header_csv LIKE LINE OF tl_header_csv.
    converter_csv_al11_itab( EXPORTING im_t_csv = tl_csv_aux
                             IMPORTING ex_w_sap = wl_header_csv
                             CHANGING  ex_t_sap = tl_header_csv ).
    METHOD converter_csv_al11_itab.
      IM_T_CSV  Importing  Type  TEXTLINE_T
      EX_W_SAP  Exporting  Type  ANY
      EX_T_SAP  Changing   Type  STANDARD TABLE

  • Can I verify a field-symbol using its component name?

    Hello experts,
    I am looping at my field-symbol and I need to know what are its component name.
    I need to create an IF or CASE statement checking whether the field-symbol's
    component name is equal to that of the value that I declared. I want to do
    something like this:
    LOOP AT <fs_dyntable> ASSIGNING <wa_dyntable>.
    ASSIGN COMPONENT sy-index OF STRUCTURE <wa_dyntable>
            TO <component>.
            IF sy-subrc <> 0.
              EXIT.
            ENDIF.
    if component name = '2000'.
        condition...
      elseif component name = '1999'.
        condition...
      elseif component name = '1998'.
        condition...
      endif.
    endloop.
    Again, thank you guys and take care!

    Hi,
    I am not clear on your doubt , but you can use field-symbol fields like below:
    * if <component>-fld1 = '2000'.
    condition...
    elseif <component>-fld1 = '1999'.
    condition...
    elseif <component>-fld1 = '1998'.
    condition...
    endif.
    endloop.
    LOOP AT x_table ASSIGNING <wa_table>.
    IF <wa_table>-fld1 EQ 100.
    -----your code
    ENDIF.
    ENDLOOP.
    Regards
    Appana

  • Declaring Field Symbols in Public Section of class

    Dear All,
    I am working with class and hav declared some field symbols in one of the method.
    Now I want to move these declaration in Public section of the class so that this field symbol declaration can be used by other methods of the class but I am not able to do the same.
    Can anyone help me in finding as what I am doing wrong here.
    Regards,
    Lalit Kabra

    What you are trying to do is define an attribute. I doubt you can use field symbol as a class attribute. Consider using a data object instead.
    Data : dref type ref to data.
    This can later be deferenced in the individual methods.
    Hope this helps.
    Here's an example for the same:
    REPORT  z_class_001                             .
    *       CLASS lcl_class1 DEFINITION
    CLASS lcl_class1 DEFINITION.
      PUBLIC SECTION.
        DATA dref TYPE REF TO data.
        METHODS : constructor IMPORTING i_type TYPE char20,
                  meth1 IMPORTING value TYPE i.
    ENDCLASS.                    "lcl_class1 DEFINITION
    *       CLASS lcl_class1 IMPLEMENTATION
    CLASS lcl_class1 IMPLEMENTATION.
      METHOD constructor.
        CREATE DATA dref TYPE (i_type).
      ENDMETHOD.                    "constructor
      METHOD meth1.
        FIELD-SYMBOLS <fs> TYPE ANY.
        ASSIGN dref->* TO <fs>.
        WRITE: 'Value is ' ,value.
        ASSIGN value TO <fs>.
        WRITE: 'Field symbol is ', <fs>.
      ENDMETHOD.                                                "meth1
    ENDCLASS.                    "lcl_class1 IMPLEMENTATION
    START-OF-SELECTION.
      DATA ref_class TYPE REF TO lcl_class1.
      CREATE OBJECT ref_class EXPORTING i_type = 'I'.
      CALL METHOD ref_class->meth1
        EXPORTING
          value = 3.
    BR,
    Advait
    Edited by: Advait Gode on Sep 16, 2009 9:44 AM

  • Field Symbol Assignment

    Hi,
    I have a doubt regarding the field symbol assignment.
    In my program, I have logic as below.
    <b>  W_1STCNTFLD = 'E_INV_AGING_STRU-PDISCCNTP1'.
      W_2NDCNTFLD = 'E_INV_AGING_STRU-PDISCCNTP2'.
      ASSIGN (W_1STCNTFLD) TO <FS1>.
      ASSIGN (W_2NDCNTFLD) TO <FS2>.</b>
    While debugging, when I see the values of the Field Symbols <b><FS1></b> and <b><FS2></b> after assignment, they are <b>0, 0</b>. Why is it like that..?
    In general, what does a Field Symbol hold..? the value of the variable being assigned or the Memory location of that variable..?
    When I remove the paranthesis while assigning like below,
      <b>ASSIGN W_1STCNTFLD TO <FS1>.</b>
    it is storing the value of the variable(<b>E_INV_AGING_STRU-PDISCCNTP1</b>) to <b><FS1></b> instead of '0'.
    And what is the difference between   <b>ASSIGN (W_1STCNTFLD) TO <FS1></b> and   <b>ASSIGN W_1STCNTFLD TO <FS1></b>..? I mean, when we put paranthesis to the variable and when we remove the paranthesis.
    Please clarify my doubts. Thanks in advance.
    Thanks & Regards,
    Paddu.

    when you use the paranthesis,(W_1STCNTFLD) actually equals to ('E_INV_AGING_STRU-PDISCCNTP1'),and the 'E_INV_AGING_STRU-PDISCCNTP1' must be the label of a data object,it can't be a string!
    please refer to the following document(coming from sap abap keywords document):
    Alternative 2
    ... [TABLE FIELD] (name)
    Alternative 3
    ... oref->(attr_name)
    Alternative 4
    ... {class|(class_name)}=>{attr|(attr_name)}
    Effect
    There are three dynamic variants for mem_area, where the storage area is not specified directly, but as the content of character/type data objects enclosed within parentheses.
    In the first variant (name), the label in name is built exacltly like the direct specification. When the statement is executed, the content of name must be the label of a data object that can contain offset/length specifications, strucuture component selectors, and component selectors for the assignment of attributes in classes or objects (since Release 6.10). The content of name must be specified in uppercase letters.
    The optional addition TABLE FIELD before (name) is only possible outside of classes. This addition limits the search area - where the data object specified in (name) is searched for (see below) - to the interface work areas for the current program group declared using TABLES. If TABLE FIELD is specified, casting_spec and range_spec cannot be specified explicitly.
    If the label in name is a field symbol or a form parameter with an unstructured type, components can be addressed, as of Release 6.10, through structure component selectors. The components must exist when the statement is executed.
    The second variant oref->(attr_name) is a special case of the first variant for the assignment of an instance attribute to a field symbol - where the object reference variable oref is specified statically. The label of the attribute is specified dynamically in the character-type field attr_name and must not be specified in uppercase letters.
    The third variant {class|(class_name)}=>{name|(attr_name)} is a special case of the first variant for the assignment of a static attribute to a field symbol where the class name class and the name of the attribute name can be specified both directly and dynamically in character-type fields class_name or attr_name. The contents of attr_name and class_name do not have to be in uppercase letters. If the class name is specified dynamically and the attribute is specified directly, no offset/length specifications can be made for the attribute.
    If a data object is specified dynamically, this is searched for in accordance with the following hierarchy.
    Within the local data objects of the current procedure
    Within the attributes, visible in a method, of the actual class, where , in instance methods, the self reference me-> is set explicitly before the label
    Within the global data of the current program
    Within the interface work areas of the main program of the current program group declared with TABLES
    Within the attributes of the object to which oref refers, if the label has the expression oref-> (as of Release 6.10)
    Note
    Only for internal use can the label in name also have the form (PROG)DOBJ, whereby PROG is the name of an ABAP program and DOBJ is the name of a global data object of this program. If the program PROG is loaded during execution of the statement ASSIGN in the same internal mode as the current program is loaded, the data object (PROG)DOBJ in this program is searched for and the field symbol points to this data object after successful assignment.
    Example
    Dynamic access to an attribute of an object (Dynamic Access) through a field symbol.
    CLASS c1 DEFINITION.
      PUBLIC SECTION.
        METHODS m1 IMPORTING oref TYPE REF TO object
                             attr TYPE string.
    ENDCLASS.
    CLASS c1 IMPLEMENTATION.
      METHOD m1.
        FIELD-SYMBOLS <attr> TYPE ANY.
        ASSIGN oref->(attr) TO <attr>.
        WRITE <attr> ...
      ENDMETHOD.
    ENDCLASS.

  • Read line + field symbol

    Hi expets.
    I have some doubt related to Read Line, iknow it's use but it fails when i m using field symbol.
    1->
    Do w_lines times.
    Read line sy-index field value <fs_customer>-name1.
    enddo
    Here it makes dump because i m using fied symbol. Its type is correct .
    But when i use int. table or structure it's wrks fine
    2-> when i try to hide a field sybmol it shows dump. what can i do?
      actually in a loop i_customer assigning <fs_customer>
      write: /<fs_customer>-name1..etc...
    hide : <fs_customer>-kunnr.
    here it makes dump when i hide
    3-> Problem is-
    I have two reports on same screen.1 for Customer and another for Vendor.
    both have check boxes.
    I want to read them from Screen output and for Customer name i have to get the Customer no. for the selected check box.
    Same is with the venodr report n same screen.
    wen slect Vendor name check box get vendor no.
    My issue is that how i should read two reports on same screen for check boxes.
    I mean i will make a DO ...ENDDO . and on it i will read for sy-line-1 times.
    then hw i will separate that whetehr this read is for Customer or Vendor.
    Do i need to set  some flag and then hide that flag.
    and supoose if Flag eq C at read then its custoer and as it will be V then its Vendor,
    All teh Vendor report is Below thw Customer.
    Please tell me the advantage of Field symbol over heaer lines of table./
    thanks in Advance.

    Loop to get the unselected checkbox
      DO l_line_lockbx TIMES.
      Read the lines on Screen -for LOCK BOX
        READ LINE sy-index FIELD VALUE g_check
                                                         <fs_lockbx>-name1 .
        IF  sy-subrc EQ 0 .
      If Check Box is not selected-Store in a separate table
        if g_check eq c_x.
        clear l_name_lockbx.
        move <fs_lockbx>-name1 to l_name_lockbx.
      Read table to get the Detail when ceck box not selected
        read table i_lockbx with key name1 = l_name_lockbx
                                    binary search
                                    assigning <fs_lockbx>.
          IF  sy-subrc EQ 0.
          MOVE : <fs_lockbx>-serial     TO <fs_rcvlad>-serial ,
                       <fs_lockbx>-rcvlad    TO <fs_rcvlad>-rcvlad ,
                       <fs_lockbx>-docnum TO <fs_rcvlad>-docnum .
          APPEND <fs_rcvlad> TO i_rcvlad.
          CLEAR :<fs_rcvlad>  ,
                       <fs_lockbx> ,
                         g_check     .
         endif.            " IF  sy-subrc EQ 0
        ENDIF.             " if g_check ne c_x.
      ENDDO.               " DO l_line_lockbx TIMES.

  • Field symbol assign problem

    Hi ,
    Please find below code when I tried in version 4.6 code works correctly . but in 6.0 it gives short dump..
    Here.
      FIELD-SYMBOLS : <fs_table> TYPE ANY TABLE.
    FIELD-SYMBOLS : <fs_work_area> TYPE yatsdzz00.
    ASSIGN pr_data_changed->mp_mod_rows->* TO <fs_table>.
    LOOP AT <fs_table> ASSIGNING <fs_work_area>. (In there system gives short dump)
    Thanks in advance.

    Hai,
    Use CASTING or CASTING TYPE (mytype) after LOOP AT <fs_table> ASSIGNING <fs_work_area>.
    ie:
    FIELD-SYMBOLS : <fs_table> TYPE ANY TABLE.
    FIELD-SYMBOLS : <fs_work_area> TYPE yatsdzz00.
    ASSIGN pr_data_changed->mp_mod_rows->* TO <fs_table>.
    LOOP AT <fs_table> ASSIGNING <fs_work_area> <b>CASTING or CASTING TYPE (mytype).</b>
    For more information click the below link:
    http://help.sap.com/saphelp_46c/helpdata/EN/fc/eb35de358411d1829f0000e829fbfe/frameset.htm
    I hope it helps you.
    Reward points if it helps you.
    Regds,
    Rama chary.Pammi

  • Problem with DESCRIBE field-symbol statement?

    Hi
    I havw written following querry but it's showing error. My doubt is there any resctriction field symbols in DESCRIBE query.
    i wrote
    describe field <a> type typ  length in character mode.
    Is that syntax correct?

    When you use the Describe statement with the field symbols, it will do the describe on the field which was assigned to it.
    Like:
    FIELD-SYMBOLS: <fs> TYPE ANY.
    DATA: l_char TYPE char10.
    l_char = 'TEST'.
    ASSIGN l_char TO <fs>.
    DATA: l_len TYPE i.
    DESCRIBE FIELD <fs> LENGTH l_len IN CHARACTER MODE.
    write: / '<fs>:', <fs>.
    WRITE: / 'Length', l_len.
    Here descirbe gives the property of the L_CHAR because it was assigned to field symbol <FS>.
    Regards,
    Naimesh Patel

  • Macros,field symbols

    Hi All,
    Please can you suggest me best sites or any documents to learn more on field symbols and macros in ABAP SAP?
    Thanks in advance.
    Regds,
    Leeza.

    For field symbols
    <a href="http://searchsap.techtarget.com/tip/1,289483,sid21_gci920484,00.html">Use field symbols for better performance in internal tables</a>
    <a href="http://www.erpgenie.com/abap/example_code.htm">Example code</a>
    For macros
    <a href="http://www.howforge.com/how-to-define-macro-in-abap-4">How to define macro in ABAP/4</a>
    <a href="http://www.sap-img.com/ab022.htm">Macro in ABAP</a>
    Regards

  • RSBBS: field symbol not yet assigned

    Hello Gurus,
    I have a RRI for a query jumping to another query.
    But after doing some minor changes to the child and parent query, while executing the jump, an error message comes
    ' Fiel;d symbol not yet assigned'.
    Its details mention '<internal error> Cannot determine text element for the current query;.
    Please guide me as to what can be the issue and how to resolve it. I am new to RSBBS.
    Regards,
    NIKEKAB

    Hello,
    I have changed the assignment details as the type mentioned for a field was Table field (used for non BW jumps), to Generic.
    This helped me see the receiver query name when I click on GOTO.
    But even now I get the same error i.e. Field symbol not yet assigned.
    I went through some other posts but did not find answer to my doubt.
    Any other solution.
    Regards,
    NIKEKAB.

  • In webdynpro ,Passing field symbols as values to class methods

    Hi
    Please tell me the ways of accessing database in webdynpro abap(not directly). I am calling Class method for accessing database. As currently I am directly accessing database in my webdynpro application. I have created a class and method for the same.
    In my method I want to use select statement which will return table with values to webdynpro application. So for select statement(Calling Method) I need to use my field symbol values as where in clause .
    Could anyone please help with example code?
    Thanks,
    Ujjwal

    data: in_line type ref to data.
    CREATE DATA in_line LIKE LINE OF <dyn_tab>.
      ASSIGN in_line->* TO <dyn_wa>.
    You can create a data reference and assign it to a field symbol and change the values. direclty passing field symbols is not possible.
    Abhi

  • How to revert back a SAP NOTE? Dump- Field symbol has not yet been assigned

    Hi Experts,
    We r getting dump(cause: Field symbol has not yet been assigned) in production for ABUMN tx, so, when debugged, it came to know that, the Field symbol is coming from REUSE_ALV_LIST_DISPLAY!!
    So, for some reason the system message text is not getting output in ALV-->Dump!!
    So, found a NOTE causing this problem!!
    So, pls. let me know that, How to revert back this/any SAP NOTE? pls. in detail steps wise!!
    thanq
    Edited by: Srinivas on Jan 24, 2008 4:32 PM

    Hi
    In SNOTE tcode,  select the Note that you implemented and click on 'RESET SAP Note Implementation'
    shylesh

  • Modify DB by single field using Field Symbol

    Hi,
      please help me ,actually i have not use the field symbol in any object. i have one requirement ,i have to modify the DB by field STATUS using Field symbol ,
    I am sending u my code so please help me how can i modify DB using field symbol..
              gw_msg3_status1   = k_status1 .
              LOOP AT gi_msg3 INTO gs_msg3.
                gs_msg3-status  = gw_msg3_status1 .
                gs_msg3-issue   = lw_issuno.
           MODIFY gi_msg3 FROM gs_msg3 TRANSPORTING status.
                MODIFY gi_msg3 INDEX sy-tabix FROM gs_msg3 TRANSPORTING issue status.
              ENDLOOP.
    Thanks & Regards,
    Meenakshi

    perform dboperation_table using 'SET' 'BIRTHDT' '=' <fs>.
        perform dboperation_table using 'WHERE' 'PARTNER' '='  <fs>
        perform dboperation_update using 'BUT000'.
    form dboperation_table
    using p_type
          p_var1
          p_var2
          p_var3.
      data: t_l type cmst_str_data.
      data: d_cx_root            type ref to cx_root,
            d_text               type string.
      try.
          clear t_l.
          if p_var3 is not initial.
            t_l = p_var3.
            condense t_l.
            concatenate '''' t_l '''' into t_l.
          endif.
          concatenate p_var1 p_var2 t_l into t_l
          separated by space.
          case p_type.
            when 'SET'.   append t_l to g_s_t.
            when 'WHERE'. append t_l to g_w_t.
          endcase.
        catch cx_root into d_cx_root.
          d_text = d_cx_root->get_text( ).
          message a398(00) with  d_text.
      endtry.
    endform.                    "DBOPERATION_table
    form dboperation_update
    using  p_tabname type zdboperation-tabname.
      data: tabname type bus_table.
      data: d_cx_root            type ref to cx_root,
            d_text               type string.
      try.
          tabname-tabname = p_tabname.
          call function 'ZDBOPERATION_UPDATE'
            in update task
            exporting
              tabname     = tabname
            tables
              where_table = g_w_t
              set_table   = g_s_t.
        catch cx_root into d_cx_root.
          d_text = d_cx_root->get_text( ).
          message a398(00) with  d_text.
      endtry.
    endform.                    "DBOPERATION_update
    Hope it will help you.
    Regards,
    Madan.

  • Field symbols and READ TABLE with system code 4

    Hi,
    I have a hashed table and I am using field symbols to point to it to retrieve the field content. I then use it in the READ TABLE statement in the following way:
    Loop at x_data assign <fs>.
    ASSIGN COMPONENT 'xxx' OF STRUCTURE <fs> TO <c1>.
    ASSIGN COMPONENT 'xxx' OF STRUCTURE <fs> TO <c2>.
    READ TABLE ZZZZ assign <fs> with table key a1 = <c1>
                                               a2 = <c2>.
    If sy-subrc = 0.
    endif.
    I ran the debugger and I keep getting a 4. I am not able to get the value from a1 and a2 to see what it is and why it is causing a 4 sy-subrc. I know the value from the hashed table and the values c1 and c2 are the same, so the sy-subrc should be 0.
    How would I read a hashed table using field symbols? I know that usig a standard table, I have to sort the table on the key fields() before I actually can do the READ TABLE using the binary search.
    Please advise. Thanks
    RT

    Hai Rob
    Go  through the following Code
    Field-Symbols are place holders for existing fields.
    A Field-Symbol does not physically reserve space for a field but points to a field, which is not known until run time of the program.
    Field-Symbols are like Pointers in Programming language ‘ C ‘.
    Syntax check is not effective.
    Syntax :
    Data : v1(4) value ‘abcd’.
    Field-symbols <fs>.
    Assign v1 to <fs>.
    Write:/ <fs>.
    DATA: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY COL1.
    FIELD-SYMBOLS <FS> LIKE LINE OF ITAB.
    DO 4 TIMES.
    LINE-COL1 = SY-INDEX.
    LINE-COL2 = SY-INDEX ** 2.
    APPEND LINE TO ITAB.
    ENDDO.
    READ TABLE ITAB WITH TABLE KEY COL1 = 2 ASSIGNING <FS>.
    <FS>-COL2 = 100.
    READ TABLE ITAB WITH TABLE KEY COL1 = 3 ASSIGNING <FS>.
    DELETE ITAB INDEX 3.
    IF <FS> IS ASSIGNED.
    WRITE '<FS> is assigned!'.
    ENDIF.
    LOOP AT ITAB ASSIGNING <FS>.
    WRITE: / <FS>-COL1, <FS>-COL2.
    ENDLOOP.
    The output is:
    1 1
    2 100
    4 16
    Thanks & regards
    Sreenivasulu P

Maybe you are looking for

  • FtpAdapter deploy problem ORABPEL-09903

    Hi, What's wrong with my configuration of the FtpAdapter ??? I've configured the FTP Adapter in the following files : * $ORACLE_HOME/j2ee/OC4JINT/application-deployments/default/FtpAdapter/oc4j-ra.xml * $ORACLE_HOME /j2ee/OC4JINT/connectors/FtpAdapte

  • Java Index Out Of Bounds Exception error

    In the Query Designer when I choose access type for Result value as Master data, and execute, I get the following java Index Out Of Bounds Exception error: com.sap.ip.bi.webapplications.runtime.controller.MessageException: Error while generating HTML

  • FinalCut Pro Movie Import?

    Is it possible to use FinalCut Pro movies in iWeb?

  • Command key in Illustrator

    I'm still back in Adobe CS1. Everything seems still to work okay in Leopard, except that the command key doesn't seem to work. I use so many shortcuts with the command key, that it's really frustrating not to be able to use the command key. I know th

  • Adobe Air Auto Turned Off Smoothing?!!!!

    Hi, I am using Adobe Air to create a media player. To have better video quality, I have added video smoothing enabled. However, recently I installed it on an ATOM PC, the video playback is lagging due to the performance of PC hardware. But, during th