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
Similar Messages
-
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?
regardssorry, question resolved.
-
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. -
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 -
Fields symbols and field groups
what are field symbols and field groups?
Regards,
sravanthiDifference between Field symbols and Field groups
what are field groups and field symbols ... -
What are the tables and fields in fico & sd module
what are the tables and fields in fico & sd module
Hi,
<b> Sales and Distribution:</b>
Customers KNA1 General Data
KNB1 Customer Master Co. Code Data (payment method, reconciliation acct)
KNB4 Customer Payment History
KNB5 Customer Master Dunning info
KNBK Customer Master Bank Data
KNKA Customer Master Credit Mgmt.
KNKK Customer Master Credit Control Area Data (credit limits)
KNVV Sales Area Data (terms, order probability)
KNVI Customer Master Tax Indicator
KNVP Partner Function key
KNVD Output type
KNVS Customer Master Ship Data
KLPA Customer/Vendor Link
Sales Documents VBAKUK VBAK + VBUK
VBUK Header Status and Administrative Data
VBAK Sales Document Header Data
VBKD Sales Document Business Data
VBUP Item Status VBAP Sales Document Item Data
VBPA Partners
VBFA Document Flow
VBEP Sales Document Schedule Line
VBBE Sales Requirements: Individual Records
SD Delivery DocumeLIPS Delivery Document item data, includes referencing PO
LIKP Delivery Document Header data
Billing Document VBRK Billing Document Header
VBRP Billing Document Item
SD Shipping Unit VEKP Shipping Unit Item (Content)
VEPO Shipping Unit Header
<b>Financial Accounting</b>
FBAS Financial Accounting Basis
BKPF Accounting Document Header BUKRS / BELNR / GJAHR
BSEG Accounting Document Segment BUKRS / BELNR / GJAHR / BUZEI
BSIP Index for Vendor Validation of Double BUKRS / LIFNR / WAERS / BLDAT /
Documents XBLNR / WRBTR / BELNR / GJAHR / BUZEI
BVOR Inter Company Posting Procedure BVORG / BUKRS / GJAHR / BELNR
EBKPF Accounting Document Header (docs from GLSBK / BELNR / GJHAR / GLEBK
External Systems)
FRUN Run Date of a Program PRGID
KLPA Customer / Vendor Linking NKULI / NBUKR / NKOAR / PNTYP
/ VKULI / VBUKR / VKOAR
KNB4 Customer Payment History KUNNR / BUKRS
KNB5 Customer Master Dunning Data KUNNR / BUKRS / MABER
KNBK Customer Master Bank Details KUNNR / BANKS / BANKL / BANKN
KNC1 Customer Master Transaction Figures KUNNR / BUKRS / GJHAR
KNC3 Customer Master Special GL Transactions KUNNR / BUKRS / GJAHR / SHBKZ
Figures
LFB5 Vendor Master Dunning Data LIFNR / BUKRS / MABER
LFBK Vendor Master Bank Details LIFNR / BANKS / BANKL / BANKN
LFC1 Vendor Master Transaction Figures LIFNR / BUKRS / GJHAR
LFC3 Vendor Master Special GL Transactions LIFNR / BUKRS / GJHAR / SHBKZ
Figures
VBKPF Document Header for Document Parking AUSBK / BUKRS / BELNR / GJHAR
FBASCORE Financial Accounting General Services Basis
KNB1 Customer Master (Company Code) KUNNR / BUKRS
LFA1 Vendor Master (General Section) LIFNR
LFB1 Vendor Master (company Code Section) LIFNR / BUKRS
SKA1 G/L Account Master (Chart of Accounts) KTOPL / SAKNR
SKAT G/L Account Master (Chart of Accounts SPRAS / KTOPL / SAKNR
Description)
MAHNS Accounts Blocked by Dunning Selection KOART / BUKRS / KONKO / MABER
MHNK Dunning Data (Account Entries) LAUFD / LAUFI / KOART / BUKRS /
KUNNR / LIFNR / CPDKY / SKNRZE /
SMABER / SMAHSK / BUSAB
FI-GL-GL (FBS) General Ledger Accounting: Basic Functions- G/L Accounts
SKAS G/L Account Master (Chart of Accounts SPRAS / KTOPL / SAKNR / SCHLW
Key Word list)
SKB1 G/L Account Master (Company Code) BUKRS / SAKNR
FI-GL-GL (FBSC) General Ledger Accounting: Basic
Functions - R/3 Customizing for G/L Accounts
FIGLREP Settings for G/L Posting Reports MANDT
TSAKR Create G/L account with reference BUKRS / SAKNR
FI-GL-GL (FFE) General Ledger Accounting: Basic
Functions - Fast Data Entry
KOMU Account Assignment Templates for G/L KMNAM / KMZEI
Account items
FI-AR-AR (FBD) Accounts Receivable: Basic Functions - Customers
KNKA Customer Master Credit Management : KUNNR
Central Data
KNKK Customer Master Credit Management : KUNNR / KKBER
Control Area Data
KNKKF1 Credit Management : FI Status data LOGSYS / KUNNR / KKBER / REGUL
RFRR Accounting Data A/R and A/P RELID / SRTFD / SRTF2
Information System
FI-BL-PT Bank Accounting: Payment (BFIBL_CHECK_D) Transactions General Sections
PAYR Payment Medium File ZBUKR / HBKID / HKTID / RZAWE /
CHECT
PCEC Pre-numbered Check ZBUKR / HBKID / HKTID / STAPL
FI-BL-PT-AP(FMZA)Bank Accounting: Payment Transactions Automatic Payments
F111G Global Settings for Payment Program for MANDT
Payment Requests
FDZA Cash Management Line Items in Payment KEYNO
Requests
PAYRQ Payment Requests KEYNO
Hope this solves your concern...
Regards,
Habeeb
Assign points if helpful -
What are filed simbols and filed groups
what are filed simbols and filed groups?
Regards,
pandu.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.
Field Groups
Field groups use a mechanism called extract to store and process data. You define a header and then line structure and the fields that you would like those to have and process them fairly similarly to a table; unless you are dealing with millions of records.
Since internal tables have fixed line structures, they are not suited to handle data sets with varying structures.
An extract is a sequential dataset in the memory area of the program. You can only address the entries in the dataset within a special loop. The index or key access permitted with internal tables is not allowed. You may only create one extract in any ABAP program. The size of an extract dataset is, in principle, unlimited. Extracts larger than 500KB are stored in operating system files. The practical size of an extract is up to 2GB, as long as there is enough space in the file-system.
Reward points if this explains well
Kiran -
What are the tables and field where Cost Center info. is stored ?
Hi Experts,
One of my customer is using the Cost Center / Profit Center and mention the same in all document. Now for particular Incoming Payment customer wants to print the dimention wise details entered in incoming payment as well as out going payment.
Can anybody tell me from which table / fields I can retrive this information ? Particularly in Crystal Report.
Thanking in advance,
Samir GandhiNo response ?
Does anybody monitoring this or not ?
BR
Samir Gandhi -
Could you please tell me what are Firefox Aliases and why do have 9 of them?
In my applications folder Firefox Alias keeps appearing, I now have 9 of them. Could you please tell me what they are? Also, when I go to open a new tab the screen fills with boxes of sites I have been to previously. I do not like this, how do I stop that from happening?
ThanksAliases are the same as shortcuts. You can remove the aliases without hurting anything.
-
What are the pros and cons of storing heavely used CFCs in the application scope?
I've been storing all the required CFCs for a site in the application scope. During onApplicationStart I do something like this application.objSomeCfc =CreateObject('component', 'com.someCfc').init().
Here is my reasoning.
Get the CFCs initialized once and stored in memory for better performance.
Using CreateObject several times on each page load can have a negative impact on performance.
Having one place to create application scoped CFCs makes it easier to manage code.
So is my thinking flawed? Are there any additional pros or cons for dealing with CFCs? Is there any docs, articles, blogs, videos, frameworks, ...... that I should check that may change my perspective on how I'm doing this?
ThanksYour approach is fine, depending on how many and what type of CFCs you are talking about. If they are "singletons" - that is, only one instance of each CFC is needed to be in memory and can be reused/shared from multiple parts of your application - caching them in the application scope is common. Just make sure they are thread safe ("var" or local.* all your method variables).
You might consider taking advantage of a dependency injection framework, such as DI/1 (part of the FW/1 MVC framework), ColdSpring, or WireBox (a module of the ColdBox platform that can be used independently). They have mechanisms for handling and caching singletons. Then you wouldn't have to go to the application scope to get your CFC instances.
-Carl V. -
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. -
Field Symbols, Field String, and Field Group.
Hi,
Can you differentiate between filed symbols, field strings and field groups,
With regards,
Bharath Mohan BHi,
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
FIELD GROUPS
are used to hold/handle large amount of data when the internal table are not useful
we use EXTRACT statement, HEADER structure in them
see the example
REPORT demo_extract.
NODES: spfli, sflight.
FIELD-GROUPS: header, flight_info, flight_date.
START-OF-SELECTION.
INSERT: spfli-carrid spfli-connid sflight-fldate
INTO header,
spfli-cityfrom spfli-cityto
INTO flight_info.
GET spfli.
EXTRACT flight_info.
GET sflight.
EXTRACT flight_date.
END-OF-SELECTION.
SORT STABLE.
LOOP.
AT FIRST.
WRITE / 'Flight list'.
ULINE.
ENDAT.
AT flight_info WITH flight_date.
WRITE: / spfli-carrid , spfli-connid, sflight-fldate,
spfli-cityfrom, spfli-cityto.
ENDAT.
AT flight_date.
WRITE: / spfli-carrid , spfli-connid, sflight-fldate.
ENDAT.
AT LAST.
ULINE.
WRITE: cnt(spfli-carrid), 'Airlines'.
ULINE.
ENDAT.
ENDLOOP.
FIELD STRING is nothing but a string with one row of records.
Reward points if useful
regards
Anji -
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,
KathirHi
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 -
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,
HardikAnurag,
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
Maybe you are looking for
-
Lion starts in 'set up' mode after installing Parallelsn safe mode
Big problem. I couldn't get on with VMWare Fusion as it was piling up huge files (106 Gb) and using up half of my hard drive. I had always had problems with it since installation so i decided to take up the transfer offer from Parallels and installed
-
Cl_gui_frontend_services= gui_download
hi. i use this method to download a table to excel file. 1.when i download i get a file with 6000K and when i open it in notepad i get it tab delimeted. 2.when i opened it and make save as new_name.xls i get 2000K and when i opened it notepad i get i
-
HT1338 My mac book pro is stuck in dos mod how do i turn it off?
hello i may need to get some help geting off dos mode. please help
-
Unix Scripting with screen saver
I have been trying commands from every version of Unix. I cannot find a way to start screen saver from Darwin. I am frustrated. Furthermore, is there a way someone can inform me how to connect to a bluetooth phone using a Mac Address. Similar to "hci
-
Can't see older emails in inbox
I am having an issue using the My Verizon 2.0 website to access my email. I switched over to Verizon around the end of Oct last year and when I open my email on Verizon's site and look at my inbox, I can only see email back for a couple of weeks. I a