DATA FORMATTING AND CONTROL LEVEL PROCESSING:
You can use control level processing to create structured lists. Control levels are determined by the contents of the fields that are to be displayed. there is a control level change whenever the content of a field changes. This means that there is no point in creating control levels unless the data are sorted.
The data to be displayed must be saved temporarily if you want to use control level processing. You can also use internal tables and intermediate datasets.
You can use an array fetch in a SELECT statement to fill an internal table in one go.
You can use the APPEND statement to insert table entries at the end of an internal table. The variant of the APPEND statement on the slide is permitted only for standard or sorted tables. After an APPEND statement, system field SY-TABIX contains the index value of the newly inserted table entry.
You use the COLLECT statement to generate unique or compressed datasets. The contents of the work area of the internal table are recorded as a new entry at the end of the table or are added to an existing entry. The latter occurs when the internal table already contains an entry with the same key field values as those currently in the work area. The numeric fields that do not belong to the key are added to the corresponding fields of the existing entry.
When the COLLECT statement is used, all the fields that are not part of the key must be numeric.
The SORT statement sorts the entries in internal table in ascending order. If the addition BY ..., is missing, then the key assigned when the table was defined is used.
If addition BY ... is used, then fields , , ... are used as sort keys. The fields can be of any type.
You can use the additions ASCENDING and DESCENDING with the SORT statement to determine whether the fields are sorted in ascending (default) or descending order.
For more information about the SORT statement, please refer to appendix documentation DAP-3.
You can use the loop statement LOOP AT ... ENDLOOP to process an internal table. The data records in the internal table are processed sequentially.
The CONTINUE statement can be used to prematurely exit the current loop pass and skip to the next pass.
The EXIT statement can be used to exit loop processing.
At the end of loop processing (after ENDLOOP), return value sy-subrc indicates whether the loop was passed or not.
SY-SUBRC = 0: The loop was passed at least once
SY-SUBRC = 4: The loop was not passed because no entry was available.
You can use special control structures for control level processing. All the structures begin with AT and end with ENDAT. These control structures can only be used within a LOOP.
The statement blocks AT FIRST and AT LAST are run exactly once: at the first AT FIRST and at the last AT LAST loop.
The statements within AT NEW ... ENDAT are executed when the value of field changes within the current LOOP (start of a control level) or the value of one of the fields in the table definition (further to the left).
The statements within AT END OF ... ENDAT are executed when the value of field changes during the next LOOP (end of a control level) or the value of one of the fields in the table definition (further to the left).
At entry of the control level (directly after AT), - all fields with the same character types after (to the right of) the current control level key are filled with "*" - all other fields after (to the right of) the current control level key are set to default values.
When a control structure is exited (at ENDAT), all fields of the query area are filled with the data from the current loop pass.
The SUM statement supplies the respective group totals in the query area of the LOOP in all fields of TYPE I, F and P.
The control level structure in internal tables is static. It corresponds exactly to the sequence of columns in the internal table (from left to right). In particular, the control level structure for internal tables is independent of the criteria used to sort the internal table. The table must be sorted according to the internal table fields.
When you implement control level processing, you must follow the sequence of individual control levels within the LOOP as illustrated in the slide. The sequence follows the sequence of fields in the internal table and is therefore also the sort sequence.
The processing block between AT FIRST and ENDAT is executed before processing of the single lines begins. The processing block AT LAST and ENDAT is executed after all single lines have been processed.
RELATED POSTS
Subscribe to:
Post Comments (Atom)
Content
-
▼
2009
(120)
-
▼
March
(87)
- WORK FLOW SCENARIOS IN SD SAP II
- WORK FLOW SCENARIOS IN SD SAP I
- WORK FLOW SAP IV
- WORK FLOW SAP III
- WORK FLOW SAP II
- WORK FLOW SAP I
- BDC SAP X
- BDC SAP IX
- BDC SAP VIII
- BDC SAP VII
- BDC SAP VI
- BDC SAP V
- BDC SAP IV
- BDC SAP III
- BDC SAP II
- BDC SAP I
- BADI SAP III
- BADI SAP II
- BADI SAP I
- BAPI SAP IV
- BAPI SAP III
- BAPI SAP II
- BAPI SAP I
- TABLE CONTROL IN BDC
- USER EXITS IN DETAIL
- BDC AND LSMW COMPARISION
- MODIFICAITONS EXITEDED 57
- SAP MODIDICAITONS 56
- BUSINESS ADD INS 55
- BUSINESS TRANSACTION EVENTS 53
- ENHANCEMENTS USING COSTMER EXITS 54
- ENHANCEMENTS TO DICTIONERY ELEMENTS 52
- CHANGING THE SAP STANDARD 51
- AUTHORISATION CHECKS 50
- COMPLEX LUW PROCESSING 49
- ORGANIZING DATA BASE UPDATES 48
- SAP LOCK CONCEPT 47
- LUW’S AND CLIENT/SERVER ARCHITECHERE 46
- OVERVIEW OF DATABAE UPDATES XXXXV
- LISTS IN SCREEN PROGRAMMING XXXXIV
- CONTEXT MENUS ON SCREENS XXXXIII
- SCREEN ELEMENTS ANDTABLE CONTROLS XXXXII
- SUBSCREEN TABSTRIPS XXXXI
- SCREEN ELEMENTS FOR INPUT AND OUTPUT XXXX
- SCREEN ELEMENTS FOR OUTPUT XXXIX
- IDOC AND BAPI
- DIFFERENCE BETWEEN CONVERSION AND INTERFACE
- INTRODUCITON TO SCREEN PROGRAMMING XXXVIII
- INTERACTIVE LIST TECHNIQUES XXXVII
- SAP LANDSCAPE
- PROGRAM INTERFACE XXXVI
- BASICS OF INTERACTIVE REPORTS XXXV
- ALV GRID CONTROL XXXIV
- SAVING LISTS AND BACK GROUND PROCESSING XXXIII
- DATA FORMATTING AND CONTROL LEVEL PROCESSING XXXII
- SAP QUARY ADMINSTRATION XXXI
- PROGRAMMING DATA RETRIVAL XXX
- LOGICAL DATA BASES XXVIII
- SELECTION SCREENS ABAP REPORT XXIX
- ALV DOCUMENTATION COMPLETE
- FAQ'S ON ABAP CROSS APPLICATIONS
- TECHNIQUES FOR LIST CREATION AND SAP QUARY XXVI
- CALLING PROGRAM AND PASSING DATA XXV
- FUNCTION MODULES AND GROUPS OF ABAP XXIV
- SUB ROUTIENS IN ABAP XXIII
- INTERNAL TABLES IN ABAP XXII
- ABAP STATEMENTS XXI
- DATA TYPES AND DATA OBJECT XX
- ABAP RUN TIME ENVIRONMENT XIX
- SEARCH HELP XVIII
- VIEWS IN ABAP XVII
- CHANGES TO DATA BASE TABLES XVI
- DEPENDENCIES OF DICTIONARY OBJECTS XV
- CONSITENCEY THROUGH INPUT CHECKS XIV
- PERFORMANCE DURING TABLE ACCESS XIII
- ABAP DICTIONARY XII
- ABAP PROJECT OVERVIEW - XI
- REUSE COMPONENTS - X
- DIALOGS AND SCREENS - IX
- USER DIALOGS AND SELECTION SCREEN - VIII
- USER DIALOGS-LISTS - VII
- INTERNAL PROGRAM MODULARIZATION - VI
- DATA BASE DIALOG - V
- ABAP DATA OBJECTS AND STATEMENTS - IV
- ABAP WORK BENCH AND TOOLS - III
- SAP ARCHETECHERE AND DESIGN - II
- SAP NAVIGATION - I
-
▼
March
(87)
Privacy Policy
The articles are copyrighted to Technical Information and can only
be reproduced given the author's permission.Information furnished
in the blog is collected from various Resources.This blog does not
host any files on its server. Please report any broken links in
comment.
If u have any queries contact me at
technicalinformation.websites@gmail.com
0 comments:
Post a Comment