You are on page 1of 34

ABAP Statement Overview

The following is an alphabetical classification of the most important generally-released ABAP statements. ABCDEFG !"#$%P&'T()

A
ADD for Single Fields Adds two single fields. Syntax ADD <n> TO <m>. The contents of *n+ are added to the contents of *m+. The res,lt is placed in *m+. E-,i.alent of *m+ / *m+ 0 *n+. ADD for Sequences of Fields Adds se-,ences of fields. Syntax ADD <n1> THEN <n2> UNTIL <nz> GIVING <m>. ADD <n1> THEN <n2> UNTIL <nz> ACCORDING TO <sel> GIVING <m>. ADD <n1> THEN <n2> UNTIL <nz> TO <m>. ADD <n1> FROM <m1> TO <mz> GIVING <m>. !f *n1+2 *n3+2...2 *n4+ is a se-,ence of fields with a ,niform gap between each2 the same type2 and the same length2 the fields are added together and the res,lt placed in *m+. The .ariants allow yo, to restrict the fields to a partial se-,ence2 to incl,de *m+ in the s,m2 or to perform the operation for a se-,ence of consec,ti.e fields. ADD-CORR SPO!D"!# Adds components of str,ct,res. Syntax ADD-CORRESPONDING <s !"#1> TO <s !"#2>. Adds together all of the components of str,ct,res *str,c1+ and *str,c3+ that ha.e identical names2 and places the res,lts in the corresponding components of *str,c3+. A$"AS S Defines class-specific alias names for an interface component in ABAP %b5ects. Syntax ALIASES <$l%$s> FOR <%n &'#(m)>. Defines *alias+ within a class as a synonym for the interface component *intf6comp+. APP !D Appends one or more lines to the end of an inde7 table. Syntax APPEND <l%ne>*LINES OF <+ $,> TO <% $,>. Appends one line *line+ or se.eral lines of an internal table *5tab+ to the inde7 table *itab+. ASS"#! Assigns a field to a field symbol. Syntax ASSIGN <&> TO <FS>. Assigns the data ob5ect *f+ to the field symbol *F'+2 after which2 *F'+ points to the data ob5ect. The pointed brac8ets are part of the synta7 of the field symbol. A% for vent Bloc&s E.ent 8eywords for defining e.ent bloc8s for screen e.ents. Syntax AT SELECTION-SCREEN... AT LINE-SELECTION. AT USER-COMMAND. AT PFn. (ser actions on selection screens or lists trigger e.ents in the ABAP r,ntime en.ironment. The e.ent 8eywords define e.ent bloc8s2 which are called when the corresponding e.ent occ,rs. A% for Control $evels Control le.el change when yo, process e7tracts and internal tables in a loop. Syntax

AT NE- <&>. AT END OF <&>. AT FIRST. AT LAST. AT <&.>. These statements are ,sed in control le.el processing with e7tract datasets or internal tables. Each introd,ces a statement bloc8 that yo, m,st concl,de with the E$DAT statement. The statements between AT and E$DAT are e7ec,ted whene.er the corresponding control le.el change occ,rs. A'%(OR"%)-C( C* Chec8s the a,thori4ation of a ,ser. Syntax AUTHORIT/-CHEC0 O12ECT <(,+e# > ID <n$me1> FIELD <&1> ID <n$me2> FIELD <&2> ... ID <n$me13> FIELD <&13>. The statement chec8s whether the ,ser has all of the a,thori4ations defined in the a,thori4ation ob5ect *ob5ect+. *name1+2...2 *name19+ are the a,thori4ation fields in the ob5ect2 and *f1+2... 2*f19+ are data ob5ects in the program. The .al,e of each data ob5ect is chec8ed against the corresponding a,thori4ation field.

B
BAC* &elati.e positioning for o,tp,t in a list. Syntax 1AC0. Positions the list o,tp,t either in the first col,mn of the first line after the page header on the c,rrent page2 or in the first col,mn of the first line of a line bloc8 if yo, ha.e pre.io,sly ,sed the &E'E&:E statement. BR A*-PO"!% 'tarts the ABAP Deb,gger. Syntax 1REA0-POINT. !nterr,pts program e7ec,tion and starts the Deb,gger. This allows yo, to test yo,r programs by halting them at any point.

C
CA$$ C'S%O+ R-F'!C%"O! Calls a c,stomer f,nction mod,le. Syntax CALL CUSTOMER-FUNCTION <&"n#>... 'imilar to CA"" F($CT!%$. The f,nction mod,le that it calls m,st be programmed and acti.ated by a c,stomer ,sing the modification concept. CA$$ F'!C%"O! Calls a f,nction mod,le. Syntax CA"" F($CT!%$ *f,nc+ ;E<P%&T!$G ... fi / a i... = ;!#P%&T!$G ... fi / a i... = ;C A$G!$G ... fi / a i... = ;TAB"E' ... fi / a i... = ;E<CEPT!%$'... ei / r i... = ;DE'T!$AT!%$ *dest+= ;!$ (PDATE TA'>= ;'TA&T!$G $E) TA'>= ;!$ BAC>G%($D TA'>=. 'tarts a f,nction mod,le2 either in the same system or in an e7ternal system2 depending on the type of call that yo, ,se. ?o, can also ,se ,pdate f,nction mod,les in transactions2 and call f,nction mod,les asynchrono,sly. The remaining additions are ,sed for the parameter interface of the f,nction mod,le2 in which yo, can specify act,al parameters and determine how to handle e7ceptions.

CA$$ D"A$O# Calls a dialog mod,le. Syntax CA"" D!A"%G *dialog+ ;A$D '>!P F!&'T 'C&EE$= ;E<P%&T!$G... fi / a i... = ;!#P%&T!$G... fi / a i... = ;('!$G itab=. Calls the dialog mod,le *dial+. A dialog mod,le is an ABAP program containing a chain of screens. !t does not ha.e to be called ,sing a transaction code2 and r,ns in the same 'AP "() as the program that called it. The additions allow yo, to s8ip the first screen in the chain and pass act,al parameters to and from the parameter interface of the dialog mod,le. CA$$ + %(OD Calls a method in ABAP %b5ects. Syntax CA"" #ET %D *meth+ ;E<P%&T!$G ... *ii+ /.*f i+... = ;!#P%&T!$G ... *ei+ /.*g i+... = ;C A$G!$G ... *ci+ /.*f i+... = ;&ECE!:!$G r / h = ;E<CEPT!%$'... *ei+ / r i... = Calls a static method or instance method *meth+. The additions allow yo, to pass parameters to and from the method and handle its e7ceptions. CA$$ + %(OD OF Calls a method in %"E3 A,tomation. Syntax CALL METHOD OF <(,+> <m>. Calls the method *m+ of the %"E3 A,tomation ob5ect *ob5+. CA$$ SCR ! Calls a se-,ence of screens. Syntax CALL SCREEN <s#!> 4STARTING AT <51> </1>6 4ENDING AT <52> </2>6. Calls the se-,ence of screens beginning with screen n,mber *scr+. All of the screens in the chain belong to the same ABAP program. The chain ends when a screen has the ne7t screen n,mber 9. The additions allow yo, to call a single screen as a modal dialog bo7. CA$$ S $ C%"O!-SCR ! Calls a selection screen. Syntax CALL SELECTION-SCREEN <s#!> 4STARTING AT <71> <8 1>6 4ENDING AT <72> <8 2>6. Calls a ,ser-defined selection screen in a program. 'election screens are processed in the AT 'E"ECT!%$-'C&EE$ e.ents. The additions allow yo, to call a selection screen as a modal dialog bo7. CA$$ %RA!SAC%"O! Calls a transaction. Syntax CALL TRANSACTION < #(9> 4AND S0IP FIRST SCREEN6 4USING <% $,>6. Calls the transaction *tcod+ while retaining the data in the calling program. At the end of the transaction2 control ret,rns to the point from which the transaction was called. The additions allow yo, to s8ip the first screen of the transaction or pass an internal table for batch inp,t to it. CAS Conditional branching. Syntax CASE <&>.

%pens a CA'E control str,ct,re that m,st concl,de with the E$DCA'E statement. This allows yo, to branch to .ario,s statement bloc8s @introd,ced with the ) E$ statementA2 depending on the contents of the data ob5ect *f+. CA%C( Catches r,ntime errors. Syntax CATCH S/STEM-E5CEPTIONS <e7#e) 1> : <!# 1>... <e7#e) n> : <!# n>. !ntrod,ces a CATC area2 which concl,des with an E$DCATC statement. !f a catchable r,ntime error * e7#e) % + occ,rs within this bloc82 the c,rrent bloc8 terminates immediately2 and the program 5,mps directly to the corresponding E$DCATC statement2 filling '?-'(B&C with *rc i+. C( C* Conditional termination of a loop pass or a processing bloc8. Syntax CHEC0 <l(.e7)>. !f the logical e7pression *loge7p+ is tr,e2 the program contin,es at the ne7t statement. !f2 howe.er2 *loge7p+ is false2 the c,rrent loop pass terminates and the ne7t begins. !f the program is not c,rrently processing a loop2 the c,rrent processing bloc8 terminates. There are special forms of the C EC> statement for ,se with selection tables and in GET e.ent bloc8s. C$ASS - Declaration Declares a class in ABAP %b5ects. Syntax CLASS <#l$ss> DEFINITION 4PU1LIC6 4INHERITING FROM <s")e!#l$ss>6 4DEFERRED6 4LOAD6. This statement introd,ces the declaration part of a class *class+. The declaration part concl,des with E$DC"A''2 and contains the declarations of all components in the class. The P(B"!C addition is generated by the Class B,ilder2 and defines a global class in the class library. The !$ E&!T!$G F&%# addition allows yo, to deri.e the class *class+ from a s,perclass *s,perclass+. The DEFE&&ED addition declares the class before it is act,ally defined. The "%AD addition loads a class e7plicitly from the class library. C$ASS , "m-lementation !mplementation of a class in ABAP %b5ects. Syntax CLASS <#l$ss> IMPLEMENTATION. !ntrod,ces the implementation part of a class *class+. This concl,des with the E$DC"A'' statement2 and contains the implementations of all of the methods in the class. C$ASS-DA%A Declares static attrib,tes of a class or interface. Syntax CLASS-DATA <$>... "i8e DATA. owe.er2 the attrib,te *a+ is declared as a static attrib,te. 'tatic attrib,tes are independent of instances of the class. %nly one copy of the attrib,te e7ists in the class2 and this is shared by all instances. C$ASS-+ %(ODS Declares static methods of a class or interface. Syntax CLASS-METHODS <me ;>... "i8e #ET %D'. owe.er2 the method *meth+ is declared as a static method. A static method can access static attrib,tes2 and may only trigger static e.ents. C$ASS- . !%S Declares static e.ents of a class or interface. Syntax CLASS-EVENTS <e< >... "i8e E:E$T'. owe.er2 the e.ent *e.t+ is declared as a static e.ent. 'tatic e.ents are the only e.ents that may be triggered in a static method.

C$ AR &esets a .ariable to its initial .al,e. Syntax CLEAR <&>. &esets the .ariable *f+2 which may be of any data type2 to the initial .al,e defined for that type. C$OS DA%AS % Closes a file. Syntax CLOSE DATASET <9sn>. Closes a file *dsn+ on the application ser.er pre.io,sly opened with the %PE$ DATA'ET statement. C$OS C'RSOR Closes a database c,rsor. Syntax CLOSE CURSOR <#>. Closes a c,rsor opened ,sing the %PE$ C(&'%& statement. CO$$ C% !nserts lines into an internal table in s,mmari4ed form. Syntax COLLECT <l%ne> INTO <% $,>. The statement first chec8s whether the internal table contains an entry with the same 8ey. !f not2 it acts li8e !$'E&T. !f there is already a table entry with the same 8ey2 C%""ECT does not insert a new line. !nstead2 it adds the .al,es from the n,meric fields of the wor8 area *line+ to the .al,es in the corresponding fields of the e7isting table entry. CO++"% Concl,des an 'AP "(). Syntax COMMIT -OR0 4AND -AIT6. All database ,pdates are written firmly to the database2 and all loc8s are released. Triggers the database ,pdate. The A$D )A!T addition allows yo, to pa,se the program ,ntil the ,pdate is complete. !f yo, omit it2 the database is ,pdated asynchrono,sly. CO++'!"CA%"O! Allows comm,nication between programs. Syntax COMMUNICATION INIT DESTINATION <9es > ID <%9> 4A99% %(ns6. COMMUNICATION ALLOCATE ID <%9> 4A99% %(ns6. COMMUNICATION ACCEPT ID <%9> 4A99% %(ns6. COMMUNICATION SEND ID <%9> 1UFFER <&> 4A99% %(ns6. COMMUNICATION RECEIVE ID <%9> 4A99% %(ns6. COMMUNICATION DEALLOCATE ID <%9> 4A99% %(ns6. These statements allow yo, to initiali4e2 start2 and accept program-to-program comm,nication2 send and recei.e data between partner programs2 and then terminate the connection. CO+P'% Performs n,meric operations. Syntax COMPUTE <n> : <e7)!ess%(n>. The res,lt of the mathematical e7pression in *e7pression+ is assigned to the res,lt field *n+. The C%#P(TE 8eyword is optional. CO!CA% !A% Combines a series of strings into a single string. Syntax CONCATENATE <#1>... <#n> INTO <#> 4 SEPARATED 1/ <s> 6. The strings *c1+ to *cn+ are concatenated2 and the res,lt placed in *c+. The 'EPA&ATED B? addition allows yo, to specify a string *s+ to be placed between the strings. CO!D !S &emo.es spaces from a string. Syntax

CONDENSE <#> 4NO-GAPS6. &emo.es all leading spaces2 and replaces other series of blan8s with a single space in the character field *c+. !f yo, ,se the $%-GAP' addition2 all of the spaces are remo.ed. CO!S%A!%S Declares constant data ob5ects. Syntax CONSTANTS <#>... VALUE 4<<$l> * IS INITIAL6... The synta7 is similar to DATA2 e7cept that the :A"(E addition is re-,ired2 and that internal tables and deep str,ct,res cannot be declared as constants. The starting .al,e that yo, assign in the :A"(E addition cannot be changed d,ring the program. CO!%"!' Ends a loop pass. Syntax CONTINUE. %nly possible within loops. This statement terminates the c,rrent loop pass and starts the ne7t. CO!% /%S Declares a conte7t. Syntax C%$TE<T' *c+. Generates an implicit data type C%$TE<TB*c+2 which yo, can ,se to create conte7t instances. CO!%RO$S Defines a control. Syntax CONTROLS <# !l> T/PE <# !l= 8)e>. Defines an ABAP r,ntime ob5ect *ctrl+. This displays data in a partic,lar format on a screen2 depending on the type *ctrlBtype+. C,rrently2 *ctrlBtype+ may be a table control or tabstrip control. CO!. R% for Dates Con.erts a data into an in.erted date form. Syntax CONVERT DATE <91> INTO INVERTED-DATE <92>. CONVERT INVERTED-DATE <91> INTO DATE <92>. !f *d1+ and *d3+ are date fields in the internal form ????##DD2 the nines complement of *d1+ is placed in field *d3+ and .ice .ersa. !n in.erted date format2 the most recent date has the smaller n,merical .al,e. CO!. R% for %imestam-s Con.erts a timestamp into the correct date and time for the c,rrent time 4one. Syntax CONVERT TIME STAMP < s > TIME >ONE < z> INTO DATE <9> TIME < >. CONVERT DATE <9> TIME < > INTO TIME STAMP < s > TIME >ONE < z>. As long as *tst+ has type P@CA or P@11A with D decimal placed2 and *t4+ has type C@EA2 the time stamp *tst+ will be con.erted to the correct date *d+ and time *t+ for the time 4one *t4+. CO!. R% for %ext Con.erts a te7t into a format that can be sorted alphabetically. Syntax CONVERT TE5T < e7 > INTO SORTA1LE CODE <7>. *te7t+ m,st ha.e type C and *7+ m,st ha.e type <. The string is then con.erted so that the relati.e order of the characters allows them to be sorted alphabetically in the c,rrent te7t en.ironment. CR A% OB0 C% in ABAP O12ects Creates an ob5ect in ABAP %b5ects. Syntax CREATE O12ECT <#!e&>. *cref+ m,st be a reference .ariable2 defined with reference to a class. C&EATE %BFECT then creates an ob5ect of that class2 to which the reference in *cref+ then points. CR A% OB0 C% in O$ 3 Automation Creates an e7ternal ob5ect in %"E3 A,tomation. Syntax

CREATE O12ECT <(,+> <#l$ss>. !f *class+ is a class assigned to an a,tomation ser.er2 an initial ob5ect *ob5+ of this class is created.

D
DA%A wit4 Reference to Declared Data %y-es Declares .ariables with a pre.io,sly-declared data type. Syntax DATA *f+... ;T?PE *type+G"!>E *ob5+=... ;:A"(E *.al+=. Declares a .ariable *f+ with the f,lly-defined data type *type+ or the same data type as another data ob5ect *ob5+. The data type *type+ can be D2 F2 !2 T2 a type defined locally in the program ,sing the T?PE' statement2 or a type from the ABAP Dictionary. The data ob5ect *ob5+ is a data ob5ect or line of an internal table that has already been defined. The :A"(E addition allows yo, to specify a starting .al,e. DA%A wit4 Reference to #eneric Data %y-es Declares .ariables by completing the description of a generic type. Syntax DATA *f+;@*length+A= T?PE *type+ ;DEC!#A"' *d+=... ;:A"(E *.al+=. DATA *f+ T?PE *itab+. The data type *type+ can be C2 $2 P2 or <. !n the *length+ option2 yo, specify the length of the field. !f yo, do not specify the length2 the defa,lt .al,e for the data type is ,sed. !f *type+ is P2 yo, can ,se the DEC!#A"' addition to specify a n,mber of decimal places *d+. !f yo, do not specify a n,mber of decimal places2 it is set to none. !f yo, do not specify a type2 the system ,ses the defa,lt type C. Syntax DATA *f+ T?PE *itab+. The data type *itab+ is a standard internal table with generic 8ey. The defa,lt 8ey is a,tomatically ,sed in the DATA statement. DA%A5 Creating an Associated Data %y-e Declares .ariables with data types that only e7ist as an attrib,te of the .ariable. Syntax DATA *f+ T?PE &EF T% *class+G*interface+. Declares the .ariable *f+ as a reference .ariable for the class *class+ or the interface *interface+. Syntax DATAH BEG!$ %F *str,ct,re+2 ... *fi+...2 ... E$D %F *str,ct,re+. Combines the .ariables *fi+ to form the str,ct,re *str,ct,re+. ?o, can address the indi.id,al components of a str,ct,re by placing a hyphen between the str,ct,re name and the component nameH *str,ct,re+-*f i+. Syntax DATA *f+ T?PEG"!>E *tab8ind+ %F *linetype+ )!T *8ey+. Declares the .ariable *f+ as an internal table with the table type *tab8ind+2 line type *line8ind+2 and 8ey *8ey+. DA%A for S4ared Data Areas Declares shared data areas in a program. Syntax DATA? 1EGIN OF COMMON PART <#>@ *f i+. .. END OF COMMON PART. The .ariables *fi+ are assigned to a data area *c+2 which can be defined in more than one program. These data areas ,se the same memory addresses for all programs that are loaded into the same internal session. D F"! Defines a macro. Syntax DEFINE <m$#!(>.

!ntrod,ces the definition of the macro *macro+. Each macro m,st consist of complete ABAP statement and be concl,ded with the E$D-%F-DEF!$!T!%$ statement. D $ % for Files Deletes files on the application ser.er. Syntax DELETE DATASET <9sn>. Deletes the file *dsn+ from the file system of the application ser.er. D $ % for Data1ase %a1le ntries Deletes entries from database tables. Syntax DELETE FROM <9, $,> -HERE <#(n9>. Deletes all of the lines from the database table *dbtab+ that satisfy the ) E&E condition. Syntax DE"ETE *dbtab+ F&%# *wa+. DE"ETE *dbtab+ F&%# TAB"E *itab+. Deletes the lines with the same primary 8ey as the wor8 area *wa+2 or all of the lines from the database table with the same primary 8ey as one of the lines in the internal table *itab+. The wor8 area *wa+ or the lines of the internal table *itab+ m,st be at least as long as the primary 8ey of the database table and ha.e the same alignment. D $ % for Cluster Data1ase %a1les Deletes data cl,sters from cl,ster database tables. Syntax DE"ETE F&%# DATABA'E *dbtab+@*ar+A !D *8ey+. Deletes the entire data cl,ster from the area *ar+ with the name *8ey+ from the cl,ster database table *dbtab+. D $ % for t4e Cross-%ransaction A--lication Buffer Deletes data cl,sters from the cross-transaction application b,ffer. Syntax DE"ETE F&%# ' A&ED B(FFE& *dbtab+@*ar+A !D *8ey+. Deletes the data cl,ster for the area *ar+ with the name *8ey+ stored in the cross-transaction application b,ffer for the table *dbtab+. D $ % for $ines from an "nternal %a1le Deletes lines from internal tables of any type. Syntax DE"ETE TAB"E *itab+ F&%# *wa+. DE"ETE TAB"E *itab+ )!T TAB"E >E? *81+ / *f 1+... *8 n+ / *f n+. Deletion ,sing the table 8eyH All lines with the same 8ey are deleted. The 8ey .al,es are ta8en either from a compatible wor8 area *wa+ or specified e7plicitly. Syntax DE"ETE *itab+ ) E&E *cond+. Deletion ,sing a conditionH Deletes all table entries that satisfy the logical e7pression *cond+. The logical condition may consist of more than one e7pression. owe.er2 the first operand in each e7pression m,st be a component of the line str,ct,re. Syntax DE"ETE ADFACE$T D(P"!CATE E$T&!E' F&%# *itab+ ;C%#PA&!$G... =. Deletes ad5acent d,plicate entries2 either by comparing the 8ey fields or the comparison fields specified e7plicitly in the C%#PA&!$G addition. D $ % for $ines from "ndex %a1les Deletes lines from inde7 tables. Syntax DE"ETE *itab+ ;!$DE< *id7+=. !f yo, ,se the !$DE< option2 deletes the line with the inde7 *id7+ from the table *itab+. !f yo, do not ,se the !$DE< option2 the statement can only be ,sed within a "%%P I E$D"%%P constr,ction. !n this case2 it deletes the c,rrent line. Syntax DE"ETE *itab+ ;F&%# *n1+= ;T% *n 3+= ;) E&E *cond+=.

Deletes all rows from *itab+ with inde7 between *n 1 + and *n 2 + an which satisfy the ) E&E condition. !f yo, do not ,se the F&%# addition2 the system deletes lines starting at the beginning of the table. !f yo, do not ,se the T% addition2 the system deletes lines to the end of the table. The logical e7pression *cond+ can consist of more than one e7pression. owe.er2 the first operand in each e7pression m,st be a component of the line str,ct,re of the internal table. D +A!D &etrie.es .al,es from a conte7t instance. Syntax DE#A$D *.al1+ / *f 1+... *.al n+ / *f n+ F&%# C%$TE<T *inst+ ;#E''AGE' !$T% *itab+=. Fills the fields *fn+ with the .al,es *.al n+ of the conte7t instance *inst+. The #E''AGE' addition allows yo, to control how messages from the conte7t are handled in the program. D SCR"B D"S%A!C Determines the distance between two fields. Syntax DESCRI1E DISTANCE 1ET-EEN <&1> AND <&2> INTO <&A>. )rites the distance in bytes between fields *f1+ and *f3+ to *fJ+2 always incl,ding the length of the field that occ,rs first in memory. D SCR"B F" $D Describes the attrib,tes of a field. Syntax DE'C&!BE F!E"D *f+ ;"E$GT *l+= ;T?PE *t+ ;C%#P%$E$T' *n+== ;%(TP(T-"E$GT *o+= ;DEC!#A"' *d+= ;ED!T #A'> *m+= ; E"P-!D *h+=. The attrib,tes of the data ob5ect *f+ named in the additions to the statement are placed in the corresponding .ariables. ?o, can ,se any n,mber of additions in a single statement. D SCR"B $"S% Describes the attrib,tes of a list. Syntax DESCRI1E LIST NUM1ER OF LINES <l%n> 4INDE5 <%97>6. DESCRI1E LIST NUM1ER OF PAGES <n> 4INDE5 <%97>6. DESCRI1E LIST LINE <l%n> PAGE <)$.> 4INDE5 <%97>6. DESCRI1E LIST PAGE <)$.> 4INDE5 <%97>6... Depending on the .ariant of the statement that yo, ,se2 writes the n,mber of lines2 n,mber of pages2 a line of a list on a gi.en page2 or .ario,s attrib,tes of a page to .ariables. D SCR"B %AB$ Describes the attrib,tes of an internal table. Syntax DESCRI1E TA1LE 4LINES <l>6 4OCCURS<n>6 40IND <B>6. Depending on the additions yo, ,se2 writes the n,mber of lines occ,pied2 the .al,e specified for the !$!T!A" '!KE of the table2 or the table type into a corresponding .ariable. D"."D Di.ides one field by another. Syntax DIVIDE <n> 1/ <m>. Di.ides the content of *n+ by *m+2 and places the res,lt in *n+. The e-,i.alent of n / n L m. D"."D -CORR SPO!D"!# Di.ides matching components of str,ct,res. Syntax DIVIDE-CORRESPONDING <s !"#1> 1/ <s !"#2>. Di.ides all matching components of the str,ct,res *str,c1+ and *str,c3+ and places the res,lts into the corresponding components of *str,c1+. DO !ntrod,ces a loop. Syntax D% ;*n+ T!#E'= ;:A&?!$G *f+ F&%# *f1+ $E<T *f3+=.

!ntrod,ces a statement bloc8 that m,st concl,de with E$DD%. !f yo, omit the T!#E' addition2 the statement bloc8 is repeated ,ntil a termination statement s,ch as C EC> or E<!T occ,rs. The T!#E' addition restricts the n,mber of loop passes to *n+. The :A&?!$G addition allows yo, to process a se-,ence of fields the same distance apart in memory. D"%OR-CA$$ "oads an ABAP program or internal table into a te7t editor. Syntax EDITOR-CALL FOR <% $,>... EDITOR-CALL FOR REPORT <)!(.>... "oads the internal table *itab+ or the program *prog+ into a te7t editor2 where yo, can edit it ,sing standard editor f,nctions. $S !ntrod,ces a statement bloc8 in an !F control str,ct,re. Syntax ELSE. !f the logical e7pression in an !F statement is false2 E"'E introd,ces the statement bloc8 to be e7ec,ted instead. $S "F !ntrod,ces a statement bloc8 in an !F control str,ct,re. Syntax ELSEIF <l(.e7)>. !f the logical e7pression in the preceding !F is false and *loge7p+ is tr,e2 E"'E!F introd,ces the statement bloc8 that will be e7ec,ted. !D-OF-D F"!"%"O! Concl,des a macro definition. Syntax END-OF-DEFINITION. This statement concl,des a macro definition introd,ced with DEF!$!T!%$. !D-OF-PA# E.ent 8eyword for defining an e.ent bloc8 for a list e.ent. Syntax END-OF-PAGE. )hene.er the page footer is reached while a list is being created2 the r,ntime en.ironment triggers the E$D-%F-PAGE e.ent2 and the corresponding e.ent bloc8 is e7ec,ted. !D-OF-S $ C%"O! E.ent 8eyword for defining an e.ent bloc8 for a reporting e.ent. Syntax END-OF-SELECTION. %nce a logical database has read all of the re-,ired lines and passed them to the e7ec,table program2 the r,ntime en.ironment triggers the E$D-%F-'E"ECT!%$ e.ent2 and the corresponding e.ent bloc8 is e7ec,ted. !DA% Concl,des a statement bloc8 in control le.el processing. Syntax ENDAT. The statement concl,des a control le.el processing bloc8 introd,ced with the AT statement. !DCAS Concl,des a CA'E control str,ct,re. Syntax ENDCASE. This statement concl,des a control str,ct,re introd,ced with the CA'E statement. !DCA%C( Concl,des a CATC area. Syntax E$DCATC .

The statement concl,des an e7ception handling area introd,ced with CATC . !DC$ASS Concl,des a class definition. Syntax E$DC"A''. This statement concl,des a class declaration or implementation introd,ced with C"A''. !DDO Concl,des a D% loop. Syntax ENDDO. This statement concl,des a loop introd,ced with D%. !D / C Concl,des a $ati.e 'M" statement. Syntax ENDE5EC. This statement concl,des a $ati.e 'M" statement introd,ced with E<EC 'M". !DFOR+ Concl,des a s,bro,tine. Syntax ENDFORM. This statement concl,des a s,bro,tine definition introd,ced with F%&#. !DF'!C%"O! Concl,des a f,nction mod,le. Syntax ENDFUNCTION. This statement concl,des a f,nction mod,le introd,ced with F($CT!%$. !D"F Concl,des an !F control str,ct,re. Syntax ENDIF. This statement concl,des a control str,ct,re introd,ced ,sing !F. !D"!% RFAC Concl,des an interface definition. Syntax ENDINTERFACE. This statement concl,des an interface definition introd,ced with !$TE&FACE. !D$OOP Concl,des a loop. Syntax ENDLOOP. This statement concl,des a loop introd,ced with "%%P. !D+ %(OD Concl,des a method. Syntax ENDMETHOD. This statement concl,des a method implementation introd,ced with #ET %D. !D+OD'$ Concl,des a dialog mod,le. Syntax ENDMODULE. This statement concl,des a dialog mod,le introd,ced with #%D("E. !DO! Concl,des a conditional statement bloc8. Syntax ENDON. This statement concl,des a conditional statement bloc8 introd,ced with %$ C A$GE.

!DPRO."D Concl,des a P&%:!DE loop. Syntax ENDPROVIDE. This statement concl,des a loop introd,ced with P&%:!DE. !DS $ C% Concl,des a 'E"ECT loop. Syntax ENDSELECT. This statement concl,des a loop introd,ced with 'E"ECT. !D6("$ Concl,des a ) !"E loop. Syntax END-HILE. This statement concl,des a loop introd,ced with ) !"E. . !%S Defines e.ents in classes or interfaces. Syntax E:E$T' *e.t+ E<P%&T!$G.. :A"(E@*ei+A T?PE type ;%PT!%$A"=... The e.ent *e.t+ can be declared in the declaration part of a class or within an interface definition2 and may ha.e E<P%&T!$G parameters that are passed to the e.ent handler. The parameters are always passed by .al,e. / C S7$ !ntrod,ces a $ati.e 'M" statement. Syntax E5EC SCL 4PERFORMING <&(!m>6. Between E<EC 'M" and the E$DE<EC statement2 yo, can incl,de a database-specific $ati.e 'M" statement. The PE&F%&#!$G addition allows yo, to pass a m,ltiple-line selection line by line to a s,bro,tine. /"% Terminates a loop or processing bloc8. Syntax E5IT. )ithin a loopH The entire loop is terminated2 and processing contin,es with the first statement following the loop. %,tside a loopH Terminates the c,rrent processing bloc8. !n a reporting e.entH F,mps directly to the o,tp,t list. /"% FRO+ S% P-$OOP Ends a step loop. Syntax E5IT FROM STEP-LOOP. Terminates step loop processing. A step loop is a way of displaying a table on a screen. /"% FRO+ S7$ Terminates $ati.e 'M" processing. Syntax E5IT FROM SCL. This statement may occ,r within a s,bro,tine called ,sing the PE&F%&#!$G addition in the E<EC 'M" statement. The entire s,bro,tine is processed2 b,t no more s,bse-,ent lines of the selection are processed. /POR% E7ports a data cl,ster. Syntax E<P%&T... *fi+ ;F&%# *g i+=... G @*itab+A T% #E#%&? G DATABA'E *dbtab+@*ar+A !D@*8ey+A G ' A&ED B(FFE& *dbtab+@*ar+A !D@*8ey+A.

The data ob5ects *fi+ or *g i+2 or the data ob5ects in the internal table *itab+ are stored as a data cl,ster in the cross-program ABAP memory of the c,rrent internal session2 in a cl,ster database table *dbtab+2 or in the cross-transaction application b,ffer of the table *dbtab+. /%RAC% Creates an e7tract dataset and adds lines to it. Syntax E5TRACT <&.>. The first E<T&ACT statement in a program creates an e7tract dataset and adds the first entry to it. Each s,bse-,ent E<T&ACT statement adds a new entry. Each e7tract entry contains the fields of the field gro,p *fg+ and2 at the beginning2 the fields of the field gro,p EADE& as a sort 8ey.

F
F %C( (ses a c,rsor to read entries from a database table. Syntax FETCH NE5T CURSOR <#> INTO < $!.e >. !f the c,rsor *c+ is lin8ed with a selection in a database table2 FETC writes the ne7t line of the selection into the flat target area *target+. F" $D-#RO'PS Declares a field gro,p for an e7tract dataset. Syntax FIELD-GROUPS <&.>. Declares the field gro,p *fg+. Field gro,ps define the line str,ct,re of an e7tract dataset. ?o, can define a special field gro,p called EADE& as the sort 8ey. )hen yo, fill the e7tract dataset2 the EADE& field gro,p precedes each entry. F" $D-S)+BO$S Declares a field symbol. Syntax F!E"D-'?#B%"' *F'+ ;*type+G'T&(CT(&E *s+ DEFA("T *wa+=. Field symbols are placeholders or symbolic names for fields. The pointed brac8ets in the name of a field symbol are part of its synta7. The *type+ addition allows yo, to specify a type. The 'T&(CT(&E addition imposes a str,ct,re on the data ob5ect assigned to the field symbol. FOR+ Defines a s,bro,tine. Syntax F%&# *s,br+ ;('!$G ... ;:A"(E@=*pi+;A= ;T?PE *t+G"!>E *f+=... = ;C A$G!$G... ;:A"(E@=*pi+;A= ;T?PE *t+G"!>E *f+=... =. !ntrod,ces a s,bro,tine *form+. The ('!$G and C A$G!$G additions define the parameter interface. The s,bro,tine definition is concl,ded with the E$DF%&# statement. FOR+A% 'ets formatting options for list o,tp,t. Syntax F%&#AT... *optioni+ ;%$G%FF=... The formatting options *optioni+ @color2 for e7ampleA apply to all s,bse-,ent list o,tp,t ,ntil they are disabled with the %FF option. FR &eleases memory space. Syntax FREE <% $,>. FREE MEMOR/ IDD<Be8>E. FREE O12ECT <(,+>. This statement deletes an internal table2 a data cl,ster in ABAP memory2 or an e7ternal ob5ect in %"E3 A,tomation2 depending on the form of the statement ,sed. !t also releases the memory occ,pied by the ob5ect. F'!C%"O! Defines a f,nction mod,le. Syntax

FUNCTION <&"n#>. !ntrod,ces the f,nction mod,le *f,nc+. This statement does not ha.e to be entered in the ABAP Editor2 b,t is a,tomatically generated by the F,nction B,ilder in the ABAP )or8bench. The f,nction mod,le definition is concl,ded with the E$DF($CT!%$ statement. F'!C%"O!-POO$ !ntrod,ces a f,nction gro,p. Syntax FUNCTION-POOL. The first statement in a f,nction gro,p. This statement does not ha.e to be entered by hand2 b,t is generated a,tomatically by the F,nction B,ilder in the ABAP )or8bench. A f,nction gro,p is an ABAP program that contains f,nction mod,les.

#
# % E.ent 8eyword that defines e.ent bloc8s for reporting e.ents. Syntax GET *node+ ;F!E"D' *f1+ *f 3+...=. %nly occ,rs in e7ec,table programs. )hen the logical database has passed a line of the node *node+ to the program2 the r,ntime en.ironment triggers the GET e.ent2 and the corresponding e.ent bloc8 is e7ec,ted. The F!E"D' addition allows yo, to specify e7plicitly the col,mns of the node that the logical database sho,ld retrie.e. # % B"% &eads an indi.id,al bit. Syntax GET 1IT <n> OF <&> INTO <.>. &eads the bit at position *n+ of the he7adecimal field *f+ into the field *b+. # % C'RSOR Determines the c,rsor position on a screen or in an interacti.e list e.ent. Syntax GET C(&'%& F!E"D *f+ ;%FF'ET *off+= ;"!$E *lin+= ;:A"(E *.al+= ;"E$GT *len+=. GET C(&'%& "!$E *lin+ ;%FF'ET *off+= ;:A"(E *.al+= ;"E$GT *len+=. At a ,ser action on a list or screen2 the statement writes the position2 .al,e2 and displayed length of a field or line into the corresponding .ariables. # % $OCA$ $A!#'A# Finds o,t the c,rrent te7t en.ironment. Syntax GET LOCALE LANGUAGE <l.> COUNT/ <#> MODIFIER <m>. &et,rns the c,rrent lang,age2 co,ntry !D and any modifier into the corresponding .ariables. # % PARA+ % R Finds o,t the .al,e of a 'PALGPA parameter. Syntax GET PARAMETER ID <)%9> FIELD <&>. Places the .al,e of the 'PALGPA parameter *pid+ from the ,ser-specific 'AP memory into the .ariable *f+. # % PF-S%A%'S Finds o,t the c,rrent G(! stat,s. Syntax GET PF-STATUS <&> 4PROGRAM <)!(.>6 4E5CLUDING <% $,>6. &et,rns the name of the c,rrent G(! stat,s @the same as '?-PF>E?A into the .ariable *f+. The P&%G&A# addition writes the name of the ABAP program to which the stat,s belongs into the .ariable *prog+. The E<C"(D!$G addition ret,rns a list of all c,rrently inacti.e f,nction codes into the internal table *itab+.

# % PROP R%) Finds o,t a property of an %"E3 A,tomation ob5ect. Syntax GET PROPERT/ OF <(,+> <)> : <&>. &et,rns the property *p+ of an e7ternal %"E3 A,tomation ob5ect to the .ariable *f+. # % R'! %"+ F" $D #eas,res the r,ntime in microseconds. Syntax GET RUN TIME FIELD <&>. The first time the statement is e7ec,ted2 the .ariable *f+ is set to 4ero. !n each f,rther call2 the r,ntime since the first call is written to *f+. # % %"+ 'ynchroni4es the time. Syntax GET TIME 4FIELD <&>6. &efreshes the system fields '?-(KE!T2 '?-DAT(#2 '?-T!#"%2 '?-DAT"%2 and '?-K%$"%. !f yo, ,se the F!E"D addition2 the .ariable *f+ is filled with the c,rrent time. # % %"+ S%A+P F" $D &et,rns a time stamp. Syntax GET TIME STAMP FIELD <&>. &et,rns the short or long form of the c,rrent date and time2 depending on whether the .ariable *f+ has the type P@CA or P@11A. The long form ret,rns the time correct to se.en decimal places.

(
("D 'tores information abo,t list lines. Syntax HIDE <&>. D,ring list creation2 this statement stores the contents of the field *f+ and the c,rrent line n,mber in the internal !DE area. )hen the c,rsor is positioned on a line in an interacti.e list e.ent2 the stored .al,e is ret,rned to the field *f+.

"
"F Conditional branching. !ntrod,ces a new branch. Syntax IF <l(.e7)>. %pens an !F control str,ct,re that m,st be concl,ded with E$D!F. The system e.al,ates the logical e7pression *loge7p+2 and processes different statement bloc8s depending on the res,lt. "+POR% !mports a data cl,ster. Syntax !#P%&T... *fi+ ;T% *g i+=... G @*itab+A F&%# #E#%&? G DATABA'E *dbtab+@*ar+A !D@*8ey+A G ' A&ED B(FFE& *dbtab+@*ar+A !D@*8ey+A. The data ob5ects *fi+ or the ob5ects listed in the table *itab+ are written from data cl,sters in the crossprogram ABAP memory of the c,rrent internal session2 a cl,ster database table *dbtab+2 or the crosstransaction application b,ffer of the table *dbtab+ into the .ariables *f i+ or *g i+. "+POR% D"R C%OR) Creates the directory of a data cl,ster from a cl,ster database. Syntax !#P%&T D!&ECT%&? !$T% *itab+ F&%# DATABA'E *dbtab+@*ar+A !d *8ey+.

The statement creates a directory of the data ob5ects in a data cl,ster of the cl,ster database *dbtab+ and writes it to the internal table *itab+. !n the third .ariant2 the table *itab+ contains a directory of the ob5ects stored ,sing E<P%&T T% DATABA'E. "!C$'D !nserts an incl,de program in another program. Syntax INCLUDE <%n#l>. This has the same effect as inserting the so,rce code of the incl,de program *incl+ at the same position in the program as the !$C"(DE statement. !ncl,des are not loaded dynamically at r,ntime2 b,t are a,tomatically e7panded when the program is loaded. An incl,de m,st ha.e the program type !. "!C$'D S%R'C%'R !ncl,des a str,ct,re within another. Syntax INCLUDE STRUCTURE <s>*T/PE < >. Adopts the str,ct,re of an ABAP Dictionary str,ct,re *s+ or a str,ct,red data type *t+ as part of a new str,ct,re declared ,sing DATA BEG!$ %F I "!"%"A$"8A%"O! E.ent 8eyword that defines an e.ent bloc8 for a reporting e.ent. Syntax INITIALI>ATION. %nly occ,rs in e7ec,table programs. The ABAP r,ntime en.ironment triggers the !$!T!A"!KAT!%$ e.ent before the selection screen is processed2 at which point the corresponding e.ent bloc8 is processed. "!S R% for Data1ase %a1les !nserts lines into a database table. Syntax !$'E&T *dbtab+ F&%# *wa+. !$'E&T *dbtab+ F&%# TAB"E *itab+ ;ACCEPT!$G D(P"!CATE >E?'=. !nserts one line from the wor8 area *wa+ or se.eral lines from the internal table *itab+ into the database table *dbtab+. The addition ACCEPT!$G D(P"!CATE >E?' pre.ents a r,ntime error from occ,rring if two entries ha.e the same primary 8ey. !nstead2 it merely discards the d,plicate. "!S R% for Field #rou-s Defines the str,ct,re of field gro,ps for e7tract datasets. Syntax !$'E&T *f1+... *f n+ !$T% *fg+. !ncl,des the fields *fi+ in the field gro,p *fg+2 th,s defining a line str,ct,re for an e7tract dataset. "!S R% for any "nternal %a1le !nserts lines in an internal table of any type. Syntax !$'E&T *line+G"!$E' %F *5tab+ ;F&%# *n1+= ;T% *n 3+= !$T% TAB"E *itab+. !nserts a line *line+ or a set of lines from the internal table *5tab+ into the internal table *itab+. !f *5tab+ is an inde7 table2 yo, can ,se the F&%# and T% additions to restrict the lines inserted. "!S R% for "ndex %a1les !nserts lines in inde7 tables. Syntax !$'E&T *line+G"!$E' %F *5tab+ ;F&%# *n1+= ;T% *n 3+= !$T% *itab+ ;!$DE< *id7+=. !nserts a line *line+ or a set of lines from an internal table *5tab+ into the internal table *itab+ before the line with the inde7 *id7+. !f *5tab+ is an inde7 table2 yo, can restrict the lines to be inserted ,sing the F&%# and T% additions. !f yo, omit the !$DE< addition2 yo, can only ,se the statement within a "%%P constr,ction. !n this case2 the new line is inserted before the c,rrent line. "!S R% for Programs !nserts ABAP programs into the program library. Syntax !$'E&T &EP%&T *prog+ F&%# *itab+.

The lines of the internal table *itab+ are added to the program library as the program *prog+. "!% RFAC Defines an interface in ABAP %b5ects. Syntax INTERFACE <%&$#> 4DEFERRED6 4LOAD6. !ntrod,ces the definition of the interface *interface+. The definition concl,des with E$D!$TE&FACE2 and contains the declaration of all of the components in the interface. ?o, can ,se the DEFE&&ED addition to declare the interface before yo, act,ally define it. The "%AD addition loads the interface definition e7plicitly from the class library. "!% RFAC S !mplements interfaces in a class. Syntax INTERFACES <%&$#>. (sed in a class declarationH This statement adds the components of the interface to the e7isting class definition. (sed in an interface definitionH Forms a compo,nd interface.

$
$ A. for Screens "ea.es a screen. Syntax LEAVE SCREEN. Terminates the c,rrent screen and calls the ne7t screen. The ne7t screen can either be defined statically in the screen attrib,tes or set dynamically ,sing the 'ET 'C&EE$ statement. Syntax LEAVE TO SCREEN <s#!>. Terminates the c,rrent screen and calls the dynamically-defined ne7t screen *scr+. $ A. for $ists During Screen Processing 'witches between screen and list processing. Syntax LEAVE TO LIST-PROCESSING 4AND RETURN TO SCREEN <s#!>6. This statement allows yo, to create and display a list while processing a series of screens. The addition allows yo, to specify the ne7t screen @to which yo, ret,rn after the list has been displayedA. !f yo, do not ,se the addition2 screen processing res,mes with the PB% of the c,rrent screen. Syntax LEAVE LIST-PROCESSING. Allows yo, to switch bac8 e7plicitly from list processing to screen processing. $ A. for Programs Terminates an ABAP program. Syntax LEAVE 4PROGRAM6. Terminates the c,rrent program and ret,rns to the point from which it was called. Syntax LEAVE TO TRANSACTION < #(9> 4AND S0IP FIRST SCREEN6. Terminates the c,rrent program and starts a new transaction *tcod+. The addition allows yo, to s8ip the initial screen of the transaction. $OCA$ Protects global data against changes. Syntax LOCAL <&>. %nly occ,rs in s,bro,tines. )hen the s,bro,tine starts2 the .al,e of *f+ is stored temporarily2 and restored to the .ariable *f+ at the end of the s,bro,tine. $OOP %4roug4 xtracts 'tarts a loop thro,gh an e7tract dataset. Syntax LOOP.

"oops thro,gh an e7tract dataset. The loop is concl,ded with E$D"%%P. )hen the "%%P statement is e7ec,ted2 the system finishes creating the e7tract dataset2 and loops thro,gh all of its entries. %ne entry is read in each loop pass. The .al,es of the e7tracted data are placed in the o,tp,t fields of the field gro,p within the loop. $OOP %4roug4 "nternal %a1les 'tarts a loop thro,gh an internal table. Syntax "%%P AT *itab+ !$T% *wa+ ) E&E *loge7p+. "%%P AT *itab+ A''!G$!$G *F'+ ) E&E *loge7p+. "%%P AT *itab+ T&A$'P%&T!$G $% F!E"D' ) E&E *loge7p+. "oops thro,gh an internal table. The loop is concl,ded with E$D"%%P. !f the logical e7pression *loge7p+ is tr,e2 the c,rrent line contents are either placed in the wor8 area *wa+2 assigned to the field symbol *F'+2 or not assigned at all. The first operand in each part of *loge7p+ m,st be a component of the internal table. The pointed brac8ets in the field symbol name are part of its synta7. )ith inde7 tables2 yo, can ,se the additions F&%# *n+ and T% *n+ to restrict the lines that are read by specifying an inde7 range. $OOP %4roug4 Screen Fields 'tarts a loop thro,gh the special table 'C&EE$. Syntax LOOP AT SCREEN... 'imilar to a loop thro,gh an internal table. The system table 'C&EE$ contains the names and attrib,tes of all of the fields on the c,rrent screen.

+
+ SSA# %,tp,ts a message. Syntax MESSAGE <7nnn> 4-ITH <&1>... <&F>6 4RAISING <e7#e) >6. MESSAGE ID <m%9> T/PE <7> NUM1ER <nnn>. MESSAGE <7nnn>D<m%9>E. %,tp,ts the message *nnn+ of message class *mid+ as message type *7+. The message type determines how the message is displayed2 and how the program reacts. The )!T addition allows yo, to fill placeholders in the message te7t. The &A!'!$G addition in f,nction mod,les and methods allows yo, to terminate the proced,re and trigger the e7ception *e7ception+. + %(OD !ntrod,ces the implementation of a method in a class. Syntax METHOD <me ;>. %nly occ,rs in the implementation part of classes. This statement begins a statement bloc8 that m,st be concl,ded with E$D#ET %D. ?o, do not ha.e to specify any interface parameters2 since these are defined in the method declaration. + %(ODS Declares methods in classes and interfaces. Syntax #ET %D' *meth+ !#P%&T!$G... ;:A"(E@=*ii+;A= T?PE *t+ ;%PT!%$A"=... E<P%&T!$G... ;:A"(E@=*ei+;A= T?PE *t+ ;%PT!%$A"=... C A$G!$G ... ;:A"(E@=*ci+;A= T?PE *t+ ;%PT!%$A"=... &ET(&$!$G :A"(E@*r+A E<CEPT!%$' ... *ei+... Declares a method *meth+ in the declaration part of a class or in an interface definition. The additions define the parameter interface and e7ceptions of the method. The f,nction of the method m,st be implemented ,sing the #ET %D statement. +OD"F) for Data1ase %a1les !nserts or changes lines in database tables. Syntax #%D!F? *dbtab+ F&%# *wa+.

#%D!F? *dbtab+ F&%# TAB"E *itab+. )or8s li8e !$'E&T for database tables if there is not yet a line in the table with the same primary 8ey. )or8s li8e (PDATE if a line already e7ists with the same primary 8ey. +OD"F) for All "nternal %a1les Changes the contents of lines in any type of internal table. Syntax #%D!F? TAB"E *itab+ F&%# *wa+ ;T&A$'P%&T!$G *f 1+ *f 3+...=. Copies the wor8 area *wa+ into the line of the internal table with the same table 8ey as *wa+. ?o, can ,se the T&A$'P%&T!$G addition to specify the e7act components that yo, want to change. #%D!F? *itab+ F&%# *wa+ T&A$'P%&T!$G *f1+ *f 3+... ) E&E *loge7p+. Copies the wor8 area *wa+ into the lines of the internal table for which the logical e7pression is tr,e. The first operand in each comparison of the logical e7pression m,st be a component of the line str,ct,re. +OD"F) for "ndex %a1les Changes the contents of lines in inde7 tables. Syntax #%D!F? *itab+ F&%# *wa+ ;!$DE< *id7+= ;T&A$'P%&T!$G *f1+ *f 3+...=. Copies the wor8 area *wa+ into the line of the internal table with inde7 *id7+. !f yo, omit the !$DE< addition2 yo, can only ,se the statement within a "%%P. This changes the c,rrent line. +OD"F) for $ists Changes a line of a list. Syntax #%D!F? "!$E *n+ ;!$DE< *id7+= ;%F C(&&E$T PAGEG%F PAGE *p+= GC(&&E$T "!$E "!$E F%&#AT *option1+ *option3+... F!E"D :A"(E *f1+ ;F&%# *g1+= *f3+ ;F&%# *g3+=... F!E"D F%&#AT *f1+ *options1+ *f3+ *options3+ Changes either line *n+ on the c,rrent or specified list @or pageA2 or the last line to be chosen. The e7act nat,re of the change is specified in the additions. +OD"F) SCR ! Changes the table 'C&EE$. Syntax MODIF/ SCREEN... "i8e changing an internal table. This statement allows yo, to change the attrib,tes of fields on the c,rrent screen. +OD'$ !ntrod,ces a dialog mod,le. Syntax MODULE <m(9> OUTPUT *4INPUT6. !ntrod,ces the dialog mod,le *mod+. The %(TP(T and !$P(T additions designate the mod,le as a PB% or PA! mod,le respecti.ely. Each mod,le m,st concl,de with the E$D#%D("E statement. +O. Assigns .al,es. Syntax MOVE <&1> TO <&2>. Assigns the contents of the data ob5ect *f1+ to the .ariable *f3+2 with a,tomatic type con.ersion if necessary. E-,i.alent to *f3+ / *f1+. +O. -CORR SPO!D"!# Assigns .al,es between identically-named components of str,ct,res. Syntax MOVE-CORRESPONDING <s !"#1> TO <s !"#2>. The contents of the components of the str,ct,re *str,c1+ are assigned to the identically-named components of the str,ct,re *str,c3+. +'$%"P$) #,ltiplies two indi.id,al fields. Syntax MULTIPL/ <n> 1/ <m>.

The contents of *n+ are m,ltiplied by the contents of *m+2 and the res,lt is placed in *m+. E-,i.alent is # / m N n. +'$%"P$)-CORR SPO!D"!# #,ltiplies components of str,ct,res. Syntax MULTIPL/-CORRESPONDING <s !"#1> 1/ <s !"#2>. #,ltiplies all of the identically-named components of *str,c1+ and *str,c3+ and places the res,lts in the components in *str,c1+.

!
! 6-$"! !nserts a line brea8 in a list. Syntax NE--LINE 4NO-SCROLLING*SCROLLING6. Positions the list o,tp,t on a new line. The $%-'C&%""!$G addition loc8s the line against hori4ontal scrolling. To lift the loc82 ,se the 'C&%""!$G addition. ! 6-PA# !nserts a page brea8 in a list. Syntax NE--PAGE 4NO-TITLE*-ITH-TITLE6 4NO-HEADING*-ITH-HEADING6 4LINE-COUNT6 4LINE-SI>E6 4PRINT ON*OFF6. Generates a new page and positions the list o,tp,t after the page header. The additions control how the page header is displayed2 the length and width of the page2 and the print o,tp,t. !OD S Declares an interface wor8 area. Syntax NODES <n(9e>. Declares a .ariable with the same data type and the same name as a data type from the ABAP Dictionary. 'tr,ct,res in main programs and s,bro,tines declared with nodes ,se a common data area. This statement is ,sed in con5,nction with logical databases.

O
O! C(A!# !ntrod,ces a branch. Syntax ON CHANGE OF <&> 4OR <&1> OR <&2>...6. %pens an %$ control str,ct,re2 concl,ded with E$D%$. The statement bloc8 is e7ec,ted whene.er the contents of the field *f+ or one of the other fields *fi+ has changed since the statement was last e7ec,ted. OP ! C'RSOR %pens a database c,rsor. Syntax %PE$ C(&'%& ;)!T %"D= *c+ F%& 'E"ECT *res,lt+ F&%# *so,rce+ ;) E&E *condition+= ;G&%(P B? *fields+= ; A:!$G *cond+= ;%&DE& B? *fields+=. %pens a c,rsor *c+ with type C(&'%& for a 'E"ECT statement. All of the cla,ses of the 'E"ECT statement apart from the !$T% cla,se can be ,sed. The !$T% cla,se is set in the FETC statement. !f yo, ,se the )!T %"D addition2 the c,rsor is not closed when a database commit occ,rs. OP ! DA%AS % %pens a file. Syntax

OPEN DATASET <9sn> 4FOR INPUT*OUTPUT*APPENDING6 4IN 1INAR/*TE5T MODE6 4AT POSITION <)(s>6 4MESSAGE <mess>6 4FILTER <&%l >6. %pens a file *dsn+ on the application ser.er. The additions determine whether the file is for reading or writing2 whether the contents are to be interpreted in binary or character form2 the position in the file2 the location to which an operating system can be written2 and allow yo, to e7ec,te an operating system command. O. R$A) %.erlays a character string with another. Syntax OVERLA/ <#1> -ITH <#2> 4ONL/ <s !>6. All of the characters in field *c1+ that occ,r in *str+ are o.erlaid with the contents of *c3+. *c3+ remains ,nchanged. !f yo, omit the %$"? *str+ addition2 all positions in *c1+ containing spaces are o.erwritten.

P
PAC* Con.erts type C .ariables into type P. Syntax PAC0 <&> TO <.>. Pac8s the string *f+ and places it in the field *g+. This can be re.ersed with the ($PAC> statement. PARA+ % RS Declares parameters for a selection screen. Syntax PARAMETERS <)>4D<len. ;>E6 4T/PE < 8)e>*LI0E <(,+>6 4DECIMALS <9>6 4DEFAULT <&>6 4MEMOR/ ID <)%9>6 4LO-ER CASE6 4O1LIGATOR/6 4VALUE CHEC06 4AS CHEC01O56 4RADIO1UTTON GROUP <!$9%>6 4NO-DISPLA/6 4MODIF ID <Be8>6. Declares a .ariable *p+2 as in the DATA statement. owe.er2 the PA&A#ETE&' statement also creates an inp,t field for *p+ on the rele.ant selection screen. ?o, can ,se the additions to define defa,lt .al,es2 accept lowercase inp,t2 define the field as re-,ired2 chec8 .al,es2 define a chec8bo7 or radio b,tton2 pre.ent the field from being displayed on the selection screen2 or modify the field. P RFOR+ Calls a s,bro,tine. Syntax PE&F%&# *s,br+ G *s,br+@*prog+A ;!F F%($D= G@*fs,br+A;!$ P&%G&A# @*fprog+A=;!F F%($D= ;('!$G ... *pi+... = ;C A$G!$G... *pi+... = ;%$ C%##!T=. Calls an internal or e7ternal s,bro,tine *s,br+ or the s,bro,tine whose name occ,rs in the *fs,br+ field. The e7ternal program is *prog+ or the name contained in *fprog+. The !F F%($D addition pre.ents a r,ntime error from occ,rring if the s,bro,tine does not e7ist. ?o, m,st ,se the ('!$G and C A$G!$G additions to s,pply .al,es to the interface parameters of the s,bro,tine. The %$ C%##!T addition delays the e7ec,tion of the s,bro,tine ,ntil the ne7t C%##!T )%&> statement. POS"%"O! Absol,te positioning of the o,tp,t on a list. Syntax POSITION <#(l>.

Positions the list o,tp,t in col,mn *col+. PR"!%-CO!%RO$ for Print Format 'pecifies the print format. Syntax P&!$T-C%$T&%" *formats+ ;"!$E *lin+= ;P%'!T!%$ *col+=. 'ets the print format starting either at the c,rrent list position or at line *lin+ and col,mn *col+. PR"!%-CO!%RO$ for "ndex $ines Creates inde7 lines in the spool file. Syntax PRINT-CONTROL INDE5-LINE <&>. )rites the contents of the field *f+ into an inde7 line at the end of the c,rrent print line. The inde7 line is not printed. !n optical archi.ing2 the spool system separates the lists into a data file and a description file containing the inde7 lines. PR".A% Defines the pri.ate section of a class. Syntax PRIVATE SECTION. !ntrod,ces the declaration of all of the components of a class that are only .isible in the class itself. PRO#RA+ !ntrod,ces a program. Syntax PROGRAM <)!(.>... The first statement in some ABAP programs. E-,i.alent of &EP%&T. PRO% C% D Defines the protected section of a class. Syntax PROTECTED SECTION. !ntrod,ces the declaration of all of the components of a class that are only .isible in the class and its s,bclasses. PRO."D "oops thro,gh internal tables at gi.en inter.als. Syntax PROVIDE <&1>... <&n> FROM <% $,1> <.1>... <.m> FROM <% $,2> ... FROM <% $,n> ... 1ET-EEN <&> AND <.>. The contents of the specified fields of the internal tables *itab1+ I *itabn+ are placed in their header lines. Then2 the processing bloc8 between P&%:!DE and E$DP&%:!DE is e7ec,ted for each inter.al. P'B$"C Defines the p,blic section of a class. Syntax PU1LIC SECTION. !ntrod,ces the declaration of all components of a class that are .isible in the class2 its s,bclasses2 and for all ,sers. P'% Triggers a GET e.ent. Syntax PUT <n(9e>. %nly occ,rs in logical databases. Branches the program flow according to the str,ct,re of the logical database.

R
RA"S for xce-tions Triggers an e7ception. Syntax RAISE <e7#e) >.

%nly occ,rs in f,nction mod,les and methods. Terminates the proced,re and triggers the e7ception *e7cept+. RA"S for vents Triggers an e.ent in ABAP %b5ects. Syntax RAISE EVENT <e< >. %nly occ,rs in methods. The e.ent *e.t+ is triggered2 and this calls all of the handler methods registered for it. RA!# S Declares a &A$GE' table. Syntax RANGES <!$n.e $,> FOR <&>. Declares a &A$GE' table for the field *f+. &A$GE' tables ha.e the same data type as a selection table2 b,t they do not ha.e inp,t fields on a selection screen. R AD for Files &eads a file. Syntax &EAD DATA'ET *dsn+ !$T% *f+ ;"E$GT *len+=. &eads the contents of the file *dsn+ on the application ser.er to the .ariable *f+. The n,mber of bytes transferred can be written to *len+. R AD for any "nternal %a1le &eads a line from any internal table. Syntax &EAD TAB"E *itab+ F&%# *wa+ G)!T TAB"E >E? *81+ / *f1+... *8n+ / *fn+ G)!T >E? / *f+ G)!T >E? *81+ / *f1+... *8n+ / *fn+ !$T% *wa+ ;C%#PA&!$G *f1+ *f3+... GA"" F!E"D'= ;T&A$'P%&T!$G *f1+ *f3+... GA"" F!E"D'G$% F!E"D'= GA''!G$!$G *F'+. This statement reads either the line of the internal table with the same 8ey as specified in the wor8 area *wa+2 the line with the 8ey specified in the TAB"E >E? addition2 the line that corresponds f,lly to *f+2 or the one corresponding to the freely-defined 8ey in the >E? addition. The contents of the line are either written to the wor8 area *wa+2 or the line is assigned to the field symbol *F'+. !f yo, assign the line to a wor8 area2 yo, can compare field contents and specify the fields that yo, want to transport. R AD for "ndex %a1les &eads a line of an inde7 table. Syntax &EAD TAB"E *itab+ !$DE< *id7+ !$T% *wa+... G A''!G$!$G *F'+. &eads the line with the inde7 *id7+. The res,lt is a.ailable as described abo.e. R AD for $ists &eads the contents of a line from a list. Syntax &EAD "!$E *n+ ;!$DE< *id7+= ;%F C(&&E$T PAGEG%F PAGE *p+= GC(&&E$T "!$E ;F!E"D :A"(E *f1+ ;!$T% *g1+=... *fn+ ;!$T% *gn+==. &eads either the line *n+ on the c,rrent or specified list or page2 or the last line to ha.e been selected by the ,ser. The addition specifies the fields that yo, want to read2 and the target fields into which they sho,ld be placed. The entire line is always placed in the system field '?-"!'E"2 and the !DE area is filled for the line. R AD for Programs &eads ABAP programs from the program library. Syntax &EAD &EP%&T *prog+ !$T% *itab+. Copies the lines of the program *prog+ into the internal table *itab+. R C ".

&ecei.es res,lts from an asynchrono,s f,nction mod,le call. Syntax RECEIVE RESULTS FROM FUNCTION <&"n#> 40EEPING TAS06 4IMPORTING ... &% : $ %... 6 4TA1LES ... &% : $ %... 6 4E5CEPTIONS... e% : ! %... 6 %cc,rs in special s,bro,tines to recei.e !#P%&T!$G and TAB"E' parameters from f,nction mod,les called ,sing the 'TA&T!$G $E) TA'> addition. R FR S( !nitiali4es an internal table. Syntax REFRESH <% $,>. &esets the internal table *itab+ to its initial .al,e2 that is2 deletes all of its lines. R FR S( CO!%RO$ !nitiali4es a control. Syntax REFRESH CONTROL <# !l> FROM SCREEN <s#!>. The control *ctrl+ defined in the C%$T&%"' statement is reset with the initial .al,es specified for screen *scr+. R 0 C% Terminates a GET processing bloc8. Syntax RE2ECT 4<9, $,>6. 'tops processing the c,rrent line of the node of the logical database. !f yo, specify *dbtab+2 the logical database reads the ne7t line of the node *dbtab+2 otherwise the ne7t line of the c,rrent node. R P$AC &eplaces strings in fields with another string. Syntax REPLACE <s !1> -ITH <s !2> INTO <#> 4LENGTH <l>6. This statement searches the first occ,rrence of the first *l+ characters of the search pattern *str1+ in field *c+ and replaces them with the string *str3+. R POR% !ntrod,ces a program. Syntax REPORT <!e)> 4MESSAGE-ID <m%9>6 4NO STANDARD PAGE HEADING6 4LINE-SI>E <#(l>6 4LINE-COUNT <n>D<m>E6 4DEFINING DATA1ASE <l9,>6. This is the first statement within certain ABAP programs. *rep+ can be any name yo, choose. The addition #E''AGE-!D specifies a message class to be ,sed in the program. The DEF!$!$G DATABA'E addition defines the program as the database program of the logical database *ldb+. The other options are formatting specifications for the defa,lt list of the program. R S R. Conditional page brea8 in a list. Syntax RESERVE <n> LINES. E7ec,tes a page brea8 on the c,rrent page if less than *n+ lines are free between the c,rrent line and the page footer. RO$$BAC* (ndoes the changes in a 'AP "(). Syntax ROLL1AC0 -OR0. (ndoes all changes within a database "() to the beginning of the "(). The registered ,pdate mod,les are not e7ec,ted2 and the record entry is deleted from table :B"%G.

SCRO$$ 'crolls in a list. Syntax 'C&%"" "!'T F%&)A&DGBAC>)A&D ;!$DE< *id7+=. 'C&%"" "!'T T% F!&'T PAGEG"A'T PAGEGPAGE *pag+ ;!$DE< *id7+= ;"!$E *lin+=. 'C&%"" "!'T "EFTG&!G T ;B? *n+ P"ACE'= ;!$DE< *id7+=. 'C&%"" "!'T T% C%"(#$ *col+ ;!$DE< *id7+=. Positions the c,rrent list or the list le.el *id7+ in accordance with the additions specified. ?o, can scroll by window2 page2 col,mns2 or to the left- or right-hand edge of the list. S ARC( 'earches for a string. Syntax SEARCH <&>*<% $,> FOR <.> 4A11REVIATED6 4STARTING AT <n1>6 4ENDING AT <n2>6 4AND MAR06. 'earches the field *f+ or the table *itab+ for the string in field *g+. The res,lt is placed in the system field '?-FDP%'. The additions allow yo, to hide intermediate characters2 search from and to a partic,lar position2 and con.ert the fo,nd string into ,ppercase. S $ C% &eads data from the database. Syntax 'E"ECT *res,lt+ !$T% *target+ F&%# *so,rce+ ;) E&E *condition+= ;G&%(P B? *fields+= ; A:!$G *cond+= ;%&DE& B? *fields+=. The 'E"ECT statement consists of a series of cla,ses2 each of which f,lfils a certain tas8H S $ C% clause Defines the str,ct,re of the selection. Syntax 'E"ECT ;'!$G"E=G;D!'T!$CT= N G *si+ ;A' *a i+=... *agg+@ ;D!'T!$CT= *s 5+A ;A' *a 5+=... The selection can be a single line '!$G"E or a series of lines. ?o, can eliminate d,plicate lines ,sing the D!'T!$CT addition. To select the entire line2 ,se N2 otherwise2 yo, can specify indi.id,al col,mns *s i+. For indi.id,al col,mns2 yo, can ,se aggregate f,nctions *agg+2 and assign alternati.e col,mn names *a i+. "!%O clause Defines the target area into which the selection from the 'E"ECT cla,se is to be placed. Syntax ... !$T% ;C%&&E'P%$D!$G F!E"D' %F= *wa+ G !$T%GAPPE$D!$G ;C%&&E'P%$D!$G F!E"D' %F= TAB"E *itab+ ;PAC>AGE '!KE *n+= G !$T% @*f1+2 *f 3+2...A The target area can be a flat wor8 area *wa+2 an internal table *itab+2 or a list of fields *f i+. !f yo, ,se the C%&&E'P%$D!$G F!E"D' addition2 data is only selected if there is an identically-named field in the target area. !f yo, ,se APPE$D!$G instead of !$T%2 the data is appended to an internal table instead of o.erwriting the e7isting contents. PAC>AGE '!KE allows yo, to o.erwrite or e7tend the internal table in a series of pac8ages. The data type of the target area m,st be appropriate for the selection in the 'E"ECT cla,se. FRO+ clause 'pecifies the database tables from which the data in the selection in the 'E"ECT cla,se is to be read. Syntax

... F&%# ;*tab+ ;!$$E&=G"EFT ;%(TE&= F%!$= *dbtab+ ;A' *alias+= ;%$ *cond+= ;C"!E$T 'PEC!F!ED= ;B?PA''!$G B(FFE&= ;(P T% *n+ &%)'= ?o, can read a single table *dbtab+ or more than one table2 ,sing inner and o,ter 5oins to lin8 tables with conditions *cond+2 where *tab+ is a single table or itself a 5oin condition. ?o, can specify indi.id,al database tables either statically or dynamically2 and yo, can replace their names with an alternati.e *alias+. ?o, can bypass a,tomatic client handling with the C"!E$T 'PEC!F!ED addition2 and 'AP b,ffering with B?PA''!$G B(FFE&. ?o, can also restrict the n,mber of lines read from the table ,sing the (P T% *n+ &%)' addition. 6( R clause &estricts the n,mber of lines selected. Syntax ... ;F%& A"" E$T&!E' !$ *itab+= ) E&E *cond+ The condition *cond+ may contain one or more comparisons2 tests for belonging to inter.als2 .al,e list chec8s2 s,b-,eries2 selection table -,eries or n,ll .al,e chec8s2 all lin8ed with A$D2 %&2 and $%T. !f yo, ,se the F%& A"" E$T&!E' addition2 the condition *cond+ is chec8ed for each line of the internal table *itab+ as long as *cond+ contains a field of the internal table as an operand. For each line of the internal table2 the lines from the database table meeting the condition are selected. The res,lt set is the ,nion of the indi.id,al selections res,lting from each line. #RO'P B) clause Gro,ps lines in the selection Syntax ... G&%(P B? *s1+ *s 3+ Gro,ps lines with the same contents in the specified col,mns. (ses aggregate f,nctions for all other col,mns in each gro,p. All col,mns listed in the 'E"ECT cla,se that do not appear in the G&%(P B? addition m,st be specified in aggregate e7pressions. (A."!# clause &estricts the n,mber of line gro,ps. Syntax ... A:!$G *cond+ "i8e the ) E&E cla,se2 b,t can only be ,sed in con5,nction with a G&%(P B? cla,se. Applies conditions to aggregate e7pressions to red,ce the n,mber of gro,ps selected. ORD R B) clause 'orts the lines in the selection. Syntax ... %&DE& B? P&!#A&? >E? G... *si+ ;A'CE$D!$GGDE'CE$D!$G=... 'orts the selection in ascending or descending order according to the primary 8ey or the contents of the fields listed. S $ C%-OP%"O!S Declares selection criteria for a selection screen. Syntax SELECT-OPTIONS <sel> FOR <&> 4DEFAULT <.> 4 ( <;>6 4OPTION <()>6 SIGN <s>6 4MEMOR/ ID <)%9>6 4LO-ER CASE6 4O1LIGATOR/6 4NO-DISPLA/6 4MODIF ID <Be8>6 4NO-E5TENSION6 4NO INTERVALS6 4NO DATA1ASE SELECTION6. Declares a selection table *sel+ for the field *f+2 and also places inp,t fields on the corresponding selection screen. The additions allow yo, to set a defa,lt .al,e2 accept inp,t in lowercase2 define a

re-,ired field2 s,ppress or modify the display on the selection screen2 restrict the selection table to a line or a selection to a single field2 or pre.ent inp,t from being passed to a logical database. S $ C%"O!-SCR ! for Selection Screen Formatting Formats a selection screen. Syntax 'E"ECT!%$-'C&EE$ '>!P ;*n+=. 'E"ECT!%$-'C&EE$ ("!$E ;;L=*pos@lenA+= ;#%D!F !D *8ey+=. 'E"ECT!%$-'C&EE$ C%##E$T ;L=*pos@lenA+ *comm+ ;F%& F!E"D *f+= ;#%D!F !D *8ey+=. 'E"ECT!%$-'C&EE$ BEG!$ %F "!$E. ... 'E"ECT!%$-'C&EE$ E$D %F "!$E. 'E"ECT!%$-'C&EE$ BEG!$ %F B"%C> *bloc8+ ;)!T F&A#E ;T!T"E *title+== ;$% !$TE&:A"'=. ... 'E"ECT!%$-'C&EE$ E$D %F B"%C> *bloc8+. 'E"ECT!%$-'C&EE$ F($CT!%$ >E? *i+. 'E"ECT!%$ 'C&EE$ P(' B(TT%$ ;L=*pos@lenA+ *p,sh+ ('E&-C%##A$D *,com+ ;#%D!F !D *8ey+=. Allows yo, to insert blan8 lines2 lines and comments2 gro,p inp,t fields together in lines and bloc8s2 and create p,shb,ttons. S $ C%"O!-SCR ! for Defining Selection Screens Defines selection screens. Syntax 'E"ECT!%$-'C&EE$ BEG!$ %F *n,mb+ ;T!T"E *tit+= ;A' )!$D%)=. ... 'E"ECT!%$-'C&EE$ E$D %F *n,mb+. Defines a selection screen with the screen n,mber *n,mb+. All PA&A#ETE&'2 'E"ECT-%PT!%$'2 and 'E"ECT!%$-'C&EE$ statements within the 'E"ECT!%$-'C&EE$ BEG!$ %F I E$D %F bloc8 belong to the selection screen *n,mb+. The T!T"E addition allows yo, to define a title for the selection screen. The A' )!$D%) addition allows yo, to define the selection screen as a modal dialog bo7. S $ C%"O!-SCR ! for Selection Screen .ersions Defines selection screen .ersions. Syntax 'E"ECT!%$-'C&EE$ BEG!$ %F :E&'!%$ *dynnr+ ... 'E"ECT!%$-'C&EE$ E<C"(DE *f+. ... 'E"ECT!%$-'C&EE$ BEG!$ %F :E&'!%$ *dynnr+. %nly in logical databases. The statement hides fields that otherwise appear on the standard selection screen. S $ C%"O!-SCR ! for $ogical Data1ases Pro.ides special f,nctions in con5,nction with logical databases. Syntax 'E"ECT!%$-'C&EE$ D?$A#!C 'E"ECT!%$' G F!E"D 'E"ECT!%$ F%& $%DEGTAB"E *node+. Can only be ,sed in logical databases. Declares a node as accepting dynamic selections or field selections. S % B"% 'ets an indi.id,al bit. Syntax 'ET B!T *n+ %F *f+ ;T% *b+=. 'ets t he bit at position *n+ of he7adecimal field *f+ to 1 or the .al,e of the field *b+. *b+ m,st be 9 or 1. S % B$A!* $"! S Allows blan8 lines in lists.

Syntax 'ET B"A$> "!$E' %$G%FF. Pre.ents blan8 lines created in )&!TE statements from being s,ppressed in list o,tp,t. S % CO'!%R) 'ets the o,tp,t format Syntax 'ET C%($T&? *c+. 'ets the o,tp,t formats for n,meric and date fields for the co,ntry with the !D *c+. S % C'RSOR 'ets the c,rsor on the screen. Syntax 'ET C(&'%& F!E"D *f+ ;%FF'ET *off+= ;"!$E *lin+=. 'ET C(&'%& "!$E *lin+ ;%FF'ET *off+=. 'ET C(&'%& *col+ *line+. 'ets the c,rsor either to a partic,lar position in a field2 line2 or col,mn of a line. S % /% !D D C( C* Affects the e7tended program chec8. Syntax 'ET E<TE$DED C EC> %$G%FF. 'witches the e7tended program chec8 @'"!$A on or off2 s,ppressing the corresponding messages. S % (A!D$ R &egisters e.ent handlers in ABAP %b5ects. Syntax 'ET A$D"E&... *hi+... ;F%& *ref+GF%& A"" !$'TA$CE'=. !f yo, do not ,se the F%& addition2 the handler is set for all static e.ents. (se the F%& addition to register handlers for instance e.ents. S % (O$D DA%A 'ets a screen attrib,te. Syntax 'ET %"D DATA %$G%FF. 'ets the screen attrib,te O old dataO from the program. S % $A!#'A# 'ets the display lang,age. Syntax 'ET "A$G(AGE *lg+. All te7t symbols are refreshed with the contents of the te7t pool in lang,age *lg+. S % $ F% SCRO$$ BO'!DAR) 'ets the left-hand bo,ndary for hori4ontal scrolling. Syntax 'ET "EFT 'C&%""-B%($DA&? ;C%"(#$ *col+=. 'ets the c,rrent o,tp,t position or the position *col+ as the left-hand edge of the scrollable area on the c,rrent list page. S % $OCA$ $A!#'A# 'ets the te7t en.ironment. Syntax 'ET "%CA"E "A$G(AGE *lg+ ;C%($T&? *c+= ;#%D!F!E& *m+=. 'ets the te7t en.ironment for alphabetical sorting according to the lang,age *lg+2 co,ntry *c+2 and any f,rther modifier *m+. S % +AR#"! 'ets the margin of a print page. 'ET #A&G!$ *7+ ;*y+=. 'ends the c,rrent list page to the spool system with a margin of *7+ col,mns from the left-hand edge and *y+ rows from the top edge of the page. S % PARA+ % R 'ets a 'PALGPA parameter.

Syntax SET PARAMETER ID <)%9> FIELD <&>. Copies the .al,e of the field *f+ into the 'PALGPA parameter *pid+ in the ,ser-specific 'AP memory. S % PF-S%A%'S 'ets the G(! stat,s. Syntax 'ET PF-'TAT(' *stat+ ;E<C"(D!$G *f+G*itab+= ;!##ED!ATE"?= ;%F P&%G&A# *prog+=. 'ets the G(! stat,s *stat+ for the s,bse-,ent screens. The E<C"(D!$G addition allows yo, to deacti.ate f,nctions dynamically. The !##ED!ATE"? addition sets the G(! stat,s of the list c,rrently displayed. The %F P&%G&A# addition allows yo, to ,se a G(! stat,s from another program. S % PROP R%) 'ets a property of an %"E3 A,tomation ob5ect. Syntax GET PROPERT/ OF <(,+> <)> : <&>. 'ets the property *p+ of an e7ternal %"E3 A,tomation ob5ect to *f+. S % R'! %"+ A!A$)8 R Controls the r,ntime analysis. Syntax 'ET &($ T!#E A$A"?KE& %$G%FF. The r,ntime analysis only meas,res the r,ntime of the statements in the bloc8 between 'ET &($ T!#E A$A"?KE& %$ and %FF. S % R'! %"+ C$OC* 'ets the cloc8 acc,racy for r,ntime analysis. Syntax 'ET &($ T!#E C"%C> &E'%"(T!%$ !G G"%). 'ets the acc,racy of the r,ntime to low acc,racy with long meas,rement inter.al or high acc,racy with shorter meas,rement inter.al. S % SCR ! 'ets the ne7t screen. Syntax 'ET 'C&EE$ *scr+. Temporarily o.erwrites the statically-defined ne7t screen with *scr+. *scr+ is processed after the c,rrent screen. S % %"%$ BAR 'ets the screen title. Syntax 'ET T!T"EBA& *t+ ;%F P&%G&A# *prog+= ;)!T *g1 +.99 *gP+=. 'ets the title *t+ for the s,bse-,ent screens. The %F P&%G&A# addition allows yo, to ,se a title from another program. The )!T addition fills any placeholders in the title. S % 'PDA% %AS* $OCA$ 'witches on local ,pdate. Syntax 'ET (PDATE TA'> "%CA". (pdates are processed in the c,rrent wor8 process. S % 'S R-CO++A!D Triggers a list e.ent. Syntax 'ET ('E&-C%##A$D *fc+. Triggers a list e.ent with the f,nction code *fc+ and calls the corresponding e.ent bloc8. S("F% 'hifts strings. Syntax ' !FT *c+ ;B? *n+ P"ACE'= ;"EFTG&!G TGC!&C("A&=. 'hifts the field *c+ by one or *n+ places. The additions allow yo, to specify the direction2 and how the empty spaces are dealt with.

S*"P for Blan& $ines Creates blan8 lines on the o,tp,t list. Syntax S0IP 4<n>6. Creates *n+ blan8 lines after the c,rrent line in a list. !f yo, omit *n+2 inserts one line. S*"P for Positioning Absol,te positioning for o,tp,t on a list. Syntax S0IP TO LINE <l%n>. Positions the list o,tp,t in line *lin+. SOR% for xtracts 'orts an e7tract dataset. Syntax '%&T ;A'CE$D!$GGDE'CE$D!$G= ;A' TE<T= ;'TAB"E= ... B? *fi+ ;A'CE$D!$GGDE'CE$D!$G= ;A' TE<T=... Ends creation of the e7tract dataset in the program and sorts it. !f yo, omit the B? addition2 the e7tract is sorted by the 8ey specified in the EADE& field gro,p. The B? addition allows yo, to specify a different sort 8ey. The other additions specify whether yo, want to sort in ascending or descending order2 and whether strings sho,ld be sorted alphabetically. SOR% for "nternal %a1les 'orts internal tables. Syntax '%&T *itab+ ;A'CE$D!$GGDE'CE$D!$G= ;A' TE<T= ;'TAB"E= ... B? *fi+ ;A'CE$D!$GGDE'CE$D!$G= ;A' TE<T=... 'orts the internal table *itab+. !f yo, omit the B? addition2 the table is sorted by its 8ey. The B? addition allows yo, to specify a different sort 8ey. The remaining additions allow yo, to specify whether yo, want to sort in ascending or descending order2 and whether strings sho,ld be sorted alphabetically. SP$"% 'plits a character string. Syntax SPLIT <#> AT <9el> INTO <#1>... <#n> INTO TA1LE <% $,>. 'earches the field *c+ for the character *del+ and places the partial fields before and after *del+ into the target fields *c1+ I *cn+2 or into a new line of the internal table *itab+. S%AR%-OF-S $ C%"O! E.ent 8eyword that defines an e.ent bloc8 for a reporting e.ent. Syntax START-OF-SELECTION. After the selection screen has been processed2 the r,ntime en.ironment triggers the 'TA&T-%F'E"ECT!%$ e.ent and processes the corresponding e.ent bloc8. S%A%"CS Defines static .ariables. Syntax STATICS <&>... "i8e DATA. &etains the .al,e of a local .ariable beyond the r,ntime of the proced,re in which it occ,rs. S%OP E7its a reporting e.ent. Syntax STOP. Can only occ,r in e.ent bloc8s for reporting e.ents. "ea.es the bloc8 and 5,mps to E$D-%F'E"ECT!%$. S'B+"% Calls an e7ec,table program. Syntax '(B#!T *rep+ ;A$D &ET(&$= ;:!A 'E"ECT!%$-'C&EE$= ;('!$G 'E"ECT!%$-'ET *.ar+= ;)!T *sel+ *criterion+=

;)!T F&EE 'E"ECT!%$' *freesel+= ;)!T 'E"ECT!%$-TAB"E *rspar+= ;"!$E-'!KE *width+= ;"!$E-C%($T *length+=. Calls the program *rep+. !f yo, omit the A$D &ET(&$ addition2 the c,rrent program is terminated2 otherwise2 the data from the c,rrent program is retained2 and processing ret,rns to the calling program when *rep+ has finished r,nning. The other additions control the selection screen and set attrib,tes of the defa,lt list in the called program. S'B%RAC% for Single Fields ',btracts two single fields. Syntax SU1TRACT <n> FROM <m>. The contents of *n+ are s,btracted from the contents of *m+ and the res,lt placed in *m+. E-,i.alent of m / m - n. S'B%RAC%-CORR SPO!D"!# ',btracts components of str,ct,res. Syntax SU1TRACT-CORRESPONDING <s !"#1> FROM <s !"#2>. ',btracts the contents of the components of *str,c1+ from identically-named components in *str,c3+ and places the res,lts in the components of *str,c3+. S'+ Calc,lates s,ms of gro,ps. Syntax '(#. Can only be ,sed in loops thro,gh internal tables. Calc,lates the s,ms of the n,meric fields in all lines of the c,rrent control le.el and writes the res,lts to the corresponding fields in the wor8 area. S'PP$) Fills conte7t instances with .al,es. Syntax '(PP"? *8ey1+ / *f 1+... *8ey n+ / *f n+ T% C%$TE<T *inst+. Fills the 8ey fields *8eyn+ of the conte7t instance *inst+ with the .al,es *f n+. S'PPR SS D"A$O# Pre.ents the c,rrent screen from being displayed. Syntax SUPPRESS DIALOG. Can only occ,r in a PB% dialog mod,le. The screen is not displayed2 b,t its flow logic is still processed.

%
%AB$ S Declares an interface wor8 area. Syntax TA1LES <9, $,>. Declares a str,ct,re with the same data type and name as a database table2 a .iew2 or a str,ct,re from the ABAP Dictionary. 'tr,ct,res declared ,sing TAB"E' in main programs and s,bro,tines ,se a common data area. %OP-OF-PA# E.ent 8eyword for defining an e.ent bloc8 for a list e.ent. Syntax TOP-OF-PAGE 4DURING LINE-SELECTION6. )hene.er a new page begins while a standard list is being created2 the r,ntime en.ironment triggers the T%P-%F-PAGE e.ent and the corresponding e.ent bloc8 is e7ec,ted. The addition D(&!$G "!$E'E"ECT!%$ has the same f,nction2 b,t for detail lists. %RA!SF R )rites data to a file. Syntax T&A$'FE& *f+ T% ;"E$GT *len+=.

)rites the field *f+ to the file *dsn+ on the application ser.er. The "E$GT addition specifies the length *len+ of the data yo, want to transfer. %RA!S$A% Con.erts characters in strings. Syntax T&A$'"ATE *c+ T% (PPE&G"%)E& CA'E G('!$G *r+. The characters of the string *c+ are con.erted into ,pper- or lowercase2 or according to a s,bstit,tion r,le specified in *r+. %)P -POO$ !ntrod,ces a type gro,p. Syntax T/PE-POOL < )((l>. The first statement in a type gro,p. ?o, do not ha.e to enter this statement in the ABAP Editor - instead2 it is a,tomatically inserted in the type gro,p by the ABAP Dictionary. A type gro,p is an ABAP program containing type definitions and constant declarations that can then be ,sed in se.eral different programs. %)P -POO$S Declares the types and constants of a type gro,p to a program. Syntax T/PE-POOLS < )((l>. After this statement2 yo, can ,se all of the data types and constants defined in the type gro,p *tpool+ in yo,r program. %)P S for Sim-le Field %y-es Defines a simple field type. Syntax T?PE' *t+;@*length+A= ;T?PE *type+G"!>E *ob5+= ;DEC!#A"' *dec+=. Defines the internal data type *t+ in the program with length *len+2 reference to the ABAP Dictionary type *type+ or a data ob5ect *ob5+2 and2 where appropriate2 with *dec+ decimal places. Syntax T?PE' *t+ T?PE &EF T% *class+G*interface+. Defines the internal data type *t+ in the program with reference to the class *class+ or the interface *interface+. %)P S for Aggregate %y-es Defines aggregated types. Syntax T?PE'H BEG!$ %F *str,ct,re+2 ... *ti+...2 ... E$D %F *str,ct,re+. Combines the data types *ti+ to form the str,ct,re *str,ct,re+. ?o, can address the indi.id,al components of a str,ct,re in a program ,sing a hyphen between the str,ct,re name and the component name as followsH *str,ct,re+-*t i+. Syntax T?PE' *t+ T?PEG"!>E *tab8ind+ %F *linetype+ ;)!T *8ey+=. Defines the local data type *t+ in the program as an internal table with the access type *tab8ind+2 the line type *linetype+2 and the 8ey *8ey+.

'
'$"! Places a hori4ontal line on the o,tp,t list. Syntax ("!$E ;AT ;L=;*pos+=;@*len+A==. )itho,t additions2 generates a new line on the c,rrent list and fills it with a hori4ontal line. The additions allow yo, to insert a line brea8 and specify the starting position and length of the line. '!PAC*

Con.erts .ariables from type P to type C. Syntax UNPAC0 <&> TO <.>. (npac8s the pac8ed field *f+ and places it in the string *g+ with leading 4eros. The opposite of PAC>. 'PDA% #odifies lines in database tables. Syntax (PDATE *dbtab+ 'ET *si+ / *f+ G*si+ / *s i+ 0 *f+ G*si+ / *s i+ - *f+ ;) E&E *cond+=. 'ets the .al,e in *si+ to *f+2 increases it by *f+2 or decreases it by *f+ for all selected lines. The ) E&E addition determines the lines that are ,pdated. !f yo, omit the ) E&E addition2 all lines are ,pdated. Syntax (PDATE *dbtab+ F&%# *wa+. (PDATE *dbtab+ F&%# TAB"E *itab+. %.erwrites the line with the same primary 8ey as *wa+ with the contents of *wa+2 or all lines with the same primary 8ey as a line in the internal table *itab+ with the corresponding line of itab. The wor8 area *wa+ or the lines of the table *itab+ m,st ha.e at least the same length and the same alignment as the line str,ct,re of the database table.

6
6( ! !ntrod,ces a statement bloc8 in a CA'E control str,ct,re. Syntax ) E$ *f1+ ;%& *f 3+ %&...= G %T E&'. The statement bloc8 after a ) E$ statement is e7ec,ted if the contents of the field *f+ in the CA'E statement are the same as those of one of the fields *f % +. Processing then res,mes after the E$DCA'E statement. The ) E$ %T E&' statement bloc8 is e7ec,ted if the contents of *f+ do not correspond to any of the fields *f % +. 6("$ !ntrod,ces a loop. Syntax ) !"E *loge7p+ ;:A&? *f+ F&%# *f1+ $E<T *f3+=. !ntrod,ces a statement bloc8 that is concl,ded with E$D) !"E. The statement bloc8 between ) !"E and E$D) !"E is repeated for as long as the e7pression *loge7p+ is tr,e2 or ,ntil a termination statement s,ch as C EC> or E<!T occ,rs. The :A&? addition allows yo, to process fields that are a ,niform distance apart within memory. 6"!DO6 Displays a list as a modal dialog bo7. Syntax -INDO- STARTING AT <71> <81> 4ENDING AT <72> <82>6. Can only be ,sed in list processing. The c,rrent detail list is displayed as a modal dialog bo7. The top lefthand corner of the window is positioned at col,mn *71+ and line *y1+. The bottom right-hand corner is positioned at col,mn *73+ and line *y3+ @if specifiedA. 6R"% Creates list o,tp,t. Syntax -RITE 4AT 4G64<)(s>64D<len>E66 <&> 4AS CHEC01O5*S/M1OL*ICON*LINE6 4CUIC0INFO <.>6. 4<&(!m$ >6 The contents of the field *f+ are formatted according to their data type and displayed on the list. The additions before the field allow yo, to specify a line brea82 the starting position2 and the length of the field. The additions after the field allow yo, to display chec8bo7es2 symbols2 icons2 and lines. The *format+ addition can contain .ario,s other formatting options. The M(!C>!$F% addition allows yo, to assign a -,ic8info *g+ to the field. 6R"% %O

Assigns strings. Syntax -RITE <&1> TO <&2> 4<&(!m$ >6. Con.erts the contents of the data ob5ect *f1+ to type C and assigns the res,lting string to the .ariable *f3+. ?o, can ,se the same formatting options a.ailable in the )&!TE statement.

You might also like