Field symbols and its practical usages

I read about the field symbol but cannot think about the practical examples of how, where and when should I use it? any one have suggestions and recommendations? thanks!

Please check th following standard programs which will help you understand the scenarios in which you can use field symbols
DEMO_FIELD_SYMBOLS_TYPE
DEMO_FIELD_SYMBOLS_STRUCTURE
DEMO_FIELD_SYMBOLS_STAT_ASSIGN
  DEMO_FIELD_SYMBOLS_STAT_AS_OFF
DEMO_FIELD_SYMBOLS_STAT_AS_OF2
DEMO_FIELD_SYMBOLS_DYNAMI_AS_1
DEMO_FIELD_SYMBOLS_DYNAMI_AS_2
DEMO_FIELD_SYMBOLS_DYNAMI_AS_3
DEMO_FIELD_SYMBOLS_ASSIGN_COMP
DEMO_FIELD_SYMBOLS_CASTING
DEMO_FIELD_SYMBOLS_CASTING_TYP
DEMO_FIELD_SYMBOLS_ASSIGN_TYPE
DEMO_FIELD_SYMBOLS_ASSIGN_DECI
DEMO_FIELD_SYMBOLS_ASSIGN_ERR
DEMO_FIELD_SYMBOLS_ASSIGN_ERR
DEMO_DATA_REFERENCE
All the best,
Murthy.

Similar Messages

  • 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

  • Field symbols and field groups

    Hi friends plz send me the answer for this query:
    What are field symbols and field groups.? what is the"component idx of structure" clause with field groups?

    Hi,
    A field group combines several existing fields together under one name
    like
    FIELD-GROUPS: fg.
    then you can use one insert statement to insert values in fields of field-group.
    INSERT f1 f2 ... INTO fg.
    Field symbols
    If u have experience with 'C', then understand this to be similar to a pointer.
    It is used to reference another variable dynamically. So this field symbol will simply point to some other variable. and this pointer can be changed at runtime.
    FIELD-SYMBOLS <FS>.
    DATA FIELD VALUE 'X'.
    ASSIGN FIELD TO <FS>.
    WRITE <FS>.
    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 Groups:
    A field group is a user-defined grouping of characteristics and basic key figures from the EC-EIS or EC-BP field catalog.
    Use
    The field catalog contains the fields that are used in the aspects. As the number of fields grows, the field catalog becomes very large and unclear. To simplify maintenance of the aspects, you can group fields in a field group. You can group the fields as you wish, for example, by subject area or responsibility area. A field may be included in several field groups.
    When maintaining the data structure of an aspect, you can select the field group that contains the relevant characteristics and basic key figures. This way you limit the number of fields offered.
    Field Groups / Extracts
    http://help.sap.com/saphelp_46c/helpdata/EN/9f/db9ede35c111d1829f0000e829fbfe/frameset.htm
    Field Symbols
    http://help.sap.com/saphelp_46c/helpdata/EN/fc/eb387a358411d1829f0000e829fbfe/frameset.htm
    Regards,
    Priyanka.

  • Field symbols and index

    What are field symbols and field groups.? Have you used "component idx of structure" clause with field groups?

    Hi
    this will help you
    reward if usefull
    <b><u>FIELD-SYMBOLS</u></b>
    <u>Syntax</u>
    FIELD-SYMBOLS <fs> { typing | STRUCTURE struc DEFAULT dobj }.
    Extras:
    1. ... typing
    2. ... STRUCTURE struc DEFAULT dobj
    The FIELD-SYMBOLS statement declares a field symbol <fs>. The name conventions apply to the name fs. The angle brackets of the field symbols indicate the difference to data objects and are obligatory. You can declare field symbols in any procedure and in the global declaration section of an ABAP program, but not in the declaration section of a class or an interface. You can use a field symbol in any operand position in which it is visible and which match the typing defined using typing.
    After its declaration, a field symbol is initial - that is, it does not reference a memory area. You have to assign a memory area to it (normally using the ASSIGN statement) before you can use it as an operand. Otherwise an exception will be triggered.
    <b><u>FIELD-GROUPS</u></b>
    <u>Syntax</u>
    FIELD-GROUPS { header | field_group }.
    Declaration of a field group for the extract dataset of the program. Each field group represents the name of a line structure of the extract dataset. You can create as many field groups as you wish in a program. You define the actual components of a field group with the statement INSERT.
    The denominator of a field group is either the predefined name header or any name field_group. If you declare a field group header, it automatically becomes the beginning part of all remaining field groups of the program and its components constitute the standard sort key of the extract dataset for the statement SORT.
    The statement FIELD-GROUPS is possible in the global declaration-part of an ABAP program, as well as in the subprograms and function modules. Field groups that are declared in procedures are visible only there.
    As you can only define global data objects as components of field groups with the statement INSERT, we recommend to declare field groups only in the global declaration part as well.

  • Difference between Field symbols and field group

    Hi experts,
    Can you please advice me what is the difference between field symbols and field groups.
    Thanks in advance,
    Logu.

    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 Groups:
    A field group is a user-defined grouping of characteristics and basic key figures from the EC-EIS or EC-BP field catalog.
    Use
    The field catalog contains the fields that are used in the aspects. As the number of fields grows, the field catalog becomes very large and unclear. To simplify maintenance of the aspects, you can group fields in a field group. You can group the fields as you wish, for example, by subject area or responsibility area. A field may be included in several field groups.
    When maintaining the data structure of an aspect, you can select the field group that contains the relevant characteristics and basic key figures. This way you limit the number of fields offered.
    A field group combines several existing fields together under one name
    like
    FIELD-GROUPS: fg.
    then you can use one insert statement to insert values in fields of field-group.
    INSERT f1 f2 ... INTO fg.
    Field symbols
    If u have experience with 'C', then understand this to be similar to a pointer.
    It is used to reference another variable dynamically. So this field symbol will simply point to some other variable. and this pointer can be changed at runtime.
    FIELD-SYMBOLS <FS>.
    DATA FIELD VALUE 'X'.
    ASSIGN FIELD TO <FS>.
    WRITE <FS>.
    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 Groups:
    A field group is a user-defined grouping of characteristics and basic key figures from the EC-EIS or EC-BP field catalog.
    Use
    The field catalog contains the fields that are used in the aspects. As the number of fields grows, the field catalog becomes very large and unclear. To simplify maintenance of the aspects, you can group fields in a field group. You can group the fields as you wish, for example, by subject area or responsibility area. A field may be included in several field groups.
    When maintaining the data structure of an aspect, you can select the field group that contains the relevant characteristics and basic key figures. This way you limit the number of fields offered.
    example :
    DATA: BEGIN OF SPTAB OCCURS 0,
    line(1000), " or type string
    END OF SPTAB.
    DATA: IDX LIKE SY-INDEX.
    field-symbols <FS1>.
    split tb_sip AT ';' INTO table sptab.
    LOOP AT SPTAB.
    IDX = IDX + 1.
    ASSIGN COMPONENT IDX OF STRUCTURE tb_detsip TO <FS1>.
    If sy-subrc = 0.
    <FS1> = SPTAB-line.
    Endif.
    Endloop.
    append tb_detsip.
    clear idx.
    Field Groups / Extracts
    http://help.sap.com/saphelp_46c/helpdata/EN/9f/db9ede35c111d1829f0000e829fbfe/frameset.htm
    Field Symbols
    http://help.sap.com/saphelp_46c/helpdata/EN/fc/eb387a358411d1829f0000e829fbfe/frameset.htm
    Reward points if useful.

  • Difference between Field symbols and Field groups

    <b>Hi Friends,
    can you tell me the differences between Field symbols and Field groups? with any examples preferably?
    Regards
    Dinesh</b>

    Hi Dinesh,
    A field group combines several existing fields together under one name
    like
    FIELD-GROUPS: fg.
    then you can use one insert statement to insert values in fields of field-group.
    INSERT f1 f2 ... INTO fg.
    <b>Field symbols</b>
    If u have experience with 'C', then understand this to be similar to a pointer.
    It is used to reference another variable dynamically. So this field symbol will simply point to some other variable. and this pointer can be changed at runtime.
    FIELD-SYMBOLS <FS>.
    DATA FIELD VALUE 'X'.
    ASSIGN FIELD TO <FS>.
    WRITE <FS>.
    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 Groups:
    A field group is a user-defined grouping of characteristics and basic key figures from the EC-EIS or EC-BP field catalog.
    Use
    The field catalog contains the fields that are used in the aspects. As the number of fields grows, the field catalog becomes very large and unclear. To simplify maintenance of the aspects, you can group fields in a field group. You can group the fields as you wish, for example, by subject area or responsibility area. A field may be included in several field groups.
    When maintaining the data structure of an aspect, you can select the field group that contains the relevant characteristics and basic key figures. This way you limit the number of fields offered.
    Field Groups / Extracts
    http://help.sap.com/saphelp_46c/helpdata/EN/9f/db9ede35c111d1829f0000e829fbfe/frameset.htm
    Field Symbols
    http://help.sap.com/saphelp_46c/helpdata/EN/fc/eb387a358411d1829f0000e829fbfe/frameset.htm
    Reward points if helpful.
    Regards,
    Hemant

  • What are field symbols and field groups.?

    hi,
    What are field symbols and field groups.? what is the usage of  "component idx of structure" clause with field groups?
    regards

    sorry, question resolved.

  • What are field symbols and field groups.? Have you used "component idx of s

    What are field symbols and field groups.? Have you used "component idx of structure"

    Field Symbols and field groups
    Field Groups / Extracts
    http://help.sap.com/saphelp_46c/helpdata/EN/9f/db9ede35c111d1829f0000e829fbfe/frameset.htm
    Field Symbols
    http://help.sap.com/saphelp_46c/helpdata/EN/fc/eb387a358411d1829f0000e829fbfe/frameset.htm
    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 Groups:
    A field group is a user-defined grouping of characteristics and basic key figures from the EC-EIS or EC-BP field catalog.
    Use
    The field catalog contains the fields that are used in the aspects. As the number of fields grows, the field catalog becomes very large and unclear. To simplify maintenance of the aspects, you can group fields in a field group. You can group the fields as you wish, for example, by subject area or responsibility area. A field may be included in several field groups.
    When maintaining the data structure of an aspect, you can select the field group that contains the relevant characteristics and basic key figures. This way you limit the number of fields offered.
    A field group combines several existing fields together under one name
    like
    FIELD-GROUPS: fg.
    then you can use one insert statement to insert values in fields of field-group.
    INSERT f1 f2 ... INTO fg.
    Field symbols
    If u have experience with 'C', then understand this to be similar to a pointer.
    It is used to reference another variable dynamically. So this field symbol will simply point to some other variable. and this pointer can be changed at runtime.
    FIELD-SYMBOLS <FS>.
    DATA FIELD VALUE 'X'.
    ASSIGN FIELD TO <FS>.
    WRITE <FS>.
    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 Groups:
    A field group is a user-defined grouping of characteristics and basic key figures from the EC-EIS or EC-BP field catalog.
    Use
    The field catalog contains the fields that are used in the aspects. As the number of fields grows, the field catalog becomes very large and unclear. To simplify maintenance of the aspects, you can group fields in a field group. You can group the fields as you wish, for example, by subject area or responsibility area. A field may be included in several field groups.
    When maintaining the data structure of an aspect, you can select the field group that contains the relevant characteristics and basic key figures. This way you limit the number of fields offered.
    Field Groups / Extracts
    http://help.sap.com/saphelp_46c/helpdata/EN/9f/db9ede35c111d1829f0000e829fbfe/frameset.htm
    Field Symbols
    http://help.sap.com/saphelp_46c/helpdata/EN/fc/eb387a358411d1829f0000e829fbfe/frameset.htm

  • Re: field symbols and interna table

    hi,
    here is field symbol which is table type
    FIELD-SYMBOLS: <gt_pos_data> TYPE table.
    there is one internal table it_data.
    how can  move <gt_pos_data> to it_data.
    please help me.
    rgds

    Hi
    You can assign field wise:
    like
    <gt_pos_data>- field to  to it_data-field.
    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

  • I tried to restore my iphone but when it was restoring it said a problem occurred and now it just shows the itunes symbole and its telling me to connect to it but when i try to it  doesnt show up on my computer

    i tried to restore my iphone but when it was restoring it said a problem occurred and now it just shows the itunes symbole and its telling me to connect to it but when i try to it  doesnt show up on my computer

    Hi there starbaeza,
    You may find the information in the article below helpful.
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    -Griff W. 

  • Difference between Field symbols and work area for Internal tables

    Hi,
    In ECC versions we all know that we need to declare the internal tables without headerline, and for handling the internal tables we need to use exclusive work areas.
    Currently i have an issue that we have been asked to use field symbols instead of work areas...can any one help me how to use the field symbols and also let me know how it will improve the performance of the program..
    Thanks and Regards,
    Kathir

    Hi
    DATA: WA TYPE ITAB.
    LOOP AT ITAB INTO WA.
    IF WA-FIELD = .....
    ENDIF.
    ENDLOOP.[(code]
    FIELD-SYMBOLS <WA> TYPE ANY.
    LOOP AT ITAB ASSIGNING <WA>.
    ENDLOOP.
    Now the problem is you can't know the name of the fields of the table at runtime, so you can't write:
    IF <WA>-FIELD = .....
    ENDIF.
    Anyway you can create a field-symbols strcturated like the table:
    [code]FIELD-SYMBOLS <WA> TYPE ITAB.
    LOOP AT ITAB ASSIGNING <WA>.
      IF <WA>-FIELD = .....
      ENDIF.
    ENDLOOP.
    I don't know which are the differences for the performance between to use a field-symbol and to use a structure as work-area.
    The differnce between the field-symbols and work-area is the field-symbol is assigned directly to the record, so u don't need to do a MODIFY statament to change something:
    LOOP AT ITAB INTO WA.
      WA-FIELD =
      MODIFY ITAB FROM WA.
    ENDLOOP.
    LOOP AT ITAB ASSIGNING <WA>.
      <WA>-FIELD =
    ENDLOOP.
    These two pieces of abap code do the same action, so probably the field-symbol improve the performance because it do an access directly to the record without to use an external structure as workarea.
    Max

  • ABAP field symbols and PERL reference variables to unnamed arrays.

    Rob -
    Please do NOT delete this post even though it contains this link:
    ABAP field symbols and PERL reference variables to unnamed arrays.
    to a question I posted in the Scripting Languages forum.
    It's a question that should be of interest to ABAP programmers, and they may miss if they don't frequent the SL forum ...
    Thanks for your forbearance here (in advance, of course) ...
    Best
    djh
    Edited by: Rob Burbank on Jul 11, 2011 1:26 PM

    If interested, please reply in the original thread. We don't want multiple conversations at cross purposes do we?
    Rob

  • Are field symbols and Dynamic internal tables consistant?

    Hi,
    Are field symbols and Dynamic internal tables
    always consistent?
    In my program I m creating a dynamic itab and assignig values to it using <FS>, sometimes the program fails to execute assign <Fs> statement...
    this happens once in 3 to 4 runs
    any solution...
    I have proper clear and refresh statements in program.
    Thanks,
    Hardik

    Anurag,
    Thanks for a quick reply. Here I am sending a small piece of my code.
    MOVE-CORRESPONDING OUTTAB TO DYNTAB.
          CLEAR IT_UDATE.
          CLEAR : T_KBETR .
          READ TABLE IT_UDATE WITH KEY UDATE = OUTTAB-UDATE.
          CONCATENATE 'DYNTAB-KBETR' IT_UDATE-CO_POS INTO T_KBETR.
          ASSIGN (T_KBETR) TO <FS> .
          SUBRC5 = SY-SUBRC .
          IF SUBRC5 = 0 .
              <FS> =  OUTTAB-KBETR .
          ENDIF .
    read statement will always return CO_POS .
    while debuging this code a few times
    <b>ASSIGN (T_KBETR) TO <FS> .</b>
    returns sy-subrc = 4
    and that was leading the program to short dump earlier.
    now, as I have a check DYNTAB-KBETR holds no value on display.
    this happens very few times. (most of the times report is displaying desired output)
    Thanks,
    Hardik

  • Fields symbols and field groups

    what are field symbols and field groups?
    Regards,
    sravanthi

    Difference between Field symbols and Field groups
    what are field groups and field symbols ...

  • Reg: Field Symbol and Data Reference

    Hi,
    What is the difference Between a FieldSymbol and Data Reference.
    could anyone explain with an example the difference.
    The Link I am Going Through ---> [SAP HELP|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/frameset.htm]
    I couldnt get a clear idea
    regards

    Hi,
    In ABAP/4 programs, field symbols are placeholders for existing fields. A field symbol does not physically reserve space for a field, but points to a field, which is not known until runtime of the program. Field symbols are comparable to the concept of pointers as used in the programming language C. In ABAP/4, however, there is no real equivalent to pointers in the sense of variables, which contain a memory address and can be used without the content operator. You can only work with the data object to which a field symbol points.
    uF076     Concept of Field Symbols
    Sometimes you only know which field you want to process, and how you want to process it, at runtime.
    For this purpose, you can create field symbols in your program. At runtime, you can assign real fields to such field symbols. All operations, which you have programmed with the field symbol, are then carried out with the assigned field. After successful assignment, there is no difference in ABAP/4 whether you reference the field symbol or the field itself.
    Field symbols can point to any data object in ABAP/4 and to structures defined in the ABAP/4 Dictionary.
    You can create field symbols either without or with type specifications. In the first case, the field symbol adopts all the attributes of the assigned field. In the second case, the system checks during the assignment process whether the assigned field matches the type of the field symbol. Whichever applies, you must first assign a field to your field symbol before you can work with it in your program.
    Field symbols provide some features that make them very flexible:
    uF071     You can specify the offset and length of the assigned field as variables.
    uF071     You can assign field symbols to other field symbols and even specify offset and length there.
    uF071     Assignments to field symbols may extend beyond field boundaries. This allows effective access to regularly stored data.
    uF071     You can force a field symbol to be of a different type and to have a different number of decimal places than the assigned field.
    uF071     Field symbols may have a structure that you can use to point to individual components of structures.
    Since you can assign data objects to field symbols which may not be known 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. Therefore, you should use field symbols only in cases where you are absolutely sure of what you are doing, or if there are no other ABAP/4 statements you can use to solve your problem. The advantage of field symbols is that they can improve response times in some cases.
    uF076     Defining Field Symbols
    uF0D8     Defining Field Symbols for Internal Fields
    To define a field symbol for an internal data object, use the FIELD-SYMBOLS statement as follows:
    Syntax-
    FIELD-SYMBOLS <FS> [<type>].
    This statement defines a field symbol <FS>.
    for data reference follow this link
    http://help.sap.com/saphelp_nw04s/helpdata/en/14/11e70b0c5c11d3b9350000e8353423/frameset.htm
    Regards,
    Flavya

Maybe you are looking for

  • Account Determination for Tax using Sale Tax Code

    Hi, We are using TAXINN and sales tax codes. We are using JTX1 condition in our sales pricing procedure for which we r maintaing condition record with correct tax code applied to it. We have assigned account keys in Tax Procedure, so no acct. key is

  • FI Assignment field with settlement from PS

    When I'm doing a setllement from me WBS to the AUC I'm getting in the assignment field the WBS element number. In the G/L account I have filled in a sort key to get there the asset(sub) number. It looks if the assignment field is already filled in fr

  • Converting PDF to LiveCycle PDFs

    Our firm uses LiveCycle PDFs to perform data merge activities.  We have well over a 100 PDFs that need to be converted to LiveCycle for this data merge activity.  Right now, the conversion to LiveCycle is where someone opens the PDF and saves it as a

  • VBscript to change Windows 7 computer name

    Hi Guys, Could any of you help me with a script for Windows 7 that can change the name of a domain member PC? I need it for WDS deployment reasons, and can only find scripts working for Windows XP. Needless to say, my vb-skills are close to zero... T

  • Difference between macros..? urguent can any one plz..?

    1) Rp-read-infotype pernr-pernr 0041 p0041 pn-begda pn-endda. 2) rp_provide_from_last p0041 space pn-begda pn-endda. what is the difference between the two macros..? plz reply as soon as u can friends..? regards satish.v