Screen value not assign in field symbol

Hi gurus,
         I create a field symbol for module pool programming for assigning screen value. I create a tab in main screen and three subscreen for tab.  in first screen values perfectly asign in field symbol but second subscreen FS1,FS2,FS3 values not assign.
Atthe time of save three subscreen values stored in internal table, then insert into ztable.
PERFORM SAVE_DATA USING '15' 'GTAB-IO_CODE' 'GTAB-IO_PER' 'GATB-IO_VAL'.
PERFORM SAVE_DATA USING '26' 'GTAB-IO_SCODE' 'GTAB-IO_SPER' 'GTAB-IO_SVAL'.
FORM SAVE_DATA USING X TYPE I
                     FS1 TYPE STRING
                     FS2 TYPE STRING
                     FS3 TYPE STRING.
*FORM SAVE_DATA USING X TYPE I FS1 TYPE STRING.
  CLEAR SNO.
  CLEAR C.
  ITAB-MANDT = SY-MANDT.
  ITAB-BUKRS = '1000'.
  ITAB-DOCNO = '0001000005'.
  ITAB-BUDAT = SY-DATUM.
  DO X TIMES.
  IF X EQ '15'.
    FS1 = 'GTAB-IO_CODE'.
    FS2 = 'GTAB-IO_PER'.
    FS3 = 'GTAB-IO_VAL'.
  ELSEIF X EQ '26'.
    FS1 = 'GTAB-IO_SCODE'.
    FS2 = 'GTAB-IO_SPER'.
    FS3 = 'GTAB-IO_SVAL'.
  ENDIF.
    C = C + 1.
    SNO = SNO + 10.
    ITAB-SLNO = SNO.
    ZCOMRP_ORTRN-SLNO = SNO.
    CONCATENATE FS1 C INTO FS1.
    ASSIGN  (FS1) TO <FS>.
    ZCOMRP_ORTRN-PRCOD = <FS>.
    ITAB-PRCOD = <FS>.
    CONCATENATE FS2 C INTO FS2.
    ASSIGN  (FS2) TO <FS>.
    ZCOMRP_ORTRN-KBETR = <FS>.
    ITAB-KBETR = <FS>.
    CONCATENATE FS3 C INTO FS3.
    ASSIGN  (FS3) TO <FS>.
    ZCOMRP_ORTRN-DMBTR = <FS>.
    ITAB-DMBTR = <FS>.
   INSERT ZCOMRP_ORTRN.
    APPEND ITAB.
    INSERT  ZCOMRP_ORTRN FROM ITAB.
    CLEAR FS1.
    CLEAR FS2.
    CLEAR FS3.
   CLEAR C.
  ENDDO.
  PERFORM CLEAR.
ENDFORM.                    " SAVE_DATA

solved

Similar Messages

  • Selection screen value not assigning to the value when executed for the first time

    Hi ,
    Im My program at selection screen there are company code, vendor account and open items at key date(takes system date as default value).
    Facing problem at open items at key date - Open key date parameter is taken from LDB - KDF.
    First time when I am executing the program it is taking system date value in the selection screen variable even though I have given the different date.
    This problem is only when I execute for first time or press enter without giving company code.
    Can any one please help us to come out of this problem.
    Regards
    Sri Bhargavi

    HI,
         you can use the Event as AT SELECTION-SCREEN

  • Dynamic assign in field symbols

    dynamic assign in field symbols

    Hi,
    DYNAMIC ASSIGN:
    If you do not know the name of the field that you want to assign to the field symbol when you write a program, you can use a dynamic ASSIGN statement:
    ASSIGN (<f>) TO <FS>.
    This statement assigns the field whose name is contained in the field <f> to the field symbol <FS>. You cannot use offset and length in a dynamic ASSIGN.
    At runtime, the system searches for the corresponding data object in the following order:
    If the ASSIGN statement is in a procedure, the system searches first in its local data.
    If it cannot find the object in the local data (or if the ASSIGN statement is not in a procedure), it then looks in the local data of the program.
    If the field does not exist in the global data of the program, the system looks in the table work areas declared with the TABLES statement in the main program of the current program group. A program group consists of a main program and all of the programs that are loaded into the same internal session as a result of other program calls.
    If the search is successful and a field can be assigned to the field symbol, SY-SUBRC is set to 0. Otherwise, it is set to 4, and the field symbol remains unchanged. For security reasons, you should always check the value of SY-SUBRC after a dynamic ASSIGN to prevent the field symbol pointing to the wrong area.
    Searching for the field in this way slows down the program. You should therefore only use the dynamic ASSIGN statement when absolutely necessary. If you know when you create the program that you want to assign a table work area to the field symbol, you can also use the following variant of the dynamic ASSIGN statement:
    ASSIGN TABLE FIELD (<f>) TO <FS>.
    The system then only searches within the table work areas in the main program of the current program group for the data object that is to be assigned to the field symbol. This addition is forbidden in ABAP Objects, since the latter does not support table work areas.
    Suppose we have three programs. The main program:
    REPORT demo_field_symbols_dynami_as_1.
    TABLES sbook.
    sbook-fldate = sy-datum.
    PERFORM form1 IN PROGRAM demo_form1.
    The other two programs are:
    REPORT demo_form1.
    FORM form1.
      PERFORM form2 IN PROGRAM demo_form2.
    ENDFORM.
    and
    REPORT demo_form2.
    FORM form2.
      DATA name(20) TYPE c VALUE 'SBOOK-FLDATE'.
    FIELD-SYMBOLS <fs> TYPE ANY.
      ASSIGN (name) TO <fs>.
      IF sy-subrc EQ 0.
        WRITE / <fs>.
    ENDIF.
    ENDFORM.
    The output looks something like this:
    02.06.1998
    The program group in the internal session now consists of the programs DEMO, MYFORMS1 and MYFORMS2. The field symbol <FS> is defined in MYFORMS2. After the dynamic ASSIGN statement, it points to the component FLDATE of the table work area SBOOK declared in the main program DEMO.
    REPORT demo_field_symbols_dynami_as_2 .
    TABLES sbook.
    DATA: name1(20) TYPE c VALUE 'SBOOK-FLDATE',
          name2(20) TYPE c VALUE 'NAME1'.
    FIELD-SYMBOLS <fs> TYPE ANY.
    ASSIGN TABLE FIELD (name1) TO <fs>.
    WRITE: / 'SY-SUBRC:', sy-subrc.
    ASSIGN TABLE FIELD (name2) TO <fs>.
    WRITE: / 'SY-SUBRC:', sy-subrc.
    The output is:
    SY-SUBRC:      0
    SY-SUBRC:      4
    In the first ASSIGN statement, the system finds the component FLDATE of the table work area SBOOK and SY-SUBRC is set to 0. In the second ASSIGN statement, the system does not find the field NAME1 because it is declared by the DATA statement and not by the TABLES statement. In this case, SY-SUBRC is set to 4.
    Reference: http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb38d5358411d1829f0000e829fbfe/content.htm
    reward points if helpful.
    Regards,
    Ramya

  • How to pass selection screen value to LDB dynamic field.

    Hello everybody,
    In my program, I am using standard LDB(PSJ) for getting data. And there is a requirement that I have to display some dynamic fields on my selection screen like plant , person responsible ( which are mandatory also ) etc. and inside the program I have to fill those dynamic fields for which the user has entered the value in selection screen.
    Could you please tell me how to pass some of selection screen values to ldb dynamic fields before GET statement.
    Thanks !!!
    Regards,
    Mitra

    >
    Pavan Bhamidipati wrote:
    > Hi,
    >
    >
    I have to fill those dynamic fields for which the user has entered the value in selection screen.
    >
    >
    > This means that the user is going to enter the values in the selection screen for the dynamic field values so
    >
    > SET PARAMETERID 'XYZ' FIELD p_field.
    >
    > where p_field is a parameter on the selection screen
    >
    > Regards
    > Pavan
    You can capture the values selected through the dynamic selections using some of the functions modules below, just search the forum for the below FM's, perhaps you can find some sample code
    FREE_SELECTIONS_EX_2_RANGE
    FREE_SELECTIONS_EX_2_WHERE
    FREE_SELECTIONS_RANGE_2_EX
    FREE_SELECTIONS_RANGE_2_WHERE
    FREE_SELECTIONS_WHERE_2_EX
    FREE_SELECTIONS_WHERE_2_RANGE

  • Attribute value 'Not Assigned'

    Hi..
    i  have created navigational attributes for a characterstic(z_custid)  in a cube.At cube level i am able to see the values for those attributes.. but when i am trying to generate a report on this at attribute columns values are not displayed.whole column i am getting values 'not assigned'.Can anyone help me on this..
    Mahi

    Hii..
    thnks for ur reply..please find the answers for the questions u posted.
    I am able to check the data of navigational attr in infocube..
    Navigational attr's are checked in the infocube..
    Master data is active..
    while reporting only i am not able to see my data for navigational attr's..
    Mahi..

  • 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

  • How to get values from dynamically populated field symbol

    Hi all,
    I am having a field symbol <fs_table> type standard table, which is getting populated dynamically.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = i_fieldcat[]
        IMPORTING
          ep_table        = is_eptab.
      ASSIGN is_eptab->* TO <fs_table> .
    After the ALV display i am making some changes in the ALV and getting a new internal table <fst_table>,which is having changed values.
    Now the problem is that i am not able to get the changed values from <fst_table>  as it is not of any structure type and cant associate it with any field like we do in normal internal table and work areas like, wa-fieldname.
    All the fields are dynamic.
    Regards,
    Anant

    Hello Anant
    You have to access to access the fields of your dynamic outtab dynamically as well.
    DATA: ls_fcat   TYPE lvc_s_fcat.
    FIELD-SYMBOLS:
      <ls_struc>   TYPE any,
      <ld_fld>       TYPE any.
    LOOP AT <fs_table> ASSIGNING <ls_struc>.
      LOOP AT i_fieldcat INTO ls_fcat.
        ASSIGN COMPONENT ls_fcat-fieldname OF STRUCTURE <ls_struc> TO <ld_fld>.
        ...  " do processing
      ENDLOOP.
    ENDLOOP.
    Regards
      Uwe

  • Dump GETWA_NOT_ASSIGNED assigning a Field Symbol

    i have
    DATA: W_PROG3(30) VALUE '(SAPLV56U)I_XVTTK[]'.
    ASSIGN (W_PROG3) TO  is executed i got a dump.
    Only in this case i got a dump.
    I hope somebody could help me with this

    Hello,
    I have the same Problem with another Table.  To evaluate the Problem I wrote a little testprogram with the following code:
    *& Report  ZL_FROELICHM_TEST1                                          *
    report  ZL_FROELICHM_TEST1                      .
    data: VBSK_I like  VBSK.
    data: T_KOMDLGN  like KOMDLGN occurs 10 with header line,
          T_VBFS     type table of VBFS,
          T_VBLS     type table of VBLS.
    call function 'GN_DELIVERY_CREATE'
      exporting
        VBSK_I   = VBSK_I
      tables
        XKOMDLGN = T_KOMDLGN[]
        XVBFS    = T_VBFS
        XVBLS    = T_VBLS.
    perform ASSIGN.
    *&      Form  assign
          text
    -->  p1        text
    <--  p2        text
    form ASSIGN .
      data:           NAME_TAB1(30) type C value '(SAPLV50S)XKOMDLGN'.
                     KOMDLGN type table of KOMDLGN with header line.
      field-symbols:  .
      if SY-SUBRC = 0.
       KOMDLGN = <KOMDLGN>.
      endif.
    assign: (NAME_TAB1) to <KOMDLGN>.
    if SY-SUBRC = 0.
       KOMDLGN[] = <KOMDLGN>.
    endif.
    check not KOMDLGN[] is initial.
    endform.                    " assign
    If you call Funktion 'GN_DELIVERY_CREATE' then the ASSIGN dumps.  If you don't call it, then the ASSIGN gives you a returncode 4.  The funktion works within the GN_DELIVERY_CREATE, however, the relevant coding is in the Program SAPMV50A in the performroutine USEREXIT_REFRESH_DOCUMENT.  I get the dump when the exit is called by WS_DELIVERY_UPDATE, or RV_DELIVERY_CREATE.  These functions don't know the Table XKOMDLGN.
    So, if you find a solution to your problem, please let me know.  I think I have the same problem.
    Greetings,
    Maria Frölich.

  • Screen value not being captured in Report

    Hi,
          I have a designed a report program with multiple tabs. When i enter data into the selection fields, its not storing the values during the start of selection event. When i save the values as variant and then use it, the program works perfectly.
    Can some one tel me what peice of code can be added to read the screen values during start of selection?
    Regards,
    Niyaz

    Hi Masood,
    Thanks for your reply.
    Any ways thats solved by reading the value from the form_fields table in the
    DO_HANDLE_DATA event of the view.
    Masood,
    I have a different question as
    I have a requirement wherein I have to
    get a field similar to NOTES field we see in the Web UI , I tried using the textbox but i dont think  we can process data inside the textbox.Is there any other way by which I can achieve this requirement.
    Any suggestions will be highly apprecited.
    Regards,
    Sijo

  • ASSIGN TO FIELD SYMBOL

    Hi,
    in user exit EXIT_SAPLVEDA_001.
    data: wa_xvbap like line of xvbap.
          FIELD-SYMBOLS: <fs_xvbap> like wa_xvbap.
          ASSIGN '(SAPLVEDA)XVBAP' TO <fs_xvbap>.
    getting error of type incompatible..
    any ideas?
    Thanks
    Giri

    Hi,
    you are trying to assign a string '(SAPLVEDA)XVBAP' to a field symbol with type XVBAP. You are just missing brackets.
    ASSIGN ('(SAPLVEDA)XVBAP') TO <fs_xvbap>.
    Cheers

  • If I use Nav. Attribute X---Y in report, some of the values not assigned.

    Hi All,
    We r using  a navagational attribute like X-Y  in our report. X is Char. Y is Attribute. If I use Nav. Attribute X-Y in report, some of the values r not assigned. If i use display attibute Y under charectiristic X , I am getting correct values. why?
    Thanks in Advance

    Take the master data table name...go to se14...give the table name..click Edit...choose option Activate and adjust database..
    Run attribute change run
    Check and revert.
    Regards
    Gajendra

  • Checking whether field-symbol from another program is assigned?

    Hi all
    I'm attempting to access a FS from another program.
    As the FS can be assigned, or unassigned within that program, how do I checked for that in my calling program?
    e.g. calling program;
    FIELD-SYMBOLS: <fs> TYPE STANDARD TABLE.
    DATA: lv_var(40) type c.
    lv_var = '(ZTGT_PROG)<read_fs>'.
    ASSIGN (lv_var) TO <fs>.   " statement might dump...

    Hi
    Go through this doc and use accordingly
    Field Symbols
    Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
    Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to each field symbol before you can address the latter in programs.
    Field symbols are similar to dereferenced pointers in C (that is, pointers to which the content operator * is applied). However, the only real equivalent of pointers in ABAP, that is, variables that contain a memory address (reference) and that can be used without the contents operator, are reference variables in ABAP Objects.
    All operations programmed with field symbols are applied to the field assigned to it. For example, a MOVE statement between two field symbols moves the contents of the field assigned to the first field symbol to the field assigned to the second field symbol. The field symbols themselves point to the same fields after the MOVE statement as they did before.
    You can create field symbols either without or with type specifications. If you do not specify a type, the field symbol inherits all of the technical attributes of the field assigned to it. If you do specify a type, the system checks the compatibility of the field symbol and the field you are assigning to it during the ASSIGN statement.
    Field symbols provide greater flexibility when you address data objects:
    If you want to process sections of fields, you can specify the offset and length of the field dynamically.
    You can assign one field symbol to another, which allows you to address parts of fields.
    Assignments to field symbols may extend beyond field boundaries. This allows you to address regular sequences of fields in memory efficiently.
    You can also force a field symbol to take different technical attributes from those of the field assigned to it.
    The flexibility of field symbols provides elegant solutions to certain problems. On the other hand, it does mean that errors can easily occur. Since fields are not assigned to field symbols until runtime, the effectiveness of syntax and security checks is very limited for operations involving field symbols. This can lead to runtime errors or incorrect data assignments.
    While runtime errors indicate an obvious problem, incorrect data assignments are dangerous because they can be very difficult to detect. For this reason, you should only use field symbols if you cannot achieve the same result using other ABAP statements.
    For example, you may want to process part of a string where the offset and length depend on the contents of the field. You could use field symbols in this case. However, since the MOVE statement also supports variable offset and length specifications, you should use it instead. The MOVE statement (with your own auxiliary variables if required) is much safer than using field symbols, since it cannot address memory beyond the boundary of a field. However, field symbols may improve performance in some cases.
    check the below links u will get the answers for your questions
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/content.htm
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/field_sy.htm
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci920484,00.html
    Syntax Diagram
    FIELD-SYMBOLS
    Basic form
    FIELD-SYMBOLS <fs>.
    Extras:
    1. ... TYPE type
    2. ... TYPE REF TO cif
    3. ... TYPE REF TO DATA
    4. ... TYPE LINE OF type
    5. ... LIKE s
    6. ... LIKE LINE OF s
    7. ... TYPE tabkind
    8. ... STRUCTURE s DEFAULT wa
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Untyped Field Symbols ad Cannot Use Field Symbols as Components of Classes.
    Effect
    This statement declares a symbolic field called <fs>. At runtime, you can assign a concrete field to the field symbol using ASSIGN. All operations performed with the field symbol then directly affect the field assigned to it.
    You can only use one of the additions.
    Example
    Output aircraft type from the table SFLIGHT using a field symbol:
    FIELD-SYMBOLS <PT> TYPE ANY.
    DATA SFLIGHT_WA TYPE SFLIGHT.
    ASSIGN SFLIGHT_WA-PLANETYPE TO <PT>.
    WRITE <PT>.
    Addition 1
    ... TYPE type
    Addition 2
    ... TYPE REF TO cif
    Addition 3
    ... TYPE REF TO DATA
    Addition 4
    ... TYPE LINE OF type
    Addition 5
    ... LIKE s
    Addition 6
    ... LIKE LINE OF s
    Addition 7
    ... TYPE tabkind
    Effect
    You can define the type of the field symbol using additions 2 to 7 (just as you can for FORM parameters (compare Defining the Type of Subroutine Parameters). When you use the ASSIGN statement, the system carries out the same type checks as for USING parameters of FORMs.
    This addition is not allowed in an ABAP Objects context. See Cannot Use Obsolete Casting for FIELD SYMBOLS.
    In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. See Defining Types Using STRUCTURE.
    Effect
    Assigns any (internal) field string or structure to the field symbol from the ABAP Dictionary (s). All fields of the structure can be addressed by name: <fs>-fieldname. The structured field symbol points initially to the work area wa specified after DEFAULT.
    The work area wa must be at least as long as the structure s. If s contains fields of the type I or F, wa should have the structure s or at least begin in that way, since otherwise alignment problems may occur.
    Example
    Address components of the flight bookings table SBOOK using a field symbol:
    DATA SBOOK_WA LIKE SBOOK.
    FIELD-SYMBOLS <SB> STRUCTURE SBOOK
    DEFAULT SBOOK_WA.
    WRITE: <SB>-BOOKID, <SB>-FLDATE.
    Related
    ASSIGN, DATA
    Additional help
    Declaring Field Symbols
    Reward points if useful
    Regards
    Anji

  • How to access dynamic fields in a field symbol

    hi
    how do i access the dynamic fields created in side a field-symbol....
    wht i mean is i have a table, whose workarea i assign to field symbol. but this table is runtime, altough i have debugged and found the values in this table, I want to accees the field symbol in a generic way.
    say the table has 3 fields now fld1 fld2 and fld3 so i want to access the field symbol <fs> as <fs>-(name) where name can be anything fld1 or fld2 whichever i assign....
    thanks. Let me know if you have any further questions.

    Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
    Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to a field symbol before you can address it in a program.
    Field symbols are similar to de-referenced pointers in the C programming language (that is, pointers to which the content operator * is applied). In ABAP, data references represent a real equivalent to pointers in the sense of variables that contain a memory address and can be used without the contents operator.
    All operations programmed with field symbols are applied to the field assigned to it. A MOVE statement between two field symbols, for example, assigns the contents of the field assigned to another source field symbol to the field assigned to the target field symbol. The field symbols themselves point to the same fields after the MOVE statement as they did before the MOVEstatement.
    You can create field symbols either without or with type specifications. If you do not specify a type, the field symbol inherits all of the technical attributes of the field assigned to it. If you do specify a type, the system checks during the field assignment whether the assigned field matches the type of field symbol.
    Field symbols provide greater flexibility when you address data objects:
    ·        You can assign one field symbol to another, which allows you to address subfields.
    ·        Assignments to field symbols may extend beyond field boundaries. This allows you to address regular sequences of fields in memory efficiently.
    ·        You can also force a field symbol to take different technical properties than those of the field assigned to it (casting).
    The flexibility of field symbols provides elegant solutions to certain problems. On the other hand, it does mean that errors can easily occur. Since fields are not assigned to field symbols until runtime, the effectiveness of syntax and security checks is very limited for operations involving field symbols. This can lead to runtime errors or incorrect data assignments.
    While runtime errors indicate an obvious problem, incorrect data assignments are dangerous because they can be very difficult to detect. For this reason, you should only use field symbols if you cannot achieve the same result using other ABAP statements.
    For example, you may want to process part of a string where the offset and length depend on the contents of the field. You could use field symbols in this case. The MOVE statement (with your own auxiliary variables, if required) is much safer than using field symbols, since it cannot address memory beyond the boundary of a field. However, field symbols may improve performance in some cases.
    To declare a field symbol, use the statement
    FIELD-SYMBOLS  .
    For field symbols, the angle brackets are part of the syntax. They identify field symbols in the program code.
    If you do not specify any additions, the field symbol.
    in a static ASSIGN and:
    ASSIGN (dobj) TO  from the second loop pass onwards.

  • Passing Field Symbols in subroutines

    Hi all,
    Can any body tell me how to pass field symbols in a suboutine and will that effect orignal value of that symbl if i change it in subroutine.
    Any Help will be awarded.
    <b>Sachin</b>

    Hi
    Field Symbols
    Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
    Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to each field symbol before you can address the latter in programs.
    Field symbols are similar to dereferenced pointers in C (that is, pointers to which the content operator * is applied). However, the only real equivalent of pointers in ABAP, that is, variables that contain a memory address (reference) and that can be used without the contents operator, are reference variables in ABAP Objects.
    All operations programmed with field symbols are applied to the field assigned to it. For example, a MOVE statement between two field symbols moves the contents of the field assigned to the first field symbol to the field assigned to the second field symbol. The field symbols themselves point to the same fields after the MOVE statement as they did before.
    You can create field symbols either without or with type specifications. If you do not specify a type, the field symbol inherits all of the technical attributes of the field assigned to it. If you do specify a type, the system checks the compatibility of the field symbol and the field you are assigning to it during the ASSIGN statement.
    Field symbols provide greater flexibility when you address data objects:
    If you want to process sections of fields, you can specify the offset and length of the field dynamically.
    You can assign one field symbol to another, which allows you to address parts of fields.
    Assignments to field symbols may extend beyond field boundaries. This allows you to address regular sequences of fields in memory efficiently.
    You can also force a field symbol to take different technical attributes from those of the field assigned to it.
    The flexibility of field symbols provides elegant solutions to certain problems. On the other hand, it does mean that errors can easily occur. Since fields are not assigned to field symbols until runtime, the effectiveness of syntax and security checks is very limited for operations involving field symbols. This can lead to runtime errors or incorrect data assignments.
    While runtime errors indicate an obvious problem, incorrect data assignments are dangerous because they can be very difficult to detect. For this reason, you should only use field symbols if you cannot achieve the same result using other ABAP statements.
    For example, you may want to process part of a string where the offset and length depend on the contents of the field. You could use field symbols in this case. However, since the MOVE statement also supports variable offset and length specifications, you should use it instead. The MOVE statement (with your own auxiliary variables if required) is much safer than using field symbols, since it cannot address memory beyond the boundary of a field. However, field symbols may improve performance in some cases.
    check the below links u will get the answers for your questions
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/content.htm
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/field_sy.htm
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci920484,00.html
    Syntax Diagram
    FIELD-SYMBOLS
    Basic form
    FIELD-SYMBOLS <fs>.
    Extras:
    1. ... TYPE type
    2. ... TYPE REF TO cif
    3. ... TYPE REF TO DATA
    4. ... TYPE LINE OF type
    5. ... LIKE s
    6. ... LIKE LINE OF s
    7. ... TYPE tabkind
    8. ... STRUCTURE s DEFAULT wa
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Untyped Field Symbols ad Cannot Use Field Symbols as Components of Classes.
    Effect
    This statement declares a symbolic field called <fs>. At runtime, you can assign a concrete field to the field symbol using ASSIGN. All operations performed with the field symbol then directly affect the field assigned to it.
    You can only use one of the additions.
    Example
    Output aircraft type from the table SFLIGHT using a field symbol:
    FIELD-SYMBOLS <PT> TYPE ANY.
    DATA SFLIGHT_WA TYPE SFLIGHT.
    ASSIGN SFLIGHT_WA-PLANETYPE TO <PT>.
    WRITE <PT>.
    Addition 1
    ... TYPE type
    Addition 2
    ... TYPE REF TO cif
    Addition 3
    ... TYPE REF TO DATA
    Addition 4
    ... TYPE LINE OF type
    Addition 5
    ... LIKE s
    Addition 6
    ... LIKE LINE OF s
    Addition 7
    ... TYPE tabkind
    Effect
    You can define the type of the field symbol using additions 2 to 7 (just as you can for FORM parameters (compare Defining the Type of Subroutine Parameters). When you use the ASSIGN statement, the system carries out the same type checks as for USING parameters of FORMs.
    This addition is not allowed in an ABAP Objects context. See Cannot Use Obsolete Casting for FIELD SYMBOLS.
    In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. See Defining Types Using STRUCTURE.
    Effect
    Assigns any (internal) field string or structure to the field symbol from the ABAP Dictionary (s). All fields of the structure can be addressed by name: <fs>-fieldname. The structured field symbol points initially to the work area wa specified after DEFAULT.
    The work area wa must be at least as long as the structure s. If s contains fields of the type I or F, wa should have the structure s or at least begin in that way, since otherwise alignment problems may occur.
    Example
    Address components of the flight bookings table SBOOK using a field symbol:
    DATA SBOOK_WA LIKE SBOOK.
    FIELD-SYMBOLS <SB> STRUCTURE SBOOK
    DEFAULT SBOOK_WA.
    WRITE: <SB>-BOOKID, <SB>-FLDATE.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Dynamic select with field symbols

    Hi guys,
    I have 2 tables.
    First table is the popup fields using fm popup_get_values:
    tab1-tabname
    tab1-fieldname
    tab1-value
    Second table is the input fields to be displayed in the popup box:
    tab2-transactno
    tab2-docno
    tab2-customer
    tab2-postdate
    etc... (it has many fields)
    Let's say currently i loop at tab2 and assign each value of the individual fields to a variable each:
    loop at tab2
    v_transactno = tab2-transactno
    v_docno = tab2-docno
    etc...
    endloop.
    My question is how do i assign each variable to the popup fields according to the fieldname so that it can get its corresponding value correctly?
    How can this be done dynamically?
    Can the loop above be done dynamically as well coz it has alot of fields to cater for?
    Please help me solve this problem. Futher similar examples would be much appreciated as well.
    Thank you very much!

    Hi
    see the concept of field sysmbols and do accordingly
    Field Symbols
    Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
    Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to each field symbol before you can address the latter in programs.
    Field symbols are similar to dereferenced pointers in C (that is, pointers to which the content operator * is applied). However, the only real equivalent of pointers in ABAP, that is, variables that contain a memory address (reference) and that can be used without the contents operator, are reference variables in ABAP Objects.
    All operations programmed with field symbols are applied to the field assigned to it. For example, a MOVE statement between two field symbols moves the contents of the field assigned to the first field symbol to the field assigned to the second field symbol. The field symbols themselves point to the same fields after the MOVE statement as they did before.
    You can create field symbols either without or with type specifications. If you do not specify a type, the field symbol inherits all of the technical attributes of the field assigned to it. If you do specify a type, the system checks the compatibility of the field symbol and the field you are assigning to it during the ASSIGN statement.
    Field symbols provide greater flexibility when you address data objects:
    If you want to process sections of fields, you can specify the offset and length of the field dynamically.
    You can assign one field symbol to another, which allows you to address parts of fields.
    Assignments to field symbols may extend beyond field boundaries. This allows you to address regular sequences of fields in memory efficiently.
    You can also force a field symbol to take different technical attributes from those of the field assigned to it.
    The flexibility of field symbols provides elegant solutions to certain problems. On the other hand, it does mean that errors can easily occur. Since fields are not assigned to field symbols until runtime, the effectiveness of syntax and security checks is very limited for operations involving field symbols. This can lead to runtime errors or incorrect data assignments.
    While runtime errors indicate an obvious problem, incorrect data assignments are dangerous because they can be very difficult to detect. For this reason, you should only use field symbols if you cannot achieve the same result using other ABAP statements.
    For example, you may want to process part of a string where the offset and length depend on the contents of the field. You could use field symbols in this case. However, since the MOVE statement also supports variable offset and length specifications, you should use it instead. The MOVE statement (with your own auxiliary variables if required) is much safer than using field symbols, since it cannot address memory beyond the boundary of a field. However, field symbols may improve performance in some cases.
    check the below links u will get the answers for your questions
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/content.htm
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/field_sy.htm
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci920484,00.html
    Syntax Diagram
    FIELD-SYMBOLS
    Basic form
    FIELD-SYMBOLS <fs>.
    Extras:
    1. ... TYPE type
    2. ... TYPE REF TO cif
    3. ... TYPE REF TO DATA
    4. ... TYPE LINE OF type
    5. ... LIKE s
    6. ... LIKE LINE OF s
    7. ... TYPE tabkind
    8. ... STRUCTURE s DEFAULT wa
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Untyped Field Symbols ad Cannot Use Field Symbols as Components of Classes.
    Effect
    This statement declares a symbolic field called <fs>. At runtime, you can assign a concrete field to the field symbol using ASSIGN. All operations performed with the field symbol then directly affect the field assigned to it.
    You can only use one of the additions.
    Example
    Output aircraft type from the table SFLIGHT using a field symbol:
    FIELD-SYMBOLS <PT> TYPE ANY.
    DATA SFLIGHT_WA TYPE SFLIGHT.
    ASSIGN SFLIGHT_WA-PLANETYPE TO <PT>.
    WRITE <PT>.
    Addition 1
    ... TYPE type
    Addition 2
    ... TYPE REF TO cif
    Addition 3
    ... TYPE REF TO DATA
    Addition 4
    ... TYPE LINE OF type
    Addition 5
    ... LIKE s
    Addition 6
    ... LIKE LINE OF s
    Addition 7
    ... TYPE tabkind
    Effect
    You can define the type of the field symbol using additions 2 to 7 (just as you can for FORM parameters (compare Defining the Type of Subroutine Parameters). When you use the ASSIGN statement, the system carries out the same type checks as for USING parameters of FORMs.
    This addition is not allowed in an ABAP Objects context. See Cannot Use Obsolete Casting for FIELD SYMBOLS.
    In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. See Defining Types Using STRUCTURE.
    Effect
    Assigns any (internal) field string or structure to the field symbol from the ABAP Dictionary (s). All fields of the structure can be addressed by name: <fs>-fieldname. The structured field symbol points initially to the work area wa specified after DEFAULT.
    The work area wa must be at least as long as the structure s. If s contains fields of the type I or F, wa should have the structure s or at least begin in that way, since otherwise alignment problems may occur.
    Example
    Address components of the flight bookings table SBOOK using a field symbol:
    DATA SBOOK_WA LIKE SBOOK.
    FIELD-SYMBOLS <SB> STRUCTURE SBOOK
    DEFAULT SBOOK_WA.
    WRITE: <SB>-BOOKID, <SB>-FLDATE.
    Regards
    Anji

Maybe you are looking for

  • Adobe updates fail:

    Here is the error log.  Windows 7 64-bit.  Have tried cleaner tool to no avail.  Have removed Adobe story beta. Encore CS6 update Update is not applicable. Error Code: U44M1P28 Adobe CSXS InfrastructureCS6 Update is not applicable. Error Code: U44M1P

  • Some finder problems

    1. when I hover my mouse over an audio file on my desktop, usually a little play button appears on it. It's not doing that anymore.(how do I fix this?) By the way, when I tried to double click on it, it opened it in the older quicktime 7 rather than

  • When reducing qty in quick sales order form, reason field is non enterable

    Hi, When I am reducing the quantity of a booked sales order, its giving me message that "You must specify reason for the change" but reason field in quick sales order form is not editable. The same functionality is working fine in standard sales orde

  • Trouble uploading photos to the Iphone from the upload folder in photos stream.

    Hello, I started to use photostream just a few days ago. I turned on in the Icoud contro panel in my pc, and I also turn it on in my Iphone 4. It works perfect when the pictures are taken with the device. I mean, i take pictures, and when Im on wifi,

  • Flash player invisible on some sites with Firefox 4

    I have my problem documented on Adobe's forums @ http://forums.adobe.com/message/3589972#3589972 but they have been unable to help me so far and suggested I post the problem here. At http://www.adobe.com/software/flash/about/ the animation doesn't ap