Visit the SAP Forum

Languages : English | Dutch | French | Portugese | Italian



INTERVIEW EBOOK
Get 30,000 Interview Questions & Answers in an eBook.

Interview Success Kit - Get Success in Job Interviews



Send your Resume to 6000 Companies
START YOUR WEBSITE
India's Best Web Hosting Company

ABAP Syntax Starting with �C�


Home »ABAP Syntax » ABAP Syntax Starting with �C�


CATCH

Catches a class-based exception.

CATCH <cx1> � <cxn> [INTO <ref>].

You can only use this statement in a TRY-ENDTRY block, where you define a handler for one or more class-based exceptions. You can use INTO to place a reference to the exception object into the reference variable <ref>.




CATCH SYSTEM-EXCEPTIONS

Catches a catchable runtime error.

Syntax

CATCH SYSTEM-EXCEPTIONS <except1> = <rc 1>� <except n> = <rc n>.

Introduces a CATCH area, which ends with an ENDCATCH statement. If a catchable runtime error <excepti>, occurs between CATCH and ENDCATCH, the current processing block is interrupted. The system jumps to the appropriate ENDCATCH statement and fills SY-SUBRC with <rc i>.

CHECK

Conditionally leaves a loop or processing block.

Syntax

CHECK <logexp>.

If the logical expression <logexp> is true, the system continues with the next statement. If it is false, processing within the loop is interrupted at the current loop pass, and the next loop pass is performed. Otherwise the system leaves the current processing block. In conjunction with selection tables, and inside GET events, you can use an extra variant of the CHECK statement.

CLASS Declaration

Declares a class in ABAP Objects.

Syntax

CLASS <class> DEFINITION [PUBLIC]
[INHERITING FROM <superclass>]
[ABSTRACT]
[FINAL]
[CREATE PUBLIC|PROTECTED|PRIVATE]
[FRIENDS <cif1> <cif 2> �]
[DEFERRED]
[LOAD].

Introduces the declaration part of a class, <class>. The declaration part ends with ENDCLASS and contains the declaration of all the components of the class. The PUBLIC addition is generated only by the Class Builder. It defines a global class in the Class Library. The INHERITING FROM addition lets you derive the class, <class>, from a superclass, <superclass>. The ABSTRACT addition defines an abstract class, which cannot be instantiated. The FINAL addition defines a class that cannot have any subclasses. The CREATE addition specifies who can instantiate the class. FRIENDS allows you to specify other classes or interfaces, <cif> that can access the private components of the class and instantiate objects of the class, independently of the CREATE addition. The DEFERRED addition makes the class known to the program before it is declared. The LOAD addition loads a class explicitly from the Class Library.

CLASS � Implementation

Implements a class in ABAP Objects.

Syntax

CLASS <class> IMPLEMENTATION.

Introduces the implementation part of a class, <class>. The implementation part ends with ENDCLASS and contains the implementation of all the components of the class.

CLASS-DATA

Declares static attributes of a class or interface.

Syntax

CLASS-DATA <a>�

Like DATA. However, the attribute <a> is declared as a static attribute. Static attributes are not instance-specific. Their content is shared by all instances.

CLASS-METHODS

Declares static methods of a class or interface.

Syntax

CLASS-METHODS <meth>�

Like METHODS, except that the method <meth> is declared as a static method. A static method can access static attributes and can only trigger static events.

CLASS-EVENTS

Declares static events of a class or interface.

Syntax

CLASS-EVENTS <evt>�

Like EVENTS, except that the event <evt> is declared as a static attribute. Static events are the only type of event that can be triggered in a static method.

CLEANUP

Tidies up after class-based exceptions.

CLEANUP.

Can only be used within a TRY-ENDTRY block, where it defines a control block. If a class-based exception is not caught with a CATCH statement, the system executes the statements between CLEANUP and ENDTRY, before passing the exception along the call hierarchy.

CLEAR

Sets a variable to its initial value.

Syntax

CLEAR <f>.

The variable <f>, which can have any data type, is set to an initial value appropriate to its type.

CLOSE DATASET

Closes a file.

Syntax

CLOSE DATASET <dsn>.

Closes a file opened with OPEN DATASET on the application server.

CLOSE CURSOR

Closes a database cursor.

Syntax

CLOSE CURSOR <c>.

Closes a cursor opened with OPEN CURSOR.

COLLECT

Aggregates lines and then adds them to an internal table.

Syntax

COLLECT <line> INTO <itab>
[ASSIGNING <FS> | REFERENCE INTO <dref>].

The system checks whether there is already a table entry that matches the key. If there is no corresponding entry already in the table, the COLLECT statement has the same effect as INSERT. If an entry with the same key already exists, the COLLECT statement does not append a new line, but adds the contents of the numeric fields in the work area <line> to the contents of the fields in the existing entry. If you use ASSIGNING or INTO REFERENCE, field symbol <FS> refers to the inserted line or the relevant data reference is stored in <dref> after the statement.

COMMIT

Closes a SAP LUW.

Syntax

COMMIT WORK [AND WAIT]

Writes all the database changes and releases all the database locks. Triggers updating. The AND WAIT addition forces the program to wait until the system has finished updating the database. Otherwise, updating is asynchronous.

A D V E R T I S E M E N T

S A P - R E S O U R C E S


Get Free SAP Resources:

Are you looking for:
  • SAP Jobs
  • Free SAP eBooks
  • SAP Softwares
  • SAP Tutorials
  • ERP Implementation Examples
Enter Email Address:
(Enter your email address above and we will instantly send you the download link to you, when you confirm your email.)
Search SAP Resources:
A D V E R T I S E M E N T

discussionDiscussion Center
Discuss
Discuss

Query

Feedback
Yahoo Groups
Y! Group
Sirfdosti Groups
Sirfdosti
Contact Us
Contact
Sign in

User Name:
Password:
Forget password? | Register


INTERVIEW EBOOK

Get 30,000 Interview Questions & Answers in an eBook.

Interview Success Kit - Get Success in Job Interviews


Send your Resume to 6000 Companies

SAP Resources

  • SAP Articles
  • SAP Books
  • SAP Certifications
  • SAP Companies
  • SAP Study Materials
  • SAP Events
  • SAP Faqs
  • SAP Jobs
  • SAP Job Consultants
  • SAP Links
  • SAP News
  • SAP Sample Papers
  • SAP Interview Questions
  • SAP Training Institutes
  •  
    SAP Tutorial

  • Introduction
  • SAP History
  • SAP Facts
  • SAP Tables
  • SAP Function
  • SAP Report
  • Reasons To Use SAP
  • SAP Landscape
  • SAP Transaction Code
  • SAP Lotus Notes Integration
  • Business Connector and XML
  • Enterprise Release 4.7

  • SAP Training Institutes

  • SAP Training Institutes
  • Job Consultants Address
  • SAP Companies Address

  • Business Process Cycle

  • Analyze
  • Design
  • Implement
  • Operate
  • Optimize
  • Skills And Education

  • Logistics Module

  • Sales and Distribution
  • Quality Management
  • Materail Management
  • Plant Maintenance
  • Financial Modules (FI/CO)
  • Project system
  • Production Planning
  • Service Management

  • SAP NetWeaver

  • Introduction
  • Object Model
  • Interoperability
  • Creating Web Apps
  • Java Connector
  • Advantages & Conclusion
  • Life Cycle Management
  • Composite Application Framework

  • SAP Tools

  • SQL Trace Tool
  • SAP CRM
  • SAP SRM
  • SAP SCM
  • SAP ERP
  • SAP BW

  • SAP Modules

  • SAP FI Module
  • SAP CO Module

  • SAP Technical

  • SAP ITS Architecture
  • Financial Management
  • Manufacturing Planning and Execution
  • Customer Order Management
  • Lackbox Processing
  • SD and Financial Accounting Integration
  • SAP - HR (Human Resource)

  • SAP Miscellanous

  • Web Application Server(WAS)
  • Data Archiving
  • Mobile Engine
  • SAP Script
  • SAP Transactions
  • SAP Business Warehouse(BW)

  • SAP Reference

  • SAP Facts
  • SAP Tables
  • SAP Function
  • SAP Report
  • SAP Landscape

  • SAP Others

  • SAP Treasury
  • SAP Finance
  • SAP WAS
  • SAP Data Archiving
  • SAP ALE
  • SAP EDI
  • SAP Exchange
  • SAP X-APPS
  • SAP Applications Components
  • SAP Software
  • Dunning
  • SAP IDES
  • SAP Payroll Basics
  • SAP BASIS and Security Authorization
  • SAP Backup
  • SAP Router

  • ABAP Tutorials

  • Introduction
  • ABAP Transaction
  • ABAP Function
  • ABAP File Processing
  • ABAP Objects
  • ABAP Syntax
  • ABAP Queries
  • SAPMail Using ABAP
  • ABAP Programming Hints

  • SAP Projects & Codes

  • Finding the user-exits
  • Purchase Order Display
  • Batch Input
  • Dynamic Open SQL
  • Creating Extract Dataset
  • Reading database tables
  • Load table from a UNIX file
  • Create subscreen

  • SAP Resources

  • SAP Books
  • SAP Links

  • Interview Question



  • Common Interview Que.
  • ABAP Interview Que.
  • ERP Interview Que.
  • HR Interview Que.
  • MM Interview Que.
  • PP Interview Que.
  • ALE Interview Que.
  • EDI Interview Que.
  • Basis Interview Questions
  • SAP-SD Interview Questions
  • FI&CO Interview Questions
  • BW Interview Questions
  • CRM Interview Questions
  • Interview Questions

  • Careers at SAP

  • Careers in SAP (SAP Jobs)
  • Advertise
  •