How to dynamically assign type to a field-symbol?

Hi,
I have two fields in one table, one for field name and one for table name.  These can be fields in different
tables. I need to fetch value of this field in that table. So the type of this variable can change dynamically.
I am trying to assign type of this field dynamically to a field-symbol. I have to use this field symbol in a
select statement.  Currently it is showing a dumb, as the field type is dec7.  For some other types it is
working fine.
Regards,
Sunil

Hi all,
I have the same problem.
I tried with your helps but i can't fix them.
A message is raised "Field <fs_bet> unknown" when i used code below
FIELD-SYMBOLS: <fs_bet> TYPE any.
DATA: c_bet TYPE string.
DATA it_0008 type STANDARD TABLE OF pa0008 WITH HEADER LINE.
DO 40 TIMES.
  CONCATENATE 'BET0' index into c_bet.
  ASSIGN (c_bet) to <fs_bet> CASTING TYPE pad_amt7s  .
  select * from pa0008 into it_0008
     where <fs_bet> = '1000'
     and pernr = 32.
     append it_0008.
  ENDSELECT.
ENDDO.
Please help me to solve it.
Thanks so much,
Sophie Tran

Similar Messages

  • How to check data type of the field symbol at run time

    Hi,
    My code is as following:
          LOOP AT <fs> ASSIGNING <wa_covp_ext>.
            ASSIGN COMPONENT 86 OF STRUCTURE <wa_covp_ext> TO <f_zzname>.
            IF sy-subrc = 0.
              ASSIGN COMPONENT 158 OF STRUCTURE <wa_covp_ext> TO <f_pernr>.
              IF sy-subrc = 0.
                  SELECT SINGLE sname INTO <f_zzname> FROM pa0001
                                WHERE pernr = <f_pernr>
                                AND endda GE sy-datum
                                AND begda LE sy-datum.
             ENDIF.
          ENDIF.
        ENDLOOP.
    This query is giving dump when <f_zzname> is type P length 8 and decimals 2, because it tries to put PA0001-sname into it which is type C length 30. So I want to check the type of <f_zzname> before the select statement. If it is character 30, then I will write the select statement else not.
    How to check data type of the field symbol at run time? If it's not possible, then can somebody suggest a workaround? Thanks.

    check this ...
    write describe statement  ...
    field-symbols : <f_zzname> .
    data : sname like pa0001-sname,
           typ(10).
    assign sname to  <f_zzname>.
    describe  field <f_zzname> type typ.
    write : typ. <-- typ contains character type in this case ..
    U can check if typ is of character(C) if so .. write the select statement ...

  • Assign Type conflict with field symbols

    I have two tables tab1 & tab2, want to assign field values from tab1 to tab2 suing field symbols. Deatils are :
    TYPES: BEGIN OF ty_tab1,
        item1   TYPE char20,
        item2   TYPE char20,
        val1 type i,
        val2 type i,
    END OF ty_tab1,
    BEGIN OF ty_tab2,
        item1 TYPE char20,
        item2 TYPE char20,
    END OF ty_tab2.
    DATA: it_tab1 TYPE TABLE OF ty_tab1,
                it_tab2 TYPE TABLE OF ty_tab2.
      FIELD-SYMBOLS <fs_tab1> TYPE ty_tab1.
                     <fs_tab2t> type ty_tab2.
      LOOP AT it_tab1 assigning <fs_tab1>.
        READ TABLE it_tab2  assigning <fs_tab2> WITH KEY item1 = <fs_tab1>-item1
                                                                                    item2 = <fs_tab1>-item2.
        IF sy-subrc EQ 0.
          ASSIGN COMPONENT 'ITEM1' OF STRUCTURE <fs_tab1> TO <fs_tab2>.
         ASSIGN COMPONENT 'ITEM2' OF STRUCTURE <fs_tab1> TO <fs_tab2>.
        endif.
    endloop.
    Getting error msg
    You attempted to assign a field to a typed field symbol, but the field does not have the required type.         
    whats the reason of error.
    Edited by: Matt on May 27, 2011 8:59 AM - added  tags

    Taken from example dump
    A new value is to be assigned to the field "...", although this field is
    entirely or partly protected against changes.
    The following are protected against changes:
    - Character literals or numeric literals
    - Constants (CONSTANTS)
    - Parameters of the category IMPORTING REFERENCE for functions and
    methods
    - Untyped field symbols not yet assigned a field using ASSIGN
    - TABLES parameters if the actual parameter is protected against changes
    - USING reference parameters and CHANGING parameters for FORMs, if the
    actual parameter is protected against changes and
    - Accesses using field symbols if the field assigned using ASSIGN is
    protected (or partially protected, e.g. key components of an internal
    table with the type SORTED or HASHED TABLE) against changes
    - Accesses using references, if the field bound to the reference is
    protected (or partially protected) against changes
    - External write accesses to READ-ONLY attributes,
    - Content of a shared object area instance accessed using a shared lock
    (ATTACH_FOR_READ).
    You likely fall in one of these cases. Check each and if still unsure please share your code so we can reproduce the error.
    Regards
    Marcin

  • Dynamically table read / write with field symbols

    Hi,
    I like to read dynamically from a table via field symbols. The reading part is working.
    But now I like to do some changes on the entry and then write it to another table with a similar structure.
    I use SAP 4.6c
    There I have two problems:
    1. At the statement I get a dump:
    <l_sysid> = sy-sysid.
    --> Field symbol has not yet been assigned.
    I think that the problem is somewhere around
    assign <table_to> to <wa_to>.
    2. the data change inside the loop. There I like to add the sysid to the target-wa and then copy the source-wa it to the new target-wa to append it to the target table.
    But this does not work. What kind of code do I need? The "move-correspondig" is not correct.
    --> see code around
    loop at <table_from> assigning <wa_from>.
    Below you can find my code. The problem is within the last loop-statement.
    FUNCTION Z_MIG_COPY_TABLE.
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     REFERENCE(I_TABNAME_FROM) TYPE  TABNAME
    *"     REFERENCE(I_TABNAME_TO) TYPE  TABNAME
    *"     REFERENCE(I_KOMP_TRANS) LIKE  ZS_KOMP_TRANS STRUCTURE
    *"        ZS_KOMP_TRANS OPTIONAL
    *"  TABLES
    *"      I_SELCON STRUCTURE  ZS_SELCON
    *"  EXCEPTIONS
    *"      NOT_FOUND
    *"      OTHERS
    * zeilenweiser Aufbau Tabelle I_SELCON z.B.:
    * bukrs = 3011
    * AND
    * bstyp = 'F'
    * I_KOMP_TRANS
    * dient zur Uebersetzung von alt/neu, z.B. bei LIFNR
    * der angegebene Funktionsbaustein wird genutzt,
    * um den neuen Wert der übergebenen Komponente zu ermitteln
    * Angabe z.B.:
    * LIFNR
      DATA: dref       TYPE REF TO data,
            dref_to    TYPE REF TO data,
            i_alv_cat  TYPE TABLE OF lvc_s_fcat,
            ls_alv_cat LIKE LINE OF i_alv_cat,
            i_alv_cat_to  TYPE TABLE OF lvc_s_fcat,
            ls_alv_cat_to LIKE LINE OF i_alv_cat.
      DATA: BEGIN OF itab OCCURS 0.
    *        INCLUDE STRUCTURE dntab.
              INCLUDE structure DFIES.
      DATA: END OF itab.
      DATA: BEGIN OF itab_to OCCURS 0.
    *        INCLUDE STRUCTURE dntab.
              INCLUDE structure DFIES.
      DATA: END OF itab_to.
      FIELD-SYMBOLS: <table_from>   TYPE ANY TABLE.
      FIELD-SYMBOLS: <table_to>     TYPE Standard TABLE.
      FIELD-SYMBOLS: <wa_from>      TYPE ANY.
      FIELD-SYMBOLS: <wa_to>        TYPE ANY.
      FIELD-SYMBOLS: <l_komp>       TYPE ANY.
      FIELD-SYMBOLS: <l_sysid>      TYPE ANY.
      Data: l_alt type ELIFN.
      Data: l_neu type ELIFN.
      CALL FUNCTION 'DDIF_NAMETAB_GET'
           EXPORTING
                TABNAME   = i_tabname_from
           TABLES
                DFIES_TAB = itab
           EXCEPTIONS
                NOT_FOUND = 1
                OTHERS    = 2.
      IF SY-SUBRC = 1.
        raise not_found.
      elseif sy-subrc = 2.
        raise others.
      ENDIF.
      LOOP AT itab .
        ls_alv_cat-fieldname = itab-fieldname.
        ls_alv_cat-ref_table = i_tabname_from.
        ls_alv_cat-ref_field = itab-fieldname.
        APPEND ls_alv_cat TO i_alv_cat.
      ENDLOOP.
    * build internal table
      CALL METHOD cl_alv_table_create=>create_dynamic_table
          EXPORTING
            it_fieldcatalog = i_alv_cat
          IMPORTING
            ep_table = dref.
      ASSIGN dref->* TO <table_from>.
      CALL FUNCTION 'DDIF_NAMETAB_GET'
           EXPORTING
                TABNAME   = i_tabname_to
           TABLES
                DFIES_TAB = itab_to
           EXCEPTIONS
                NOT_FOUND = 1
                OTHERS    = 2.
      IF SY-SUBRC = 1.
        raise not_found.
      elseif sy-subrc = 2.
        raise others.
      ENDIF.
      LOOP AT itab_to.
        ls_alv_cat_to-fieldname = itab_to-fieldname.
        ls_alv_cat_to-ref_table = i_tabname_to.
        ls_alv_cat_to-ref_field = itab_to-fieldname.
        APPEND ls_alv_cat_to TO i_alv_cat_to.
      ENDLOOP.
    *  break-point.
    * build internal table
      CALL METHOD cl_alv_table_create=>create_dynamic_table
          EXPORTING
            it_fieldcatalog = i_alv_cat_to
          IMPORTING
            ep_table = dref_to.
      ASSIGN dref_to->* TO <table_to>.
    *Select Ursprungstabelle mit Selektionsbedingungen
      SELECT * FROM (i_tabname_from) up to 5 rows
        INTO CORRESPONDING FIELDS OF TABLE <table_from>
        where (i_selcon).
    *  break-point.
    *Aufbau interne Tabelle mit eventuell geänderten Feldern
      assign <table_to> to <wa_to>.
      if not I_KOMP_TRANS is initial.
        loop at <table_from> assigning <wa_from>.
          assign component I_KOMP_TRANS-KOMP
            of structure <wa_from> to <l_komp>.
          CALL FUNCTION I_KOMP_TRANS-FUBA
               EXPORTING
                    I_KOMP = I_KOMP_TRANS-KOMP
                    I_ALT  = <l_komp>
               IMPORTING
                    E_NEU  = <l_komp>.
          break-point.
          assign component 'SYSID' of structure <wa_to> to <l_sysid>.
          <l_sysid> = sy-sysid.
    *      move-corresponding <wa_from> to <wa_to>.
          append <wa_to> to <table_to>.
        endloop.
    *    break-point.
    *Speichern der ausgelesenen Daten in Zieltabelle
        MODIFY (i_tabname_to) FROM TABLE <table_to>.
        if sy-subrc <> 0.
          MESSAGE E001(ZMESSAGES) WITH i_tabname_to.
    *   Fehler beim Modify von Tabelle '&'.
        endif.
      else.
    *Speichern der ausgelesenen Daten in Zieltabelle
        MODIFY (i_tabname_to) FROM TABLE <table_from>.
        if sy-subrc <> 0.
          MESSAGE E001(ZMESSAGES) WITH i_tabname_to.
    *   Fehler beim Modify von Tabelle '&'.
        endif.
      endif.
      commit work.
      if sy-subrc <> 0.
        MESSAGE E002(ZMESSAGES) WITH i_tabname_to.
    *   Fehler beim Commit von Tabelle '&'.
      endif.
    *  break-point.
    ENDFUNCTION.
    Thanks a lot for any hints.
    Regards
    Tom

    Hi,
    Answers below.
    1) For this...you assigning an internal table to a work area...
    assign <table_to> to <wa_to>.
    This should solve the problem..
    * Create the target work area..
    DATA: new_line  TYPE REF TO data.
    CREATE DATA new_line LIKE LINE OF <table_to>.
    ASSIGN new_line->* TO <wa_to>.
    Now the target work area is created..
    2) For the second one...
    ************New code
       FIELD-SYMBOLS: <FS>,<FS1>.
    ************New code End.
       loop at <table_from> assigning <wa_from>.
          assign component I_KOMP_TRANS-KOMP
            of structure <wa_from> to <l_komp>.
          CALL FUNCTION I_KOMP_TRANS-FUBA
               EXPORTING
                    I_KOMP = I_KOMP_TRANS-KOMP
                    I_ALT  = <l_komp>
               IMPORTING
                    E_NEU  = <l_komp>.
          break-point.
          assign component 'SYSID' of structure <wa_to> to <l_sysid>.
          <l_sysid> = sy-sysid.
    ************New code
          LOOP AT itab .
             ASSIGN COMPONENT itab-fieldname of structure <WA_FROM> TO <FS>.
             CHECK SY-SUBRC = 0.
             ASSIGN COMPONENT itab-fieldname of structure <WA_TO> TO <FS1>.
             CHECK SY-SUBRC = 0.
    * Move from source to target.
             <FS1> = <FS>.
          ENDLOOP.
    ************New code End
          append <wa_to> to <table_to>.
        endloop.
    Thanks
    Naren

  • Run Time: type conflicts in field symbol

    In this statement i am getting run time error : assign component.
    type conflicts in field symbol
    FIELD-SYMBOLS:
        <fs_tab> TYPE ANY table,
         <wa_tab> TYPE ANY,
         <fs_field> type crmd_orderadm_h.
    DATA:      w_data    TYPE REF TO data.
    CREATE DATA w_data TYPE STANDARD TABLE OF (c_tabname) WITH NON-                     UNIQUE DEFAULT KEY.
        ASSIGN w_data->* TO <fs_tab>.
    SELECT * FROM (c_tabname)
              INTO CORRESPONDING FIELDS OF TABLE <fs_tab>
      LOOP AT <fs_tab> ASSIGNING <wa_tab>.
          DO.
            ASSIGN COMPONENT sy-index OF STRUCTURE <wa_tab> TO <fs_field>.
    *Writeing: fs_field here*
    Enddo.

    FIELD-SYMBOLS: <fs_field> type crmd_orderadm_h.
    <fs_field> type any.
    i cannot pass "
      lv_header_guid =    <fs_field>-guid.
    complete code as follows.
      LOOP AT <fs_tab> ASSIGNING <wa_tab>.
          DO.
            ASSIGN COMPONENT sy-index OF STRUCTURE <wa_tab> TO <fs_field>.
    *i am assining fs_field-guid here. Thats why i am taking this field symbol as type "crmd_orderadm_h"*
    *bold* * <fs_field>-guid.*bold**
            lv_header_guid =    <fs_field>-guid.
            iv_header_guid = lv_header_guid.
            REFRESH: lt_header_guid.
            INSERT iv_header_guid INTO TABLE lt_header_guid.
            REFRESH: im_orderadm_h,im_text.
            CALL FUNCTION 'CRM_ORDER_READ'
              EXPORTING
                it_header_guid       = lt_header_guid
              IMPORTING
                et_orderadm_h        = im_orderadm_h
                et_text              = im_text
              EXCEPTIONS
                document_not_found   = 1
                error_occurred       = 2
                document_locked      = 3
                no_change_authority  = 4
                no_display_authority = 5
                no_change_allowed    = 6
                OTHERS               = 7.
            IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
          ENDDO.

  • Type Conflict In Field Symbol

    Hi All,
    We were doing a report to read all major infotypes and displaying the relevant data. It was working fine  until we included Personal data (Infotype 0002).
    We used a field symbol of type any and pnnnn type prelp. It was working fine. But when we included details from PA0002, it is throwing a runtime error stating type conflict between field symbol and pnnnn. (We used pnnnn[] = <f>.
    Note: We are using ECC 6.0 and the program is Unicode enabled
    Kind Regards
    Hari Sankar M

    Hi Prince,
    Yes. You need to change the declaration as follows.
    Field symbols:<wa_ext> TYPE ANY,
                          <f_zname> TYPE any.
    Data: lv_zname type sname.
    ASSIGN COMPONENT 86 OF STRUCTURE <wa_ext> TO <f_zname>.
    lv_zname = <f_zname>.
    Try the above mentioned code. I think this should work.
    Best Regards,
    Ram.

  • Query in Optimal Coding - Assigning INT TAB to FIELD SYMBOLS dynamically.

    TABLES: tkesk.
    DATA: itkesk type table of tkesk.
    DATA: BEGIN of itab_RP occurs 11,
    tabname type string,
    END of itab_RP.
    DATA : wa_rp like line of itab_Rp,
    wa_onemore like line of itkesk.
    FIELD-SYMBOLS: <fs> LIKE itkesk.
    ITAB_RP-tabname = 'ITKESK'.
    APPEND ITAB_RP.
    LOOP at ITAB_RP into wa_rp.
    <i><b>*How to assign the table itkesk to the field symbol
    *which is available in wa_rp dynamically instead of assigning it directly)</b></i>
    *ASSIGN wa_rp-tabname to <fs>.
    ASSIGN itkesk to <fs>.
       LOOP at <fs> into wa_onemore.
       WRITE : 'hi'.
       endloop.
    ENDLOOP.

    Is this even possible ?
    Thanks
    Mark

  • How to dynamically assign Display Pattern using FormCalc in Adobe PDF Form

    I am using Adobe PDF Form Designer. I am trying to dynamically assign a display pattern like MM/DD/YYYY to the Field tab - Display Pattern property. May I know how to do that?
    I am using FormCalc scripting.

    hi,
    After placing the date field in layout from data view, u will get tabs like field,layout,border etc..
    In field tab under the edit pattern specify the pattern in which you want to display the date field.
    hope this works.
    Reward points if helpful.

  • How to dynamically assign BP to territory

    Hi all,
         I want to dynamically assign business partner to territory only, if the business partner is created by the user assigned to the territory.
      How can we do this, If there is any function module please send. or can we do any  customization .
    Thanks
    Hemalatha

    Hi Hemalatha,
    What Ashish told is correct
    The Main use of Territory is
    Who is responsible for a particular territory or business partner
    Which territory or employee is responsible for a business transaction (for example, sales order)
    Which business partners belong to a particular territory
    Which products can be offered in a particular territory
    According to Levels in Territory Hierarchy like Area, Region etc the BP will comes to particular Territory U does not required to assign the BP to Territory,
    The system automatically takes the Responsible Employee etc according to the Area Region etc as u ve given the level in Territory Hierarchy
    Reward points if it helpful to u
    cheers
    Ranga

  • How to dynamically assign jpeg file to a picture widget?

    Hi..
    I have a path of a image with me. I want to dynamically assign the image to the picture widget.
    Anyone know how to do this??
    thnaks,
    natarak

    Are you using Mail or a 3rd party email client? 

  • How to delete a particular record in field symbol

    Hi,
    i am declaring field symbol type any table i, i want delete a particular record in that filed symbol.
    How to do that.

    Hello Himam,
    It is not possible to delete directly from <itab> as it is of generic type.
    But you can do loop at <itab> ASSIGNING <wa> and then you can clear content of <wa> this will delete
    the line from internal table.
    Thanks,
    Augustin.

  • How to define an itab including a field-symbols

    *Please see below code, I define a field-symbols structure <wa>:
    FIELD-SYMBOLS: <wa>   TYPE ANY.
    data: wa type ref to data.
    create data wa type (p_table).
    assign wa-> to <wa>.
    My question is after <wa> get assigned, if I want to define a new internal table or structure which should include <wa>, like below:
    data: begin of itab occurs 0.
    include structure <wa>.
    data: status type c.
    data: end of itab.
    But it doesn't work. How can I do that?
    Thank you very much!

    Hi Yu,
    Just check with this example, u will get a good idea.
    PROGRAM ZMAIN.
      DATA: BEGIN OF STR,
              A VALUE 'a',
              B VALUE 'b',
              C VALUE 'c',
              D VALUE 'd',
            END   OF STR,
            CN(5) VALUE 'D'.
      FIELD-SYMBOLS <FS> TYPE ANY.
      DO 3 TIMES.
        ASSIGN COMPONENT SY-INDEX OF
               STRUCTURE STR TO <FS>.
        IF SY-SUBRC <> 0. EXIT. ENDIF.
        WRITE <FS>.
      ENDDO.
      ASSIGN COMPONENT CN OF STRUCTURE STR TO <FS>.
      WRITE <FS>.
    2.
    TYPES: BEGIN OF comp,
             f1 TYPE string,
             f2 TYPE i,
           END OF comp.
    DATA:  BEGIN OF stru,
             k1 TYPE comp,
             k2 TYPE comp,
             k3 TYPE comp,
             k4 TYPE comp,
           END OF stru.
    FIELD-SYMBOLS: TYPE comp.
    ASSIGN stru-k1 TO RANGE stru.
    DO 4 TIMES.
      ASSIGN INCREMENT 1 TO .
    ENDDO.
    PROGRAM P1MAIN.
      TABLES TRDIR.
      DATA NAME(30) VALUE 'TFDIR-PNAME'.
      FIELD-SYMBOLS <F> TYPE ANY.
      MOVE 'XYZ_PROG' TO TRDIR-NAME.
      PERFORM U IN PROGRAM P1SUB.
      ASSIGN (NAME) TO <F>.
      WRITE <F>.
      CALL FUNCTION 'EXAMPLE'.
    PROGRAM P1SUB.
      TABLES TFDIR.
      FORM U.
        FIELD-SYMBOLS <F> TYPE ANY.
        DATA NAME(30) VALUE 'TRDIR-NAME'.
        ASSIGN TABLE FIELD (NAME) TO <F>.
        WRITE <F>.
        MOVE 'FCT_PROG' TO TFDIR-PNAME.
      ENDFORM.
    FUNCTION-POOL FUN1.
      FUNCTION EXAMPLE.
        DATA NAME(30) VALUE 'TRDIR-NAME'.
        FIELD-SYMBOLS <F> TYPE ANY.
        ASSIGN (NAME) TO <F>.
        IF SY-SUBRC = 0.
          WRITE <F>.
        ELSE.
          WRITE / 'TRDIR-NAME cannot be reached'.
        ENDIF.
      ENDFUNCTION.
    PROGRAM P1MAIN.
      TABLES TRDIR.
      MOVE 'XYZ_PROG' TO TRDIR-NAME.
      CALL FUNCTION 'EXAMPLE'.
    FUNCTION-POOL FUN1.
      FUNCTION EXAMPLE.
        DATA NAME(30) VALUE 'TRDIR-NAME'.
        FIELD-SYMBOLS <FS> TYPE ANY.
        ASSIGN LOCAL COPY OF MAIN
          TABLE FIELD (NAME) TO <FS>.
        IF SY-SUBRC = 0.
          WRITE <FS>.
        ELSE.
          WRITE / 'Cannot find TRDIR-NAME'.
        ENDIF.
      ENDFUNCTION.
    Regards,
    Kumar

  • ASSIGN Component ... (field symbol stuff)

    Hi,
    I want to validate certain fields (KNA1, BUKRS, KOART, FNAME) which are
    entered by the user in the transaction XK01.  They are being captured in a structure, lets say X_LFA1.
    To validate this fields I am being asked to use field symbols using component assign.
    Can someone tell me how do I do this ?

    Tushar,
    Its still not clear to me what exactly you are trying to do.
    Is it like you just want to see if those fields exist in the table or not? If yes, you can do like this.
    parameter : p_field -- field entered by the user
    data : wa_ztable like ztable.
    field-symbols : <fs_any> type any.
    Assign component p_field of structure wa_ztable to <fs_any>.
    if sy-subrc = 0.
    Success.
    endif.
    Regards,
    Ravi

  • How to build a internal table of field symbols.

    Hi,
    I want to build a internal table, which consists of several field symbols. Each field symbol points to an entry of  other internal tables. All of these tables have different structure definition. How can I implement it. If it is possible, it can save a lot of table query time.
    I will be very appreciate for your help.
    Best Regards, Jun

    hello jun
    i hope the following example give the some idea to build internal table fileds with differen field symbol data types.
    FIELD-SYMBOLS:<f1> type any,<f2> TYPE ANY.
    data:BEGIN OF itab,
         t1 type i value 10,
         t2(30) type c value 'john',
       t3 type p DECIMALS 3 value '4.7658',
       END OF itab.
      ASSIGN itab to <f1>.
      DO 3 TIMES.
      ASSIGN COMPONENT sy-index OF STRUCTURE <f1> TO <f2>.
      WRITE <f2>.
      ENDDO.
    types:begin of it_line,
          i1 type i,
          t1 type string,
          p1 type p DECIMALS 3,
      end of it_line.
      data:itab1 type table of  it_line.
    FIELD-SYMBOLS:<f1>.
      ASSIGN itab1 to <f1>.
    and also u can refer the following links
    1->  http://help.sap.com/saphelp_wp/helpdata/en/fc/eb387a358411d1829f0000e829fbfe/content.htm
    2--> http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3923358411d1829f0000e829fbfe/content.htm
    Thanks&Regards
    sreenivas p

  • Error in assigning *VBAP to a field-symbol...

    Hello Experts,
    I am currently writing my code in a given user-exit in VA01. My problem is,
    I want to assign the value '*VBAP' to a given field-symbol which has a type of
    ANY. The problem is, it says that the value must be a C,N. etc.
    Hope you can help me guys. Thank you and take care!

    can you please paste the piece of code here ...

Maybe you are looking for

  • How can I include a captivate variable in the URL of the website widget?

    I am using the website widget to bring up some customized content during the course. The URL contains a variable which will be different for every user. I can't find the option of including a variable in the URL with the widget. Has any figured out h

  • How do I get my Close, Minimise and Maximise Buttons to Show

    When I first installed Photoshop CS6 Extended on my Mac it had a bar running along the top that had the program name in it (Photoshop) with the red, orange and green, close, minimise and maximise buttons in it. Somehow I have turned this off and the

  • Screen is pink and purple at startup

    When I turn on my 2011 MacBook Pro, the screen is pink and purple at startup. What is happening? Is my screen going out?

  • Creating objects from .xsd

    It is easy to construct objects in a oracle database that produce xml files with nested tables etc. What i'm looking for is a utility that creates the pl/sql code for the construction of those objects from a .xsd file ! Anyone?

  • WL 10.3 - Quartz's jobs stops after some time of correct executing

    Hi, I have a webapp (backend only) that is deployed on WebLogic 10.3 AS. In this webapp 5 quartz's job are executed (cron trigger). Two of them run 3 times a day, the next two of them execute every 5 seconds and the last one starts every 20 seconds.