ERP Database - The Unofficial ERP Knowledge Base

Facebook Twitter del.icio.us Digg it
ERP Database contains a huge collection of articles related to ERP System and Software. Many of the articles are specifically related to SAP. All these ERP/SAP articles are freely available to everyone.

If you would like to submit an article or share any document related to ERP or any specific ERP software. Please mail it to support@erpdb.info. Please make sure that the documents are not copyrighted.
Social Bookmarks:

FIELD-SYMBOLS: ABAP Keyword a day

Print This Post Email This Post Written by admin on May 13th, 2011 | Filed under: ABAP Keywords
FIELD-SYMBOLS: <fs>.
FIELD-SYMBOLS: <fs> TYPE t.
FIELD-SYMBOLS: <fs> TYPE LINE OF t.
FIELD-SYMBOLS: <fs> LIKE s.
FIELD-SYMBOLS: <fs> LIKE LINE OF s.

Field Symbols are placeholders or symbolic names for the fields. Pointed brackets ‘<>‘ are part of the the syntax. the type or like addition allows you to specify the type of field symbols.

Fields symbols are commonly used while working with LOOP…MODIFY…ENDLOOP eliminating complex modifications on the internal table. In the below example directly works on the internal table line and eliminates MODIFY altogether.

field-symbols: <fs> like line of <itab>.
loop at <itab> assigning <fs>.
read table <itab_2> with key <field> = <fs>-field1.
if sy-subrc eq 0.
<fs>-field2 = <itab_2>-field2..
endif.
endloop.
Share

If you like this post, you may as well like these too:

  1. FIELD-GROUPS: Abap keyword a day FIELD-GROUPS creates a field group for an extract dataset. FIELD-GROUPS: This statement would define a field group and these also define the actual line structure of extract dataset. Here is...
  2. ABAP Programs: Working with Field symbols REPORT CHAP2401. * Defining a Field Symbol FIELD-SYMBOLS < FS>. * Variable for later use DATA FIELD VALUE 'X'. * Assigning a field to a Field Symbol ASSIGN FIELD TO...
  3. ABAP Programs:Using Field Symbols for components of a structure REPORT ZSOURCE2403. * Table work area for later use TABLES CUSTOMERS. * Defining a Field Symbol FIELD-SYMBOLS <OUTPUT>. * Displaying all fields of all table entries SELECT * FROM CUSTOMERS....
  4. ABAP Programs :Using Field Symbols for variable parts of fields REPORT ZSOURCE2402. DATA: EXTERNAL_RECORD(4000), POSITION TYPE I, LENGTH TYPE N. FIELD-SYMBOLS < ENTRY>. EXTERNAL_RECORD = '0005Smith0007Edwards0005Young'. DO. LENGTH = EXTERNAL_RECORD+POSITION(4). IF LENGTH = 0. EXIT. ENDIF. ADD 4 TO POSITION....
  5. GET: ABAP Keyword a day GET: Event keyword for defining event blocks for reporting events. GET <node> [FIELDS <fi> <f 2>...]. GET node LATE [FIELDS f1 f2 ...]. Only occurs in executable programs. When the...
  6. DO : ABAP Keyword a day DO Variants 1. DO. 2. DO n TIMES. Variant 1 DO. Addition … VARYING f FROM f1 NEXT f2 Effect Repeats the processing enclosed by the DO and ENDDO statements...
  7. AT : ABAP Keyword a day AT Events in lists- AT LINE-SELECTION.- AT USER-COMMAND.- AT PFn.Events on selection screens- AT SELECTION-SCREEN.Control break with extracts- AT NEW f.- AT END OF f.- AT FIRST.- AT LAST.- AT...
  8. DELETE : ABAP Keyword a day DELETE Delete from a database table - DELETE FROM dbtab WHERE condition. - DELETE FROM (dbtabname) WHERE condition. - DELETE dbtab. - DELETE *dbtab. - DELETE (dbtabname) … . -...
  9. CONTINUE: ABAP Keyword a day CONTINUE Basic formCONTINUE.EffectWithin loop structures like * DO … ENDDO* WHILE … ENDWHILE* LOOP … ENDLOOP* SELECT … ENDSELECTCONTINUE terminates the current loop pass, returns the processing to the beginning...
  10. ENDCASE : ABAP Keyword a day ENDCASE Basic form ENDCASE. Effect The ENDCASE statement closes a case disinction introduced by CASE ....
  11. COMPUTE: ABAP Keyword a day COMPUTEBasic formCOMPUTE n = arithexp.EffectEvaluates the arithmetic expression arithexp and places the result in the field n .Allows use of the four basic calculation types + , – , *...
  12. CNT : ABAP Keyword a day CNT Basic form… CNT(h) …EffectCNT(h) is not a statement, but a field which is automatically created and filled by the system if f is a sub-field of an extract dataset...
  13. CASE: ABAP Keyword a day CASE Basic formCASE f. Effect Case distinction.Depending on the current contents of a field, this statement executes one of several alternative processing branches. The field whose contents determine how the...
  14. FETCH : ABAP Keyword a day FETCH Basic form FETCH NEXT CURSOR c target. Effect Uses the cursor c to read the next line or lines from the dataset of a database table determined by OPEN...
  15. ASSIGN: ABAP Keyword a day ASSIGN Variants:1. ASSIGN f TO .2. ASSIGN (f) TO .3. ASSIGN TABLE FIELD (f) TO .4. ASSIGN LOCAL COPY OF MAIN TABLE FIELD (f) TO .5. ASSIGN COMPONENT idx OF...



Leave a Reply