SAP CLASS TYPE

Get Example source ABAP code based on a different SAP table
  


ABAP Code Snippet

Introductory Statements for Programs CLASS-POOLIntroduces a class pool FUNCTION-POOLIntroduces a function group INTERFACE-POOLIntroduces an interface pool PROGRAMIntroduces a module pool or subroutine pool REPORTIntroduces an executable program TYPE-POOLIntroduces a type pool

Modularization Statements

Procedures FUNCTION ... ENDFUNCTIONDefines a function module METHOD ... ENDMETHODDefines a method

Dialog Modules MODULE ... ENDMODULEDefines a dialog module

Event Blocks AT LINE-SELECTION List Event AT SELECTION-SCREEN Selection Screen Event AT USER-COMMAND List Event END-OF-PAGE List Event END-OF-SELECTION Reporting Event GET Reporting Event INITIALIZATION Reporting Event LOAD-OF-PROGRAM Program Constructor Event START-OF-SELECTION Reporting Event TOP-OF-PAGE List Event

Source Code Modules DEFINE ... END-OF-DEFINITIONDefines a macro ABAP Code Snippet ABAP Code Snippet

Declarative Statements

Data Types and Data Objects CONSTANTSDeclares a constant DATADeclares a variable FIELD-SYMBOLSDeclares a field symbol ABAP Code Snippet structure NODESDeclares a table work area STATICSDeclares a static variable TABLESDeclares a table work area TYPESDefines a separate data type

Classes and Interfaces ALIASESDeclares an alias name CLASS ... ENDCLASSDefines a class CLASS-DATADeclares a static attribute CLASS-EVENTSDeclares a static event CLASS-METHODSDeclares a static method EVENTSDeclares an instance event INTERFACE ... ENDINTERFACEDefines an interface INTERFACESIncludes an interface METHODSDeclares an instance method PRIVATE SECTIONIntroduces the package visibility section PROTECTED SECTIONIntroduces the protected visibility section PUBLIC SECTIONIntroduces the public visibility section

Object Creation CREATE DATACreates an anonymous data object CREATE OBJECTCreates an object.

Calling and Exiting Program Units

Calling Programs CALL TRANSACTIONCalls a transaction LEAVE TO TRANSACTIONCalls a transaction SUBMITCalls an executable program

Calling Processing Blocks CALL FUNCTIONCalls a function module CALL METHODCalls a method dynamically PERFORMCalls a subroutine RAISE EVENTTriggers an event SET HANDLERRegisters an event SET USER-COMMANDTriggers a list event

Exiting Program Units CHECKExits a loop pass or processing block CONTINUEExits a loop pass EXITExits a loop or processing block LEAVE PROGRAMExits an ABAP program REJECTExits a processing block RETURNExits a processing block STOPExits a processing block

Program Flow Logic

Control Structures DO ... ENDDO Loop CASE ... WHEN ... ENDCASE Branch IF ... ELSEIF ... ELSE ... ENDIF Branch WHILE ... ENDWHILE Loop

Program Interruption WAIT UP TOProgram interruption for a certain amount of time

Exception Handling RAISETriggers a non-class-based exception RAISE EXCEPTIONTriggers a class-based exception TRY ... CATCH ... CLEANUP ... ENDTRY Handles class-based exceptions RESUMEResumes after a resumable exception

Assignments

Special Assignments MOVE-CORRESPONDINGAssignment according to structure components UNPACKUnpacks a packed number

Setting References ASSIGNSets a field symbol UNASSIGNInitializes a field symbol GET REFERENCESets a data reference

Initializations CLEARInitializes a data object FREEInitializes a data object

Processing Internal Data

Calculation Statements ADDAdds numeric data objects DIVIDEDivides numeric data objects MULTIPLYMultiplies numeric data objects SUBTRACTSubtracts numeric data objects

Character String and Byte String Processing CONCATENATEConcatenates character strings or byte chains CONDENSECondenses a character string CONVERT TEXTConverts a character string FINDSearches in a character string or byte chain GET BITReads individual bits in a byte chain OVERLAYReplacement in a character string REPLACEReplacement in a character string or byte chain SET BITSets individual bits in a byte chain SHIFTMoves a character string or byte chain SPLITSplits a character string or byte chain TRANSLATEConverts a character string WRITE TOFormats values as a character string

Internal Tables APPENDAttaches rows to an internal table AT Control level processing of an internal table COLLECTCondensed insertion of rows into an internal table DELETEDeletes rows from an internal table FIND IN TABLESearches in an internal table INSERTInserts rows into an internal table LOOP AT ... ENDLOOPLoop for an internal table MODIFYChanges rows in an internal table READ TABLEReads a row of an internal table REPLACE IN TABLEReplacement in an internal table SORTSorts an internal table SUMSummation of numeric fields in an internal table

Extracts AT Control level processing of extract dataset EXTRACTFills extract dataset FIELD-GROUPSDeclares a field group INSERTBuilds a field group LOOP ... ENDLOOPLoop for the extract dataset SORTSorts extract dataset

Attributes of Data Objects DESCRIBEDetermines the properties of a data object

User Dialogs

Dynpros CALL SCREENCalls a dynpro sequence CONTROLSDeclares a control EXIT FROM STEP-LOOPExits a table control or step loop GET CURSORReads the cursor position GET PF-STATUSSets the GUI status LEAVE [TO] SCREENExits a dynpro LOOP AT SCREEN ... ENDLOOPLoop for screen elements MODIFY SCREENModifies a screen element REFRESH CONTROLInitializes a table control SET CURSORSets the cursor position SET HOLD DATAActivates/deactivates standard menu entries SET PF-STATUSSets the GUI status SET SCREENSets the next dynpro SET TITLEBARSets the GUI title SUPPRESS DIALOGSuppresses the screen

Selection Screens PARAMETERSDefines a parameter SELECTION-SCREENDefines a selection screen or a screen element SELECT-OPTIONSDefines a selection criterion

Lists BACKRelative positioning of list cursor DESCRIBE LISTSpecifies the properties of a list in the list buffer FORMATFormats a list GET CURSORReads the cursor position HIDESaves a data object in a list level LEAVE TO LIST-PROCESSING Calls the list processing LEAVE LIST-PROCESSING Exits list processing MODIFY LINEChanges a list in the list buffer NEW-LINELine break in a list NEW-PAGEPage break in a list POSITIONPositions the list cursor PRINT-CONTROLFormats a spool list. READ LINEReads a list in the list buffer RESERVERelative page break in a list SCROLL LISTScrolls in a list SET BLANK LINESControls the blank characters in a list SET CURSORSets the cursor position SET MARGINSets the margin of a spool list SET PF-STATUSSets the GUI status SET LEFT SCROLL-BOUNDARY Sets the scroll boundaries of a list SET TITLEBARSets the GUI title SKIPPositions the list cursor ULINEDisplays a line in a list WINDOWDisplays a list in a dialog box WRITEDisplays data in a list

Messages MESSAGESend a message

Processing External Data

Open SQL CLOSE CURSORCloses a database cursor DELETEDeletes rows from a database table FETCH NEXT CURSORReads rows using a database cursor INSERTInserts rows into a database table MODIFYChanges or inserts rows in a database table OPEN CURSOROpens a database cursor SELECT ... ENDSELECTReads rows from a database table UPDATEChanges rows in a database table

Native SQL EXEC SQL ... ENDEXECDefines an area for Native SQL

Secondary Database Connections COMMIT CONNECTION Completes an SAP LUW on a secondary database connection ROLLBACK CONNECTION Cancels an SAP LUW on a secondary database connection

Data Clusters DELETEDeletes data clusters EXPORTExports data objects into a data cluster FREE MEMORYDeletes data clusters from the ABAP memory IMPORTImports data objects from a data cluster IMPORT DIRECTORYCreates the interval directory of a data cluster

File Interface CLOSE DATASETCloses a file DELETE DATASETDeletes a file GET DATASETSpecifies the properties of a file OPEN DATASETOpens a file READ DATASETReads a file SET DATASETSets the properties of a file TRANSFERFills a file TRUNCATE DATASETChanges the size of a file

Data Consistency AUTHORITY-CHECKChecks an authorization COMMIT WORKCompletes a SAP-LUW ROLLBACK WORKCancels a SAP-LUW SET UPDATE TASK LOCALSets the local update

Program Parameters

SAP Memory GET PARAMETERReads an SPA/GPA parameter SET PARAMETERSets an SPA/GPA parameter

Language Environment GET LOCALESpecifies the text environment. SET COUNTRYSets the formatting settings of the language environment SET LANGUAGELoads a text pool SET LOCALESets the text environment

Date and Time Information CONVERT INTO TIME STAMP Converts date and time into time stamp CONVERT TIME STAMPConverts a time stamp into data and time GET TIMEFills the system fields for date and time GET TIME STAMPCreates a time stamp

Program Processing

Testing and Checking Programs ASSERTDefines an assertion BREAK-POINTDefines a breakpoint LOG-POINTDefines a logpoint GET RUN TIMESpecifies a measuring interval SET RUN TIME ANALYZER Controls the runtime analysis SET RUN TIME CLOCK Sets the measurement accuracy for measuring intervals

Dynamic Program Development GENERATE SUBROUTINE POOL Generates a subroutine pool INSERT REPORTStores an ABAP program INSERT TEXTPOOLStores a text pool READ REPORTImports an ABAP program READ TEXTPOOLImports a text pool SYNTAX-CHECKCalls the syntax check

ABAP Data and Communication Interfaces

Remote Function Call CALL FUNCTION DESTINATION Remote Function Call RECEIVEReceives parameters for the remote function call WAIT UNTILWaits for completion of the remote function call

ABAP and XML CALL TRANSFORMATIONCalls an XSLT program or a simple transformation

OLE Interface CALL METHODCalls a OLE automation method CREATE OBJECTCreate an OLE automation object FREE OBJECTReleases memory in the OLE automation GET PROPERTYReads an attribute in the OLE Automation SET PROPERTYSets an attribute in the OLE Automation

Enhancements

Source Code Enhancements ENHANCEMENT ... ENDENHANCEMENT Implements a source code enhancement ENHANCEMENT-POINTDefines a source code enhancement ENHANCEMENT-SECTION ... END-ENHANCEMENT-SECTION Defines a source code enhancement

Enhancements Using BAdIs GET BADICreates a BAdl object CALL BADICalls BAdI methods

Statements for Experts INFOTYPESDeclares an internal table for HR info types PROVIDE ... ENDPROVIDELoop for multiple internal tables

Obsolete Statements

Obsolete Modularization FORM ... ENDFORMDefines a subroutine LOCALTemporarily stores a data object

Obsolete Declarations FIELDSAddresses a data object RANGESDeclares a ranges table TYPE-POOLSLoads a type pool

Obsolete Calls CALL CUSTOMER-FUNCTIONCalls a function module exit CALL DIALOGCalls a dialog module PUTTriggers a reporting event

Obsolete Exit LEAVEContext-dependent exit of an ABAP program

Obsolete Control Structure ON CHANGE OF ... ENDONObsolete branch

Obsolete Exception Handling CATCH SYSTEM-EXCEPTIONSCatches catchable runtime error

Obsolete Assignments MOVEAssigns data objects MOVE - PERCENTAGEAssigns a subobject of a data object PACKPacks a packed number

Obsolete Calculation Statements COMPUTECalculates a calculation expression ADD-CORRESPONDINGAdds structure components DIVIDE-CORRESPONDINGDivides structure components MULTIPLY-CORRESPONDING Multiplies structure components SUBTRACT-CORRESPONDING Subtracts structure components

Obsolete Character String and Byte String Processing CONVERT DATE|INVERTED-DATE Transforms a character string into nine's complement REPLACEReplacement in a character string or byte string SEARCHObsolete search in a character string or byte string

Obsolete Internal Table Processing REFRESHObsolete initialization of an internal table SEARCH itabObsolete search in an internal table WRITE TO itabWrites to an internal table (obsolete)

Obsolete Database Access
DELETEDeletes a row in a database table (obsolete) LOOP ATObsolete loop for a database table MODIFYChanges a row in a database table (obsolete) READ TABLEReads a row in a database table (obsolete) REFRESH FROMReads rows in a database table (obsolete)

Native SQL EXIT FROM SQLExits implicit cursor processing of Native SQL

Contexts CONTEXTSData type for contexts DEMANDRequests a context SUPPLYFills the key fields of a context

Obsolete Statements in List Processing AT PFnnObsolete List Event DETAILIntensity of the background color in a list INPUTInput-ready status of a list MAXIMUMMaximum value of output values in a list MINIMUMMinimum value of output values in a list NEW-SECTIONControls a spool list. SUMMARYIntensity of the background color in a list SUMMINGSum of output values in a list

Obsolete Editor Calls EDITOR-CALL FOR itab. Calls a GUI Control (obsolete) EDITOR-CALL FOR REPORT Calls ABAP Editor

Obsolete Tests and Checks SET EXTENDED CHECKControls the enhanced program check

Obsolete External Programming Interface COMMUNICATIONAddresses the CPI-C interface

Internal Statements

Program Processing DELETE DYNPRODeletes a dynpro DELETE REPORTDeletes an ABAP program DELETE TEXTPOOLDeletes a text pool EXPORT DYNPROExports a dynpro GENERATE DYNPROGenerates a dynpro GENERATE REPORT Generates an ABAP program LOAD REPORTLoads an ABAP program IMPORT DYNPROImports a dynpro SCANSplits an ABAP program into tokens SYNTAX-CHECK FOR DYNPRO Syntax check for a dynpro SYNTAX-TRACEInfluences the syntax check

External Interface CALLCalls a c function of the ABAP runtime environment