<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8505976362135831828</id><updated>2011-07-08T19:39:33.048+05:30</updated><category term='saving files from splooing list. You can find your own spooling list only and then choose'/><category term='The Different Types of SAP Tables'/><category term='MENU PAINTER AND SCREEN PAINTER'/><category term='Select … Into table'/><category term='BADI&apos;S IN ABAP'/><category term='GUIxt queriesand Need help with BADIs'/><category term='Appending two internal tables'/><category term='What Are Different Types Of Internal Tables'/><category term='project contract.'/><category term='General - Number Range Generation'/><category term='transport system'/><category term='sap fico integration points'/><category term='abap all topics inteview questions'/><category term='hr programming'/><category term='Raising exceptions in a method and handling the same in the workflow'/><category term='SAP extensions and their components'/><category term='SAPScripts Made Easy'/><category term='ABAP Objects'/><category term='ABAP OBJECTS -- Sample Project'/><category term='SY-UCOMM and OK_CODE in Dialog Program'/><category term='difference between Customization and Configuration'/><category term='Human Resources (HR)'/><category term='web RFC programming.'/><category term='Purchase Order History Mass Display'/><category term='Quick Note on Design of secondary database indexes and logical databases'/><category term='fico Primary configuration considerations'/><category term='Steps to Creating domains'/><category term='Actual Costing / Material Ledger'/><category term='ABAP FAQ&apos;s'/><category term='list box using abap'/><category term='sap shipping problem'/><category term='BUSINESS OBJECT REPOSITORY'/><category term='Outstanding PO Report'/><category term='installation book.'/><category term='SAP Repository'/><category term='SYSTEM FIELDS'/><category term='mm books.'/><category term='SAP FI Module faqs'/><category term='Download ABAP internalTables.pdf'/><category term='Archiving Application Data (CA-ARC) pdf book'/><category term='SAP ABAP Idoc Interface'/><category term='Trace when a variant of a report was created'/><category term='ABAP - Easy Graph to use'/><category term='programming tips'/><category term='Real Time questions ..'/><category term='Run or Display ABAP Report over the web'/><category term='bdc'/><category term='Data Elements'/><category term='graphs in abap.'/><category term='SAP Transaction'/><category term='Mailing FAQs'/><category term='Example Code For Drill Down Report'/><category term='Painter and menu painter Tutorial'/><category term='roll out of SAP Project'/><category term='SAP FICO Advance Payments pdf BOOK'/><category term='Unicode'/><category term='ABAP - Memory Usage Check'/><category term='SMARTFORM Tutorial'/><category term='fi Responsibilities'/><category term='ABAP List Viewer (ALV)'/><category term='SAP – Internal Provider Billing Quick Reference'/><category term='Application Transaction Codes'/><category term='WEB ABAP'/><category term='abap faqs'/><category term='tips and tr'/><category term='Sample ABAP Code Programs'/><category term='Enterprise Management with SAP SEM/ Business Analytics'/><category term='Tables in sap data dictionary'/><category term='Learn ABAP HR Online-Overview and Features in HR Programming'/><category term='Implementing Enhancements in a view'/><category term='SAP ABAP Performance Optimization Techniques'/><category term='sap fico More FI configuration considerations:'/><category term='Regarding Runtime creation of Check Boxes'/><category term='SAP ABAP Tips and Tricks'/><category term='ABAP Reports'/><category term='BAPI PROGRAMMING'/><category term='Recursion with Loop Checking'/><category term='SAP abap  tables'/><category term='ALV grid controls'/><category term='pbo.'/><category term='work submit.'/><category term='ALV sample programs'/><category term='REPOSITORY'/><category term='File - Print to PDF SAP Script'/><category term='BDC FAQ'/><category term='rfc'/><category term='ABAP Programming (BC-ABA)'/><category term='Preface'/><category term='ABAP Objective Questions'/><category term='and run one RFC'/><category term='bapi programing tutorial'/><category term='Role of a SAP Functional Consultant'/><category term='Helpful System Administration ABAPS'/><category term='Deleting a set of lines'/><category term='SAP Workflow faqs'/><category term='BADI and User Exits'/><category term='Enterprise Management with SAP SEM/ Business Analytics book'/><category term='SAP ABAPSCRIPTS'/><category term='ALV Grid'/><category term='contract renival details using alvs in sap abap'/><category term='INTERACTIVE PROGRAMS.'/><category term='ABAP and Unicode'/><category term='Type and Uses of Lock Objects'/><category term='save it.'/><category term='Download ABAP Programming'/><category term='sql trace'/><category term='CATT (Computer Aided Test Tool)'/><category term='Materials Management'/><category term='Avoiding delivery creation when items quantity are zero'/><category term='SAP_RFC - Perl extension to Interface with SAP RFC'/><category term='ABAP List Viewer (ALV): Classic'/><category term='To download from SAP to Excel:'/><category term='Change and Transport System'/><category term='sap recording?'/><category term='java for sap'/><category term='Selection Tables in the WHERE Clause'/><category term='call one report to another in abap?'/><category term='Sales and Distribution (SD)'/><category term='ABAP4 Tuning Checklist'/><category term='ABAP Dictionary'/><category term='ABAP - Getting PDF file from spooling list'/><category term='Inheritance'/><category term='Select with view'/><category term='Difference Between Select Single and Select UpTo One Rows in sap abap programming'/><category term='ABAP Interview Faq&apos;s'/><category term='Transporting Objects and Standard Text from one client to another'/><category term='navigation'/><category term='SAP Basic Knowledge and System Navigation Question'/><category term='sap sd books'/><category term='Difference between extract and collect statements'/><category term='SAP Queries'/><category term='abap interview questions'/><category term='Events in Table Maintenance'/><category term='24 Column Account Managers Report'/><category term='SAP Availability Check and Requirements in Sales and  pdf book'/><category term='Program to Test Line Selection and Scrolling within Document'/><category term='implementation'/><category term='abap reporting on all modules'/><category term='ABAP User Dialogs'/><category term='PDF]'/><category term='List Of User Exit Related to VL01N'/><category term='Inserting Website Links'/><category term='Mailing Workflow Faqs'/><category term='How Loop Works in Internal Tables'/><category term='Write Web Reports in SAP'/><category term='Tips for Finding Data in SAP'/><category term='Arrears Processing for  pdf book'/><category term='Interview Faq&apos;s'/><category term='Checking User Authorizations'/><category term='INTERNAL TABLES IN SAP ABAP'/><category term='mm certification books.'/><category term='Linear search vs. binary'/><category term='Useful ABAP Tools and E-book'/><category term='data programming'/><category term='Configuring a Workflow'/><category term='ABAP Keyword a day'/><category term='Landscape?'/><category term='sap best sites'/><category term='Auto-Refresh'/><category term='Download ABAP BDC Presentation'/><category term='Implementation SAP'/><category term='Different Types and Usage of Views'/><category term='Download ABAP'/><category term='SAP TRANSACTIONS'/><category term='ABAP REPORTS BASICS IN SAP'/><category term='sap bw.'/><category term='GUI Programming'/><category term='Tips and Tricks'/><category term='Description: Hard coding Tracker Program using abap'/><category term='REPORTING'/><category term='Output Table Fields to a List'/><category term='Finding the user-exits'/><category term='SAP WMS - Decentralized Warehouse Management System Integration Setup'/><category term='ABAP Programming (BC-ABA) pdf book'/><category term='SAP abap Project Systems tables structure'/><category term='Difference between a check table and a value table'/><category term='abap certification tutorial'/><category term='Download e-CATT Tutorial'/><category term='Using Fonts command'/><category term='Abap certification material'/><category term='Vb codes (or VBA macro code) for access SAP'/><category term='[PDF]'/><category term='pp books.'/><category term='object oriented abap'/><category term='sap query'/><category term='Find GRs without IRs'/><category term='Set the default start variant for VL10'/><category term='ABAP Material'/><category term='Delete'/><category term='Display Active Exits'/><category term='BAPI USER GUIDE'/><category term='sap hr books.'/><category term='ABAP - Code for Displaying Quotations in ALV and create Condition Records Automatically from it.'/><category term='change the Development Class'/><category term='ACCESSING BAPI USING VB'/><category term='User Actions on Screens'/><category term='SAP ALE in Profit Center Accounting (EC-PCA-TL) pdf BOOK'/><category term='User Exits'/><category term='uploading logos'/><category term='mts.'/><category term='sap hr interview questions'/><category term='ABAP Development  Faqs'/><category term='Changing the Standard GUI Status'/><category term='Field exits (SMOD/CMOD)'/><category term='pop window'/><category term='Macro to validate Date'/><category term='run time analysis.'/><category term='ABAP Interview Tips and Questions'/><category term='Download LSMW Tutorial'/><category term='SAP R/3 Enhancements'/><category term='Differences between Unicode and Non-Unicode Programs'/><category term='email and fax'/><category term='performance'/><category term='sap.'/><category term='Activity-Based Costing (CO-OM-ABC)'/><category term='PP'/><category term='Blocking Searchhelp and Create'/><category term='Chat Programming'/><category term='BAPI CONVENTIONS'/><category term='abap/4 sample codes..'/><category term='Set the number range for Deliveries'/><category term='download abap in 21 days'/><category term='LSMW.'/><category term='sap tr'/><category term='ABAP - BDC code for ME31K (Open Contracts Creation)'/><category term='ABAP Tutorials'/><category term='SAP R/3 Implementation'/><category term='Optimization TECHNIQUES'/><category term='SAP APIs for Logistics pdf book'/><category term='run time environment'/><category term='ABAP SYNTAX FOR OOP(OBJECT ORIENTED)'/><category term='Interview Question on BAPI'/><category term='run time analysis'/><category term='SAP ALE Scenarios in Personnel Cost'/><category term='ABAP Code in eCATT Editor'/><category term='Objects'/><category term='BADI'/><category term='Attach a Search Help to the Screen Field'/><category term='Purpose of R/3'/><category term='PRODUCTION PLANNING BOOKS'/><category term='SAP abap Production Planning tables structures'/><category term='Version Value When I Print the PO'/><category term='Modify selected components'/><category term='abap programs'/><category term='Extract the smtp email address'/><category term='SCRIPTS'/><category term='module workflows.'/><category term='REPORTS'/><category term='web transaction'/><category term='internal tables'/><category term='Warehouse Management'/><category term='ITS install.'/><category term='SAP ABAP ALE FAQ&apos;S'/><category term='idocs.'/><category term='abap calculator'/><category term='ABAP CERTIFICATION TUTORIALS and  BOOKS'/><category term='Conversion Program'/><category term='interview qustions'/><category term='SAP ALE QuickStart for Distributed HR pdf book'/><category term='Events Related to Reporting'/><category term='ABAP CODE FOR HTML VIEWER'/><category term='workbench books.'/><category term='SAP Accounting Training Simulators'/><category term='Use the aggregated functions'/><category term='Dynamic Internal Table or Array'/><category term='object oriented sap abap'/><category term='abap programming Tutorial'/><category term='MS Office programming'/><category term='Fine Tuning'/><category term='logistics'/><category term='Testing and Debugging ABAP Codes'/><category term='Exclude inventory in Storage Locations during Delivery Creation'/><category term='Shipping Conditions and Storage Location Determination'/><category term='server programming'/><category term='SAP ALE Quick pdf book'/><category term='Financial'/><category term='BAPI EXAMPLE STEP BY STEP'/><category term='Maintaining Translations for Work item texts'/><category term='LSMW'/><category term='Macro'/><category term='Running ABAP Programs'/><category term='Data dictionary Faqs'/><category term='All the SAP Online Help in PDFs'/><category term='info cube.'/><category term='Unix and FTP'/><category term='Chat Program'/><category term='WORK FLOW.'/><category term='Code Samples'/><category term='sap r/3 hand book'/><category term='sap email'/><category term='SAP and ABAP Memory'/><category term='recommendations'/><category term='s'/><category term='Real Time Objects'/><category term='Modifying a set of lines'/><category term='Search help- Connecting to an external source using Java Connector'/><category term='pop-window'/><category term='Changing Data'/><category term='Internal table'/><category term='Abap Query'/><category term='Deadlines'/><category term='ALE Programming Guide pdf book'/><category term='Logical Database Faqs'/><category term='free download SAP XI Technical Infrastructure'/><category term='ABAP CODE FOR PICTURE CONTROL'/><category term='sending e-mail programming'/><category term='Create Push Buttons in Application Tool Bar'/><category term='ABAP HR'/><category term='Workflow'/><category term='sap dms.'/><category term='Key access to multiple lines'/><category term='Finding out a projection views'/><category term='Overview of PA and PD and Integration between PA and PD'/><category term='Easy Way To Remember Table'/><category term='shipping'/><category term='Download ALV Grid Control'/><category term='Performance Notes'/><category term='Difference between the User Exit'/><category term='sap'/><category term='I made this code snippet for users to provide function like this'/><category term='Deleting a sequence of lines'/><category term='Accounting Docs Automatically Created from MM'/><category term='Doubt in Unicode Enabling'/><category term='Use the selection criteria'/><category term='ABAP BOOKS'/><category term='OO ABAP.'/><category term='Performance tuning for Data Selection Statement'/><category term='selection screen.'/><category term='free download SAP XI high availability guide pdf book'/><category term='What&apos;s the purpose of using PACKAGE SIZE'/><category term='alv'/><category term='Functional Specification'/><category term='QM'/><category term='mial and fax'/><category term='sap bw books.'/><category term='ABAP to Edit Text Symbols in INCLUDE RSAQEXCE'/><category term='Workflow Faqs'/><category term='debugging procedure'/><category term='SAP ABAP innovative programs'/><category term='RFC.'/><category term='Lock and Unlock Users in abap sap'/><category term='tickets from client'/><category term='Call Transaction'/><category term='Estimate Guidelines'/><category term='alvs'/><category term='project systems.'/><category term='interview questions'/><category term='sap abap in 24 days tutorial'/><category term='Select statement with inner join is taking forever'/><category term='SYSTEM FIELDS (ALL FIELDS)'/><category term='SAP ALV Gird Control (BC-SRV-ALE) pdf book'/><category term='java Script'/><category term='Change'/><category term='Some important ABAP sample Code'/><category term='eCATT'/><category term='Testing SAP R/3: A Manager&apos;s Step-by-Step Guide book'/><category term='ABAP VALIDATION'/><category term='Activity-Based Costing'/><category term='create Listbox and display the selected value'/><category term='What is use of using HASHED TABLE'/><category term='Process Control Program'/><category term='Optimizing the load of the database'/><category term='SAP abap system tables'/><category term='free downloads'/><category term='Example ABAP'/><category term='How can we give dynamic table name in select statement?'/><category term='FUNCTION MODULES.'/><category term='BAP/4 OLE Automation Controller'/><category term='Disabling the Modification Assistant'/><category term='OLE to create a new Excel File'/><category term='Select with selection list'/><category term='Adding additional fields to Delivery Due List'/><category term='Remove HTML Program'/><category term='SAP LE Tips and Logistics Execution Discussion Forum'/><category term='Sample Code Using Field-Groups'/><category term='ABAP Development'/><category term='SAMPLE SOURCE CODES and PROJECTS'/><category term='ABAP - Sending GOS attachments to an email address'/><category term='DOS Programming'/><category term='ABAP CODE FOR DIALOG BOX AND SPILTTER CONTAINERS'/><category term='Advance Payments'/><category term='ECC 6.0 with NetWeaver 2004S'/><category term='MODULARIZATION'/><category term='How to delete an editor lock'/><category term='Which table is the developer key stored'/><category term='ABAP retrieve statistical data from the STAT file'/><category term='BAPI_GOODSMVT_CREATE-ABAP'/><category term='Change the Input Fields Dynamically in a Screen'/><category term='PM (Plant Maintenance) Tutorials'/><category term='CLASS-METHODS'/><category term='BAPI'/><category term='Understanding &quot;Local Workflow&quot;'/><category term='Performance Tools'/><category term='ABAP Keyword Documentation'/><category term='Re Useable SAP ABAP Code'/><category term='abap'/><category term='Several nested INNER JOIN statements can be inefficient in sap abap programming'/><category term='Difference between Work Area and Header'/><category term='sd faqs.'/><category term='sap abap faq'/><category term='Authorization in SAP Business Warehouse'/><category term='Implementing SAP'/><category term='using alv grid real time implementation'/><category term='ABAP/4 programming'/><category term='query.'/><category term='Methods'/><category term='Un/Lock all users in a client'/><category term='SAP ABAP Development: Recommendations'/><category term='OOP'/><category term='PPTS ON BAPI PROGRAMMING'/><category term='Ticket Resolving'/><category term='Role of SAP Consultant In Testing'/><category term='Disabling the Download Option in LIST'/><category term='encryptions'/><category term='An Introduction to SAP'/><category term='Program to Hide ABAP&apos;s Source Code and Protects it'/><category term='programming problems'/><category term='Defining Input Help'/><category term='SMOD and CMOD?'/><category term='Difference Between LIS'/><category term='Statements in ABAP Objects'/><category term='SAP Archiving Application Data (CA-ARC) pdf book'/><category term='ALE'/><category term='Learn all Functions in ALV Grid or ALV report'/><category term='internal table tutorial'/><category term='Components of classes'/><category term='TABC41_1 : ABAP Development Workbench Basics 2'/><category term='Split String into two parts at delimiter'/><category term='Hierarchy Tree'/><category term='Application Programs'/><category term='solutions'/><category term='Scrolling in Table Control in sap abap'/><category term='sap basis'/><category term='Display Spool Output'/><category term='Difference Between Select-Options and Ranges'/><category term='SQL Tool for ABAP Yes4SQL -- Both Native and Open SQL'/><category term='plant maintanance'/><category term='TCODES'/><category term='SAP Asset Information for Intranets (FI-AA) pdf book'/><category term='netweaver books'/><category term='descriptions of a table?'/><category term='abap programmin pdf book'/><category term='PBO of the Selection Screen'/><category term='Abap Code for Create Listbox'/><category term='SAP Licenses'/><category term='SAP 6.4 GUI and NetWeaver 2004s'/><category term='ABAP Questions Commonly'/><category term='windows OS.'/><category term='Select with index support'/><category term='Performance tuning using GROUPBY'/><category term='Global Class'/><category term='SAP ALE Scenarios in Asset Accounting pdf book'/><category term='ABAP Tutorial'/><category term='Creating new program'/><category term='sap HUM.'/><category term='The interactive eLearning system for ABAP™'/><category term='Report YRS_DOWNLOAD_TRANSPORT_REQUEST'/><category term='Copying internal tables'/><category term='Checking Fields with Incompletion procedures for Delivery'/><category term='ABAP CODE FOR CREATING TOOLBAR CONTROLS'/><category term='Download BAPI Programming Tutorial'/><category term='TABC41_1 : ABAP Development Workbench Basics 1'/><category term='BDC Presentation'/><category term='ALL PDFs free downloads'/><category term='SAP Archiving Application Data (FI) pdf book'/><category term='MM pdfs'/><category term='sap ps'/><category term='MODULE TABLES.'/><category term='Comparison of internal tables'/><category term='SAP Activity-Based Costing (CO-OM-ABC) pdf BOOK'/><category term='Functions'/><category term='abap xml programming'/><category term='ABAP/4 and Developments'/><category term='EDI'/><category term='Usage of &apos;for all entries&apos; in Select Statement'/><category term='SAP Modules'/><category term='activity-Based Costing pdf book'/><category term='SAP ABAP Best practices'/><category term='ABAP CODE FOR TEXT EDIT CONTROL'/><category term='Human Resource'/><category term='Activities/Strategies in SAP FI'/><category term='work flow'/><category term='What Are Different Types of Internal Tables and Their Usage'/><category term='String Handling in ABAP - Removing Unwanted Char'/><category term='ABAP - 3 Levels Interactive Report'/><category term='ABAP Clipboard Utilities for Beautiful Commented Code'/><category term='ABAP Training Simulator'/><category term='SAP Paper Documents'/><category term='ABAP/4 OLE Automation Controller'/><category term='A demo program to create subscreen in your ABAP Program'/><category term='Download ABAP Report Tutorial'/><category term='SAP abap mm tables structure'/><category term='ALV grid Control Tutorial'/><category term='SAP Transaction codes'/><category term='Inner Join to retrieve the Material Valuation Class'/><category term='top sites.'/><category term='IDOC'/><category term='bdc session program'/><category term='Creating and Changing ABAP Programs'/><category term='free download XSLT Mapping for sap xi'/><category term='Project Expense Report'/><category term='alv grid real time implementation'/><category term='Production Planning Tables (PP)'/><category term='ABAP Programming Language'/><category term='ABAP/4 Optimization Techniques'/><category term='Mass update the User Parameter Value in sap abap'/><category term='Different Types of Selection Screens'/><category term='sap books.'/><category term='Financial Accounting(FC)'/><category term='SAP Departmental Financial Planning Quick Reference'/><category term='Protect part of ABAP code from modifying'/><category term='SAP ABAP FAQ (Technical)'/><category term='sap hr faqs'/><category term='web service in SAP'/><category term='Batch Input Program'/><category term='Using Different Color'/><category term='ABAP Proxy'/><category term='e-CATT tutorial'/><category term='SAP abap pm tables'/><category term='List Box'/><category term='Dialog programming Tutorial'/><category term='ABAP WORK BENCH'/><category term='RFC and BAPI'/><category term='user exists book.'/><category term='mySAP Certification'/><category term='Sample Questions for Abapers'/><category term='ABAP Database'/><category term='Common used of Dialog Screen for Display'/><category term='seimens material'/><category term='User Exits and Customer Exits?'/><category term='IDOCs'/><category term='IMG Configuration.'/><category term='Explain Unicode-enabled ABAP program'/><category term='Processing Screens'/><category term='Passing data from one ABAP program to another'/><category term='SAP Expert'/><category term='Select using JOINS'/><category term='Protect Selection/Parameters'/><category term='Classes'/><category term='With Header and Without Header Internal Table'/><category term='abap dates'/><category term='ABAP Internal Tables faq'/><category term='ABAP Documents'/><category term='sap tables.'/><category term='Archiving IDocs'/><category term='SAP ABAP Interview Questions'/><category term='How to used 3 tables for inner joins'/><category term='Assembly-to-order (LO-ASM) pdf book'/><category term='Describe Select-Options'/><category term='sap in 24 hours(sams series) tutorial'/><category term='SD BOOKS.'/><category term='DIFFERENCE BETWEEN BADI&apos;S AND USER EXITS'/><category term='SAP Workflow/Webflow FAQ'/><category term='Top Blog area.com'/><category term='Function to Display All the Columns of any Table Work Area'/><category term='MODULE POOL PROGRAMMING IN SAP'/><category term='Tree type report'/><category term='ABAP Free downloads'/><category term='interview faqs'/><category term='How to implement F4 search help in OO ALV Grid'/><category term='PS (Project Systems) Tutorials'/><category term='Difference between Drilldown report and Interactive report in abap'/><category term='sap ABAP report on Column Account Managers Report'/><category term='TEXT SYMBOLS'/><category term='Basis (BC)'/><category term='Creating an Organizational Plan'/><category term='SAP abap reports on all modules'/><category term='BASICs'/><category term='Total No of Pages of a Report Output'/><category term='SAP TESTING GUIDE.'/><category term='Splash Screen'/><category term='ABAP report with SQL traces'/><category term='ABAP/4 OLE Automation Controller pdf book'/><category term='tables'/><category term='EXAMPLES OF OBJECT ORIENTED ABAP PROGRAMMING'/><category term='sd interview questions'/><category term='Report YRS_UPLOAD_TRANSPORT_REQUEST'/><category term='ABAP Sample Code'/><category term='Conversions faq'/><category term='Dynpro Application'/><category term='SAP abap fico tables structure'/><category term='SAP Tickets'/><category term='Movement Type Posting Error In Delivery'/><category term='Sending recursive mails'/><category term='Plant Maintenance'/><category term='Cross Application (CA)'/><category term='script programs.'/><category term='TABStrips'/><category term='For all entries'/><category term='Complex Screen Elements'/><category term='Free download Implementing SAP R/3 - SD E-book'/><category term='Background Processing System Fields'/><category term='Tools available in SAP to pin-point a performance problem'/><category term='ABAP Database Access'/><category term='User Dialogs'/><category term='ABAP Self Test Q and A'/><category term='Sales and Distribution'/><category term='Plant Maintenance (PM)'/><category term='sd tables structure'/><category term='Quality Management'/><category term='Enable SAP with the power of Javascript book'/><category term='What is SAP R3?'/><category term='smart forms'/><category term='A Sample Hide and Get Cursor in Interactive Programming'/><category term='Explain Cutover Activities/Strategies in SAP FI.'/><category term='XXL'/><category term='Check Length and Alpha Numeric Variable'/><category term='free  SAP Balance Sheet Valuation (MM-IM-VP) pdf book'/><category term='TABW10 Study guide'/><category term='r/3.'/><category term='Reporting Tree in ABAP'/><category term='ABAP Programming'/><category term='System Fields for Current Date and Time'/><category term='SAP scripts and smart forms faq'/><category term='password'/><category term='Tickets and Authorization in SAP Business Warehouse'/><category term='Download ABAP DialogProgramming.pdf'/><title type='text'>SAP ABAP Material Free Download</title><subtitle type='html'>SAP,ABAP PROGRAMMING,Reports,Bdc,SAP Scripts,Smart Forms,Module pool,ALV Interactive, Classic reports,ALE,EDI,Work Flow,User Exits,Customer Exits,BADI,BAPI,Cross Applications,RFC,ABAP Dictionary,ABAP Performance,ABAP Optimization,Function Modules,Sub Routines,LUW'S,SMAPLE Codes,Modularization,Debugging,Internal table,interview Questions,FAQ'S...Series of Complete Course of all major topics of ABAP</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default?start-index=101&amp;max-results=100'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1333</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-274843790805928529</id><published>2009-06-23T16:22:00.001+05:30</published><updated>2009-06-23T16:22:30.567+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Differences between Unicode and Non-Unicode Programs'/><title type='text'>Lists in Unicode Systems</title><content type='html'>&lt;p&gt; A &lt;span class="blue"&gt;&lt;span class="qtext"&gt;WRITE&lt;/span&gt;&lt;/span&gt; statement writes the content of data objects to a list. When you write using a &lt;span class="qtext"&gt;WRITE&lt;/span&gt; statement, the output is stored in the &lt;span class="grey"&gt;list buffer&lt;/span&gt; and is displayed from there when the list is accessed. &lt;/p&gt; &lt;p&gt; Each time a data object is output with &lt;span class="qtext"&gt;WRITE&lt;/span&gt;, the system determines an &lt;span class="blue"&gt;output length&lt;/span&gt; either implicitly or explicitly; the implicit output length depends on the data type. The output length defines the following two attributes: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Number of positions or storage spaces available for characters in the list buffer&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Number of columns or cells available in the actual list&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; If the output length is shorter than the length of the data object, the system shortens its content according to certain &lt;span class="blue"&gt;rules&lt;/span&gt; when writing the data to the list buffer. Any values lost in numeric fields are indicated by a &lt;span class="qtext"&gt;*&lt;/span&gt;. &lt;/p&gt; &lt;p&gt; When a list is displayed or printed, the contents stored in the list buffer are transferred to the list as follows: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;In &lt;span class="blue"&gt;non-Unicode systems&lt;/span&gt;, each character occupies the same amount of space in the list buffer as it requires columns in the list. In single-byte systems, a character requires one byte in the list buffer and one column in the list, while a character that occupies several bytes in the list buffer in a multi-byte system also occupies the same number of columns in the list. For this reason, all characters stored in the list buffer are displayed in the list in non-Unicode systems.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;In &lt;span class="blue"&gt;Unicode systems&lt;/span&gt;, each character usually requires one position in the list buffer. However, a character can also occupy more than one column, as is the case for Eastern Asian characters. However, since the list only contains the same number of columns as there are positions in the list buffer, the number of characters that can be displayed in the list is smaller than the number of characters stored in the list buffer in this case. List output is shortened accordingly, with the page formatted according to the specified &lt;span class="grey"&gt;alignment&lt;/span&gt; and marked with the characters &gt;  or &lt;. You can then only display the entire content of the list by choosing the menu path &lt;span class="italic"&gt;System → List → Unicode Display&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; For this reason, the horizontal position of the &lt;span class="grey"&gt; list cursor&lt;/span&gt; only has the same meaning as the output column in a list displayed or printed in non-Unicode systems. In Unicode systems, this is only guaranteed for the top and bottom output limits. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Rules for WRITE Statements &lt;/span&gt;&lt;/p&gt; &lt;p&gt; To avoid cutting off values unintentionally as far as possible, the rules for &lt;span class="qtext"&gt;WRITE&lt;/span&gt; statements in Unicode programs have been modified and extended. &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Operands in the WRITE statement &lt;/span&gt;&lt;/p&gt; &lt;p&gt; If the data object specified in &lt;span class="qtext"&gt;WRITE&lt;/span&gt; is a &lt;/p&gt; &lt;p&gt; &lt;span class="grey"&gt;flat structure&lt;/span&gt;, this must only be character-type in Unicode programs. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; This also applies for the statement &lt;span class="blue"&gt;&lt;span class="qtext"&gt;WRITE TO&lt;/span&gt;&lt;/span&gt;, in which the target field must also be character-type. &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; WRITE Statements with Implicit Output Length &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In Unicode programs, &lt;span class="qtext"&gt;WRITE&lt;/span&gt; statements without an explicitly specified output length for all data objects with the exception of &lt;span class="grey"&gt;text field literals&lt;/span&gt;  and data objects of the type &lt;span class="qtext"&gt;string&lt;/span&gt; behave in the same way as in non-Unicode programs. This means fewer characters may be displayed in the list than are stored in the list buffer. &lt;/p&gt; &lt;p&gt; In the case of text field literals and data objects of the type &lt;span class="qtext"&gt;string&lt;/span&gt;, the system assumes that all characters are to be displayed. For this reason, the implicit output length is calculated according to the characters in the data object in such a way that it corresponds to the number of columns required in the list. If this output length is greater than the length of the data object, superfluous positions are filled with blanks when the data is written to the list buffer. When displaying the data in the list, the system removes these blanks, since the character representation fills the output length exactly. &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; WRITE Statements with Explicit Output Length &lt;/span&gt;&lt;/p&gt; &lt;p&gt; If a numeric data object is specified as an explicit output length after the &lt;span class="qtext"&gt;AT&lt;/span&gt; addition for a &lt;span class="blue"&gt;&lt;span class="qtext"&gt;WRITE&lt;/span&gt;&lt;/span&gt; statement, the value of this number is used as the output length, both in Unicode and non-Unicode systems. In Unicode systems, the number of characters displayed in the list can differ from the number of characters stored in the list buffer. You can specify the output length in the following way instead of using numeric data objects: &lt;/p&gt; &lt;ol&gt;&lt;li&gt; &lt;span class="qtext"&gt;WRITE AT (*) ...&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;ol class="ml06"&gt;&lt;li&gt; In data objects of the types &lt;span class="qtext"&gt;c&lt;/span&gt; and &lt;span class="qtext"&gt;string&lt;/span&gt;, the output length is set to the number of columns required to display the entire content in the list; closing blanks are not taken into account for type &lt;span class="qtext"&gt;c&lt;/span&gt;. In the case of data objects of the type &lt;span class="qtext"&gt;string&lt;/span&gt;, this has the same meaning as the implicit length. &lt;/li&gt;&lt;li&gt; In data objects of types &lt;span class="qtext"&gt;d&lt;/span&gt; and &lt;span class="qtext"&gt;t&lt;/span&gt;, the output length is set to 10 and 8. &lt;/li&gt;&lt;li&gt; In data objects of the numeric types &lt;span class="qtext"&gt;i&lt;/span&gt;, &lt;span class="qtext"&gt;f&lt;/span&gt;, and &lt;span class="qtext"&gt;p&lt;/span&gt;, the output length is set to the value required to display the current value including thousand separators. This rule is applied to the value after any &lt;span class="qtext"&gt;CURRENCY&lt;/span&gt;, &lt;span class="qtext"&gt;DECIMALS&lt;/span&gt;, &lt;span class="qtext"&gt;NO-SIGN&lt;/span&gt;, &lt;span class="qtext"&gt;ROUND&lt;/span&gt;, or &lt;span class="qtext"&gt;UNIT&lt;/span&gt; have been used. &lt;/li&gt;&lt;li&gt; The implicit output length is used for data objects of the types &lt;span class="qtext"&gt;n&lt;/span&gt;, &lt;span class="qtext"&gt;x&lt;/span&gt;, and &lt;span class="qtext"&gt;xstring&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt; &lt;span class="qtext"&gt;WRITE AT (**) ...&lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;ol class="ml06"&gt;&lt;li&gt; In data objects of the type &lt;span class="qtext"&gt;c&lt;/span&gt;, the output length is set to twice the length of the data object, and in data objects of the type &lt;span class="qtext"&gt;string&lt;/span&gt;, to twice the number of characters contained in the object. &lt;/li&gt;&lt;li&gt; In data objects of the types &lt;span class="qtext"&gt;d&lt;/span&gt; and &lt;span class="qtext"&gt;t&lt;/span&gt;, the output length is set to 10 and 8. &lt;/li&gt;&lt;li&gt; In data objects of the numeric types &lt;span class="qtext"&gt;i&lt;/span&gt;, &lt;span class="qtext"&gt;f&lt;/span&gt;, and &lt;span class="qtext"&gt;p&lt;/span&gt;, the output length is set to the value required in order to display the maximum possible values for these types, including plus and minus signs and thousand separators. This rule is applied to the value after any &lt;span class="qtext"&gt;CURRENCY&lt;/span&gt;, &lt;span class="qtext"&gt;DECIMALS&lt;/span&gt;, &lt;span class="qtext"&gt;NO-SIGN&lt;/span&gt;, &lt;span class="qtext"&gt;ROUND&lt;/span&gt;, or &lt;span class="qtext"&gt;UNIT&lt;/span&gt; additions have been used. &lt;/li&gt;&lt;li&gt; The implicit output length is used for data objects of the types &lt;span class="qtext"&gt;n&lt;/span&gt;, &lt;span class="qtext"&gt;x&lt;/span&gt;, and &lt;span class="qtext"&gt;xstring&lt;/span&gt;. &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p&gt; The behavior of the output lengths &lt;span class="qtext"&gt;(*)&lt;/span&gt; and &lt;span class="qtext"&gt;(**)&lt;/span&gt; when using the addition &lt;span class="qtext"&gt;USING EDIT MASK&lt;/span&gt; and the templates for date fields is described in &lt;span class="blue"&gt;Formatting Options&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Additions for GET/SET CURSOR FIELD/LINE &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The additions &lt;span class="qtext"&gt;DISPLAY OFFSET&lt;/span&gt; and &lt;span class="qtext"&gt;MEMORY OFFSET&lt;/span&gt;take account of the fact that data objects can occupy different lengths when displayed in a list and when stored temporarily in the list buffer. &lt;/p&gt; &lt;p&gt; In accordance with this fact, the addition &lt;span class="qtext"&gt;DISPLAY OFFSET off&lt;/span&gt; positions the cursor in the column in the output area specified in &lt;span class="qtext"&gt;off&lt;/span&gt; for the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;SET CURSOR { FIELD f | LINE l }&lt;/span&gt;&lt;/span&gt; statement. The addition &lt;span class="qtext"&gt;MEMORY OFFSET off&lt;/span&gt; positions the cursor on the character in the output area that is located in the position (of the data object in &lt;span class="qtext"&gt;f&lt;/span&gt;) in the list buffer specified in &lt;span class="qtext"&gt;off&lt;/span&gt;. &lt;/p&gt; &lt;p&gt; In the same way, a &lt;span class="blue"&gt;&lt;span class="qtext"&gt;GET CURSOR { FIELD f | LINE l }&lt;/span&gt;&lt;/span&gt; statement used with the addition &lt;span class="qtext"&gt;DISPLAY OFFSET off&lt;/span&gt; places the cursor position in the output area in the data object &lt;span class="qtext"&gt;off&lt;/span&gt;. When you use the addition &lt;span class="qtext"&gt;MEMORY OFFSET off&lt;/span&gt;, the cursor position in the list buffer that is assigned to the character displayed is placed in the data object &lt;span class="qtext"&gt;off&lt;/span&gt;. The addition &lt;span class="qtext"&gt;DISPLAY&lt;/span&gt; is the standard setting and can therefore be ignored.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Class for Formatting Lists &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Class &lt;span class="lnkgrey"&gt;CL_ABAP_LIST_UTILITIES&lt;/span&gt; has been introduced to calculate output lengths, convert values from the list buffer, and define field limits. The return values of the methods of this class can be used to program a correct column alignment in ABAP lists, even for output of Eastern Asian characters.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; List Settings &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The objects in a list can be displayed in different output lengths by specifying the desired length in the menu under &lt;span class="italic"&gt;System → List → Unicode Display&lt;/span&gt;. This is particularly advantageous for screen lists in &lt;span class="blue"&gt;Unicode systems&lt;/span&gt; where the output is cut off as indicated by the characters &gt; or &lt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Recommendations &lt;/span&gt;&lt;/p&gt; &lt;p&gt;We recommend that you adhere to the following rules when programming lists, to ensure that they have the same appearance and functions both in Unicode and non-Unicode systems: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Specify an adequate output length&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Do not overwrite parts of a field&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Do not use the additions &lt;span class="qtext"&gt;RIGHT-JUSTIFIED&lt;/span&gt; or &lt;span class="qtext"&gt;CENTERED&lt;/span&gt; for &lt;span class="blue"&gt;&lt;span class="qtext"&gt;WRITE TO&lt;/span&gt;&lt;/span&gt; if this statement is followed by list output with &lt;span class="qtext"&gt;WRITE&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;In customer-programmed horizontal scrolling with a &lt;span class="blue"&gt;&lt;span class="qtext"&gt;SCROLL&lt;/span&gt;&lt;/span&gt; statement, you should only specify the upper or lower limit of data objects displayed, since the positions in the list buffer and in the list displayed are only certain to match for these field limits in Unicode systems.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-274843790805928529?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/274843790805928529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=274843790805928529' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/274843790805928529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/274843790805928529'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/lists-in-unicode-systems.html' title='Lists in Unicode Systems'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-4460774426933799479</id><published>2009-06-23T16:21:00.000+05:30</published><updated>2009-06-23T16:22:02.312+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Differences between Unicode and Non-Unicode Programs'/><title type='text'>The File Interface in Unicode Programs</title><content type='html'>&lt;p&gt; Since the content of files frequently reflects the structure of data in the working memory, the file interface in a Unicode system must fulfill the following requirements: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;It must be possible to exchange data between Unicode and non-Unicode systems.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;It must be possible to exchange data between different Unicode systems.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;It must be possible to exchange data between different non-Unicode systems that use different &lt;span class="grey"&gt;code pages&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;For this reason, in Unicode programs, you must always define the code page used to encode the character-type data that is written in &lt;span class="grey"&gt;text files&lt;/span&gt; or that is read from text files. &lt;/p&gt; &lt;p&gt;You must also consider that a Unicode program must be executable in a non-Unicode system as well as a Unicode system. Some of the syntax rules for the file interface have therefore been modified so that programming data access in Unicode programs is less prone to errors than in non-Unicode programs. &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Before every read or write access, a file must be opened explicitly using &lt;span class="blue"&gt; &lt;span class="qtext"&gt;OPEN DATASET&lt;/span&gt;&lt;/span&gt;. Furthermore, a file that is already open cannot be opened again. In non-Unicode programs, the first time a file is accessed, it is implicitly opened using the standard settings. The statement for opening a file can be applied to an open file in non-Unicode-programs, although a file can only be opened once within a program.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;When opening the file, the access type and type of file storage must be specified explicitly using the following additions:&lt;/li&gt;&lt;/ul&gt; &lt;ul class="circlem2"&gt;&lt;li&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;INPUT|OUTPUT|APPENDING|UPDATE&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="circlem2"&gt;&lt;li&gt;&lt;span class="blue"&gt;[LEGACY] BINARY|TEXT MODE&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;dl&gt;&lt;dd&gt; When opening a file in &lt;span class="qtext"&gt;TEXT MODE&lt;/span&gt;, the &lt;span class="qtext"&gt;ENCODING&lt;/span&gt; addition must be used to specify the character representation. When opening a file in &lt;span class="qtext"&gt;LEGACY MODE&lt;/span&gt;, the byte order (endian) and a non-Unicode code page must be specified. &lt;/dd&gt;&lt;/dl&gt; &lt;dl&gt;&lt;dd&gt; In non-Unicode programs, if nothing is entered, a file is opened with implicit standard settings. &lt;/dd&gt;&lt;/dl&gt; &lt;ul class="disc"&gt;&lt;li&gt;If a file is opened for reading, the content can only be read. In non-Unicode programs, it is also possible to gain write access to these files.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;If a file is opened as a &lt;span class="grey"&gt;text file&lt;/span&gt;, only the content of character-type data objects can be read or written. In non-Unicode programs, byte-type and numeric data objects are also allowed.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In Unicode programs, file names can also contain blank characters. &lt;/p&gt; &lt;p&gt; &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-4460774426933799479?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/4460774426933799479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=4460774426933799479' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4460774426933799479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4460774426933799479'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/file-interface-in-unicode-programs.html' title='The File Interface in Unicode Programs'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-7514619409467404130</id><published>2009-06-23T16:20:00.002+05:30</published><updated>2009-06-23T16:21:15.064+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Differences between Unicode and Non-Unicode Programs'/><title type='text'>Character String and Byte String Processing in Unicode Programs</title><content type='html'>&lt;p&gt; In Unicode programs, character string and byte string processing are strictly separated. The operands of character string processing must be &lt;span class="grey"&gt;character-like data objects&lt;/span&gt;, and operands in byte string processing must be &lt;span class="grey"&gt;byte-like data objects&lt;/span&gt;. In non-Unicode programs, byte strings are normally handled in the same way as character strings. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Syntactic separation &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Statements for character string and byte string processing &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In the statements for &lt;span class="blue"&gt;character string and byte string processing&lt;/span&gt;, in Unicode programs, the distinction is made in the statements that are intended for both types of processing by the optional addition &lt;span class="qtext"&gt;IN CHARACTER|BYTE MODE&lt;/span&gt;. In this case, &lt;span class="qtext"&gt;IN CHARACTER MODE&lt;/span&gt; is the default. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The addition &lt;span class="qtext"&gt;IN CHARACTER|BYTE MODE&lt;/span&gt; is also used in the statements for determining length and offset: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;DESCRIBE FIELD ... LENGTH&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;DESCRIBE DISTANCE&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; In this case, the specifications are obligatory &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Relational operators for character strings and byte strings &lt;/span&gt;&lt;/p&gt; &lt;p&gt; There are relational operators for &lt;span class="blue"&gt;character strings&lt;/span&gt; and for &lt;span class="blue"&gt;byte strings&lt;/span&gt;. In Unicode programs, the latter can no longer be used for byte strings. &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Functions for character strings and byte strings &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The &lt;span class="grey"&gt;description functions&lt;/span&gt; are divided into description functions for character strings and description functions for byte strings. In particular, in Unicode programs, &lt;span class="qtext"&gt;strlen&lt;/span&gt; can now only be used for character-like arguments, while &lt;span class="qtext"&gt;xstrlen&lt;/span&gt; is available for byte-like arguments. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-7514619409467404130?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/7514619409467404130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=7514619409467404130' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/7514619409467404130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/7514619409467404130'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/character-string-and-byte-string.html' title='Character String and Byte String Processing in Unicode Programs'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-2287194914915912269</id><published>2009-06-23T16:20:00.001+05:30</published><updated>2009-06-23T16:20:43.802+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Differences between Unicode and Non-Unicode Programs'/><title type='text'>Structure Enhancements and Unicode Programs</title><content type='html'>&lt;p&gt; Since Release 3.0, the ABAP Dictionary structures and database tables that are delivered by SAP can be subsequently enhanced with &lt;span class="grey"&gt;Customizing-Includes&lt;/span&gt; or &lt;span class="grey"&gt;append structures&lt;/span&gt;. Such changes cause problems in &lt;span class="grey"&gt;unicode programs&lt;/span&gt; if the enhancement changes the &lt;span class="grey"&gt;unicode fragment view&lt;/span&gt;. &lt;/p&gt; &lt;p&gt;For this reason, the option to classify structures and database tables was introduced, which makes it possible to recognize and handle problems related to structure enhancements. This classification is used during the program check to create a warning at all points where it works with structures, and where later structure enhancements can cause syntax errors or changes in program behavior. When you define a structure or a database table in the ABAP Dictionary, you can specify the enhancement categories that are displayed in the following table as classification. &lt;/p&gt; &lt;table border="1"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;span class="bold"&gt;Level&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="bold"&gt;Category&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="bold"&gt;Meaning&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;1&lt;/td&gt; &lt;td&gt;Not classified&lt;/td&gt; &lt;td&gt;The structure does not have an enhancement category.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;2&lt;/td&gt; &lt;td&gt;Cannot be enhanced&lt;/td&gt; &lt;td&gt;The structure may not be enhanced.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;3&lt;/td&gt; &lt;td&gt;Can be enhanced and character-type&lt;/td&gt; &lt;td&gt;All structure components and their enhancements have to be character-type flat.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;4&lt;/td&gt; &lt;td&gt;Can be enhanced and character-type or numeric.&lt;/td&gt; &lt;td&gt;All structure components and their enhancements have to be flat.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;5&lt;/td&gt; &lt;td&gt;Any enhancements&lt;/td&gt; &lt;td&gt;All structure components and their enhancements can have any data type.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;The warnings displayed after the program check - depending on the effects of the structure enhancements that are permitted - are classified into three levels from the following table. &lt;/p&gt; &lt;table border="1"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;span class="bold"&gt;Level&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="bold"&gt;Type of Check&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="bold"&gt;Meaning&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;A&lt;/td&gt; &lt;td&gt;Syntax check&lt;/td&gt; &lt;td&gt;An enhancement that fully utilizes the enhancement category of the relevant structure. It leads to a syntax error.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;B&lt;/td&gt; &lt;td&gt;Extended check&lt;/td&gt; &lt;td&gt;Permitted enhancements can, but do not always have to, result in a syntax error.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;C&lt;/td&gt; &lt;td&gt;Extended check&lt;/td&gt; &lt;td&gt;Permitted enhancements cannot result in syntax errors, although changes to program behavior do result in semantic problems.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;span class="h4"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt; If the structure &lt;span class="qtext"&gt;ddic_struc&lt;/span&gt; in the ABAP Dictionary is defined only with &lt;span class="grey"&gt;flat&lt;/span&gt; components but is classified as &lt;span class="italic"&gt;Any enhancements&lt;/span&gt;, then the following program section leads to a warning during the syntax check. If the structure were enhanced by a &lt;span class="grey"&gt;deep&lt;/span&gt; component after the program was delivered, the program would be syntactically incorrect and no longer executable. This is why in this case you either have to classify the structure &lt;span class="qtext"&gt;ddic_struc&lt;/span&gt; in the ABAP Dictionary as &lt;span class="italic"&gt;Can be enhanced and character-type&lt;/span&gt; or else you cannot specify the offset/length in the program. &lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;DATA: my_struc TYPE ddic_struc,&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;      str TYPE string,&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;      off TYPE i,&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;      len TYPE i.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;str = my_struc+off(len).&lt;/span&gt; &lt;/p&gt; &lt;p&gt;  &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-2287194914915912269?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/2287194914915912269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=2287194914915912269' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2287194914915912269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2287194914915912269'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/structure-enhancements-and-unicode.html' title='Structure Enhancements and Unicode Programs'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-5638236123517007848</id><published>2009-06-23T16:19:00.002+05:30</published><updated>2009-06-23T16:20:10.087+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Differences between Unicode and Non-Unicode Programs'/><title type='text'>Structure Typing in Unicode Programs</title><content type='html'>&lt;p&gt; For downward compatibility reasons, a structure can still be cast for &lt;span class="grey"&gt;field symbols&lt;/span&gt; and parameters of &lt;span class="grey"&gt;function modules&lt;/span&gt; and &lt;span class="grey"&gt;subroutines&lt;/span&gt; using the obsolete addition &lt;span class="qtext"&gt;STRUCTURE&lt;/span&gt;. &lt;/p&gt; &lt;p&gt; When assigning a data object to such a field symbol or passing an actual parameter to such a formal parameter, in non-Unicode programs, the system only checks whether the length of the data object or actual parameter has at least the length of the structure and whether the alignment is identical at runtime. Unicode programs make a difference between structured and elementary data objects or actual parameters. For a structured data object or actual parameter, its &lt;span class="grey"&gt;Unicode fragment view&lt;/span&gt; must match the cast structure including all alignment gaps (including the closing ones). In addition, an elementary data object or actual parameter must be character-type and flat. &lt;/p&gt; &lt;p&gt; When a formal parameter of a function module is typed with a flat structure using &lt;span class="qtext"&gt;LIKE&lt;/span&gt; instead of &lt;span class="qtext"&gt;TYPE&lt;/span&gt;, &lt;span class="qtext"&gt;LIKE&lt;/span&gt; has the same effect as &lt;span class="qtext"&gt; STRUCTURE&lt;/span&gt;. However, the system checks the exact length during the parameter transfer in non-Unicode programs. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The check of the Unicode fragment view can avoid problems that occur in non-Unicode systems due to closing alignment gaps. Example: The filliing of actual parameters with the content of an alignment gap which is not type-specific. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-5638236123517007848?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/5638236123517007848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=5638236123517007848' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5638236123517007848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5638236123517007848'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/structure-typing-in-unicode-programs.html' title='Structure Typing in Unicode Programs'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-8753463675597589214</id><published>2009-06-23T16:19:00.001+05:30</published><updated>2009-06-23T16:19:39.716+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Differences between Unicode and Non-Unicode Programs'/><title type='text'>Conversion of Structures in Unicode Programs</title><content type='html'>&lt;p&gt; The most important differences between the behaviors of Unicode programs and non-Unicode programs are the changed &lt;span class="blue"&gt;conversion rules for structures&lt;/span&gt; for assignments and for &lt;span class="blue"&gt;comparisons&lt;/span&gt;. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Two structures in Unicode programs are only compatible when all &lt;span class="grey"&gt;alignment gaps&lt;/span&gt; are identical on all platforms. This applies in particular for alignment gaps that are created by included structures (&lt;span class="blue"&gt;&lt;span class="qtext"&gt;INCLUDE&lt;/span&gt;&lt;/span&gt;) &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Assignments between flat structures &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In non-Unicode programs, incompatible &lt;span class="grey"&gt;flat structures&lt;/span&gt; are treated as data objects of the type &lt;span class="qtext"&gt;c&lt;/span&gt;, whereas in Unicode programs, &lt;span class="blue"&gt;conversion rules&lt;/span&gt; apply which assign the most important role to the &lt;span class="grey"&gt;Unicode fragment view&lt;/span&gt; of the structures. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Assignments between flat structures and single fields &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In non-Unicode programs, flat structures are treated as data objects of the type &lt;span class="qtext"&gt;c&lt;/span&gt; in case of the assignment of elementary data objects and the assignment to elementary data objects, whereas in Unicode programs, a&lt;span class="blue"&gt;conversion rule&lt;/span&gt; applies according to which the structure must be character-type either completely or at least in the initial fragment. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Comparisons between incompatible flat structures &lt;/span&gt;&lt;/p&gt; &lt;p&gt; As is the case with the assignment, the structures are not treated as &lt;span class="qtext"&gt;c&lt;/span&gt; fields, but according to their &lt;span class="grey"&gt;Unicode fragment view&lt;/span&gt; (see &lt;span class="blue"&gt;comparison rules between operands&lt;/span&gt;). &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Comparisons between flat structures and single fields &lt;/span&gt;&lt;/p&gt; &lt;p&gt; As is the case with the assignment, the system checks whether the structure is character-type either completely or at least in the initial fragment (see &lt;span class="blue"&gt;Comparison Operators for All Data Types&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-8753463675597589214?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/8753463675597589214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=8753463675597589214' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/8753463675597589214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/8753463675597589214'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/conversion-of-structures-in-unicode.html' title='Conversion of Structures in Unicode Programs'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-3319349481329601718</id><published>2009-06-23T16:18:00.003+05:30</published><updated>2009-06-23T16:18:57.580+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Differences between Unicode and Non-Unicode Programs'/><title type='text'>Access to memory sequences in Unicode programs</title><content type='html'>&lt;p&gt; The following (in some cases obsolete) statements access data objects that are stored in the memory as an equally spaced sequence: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;DO ... VARYING&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;WHILE ... VARY&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;ADD ... THEN ... UNTIL&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;ADD ... FROM ... TO&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; In the &lt;span class="qtext"&gt;DO&lt;/span&gt; and &lt;span class="qtext"&gt;WHILE&lt;/span&gt; loops in Unicode programs, all data objects of the sequence must be compatible and either be structure components that belong to the same structure, or subareas of the same data object specified using offset/length specifications. In Unicode programs, a &lt;span class="qtext"&gt;RANGE&lt;/span&gt; must also be entered if it cannot be statically recognized that the data objects involved are components of the same structure. Otherwise, the permitted memory area is determined from the smallest possible substructure. &lt;/p&gt; &lt;p&gt; When memory sequences are added using &lt;span class="qtext"&gt;ADD&lt;/span&gt;, in Unicode programs, all data objects of the sequence must be components of a structure. If this cannot be statically recognized in the syntax check, a structure must be specified using the addition &lt;span class="qtext"&gt;RANGE&lt;/span&gt;. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-3319349481329601718?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/3319349481329601718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=3319349481329601718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3319349481329601718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3319349481329601718'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/access-to-memory-sequences-in-unicode.html' title='Access to memory sequences in Unicode programs'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-5891120706949359510</id><published>2009-06-23T16:18:00.001+05:30</published><updated>2009-06-23T16:18:26.192+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Differences between Unicode and Non-Unicode Programs'/><title type='text'>Offset and Length Specifications in Unicode Programs</title><content type='html'>&lt;span class="h1"&gt;&lt;/span&gt; &lt;p&gt; &lt;span class="blue"&gt;Offset/length specifications&lt;/span&gt; are made by appending &lt;span class="qtext"&gt;[+off][(len)]&lt;/span&gt; to the name of a &lt;span class="blue"&gt;data object in operand position&lt;/span&gt;, and the specifications are used to access subareas of a data object. This type of programming is no longer completely possible in Unicode systems because, for example when accessing structures with components of different data types, it is not possible to define whether offset and length should be specified in characters or bytes. Furthermore, restrictions have been introduced that forbid access to memory areas outside of flat data objects. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Offset/length specifications for elementary data objects &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Offset/length specifications are permitted for &lt;span class="grey"&gt;character-type&lt;/span&gt; and &lt;span class="grey"&gt;byte-type data objects&lt;/span&gt;. The specification of offset and length is interpreted either as a number of characters or as a number of bytes. The rules that determine which data objects in Unicode programs count as character-type or byte-type objects do not allow for offset/length specifications for data objects of numeric data types. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The method of using data objects of type &lt;span class="qtext"&gt;c&lt;/span&gt; as containers for storing structures of different types, which are often not known until runtime, in which components are accessed using offset/length access, is no longer possible in Unicode programs. Instead of these containers, the statement &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CREATE DATA&lt;/span&gt;&lt;/span&gt; can be used to generate data objects of any structure. To enable access to existing containers, these can be assigned to a field symbol using the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CASTING&lt;/span&gt;&lt;/span&gt; addition of the statement &lt;span class="blue"&gt;&lt;span class="qtext"&gt;ASSIGN&lt;/span&gt;&lt;/span&gt;. The &lt;span class="blue"&gt;&lt;span class="qtext"&gt;COMPONENT&lt;/span&gt;&lt;/span&gt; addition can then be used to access components. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Offset/length specifications for structures &lt;/span&gt;&lt;/p&gt; &lt;p&gt; An offset/length specification for a structure is only permitted in Unicode systems if the structure is either &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="grey"&gt;character-type&lt;/span&gt; (i.e. it only contains flat character-type components), or it is&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="grey"&gt;flat&lt;/span&gt;, has a character-type initial fragment according to the &lt;span class="grey"&gt;Unicode fragment view&lt;/span&gt;, and the offset/length specification accesses this initial fragment.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; In both cases, the specification of offset and length is interpreted as a number of characters. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The following structure has both character-type and non-character-type components: &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext"&gt;BEGIN OF STRUC,&lt;br /&gt;  a TYPE c LENGTH 3,    "Length 3 characters&lt;br /&gt;  b TYPE n LENGTH 4,    "Length 4 characters&lt;br /&gt;  c TYPE d,             "Length 8 characters&lt;br /&gt;  d TYPE t,             "Length 6 characters&lt;br /&gt;  e TYPE  decfloat16,   "Length 8 bytes&lt;br /&gt;  f TYPE c LENGTH 28,   "Length28 characters&lt;br /&gt;  g TYPE x LENGTH 2,    "Length 2 bytes&lt;br /&gt;END OF STRUC.&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; The &lt;span class="grey"&gt;Unicode fragment view&lt;/span&gt; splits the structure into four areas F1 - F5. &lt;/p&gt; &lt;p&gt; &lt;span class="qtext400"&gt; [ aaa | bbbb | cccccccc | ddd | AAA | eeee | fffffffffffff | gg ]&lt;br /&gt;[            F1               |  F2 |  F3  |       F4      | F5 ]&lt;/span&gt; &lt;/p&gt; &lt;p&gt; Offset/length access is only possible for the character-type initial fragment &lt;span class="qtext400"&gt;F1&lt;/span&gt;. Specifications such as &lt;span class="qtext"&gt;struc(21)&lt;/span&gt; or &lt;span class="qtext"&gt;struc+7(14)&lt;/span&gt; are accepted and are handled as a single field of type &lt;span class="qtext"&gt;c&lt;/span&gt;. An access such as &lt;span class="qtext"&gt;struc+57(2)&lt;/span&gt;, for example, is not permitted in Unicode systems. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Offset/length specifications for actual parameters &lt;/span&gt;&lt;/p&gt; &lt;p&gt; For &lt;span class="blue"&gt;actual parameters&lt;/span&gt; specified in  &lt;span class="blue"&gt;&lt;span class="qtext"&gt;PERFORM&lt;/span&gt;&lt;/span&gt;, in Unicode programs, it is not possible to specify a memory area outside of the actual parameter using offset/length specifications. In particular, it is no longer possible to specify an offset without a length, as this would implicitly set the length of the actual parameter. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Offset/length specification for field symbols &lt;/span&gt;&lt;/p&gt; &lt;p&gt; When assigning a &lt;span class="blue"&gt;memory area&lt;/span&gt; to a field symbol using the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;ASSIGN&lt;/span&gt;&lt;/span&gt; statement, in Unicode programs it is now only possible to use offset/length specifications to access the memory within the data object. The addition &lt;span class="blue"&gt;&lt;span class="qtext"&gt;RANGE&lt;/span&gt;&lt;/span&gt; determines the data object. &lt;/p&gt; &lt;p&gt;Field symbols themselves are also allocated an assignable memory area. This is effective if a field symbol is used as a source in the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;ASSIGN&lt;/span&gt;&lt;/span&gt; statement. &lt;/p&gt; &lt;p&gt; In &lt;span class="grey"&gt;non-Unicode programs&lt;/span&gt;, the assignable area is defined by the &lt;span class="grey"&gt;data area&lt;/span&gt; of the current program, which can lead to references being overwritten. &lt;/p&gt; &lt;p&gt; If a data object is entered as a source in &lt;span class="qtext"&gt;ASSIGN&lt;/span&gt;, no offset can be specified without a length unless the explicit &lt;span class="qtext"&gt;RANGE&lt;/span&gt; addition is specified. Otherwise, this would implicitly set the length of the data object. If the name of a field symbol is specified, its data type in Unicode programs must be &lt;span class="grey"&gt;flat&lt;/span&gt; and elementary if an offset is specified without a length. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Previously, cross-field offset/length accesses could be usefully implemented in the &lt;span class="qtext"&gt;ASSIGN&lt;/span&gt; statement for processing repeating groups in structures. In order to enable this in Unicode systems, the &lt;span class="qtext"&gt;ASSIGN&lt;/span&gt; statement has been enhanced with the additions &lt;span class="blue"&gt; &lt;span class="qtext"&gt;RANGE&lt;/span&gt;&lt;/span&gt; and &lt;span class="blue"&gt;&lt;span class="qtext"&gt;INCREMENT&lt;/span&gt;&lt;/span&gt;. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-5891120706949359510?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/5891120706949359510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=5891120706949359510' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5891120706949359510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5891120706949359510'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/offset-and-length-specifications-in.html' title='Offset and Length Specifications in Unicode Programs'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-5511457404563031785</id><published>2009-06-23T16:17:00.001+05:30</published><updated>2009-06-23T16:17:41.140+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Differences between Unicode and Non-Unicode Programs'/><title type='text'>Alignment in Unicode Systems</title><content type='html'>&lt;p&gt; In Unicode systems, in addition to the &lt;span class="grey"&gt; alignment requirements&lt;/span&gt; for numeric data objects of types &lt;span class="qtext"&gt;i&lt;/span&gt;, &lt;span class="qtext"&gt;decfloat16&lt;/span&gt;, &lt;span class="qtext"&gt;decfloat34&lt;/span&gt;, and &lt;span class="qtext"&gt;f&lt;/span&gt; and of &lt;span class="grey"&gt;deep&lt;/span&gt; data objects, all &lt;span class="grey"&gt;character-type data types&lt;/span&gt; are also affected. The alignment is determined by the length requirement of a character in the memory. &lt;/p&gt; &lt;p&gt; As a consequence, in structures with components of different data types, the &lt;span class="grey"&gt;alignment gaps&lt;/span&gt; in Unicode systems may be different to those in non Unicode systems. For enhancements between structures, the &lt;span class="grey"&gt;Unicode fragment view&lt;/span&gt; concept has been introduced, which divides a structure into fragments according to its alignment gaps. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Alignment gaps can also occur at the end of structures, as the overall length of the structure is determined by the component with the largest alignment requirement. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In the following structure, alignment gaps (A) occur in Unicode systems that are not present in non-Unicode systems. The first alignment gap is formed as a result of the alignment of the substructure &lt;span class="qtext"&gt;struc2&lt;/span&gt;, the second due to the alignment of the component &lt;span class="qtext"&gt;c&lt;/span&gt; of type &lt;span class="qtext"&gt;c&gt;&lt;/span&gt;, and the third is due to the component &lt;span class="qtext"&gt;d&lt;/span&gt; of type &lt;span class="qtext"&gt;i&lt;/span&gt;. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext"&gt;BEGIN OF struc1&lt;br /&gt;  a TYPE x LENGTH 1,&lt;br /&gt;  BEGIN OF struc2&lt;br /&gt;    b TYPE x LENGTH 1,&lt;br /&gt;    c TYPE c LENGTH 6,&lt;br /&gt;  END OF struc2&lt;br /&gt;  d    TYPE i,&lt;br /&gt;END OF struc1&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; &lt;span class="qtext400"&gt;Non-Unicode system [ a | b | cccccc | dddd ]&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;Unicode system     [ a | A | b | A | cccccccccccc | AA | dddd ]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-5511457404563031785?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/5511457404563031785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=5511457404563031785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5511457404563031785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5511457404563031785'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/alignment-in-unicode-systems.html' title='Alignment in Unicode Systems'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-1460590075354553589</id><published>2009-06-23T16:15:00.002+05:30</published><updated>2009-06-23T16:17:01.793+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Differences between Unicode and Non-Unicode Programs'/><title type='text'>Operand Types in Unicode Programs</title><content type='html'>&lt;p&gt; One of the most important differences between Unicode and non-Unicode programs is the clear distinction between &lt;span class="grey"&gt;character-type data objects&lt;/span&gt; and &lt;span class="grey"&gt;byte-type data objects&lt;/span&gt;, and the restriction of data types whose objects can be viewed as character-type. This has an influence on all statements in which character-type operands are expected, and in particular on &lt;span class="blue"&gt;character string and byte string processing&lt;/span&gt;. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Character-type data objects &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In Unicode programs, only the following elementary data objects are now character-type: &lt;/p&gt; &lt;table border="1"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;span class="bold"&gt;Data type&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="bold"&gt;Meaning&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext"&gt;c&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Text field&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext"&gt;d&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Date field&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext"&gt;n&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Numerical text&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext"&gt;t&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Time field&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext"&gt;string&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Text string&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt; In addition, &lt;span class="grey"&gt;structures&lt;/span&gt; are character-type if they contain only &lt;span class="grey"&gt;flat&lt;/span&gt; character-type components (only components from the above table with the exception of text strings). &lt;/p&gt; &lt;p&gt; In Unicode programs, a structure can now essentially only be used at an operand position that expects a single field if the structure is character-type. It is then handled in the same way as a data object of type &lt;span class="qtext"&gt;c&lt;/span&gt;. &lt;/p&gt; &lt;p&gt; In non-Unicode programs, all &lt;span class="grey"&gt;flat structures&lt;/span&gt; and &lt;span class="grey"&gt;byte-type data objects&lt;/span&gt; are also still handled as character-type data objects (implicit casting). &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt;The incorrect use of structures at operand positions is greatly restricted in Unicode programs. For example, a structure that contains a numeric component can no longer be used at a numeric operand position. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Byte-type data objects &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In Unicode programs, elementary data objects of types &lt;span class="qtext"&gt;x&lt;/span&gt; and &lt;span class="qtext"&gt;xstring&lt;/span&gt;are byte-type. In non-Unicode programs, data objects of this type are generally handled as character-type. Conversely, in non-Unicode programs, at positions in which byte processing takes place (&lt;span class="blue"&gt;&lt;span class="qtext"&gt;SET BIT&lt;/span&gt;&lt;/span&gt;, &lt;span class="blue"&gt; &lt;span class="qtext"&gt;GET BIT&lt;/span&gt;&lt;/span&gt; and the logical operators &lt;span class="blue"&gt;&lt;span class="qtext"&gt; O&lt;/span&gt;, &lt;span class="qtext"&gt;Z&lt;/span&gt;, &lt;span class="qtext"&gt;M&lt;/span&gt;&lt;/span&gt;), character-type data objects are still expected, while in Unicode programs only byte-type data objects are permitted. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In Unicode programs, the storage of byte strings in character-type containers causes problems, as the &lt;span class="grey"&gt;byte order&lt;/span&gt; of character-type data objects in Unicode systems is platform dependent. In non-Unicode systems, this only applies for data objects of numeric data types. The content of the data objects is interpreted incorrectly if a container of this type is stored persistently and is then imported to an application server with a different byte sequence. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-1460590075354553589?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/1460590075354553589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=1460590075354553589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/1460590075354553589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/1460590075354553589'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/operand-types-in-unicode-programs.html' title='Operand Types in Unicode Programs'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-7084898850026868095</id><published>2009-06-23T16:15:00.001+05:30</published><updated>2009-06-23T16:15:53.394+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Differences between Unicode and Non-Unicode Programs'/><title type='text'>Names in Unicode Programs</title><content type='html'>&lt;p&gt;&lt;span class="h1"&gt; Names in Unicode Programs &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Only the following characters are allowed in names in Unicode programs: &lt;/p&gt; &lt;ol&gt;&lt;li&gt; The letters "A" through "Z" &lt;/li&gt;&lt;li&gt; The digits "0" through "9" &lt;/li&gt;&lt;li&gt; Underscores ("_") &lt;/li&gt;&lt;/ol&gt; &lt;p&gt; For compatibility reasons, you can also use the characters "%", "$", "?", "-", "#", and "*" but these should be used only in exception cases (for example, for existing program generations) and with good justification. You can also use forward slashes ("/") for namespace prefixes. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt;Apart from ABAP Objects, non-Unicode programs can also use characters other than the ones listed above. This can cause the following problems in these programs: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;If characters are used that are not available in all code page supported by SAP, it might not be possible to run certain programs when using a different code page to the one in which they were created.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;No &lt;span class="grey"&gt;string templates&lt;/span&gt; can be used in a non-Unicode program.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-7084898850026868095?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/7084898850026868095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=7084898850026868095' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/7084898850026868095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/7084898850026868095'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/names-in-unicode-programs.html' title='Names in Unicode Programs'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-337121047139991143</id><published>2009-06-23T16:14:00.000+05:30</published><updated>2009-06-23T16:15:11.975+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ABAP and Unicode'/><title type='text'>Comments and Literals in Non-Unicode Programs</title><content type='html'>&lt;p&gt; In non-Unicode systems, no characters should be used in comments unless they are available in all &lt;span class="grey"&gt;code pages&lt;/span&gt; supported by SAP. In the worst case, a program can no longer be executed when a code page other than the one in which it was created is used. We recommend the usage of 7-Bit-ASCII-characters only. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In a Unicode system, all &lt;span class="grey"&gt;source codes&lt;/span&gt; are stored in Unicode and this is why this problem does not occur there. However, even in Unicode programs, do not use characters for comments and literals if they cannot be displayed in non-Unicode programs, so that programs can be transported from a Unicode system to a non-Unicode system without losses during conversion. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-337121047139991143?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/337121047139991143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=337121047139991143' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/337121047139991143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/337121047139991143'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/comments-and-literals-in-non-unicode.html' title='Comments and Literals in Non-Unicode Programs'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-5693194335903931730</id><published>2009-06-23T16:13:00.000+05:30</published><updated>2009-06-23T16:14:29.024+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ABAP and Unicode'/><title type='text'>Differences between Unicode and Non-Unicode Programs</title><content type='html'>&lt;p&gt; The ABAP key word documentation describes the ABAP statements for both Unicode and non-Unicode systems. Only &lt;span class="grey"&gt;Unicode programs&lt;/span&gt; can be compiled and executed in Unicode systems. In non-Unicode systems, this is also possible for &lt;span class="grey"&gt;non-Unicode programs&lt;/span&gt;. However, Unicode programs should also be used in non-Unicode systems, for the following reasons: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Static type checks are executed in Unicode programs.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Byte processing and string processing is separated in Unicode programs.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Structures are always handled as structures in Unicode programs.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Uncontrolled access to segments of the working memory is not possible in Unicode programs.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; This makes Unicode programs easier to understand, more robust, and easier to maintain than non-Unicode programs. &lt;/p&gt; &lt;p&gt; The following section lists the language constructs and statements for which there are differences between Unicode and non-Unicode programs: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Comments and Literals in Non-Unicode Programs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Names in Unicode Programs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Program Structure of Unicode Programs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Operand Types in Unicode Programs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Alignment in Unicode Systems&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Offset and Length Specifications in Unicode Programs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Access to Memory Sequences in Unicode Programs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Conversion of Structures in Unicode Programs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Structure Typing in Unicode Programs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Structure Enhancements and Unicode Programs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;String and Byte String Processing in Unicode Programs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Function Module Calls in Unicode Programs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Open SQL in Unicode Programs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;File Interface in Unicode Programs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Lists in Unicode Systems&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-5693194335903931730?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/5693194335903931730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=5693194335903931730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5693194335903931730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5693194335903931730'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/differences-between-unicode-and-non.html' title='Differences between Unicode and Non-Unicode Programs'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-8932918514399722358</id><published>2009-06-23T16:12:00.000+05:30</published><updated>2009-06-23T16:13:16.236+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ABAP and Unicode'/><title type='text'>Unicode - Overview</title><content type='html'>&lt;p&gt; Application Server ABAP supports both Unicode and non-Unicode systems. Non-Unicode systems are traditional &lt;span class="grey"&gt;ABAP systems&lt;/span&gt; in which one character is usually represented by one byte. Unicode systems are ABAP systems that are based on Unicode representation and an appropriate operating system and database. &lt;/p&gt; &lt;p&gt;Before Unicode, SAP used various different codes for representing characters in different fonts, such as ASCII, EBCDIC as single-byte &lt;span class="grey"&gt;code pages&lt;/span&gt;, or double-bytecode pages: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;ASCII (American Standard Code for Information Interchange) encodes every character with one byte. This means that a maximum of 256 characters can be displayed (strictly speaking, standard ASCII only encodes one character using 7 bit and can therefore only represent 128 characters. The extension to 8 bit is introduced with &lt;span class="grey"&gt;ISO-8859&lt;/span&gt;). Examples of common code pages are ISO-8859-1 for Western European, or ISO-8859-5 for Cyrillic fonts.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;EBCDIC (Extended Binary Coded Decimal Interchange) also encodes each character using one byte, and can therefore also represent 256 characters. For example,EBCDIC 0697/0500 is an IBM format that has been used on the AS/400 (now known as IBM System i)platform for Western European fonts.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Double byte code pages require between 1 and 2 bytes per character. This enables the representation of 65,536 characters, of which only 10,000 to 15,000 characters are normally used. For example, the code page SJIS is used for Japanese and BIG5 for traditional Chinese fonts.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; Using these character sets, all languages can be handled individually in one &lt;span class="grey"&gt;AS ABAP&lt;/span&gt;. Difficulties arise if texts from different incompatible character sets are mixed in one central system. The exchange of data between systems with incompatible character sets can also lead to problems. &lt;/p&gt; &lt;p&gt; The solution to this problem is the use of a character set that includes all characters at once. This is realized by &lt;span class="grey"&gt;Unicode&lt;/span&gt; (ISO/IEC 10646). A variety of Unicode character representations is possible for the Unicode character set, for example &lt;span class="grey"&gt;UTF&lt;/span&gt;, in which a character can occupy between one and four bytes. &lt;/p&gt; &lt;p&gt;From Release 6.10, the SAP NetWeaver Application Server supports both Unicode and non-Unicode systems. Non-Unicode systems are conventional &lt;span class="grey"&gt;ABAP systems&lt;/span&gt;, in which one character is usually represented by one byte. Unicode systems are ABAP systems that are based on a Unicode character set and which have a corresponding underlying operating system, including a database. &lt;/p&gt; &lt;p&gt;Before Release 6.10, many ABAP programming methods were based on the fact that one character corresponds to one byte. Before a system is converted to Unicode, ABAP programs must therefore be modified at all points where an explicit or implicit assumption is made about the internal length of a character. &lt;/p&gt; &lt;p&gt; ABAP supports this conversion using new syntax rules and new language constructs, whereby emphasis was placed on retaining as much of the existing source code as possible. As a preparation for the conversion to Unicode - but also independently of whether a system will actually be converted to Unicode - the checkbox &lt;span class="italic"&gt;Unicode checks active&lt;/span&gt; can be selected in the program properties. The transaction &lt;span class="lnkgrey"&gt;UCCHECK&lt;/span&gt; supports the activation of this check for existing programs. If this property is set, the program is identified as a Unicode program. In a Unicode program, an additional stricter syntax check is performed than in non-Unicode programs. In some cases, statements must also be enhanced by using new additions. A syntactically correct Unicode program will normally run with the same semantics and the same results in Unicode and non-Unicode systems. (Exceptions to this rule are low-level programs that query and evaluate the number of bytes per character). Programs that are required to run in both systems should therefore also be tested on both platforms. &lt;/p&gt; &lt;p&gt; In a Unicode system, only Unicode programs can be executed. Before converting to a Unicode system, the profile parameter &lt;span class="bold"&gt;abap/unicode_check&lt;/span&gt; should be set to "ON" so that only the execution of Unicode programs is permitted. Non-Unicode programs can only be executed in non-Unicode systems. All language constructs that have been introduced for Unicode programs can, however, also be used in non-Unicode programs. &lt;/p&gt; &lt;p&gt;It has been established that existing programs that have been programmed with no errors mostly fulfill the new Unicode rules and therefore require very little modification. Conversely, most programs that require significant changes are due to an error-prone and therefore questionable programming style. Even if you are not planning a conversion to a Unicode system, Unicode programs are preferable because they are more easily maintained and less prone to errors. Just as outdated and dangerous language constructs are &lt;span class="blue"&gt;declared obsolete&lt;/span&gt; and are no longer permitted for use in ABAP objects, the rules for Unicode programs also offer increased security when programming, for example when working with character fields and mixed structures. This applies particularly for the storage of external data (for example using the file interface), which has been completely reviewed for use in Unicode programs. When creating a new program, SAP therefore recommends that you always identify the program as a Unicode program, and older programs can be converted to Unicode in stages. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-8932918514399722358?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/8932918514399722358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=8932918514399722358' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/8932918514399722358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/8932918514399722358'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/unicode-overview.html' title='Unicode - Overview'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-2790985859717611315</id><published>2009-06-23T16:10:00.000+05:30</published><updated>2009-06-23T16:11:39.803+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Statements in ABAP Objects'/><title type='text'>Statements in Class and Interface Pools</title><content type='html'>&lt;p&gt; Class and interface pools are the ABAP programs in the Class Library. They are defined using the &lt;span class="grey"&gt;Class Builder&lt;/span&gt; tool in &lt;span class="grey"&gt;ABAP Workbench&lt;/span&gt; and are used as a repository for global classes and interfaces. &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;A program with the &lt;span class="grey"&gt;program type&lt;/span&gt; class pool is launched using the statement &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS-POOL&lt;/span&gt;&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;A program with the &lt;span class="grey"&gt;program type&lt;/span&gt; interface pool is launched using the statement &lt;span class="blue"&gt;&lt;span class="qtext"&gt;INTERFACE-POOL&lt;/span&gt;&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; These statements are generated by Class Builder. &lt;/p&gt; &lt;p&gt; Each class pool or interface pool can only contain a single global class or a single global interface. These classes or interfaces are declared using the following statements: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS ... PUBLIC.&lt;/span&gt; ... &lt;span class="qtext"&gt;ENDCLASS.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;INTERFACE ... PUBLIC.&lt;/span&gt; ... &lt;span class="qtext"&gt;ENDINTERFACE.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; Class Builder uses the properties entered here to generate these statements. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Further Statements in Class Pools &lt;/span&gt;&lt;/p&gt; &lt;p&gt; As well as the declaration of the global class, a class pool can only contain the following statements: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Declaration of local data types using the statement &lt;span class="blue"&gt;&lt;span class="qtext"&gt;TYPES&lt;/span&gt;&lt;/span&gt;. These data types can be used by the global class in the private visibility section and in the implementation part.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Declaration of local interfaces using the interfaces &lt;span class="blue"&gt;&lt;span class="qtext"&gt; INTERFACE&lt;/span&gt; ... &lt;span class="qtext"&gt;ENDINTERFACE&lt;/span&gt;&lt;/span&gt;. These interfaces can be used by the global class in the private visibility section and in the implementation part.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Declaration and implementation of local classes using the statements &lt;span class="blue"&gt;&lt;span class="qtext"&gt; CLASS&lt;/span&gt; ... &lt;span class="qtext"&gt;ENDCLASS&lt;/span&gt;&lt;/span&gt;. These classes can be used by the global class in the private visibility section and in the implementation part.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Definition of &lt;span class="grey"&gt;macros&lt;/span&gt; using &lt;span class="blue"&gt;&lt;span class="qtext"&gt;DEFINE&lt;/span&gt; ...&lt;span class="qtext"&gt;END-OF-DEFINITION&lt;/span&gt;&lt;/span&gt; . These macros can be used by the global class in the implementation part.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; Locally defined types, classes, and interfaces in class pools can be used in the following ways: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Only the methods of the global class access the local declarations and implementations in the program. These methods can provide utility methods, for example, which are invisible in the interface of the global class. This is the most common scenario. Any changes made to local declarations in the program do not influence the interface of the global class.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;As well as the methods in the global class, declarations in the private visibility section of the class also reference local declarations in the program. This is a more unusual scenario, in which changes made to the local declarations influence the interface of the global class, and &lt;span class="grey"&gt;subclasses&lt;/span&gt; and &lt;span class="grey"&gt;friends&lt;/span&gt; of the global class are recompiled before the program is executed again.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;span class="h2"&gt; Further Statements in Interface Pools &lt;/span&gt;&lt;/p&gt; &lt;p&gt;An interface pool cannot contain any local declarations or implementations as well as the declaration of the global interface. The interface pool cannot contain any of its own declarations or implementations. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Program Organization &lt;/span&gt;&lt;/p&gt; &lt;p&gt;Like any other ABAP program, class pools and interface pools consist of a global declaration part for declarations and an implementation part for implementations (or procedures). &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;This means that the global declaration part of a class pool can contain the declarations of local data types, local interfaces, and local classes, as well as the actual declaration part of the global class. The implementation part of a class pool can contain the implementation parts of local classes, as well as the implementation part of the global class.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;The global declaration part of an interface pool can only contain the declaration of type groups alongside the declaration of the global interface. The implementation part of an interface pool is always empty.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; Class Builder organizes the various declarations and implementations of a class pool or interface pool in &lt;span class="grey"&gt;include programs&lt;/span&gt;.The developer cannot usually view the names of these programs. A Class Builder function allows you to open the associated include programs in ABAP Editor and edit them. Include programs exist for: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Each visibility section in the declaration part of the global class&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Each implementation of a method from the global class&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Local declarations and implementations in programs&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Test classes from ABAP Unit&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;As well as the editing functions for the individual include programs, Class Builder also provides you with a source code-based mode where you can display all the include programs as a single program, and edit them. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Restrictions &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Apart from the statements listed above, class pools and interface pools do not require any other statements outside of &lt;span class="qtext"&gt;CLASS - ENDCLASS&lt;/span&gt; or&lt;span class="qtext"&gt;INTERFACE - ENDINTERFACE&lt;/span&gt;, nor are these statements allowed. The &lt;span class="blue"&gt;stricter syntax&lt;/span&gt; for ABAP Objects applies to all permitted statements. &lt;/p&gt; &lt;p&gt; The following restrictions are particularly important: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;No processing blocks except methods&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;dl&gt;&lt;dd&gt; Event blocks such as &lt;span class="qtext"&gt;START-OF-SELECTION&lt;/span&gt;, &lt;span class="qtext"&gt;AT SELECTION-SCREEN&lt;/span&gt;,&lt;span class="qtext"&gt; GET&lt;/span&gt;, or &lt;span class="qtext"&gt;AT LINE-SELECTION&lt;/span&gt; are not allowed, and neither are dialog modules (defined by &lt;span class="qtext"&gt;MODULE - ENDMODULE&lt;/span&gt;). This means that runtime environment events cannot be processed. ABAP Objects has its own event concept. Nor can you define &lt;span class="grey"&gt;function modules&lt;/span&gt; or &lt;span class="grey"&gt;subroutines&lt;/span&gt; using &lt;span class="qtext"&gt; FUNCTION - ENDFUNCTION&lt;/span&gt; or &lt;span class="qtext"&gt;FORM - ENDFORM&lt;/span&gt;. The methods of a class pool can still call external function modules and subroutines, as well as methods. &lt;/dd&gt;&lt;/dl&gt; &lt;ul class="disc"&gt;&lt;li&gt;No shared &lt;span class="grey"&gt;data areas&lt;/span&gt; with other programs&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;dl&gt;&lt;dd&gt; The statements &lt;span class="qtext"&gt;TABLES&lt;/span&gt;, &lt;span class="qtext"&gt;NODES&lt;/span&gt;, and the addition &lt;span class="qtext"&gt;COMMON PART&lt;/span&gt; of the &lt;span class="qtext"&gt;DATA&lt;/span&gt; statement are not possible. This means that class pools and interface pools do not support any global data areas across programs within a single internal mode. &lt;/dd&gt;&lt;/dl&gt; &lt;ul class="disc"&gt;&lt;li&gt;No separate  &lt;span class="grey"&gt;screens&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;dl&gt;&lt;dd&gt; Screen processing as implemented in other ABAP programs is not possible. No &lt;span class="grey"&gt;screens ("dynpros")&lt;/span&gt; can be defined in a class pool or interface pool. If you want to use classic dynpros, including &lt;span class="grey"&gt;selection screens&lt;/span&gt;, we recommend that you encapsulate them in &lt;span class="grey"&gt;function groups&lt;/span&gt;. We also recommend that you use alternatives to classic lists, for example classes from SAP List Viewer (ALV) such as  &lt;span class="lnkgrey"&gt;CL_SALV_TABLE&lt;/span&gt;, for displaying lists in tables.. For simple text output, we recommend browser control wrappers such as dynamic documents or text edit control wrappers. &lt;/dd&gt;&lt;/dl&gt; &lt;ul class="disc"&gt;&lt;li&gt;No processing of extracts&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;dl&gt;&lt;dd&gt; In global classes, &lt;span class="grey"&gt;extract data sets&lt;/span&gt; can be edited, since the defining statement &lt;span class="blue"&gt;&lt;span class="qtext"&gt;FIELD-GROUPS&lt;/span&gt;&lt;/span&gt; is forbidden in class or interface pools. &lt;/dd&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-2790985859717611315?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/2790985859717611315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=2790985859717611315' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2790985859717611315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2790985859717611315'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/statements-in-class-and-interface-pools.html' title='Statements in Class and Interface Pools'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-5481089700797935785</id><published>2009-06-23T16:09:00.000+05:30</published><updated>2009-06-23T16:10:28.703+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Statements in ABAP Objects'/><title type='text'>Statements for Defining Classes and Interfaces</title><content type='html'>he following statements define classes and interfaces and their components. You can use them in any ABAP program in which class and interface can be defined.  &lt;p&gt;&lt;span class="h2"&gt; Statements for Defining Classes &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; &lt;span class="bold"&gt;Defining the Declaration Part&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;CLASS ... DEFINITION ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt; ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;ENDCLASS ...&lt;/span&gt; &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; &lt;span class="bold"&gt;Defining the Implementation Part&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;CLASS ... IMPLEMENTATION ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt; ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;ENDCLASS ...&lt;/span&gt; &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Statements for Defining Class Components &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; &lt;span class="bold"&gt;Statements in the Declaration Part&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;PUBLIC SECTION.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;PROTECTED SECTION.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;PRIVATE SECTION.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="qtext"&gt;TYPES ...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="qtext"&gt;INTERFACES ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;ALIASES ...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="qtext"&gt;CONSTANTS ...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="qtext"&gt;CLASS-DATA ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;DATA ...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="qtext"&gt;CLASS-METHODS ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;METHODS ...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="qtext"&gt;CLASS-EVENTS ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;EVENTS ...&lt;/span&gt; &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; &lt;span class="bold"&gt;Statements in the Implementation Part&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;METHOD ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt; ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;ENDMETHOD.&lt;/span&gt; &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Statements for Defining Interfaces &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; &lt;span class="bold"&gt;Declaring the Interface&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;INTERFACE ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt; ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;ENDINTERFACE ...&lt;/span&gt; &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Statements for Declaring Interface Components &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In interfaces, you can use the same statements to declare interface components as those used in the declaration part of classes. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In the declaration part of a class or in interface, you declare its components, that is, its attributes, methods, and events. You can declare local data types using the &lt;span class="qtext"&gt;TYPES&lt;/span&gt; statement. You can also declare alias names for the components of implemented interfaces using the &lt;span class="qtext"&gt;ALIASES&lt;/span&gt; statement. In a class, all declarations must belong to one of the four &lt;span class="grey"&gt;visibility sections&lt;/span&gt; introduced by the relevant statement. &lt;/p&gt; &lt;p&gt; The implementation part of a class only contains method implementations in &lt;span class="qtext"&gt;METHOD - ENDMETHOD&lt;/span&gt; blocks. In a method, you can only use the &lt;span class="blue"&gt;statements for method implementations&lt;/span&gt;. &lt;/p&gt; &lt;p&gt; &lt;span class="bold"&gt;No&lt;/span&gt; statements other than those listed above are necessary for defining classes or interfaces. Consequently, no other statements are allowed between &lt;span class="qtext"&gt;CLASS&lt;/span&gt; and &lt;span class="qtext"&gt;ENDCLASS&lt;/span&gt; or &lt;span class="qtext"&gt;INTERFACE - ENDINTERFACE&lt;/span&gt; except within methods. &lt;/p&gt; &lt;p&gt; The &lt;span class="blue"&gt;stricter syntax&lt;/span&gt; in ABAP Objects applies to all statements for defining classes and interfaces. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-5481089700797935785?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/5481089700797935785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=5481089700797935785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5481089700797935785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5481089700797935785'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/statements-for-defining-classes-and.html' title='Statements for Defining Classes and Interfaces'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-7106842187515358594</id><published>2009-06-23T16:06:00.000+05:30</published><updated>2009-06-23T16:07:02.454+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Statements in ABAP Objects'/><title type='text'>ABAP Objects - Keywords</title><content type='html'>&lt;span class="h1"&gt;&lt;/span&gt; &lt;p&gt; The following list displays the keywords specially introduced for ABAP objects. &lt;/p&gt; &lt;table border="1"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;ALIASES&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Declaration of an &lt;span class="grey"&gt;alias name&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;CALL METHOD&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Call of a &lt;span class="grey"&gt;method&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS ... ENDCLASS&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Definition of a &lt;span class="grey"&gt;class&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS-DATA&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Declaration of a &lt;span class="grey"&gt;static attribute&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS-EVENTS&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Declaration of a &lt;span class="grey"&gt;static event&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS-METHODS&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Declaration of a &lt;span class="grey"&gt;static method&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;CREATE OBJECT&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Creation of an &lt;span class="grey"&gt;object&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;EVENTS&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Declaration of an &lt;span class="grey"&gt;instance event&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;INTERFACE ... ENDINTERFACE&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Definition of an &lt;span class="grey"&gt;interface&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;INTERFACES&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Including an &lt;span class="grey"&gt;interface&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;METHOD ... ENDMETHOD&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Definition of a &lt;span class="grey"&gt;method&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;METHODS&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Declaration of an &lt;span class="grey"&gt;Instance method&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;PRIVATE SECTION&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Start of private &lt;span class="grey"&gt;visibility section&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;PROTECTED SECTION&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Start of a protected &lt;span class="grey"&gt;visibility section&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;PUBLIC SECTION&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Start of the public &lt;span class="grey"&gt;visibility section&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;RAISE EVENT&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Triggering an &lt;span class="grey"&gt;event&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;SET HANDLER&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Registering an &lt;span class="grey"&gt;event&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-7106842187515358594?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/7106842187515358594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=7106842187515358594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/7106842187515358594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/7106842187515358594'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/abap-objects-keywords.html' title='ABAP Objects - Keywords'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-2483028308400456217</id><published>2009-06-23T16:04:00.001+05:30</published><updated>2009-06-23T16:04:59.312+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Inheritance'/><title type='text'>Inheritance Events</title><content type='html'>&lt;p&gt; The example demonstrates the behavior of &lt;span class="blue"&gt;inheritance events&lt;/span&gt;. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Source Text &lt;/span&gt;&lt;/p&gt; &lt;p class="qtextml1"&gt;&lt;span class="qtext"&gt; REPORT demo_event_inheritance.&lt;br /&gt;&lt;br /&gt;CLASS c1 DEFINITION.&lt;br /&gt;  PUBLIC SECTION.&lt;br /&gt;    CLASS-EVENTS  ce1.&lt;br /&gt;    CLASS-METHODS cm1.&lt;br /&gt;    EVENTS  ie1.&lt;br /&gt;    METHODS im1.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS c2 DEFINITION INHERITING FROM c1.&lt;br /&gt;  PUBLIC SECTION.&lt;br /&gt;    CLASS-METHODS cm2.&lt;br /&gt;    METHODS im2.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS c3 DEFINITION INHERITING FROM c2.&lt;br /&gt;  PUBLIC SECTION.&lt;br /&gt;    CLASS-METHODS cm3.&lt;br /&gt;    METHODS im3.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS c4 DEFINITION.&lt;br /&gt;  PUBLIC SECTION.&lt;br /&gt;    CLASS-METHODS cm4 FOR EVENT ce1 OF c2.&lt;br /&gt;    METHODS im4 FOR EVENT ie1 OF c2.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS event_demo DEFINITION.&lt;br /&gt;  PUBLIC SECTION.&lt;br /&gt;    CLASS-DATA handle_flag TYPE c LENGTH 1.&lt;br /&gt;    CLASS-METHODS main.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS event_demo IMPLEMENTATION.&lt;br /&gt;  METHOD main.&lt;br /&gt;&lt;br /&gt;    DATA oref1 TYPE REF TO c1.&lt;br /&gt;    DATA oref2 TYPE REF TO c2.&lt;br /&gt;    DATA oref3 TYPE REF TO c3.&lt;br /&gt;    DATA oref4 TYPE REF TO c4.&lt;br /&gt;&lt;br /&gt;    "Static event&lt;br /&gt;&lt;br /&gt;    SET HANDLER c4=&gt;cm4.&lt;br /&gt;&lt;br /&gt;    c1=&gt;cm1( ).&lt;br /&gt;    WRITE: / 'c1=&gt;cm1( ):', handle_flag.&lt;br /&gt;    c2=&gt;cm1( ).&lt;br /&gt;    WRITE: / 'c2=&gt;cm1( ):', handle_flag.&lt;br /&gt;    c3=&gt;cm1( ).&lt;br /&gt;    WRITE: / 'c3=&gt;cm1( ):', handle_flag.&lt;br /&gt;    c2=&gt;cm2( ).&lt;br /&gt;    WRITE: / 'c2=&gt;cm2( ):', handle_flag.&lt;br /&gt;    c3=&gt;cm2( ).&lt;br /&gt;    WRITE: / 'c3=&gt;cm2( ):', handle_flag.&lt;br /&gt;    c3=&gt;cm3( ).&lt;br /&gt;    WRITE: / 'c3=&gt;cm3( ):', handle_flag.&lt;br /&gt;&lt;br /&gt;    SKIP.&lt;br /&gt;&lt;br /&gt;    "Instance event&lt;br /&gt;&lt;br /&gt;    CREATE OBJECT: oref1, oref2, oref3, oref4.&lt;br /&gt;    SET HANDLER oref4-&gt;im4 FOR ALL INSTANCES.&lt;br /&gt;&lt;br /&gt;    oref1-&gt;im1( ).&lt;br /&gt;    WRITE: / 'oref1-&gt;im1( ):', handle_flag.&lt;br /&gt;    oref2-&gt;im1( ).&lt;br /&gt;    WRITE: / 'oref2-&gt;im1( ):', handle_flag.&lt;br /&gt;    oref3-&gt;im1( ).&lt;br /&gt;    WRITE: / 'oref3-&gt;im1( ):', handle_flag.&lt;br /&gt;    oref2-&gt;im2( ).&lt;br /&gt;    WRITE: / 'oref2-&gt;im2( ):', handle_flag.&lt;br /&gt;    oref3-&gt;im2( ).&lt;br /&gt;    WRITE: / 'oref3-&gt;im2( ):', handle_flag.&lt;br /&gt;    oref3-&gt;im3( ).&lt;br /&gt;    WRITE: / 'oref3-&gt;im3( ):', handle_flag.&lt;br /&gt;&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;START-OF-SELECTION.&lt;br /&gt;  event_demo=&gt;main( ).&lt;br /&gt;&lt;br /&gt;CLASS c1 IMPLEMENTATION.&lt;br /&gt;  METHOD cm1.&lt;br /&gt;    CLEAR event_demo=&gt;handle_flag.&lt;br /&gt;    RAISE EVENT ce1.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;  METHOD im1.&lt;br /&gt;    CLEAR event_demo=&gt;handle_flag.&lt;br /&gt;    RAISE EVENT ie1.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS c2 IMPLEMENTATION.&lt;br /&gt;  METHOD cm2.&lt;br /&gt;    CLEAR event_demo=&gt;handle_flag.&lt;br /&gt;    RAISE EVENT ce1.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;  METHOD im2.&lt;br /&gt;    CLEAR event_demo=&gt;handle_flag.&lt;br /&gt;    RAISE EVENT ie1.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS c3 IMPLEMENTATION.&lt;br /&gt;  METHOD cm3.&lt;br /&gt;    CLEAR event_demo=&gt;handle_flag.&lt;br /&gt;    RAISE EVENT ce1.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;  METHOD im3.&lt;br /&gt;    CLEAR event_demo=&gt;handle_flag.&lt;br /&gt;    RAISE EVENT ie1.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS c4 IMPLEMENTATION.&lt;br /&gt;  METHOD cm4.&lt;br /&gt;    event_demo=&gt;handle_flag = 'X'.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;  METHOD im4.&lt;br /&gt;    event_demo=&gt;handle_flag = 'X'.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Description &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In a &lt;span class="qtext"&gt;c1&lt;/span&gt; superclass, a static event &lt;span class="qtext"&gt;ce1&lt;/span&gt; and an instance event &lt;span class="qtext"&gt;ie1&lt;/span&gt; are declared. The superclass &lt;span class="qtext"&gt;c1&lt;/span&gt;, and its subclass &lt;span class="qtext"&gt;c2&lt;/span&gt;, and its subclass &lt;span class="qtext"&gt;c3&lt;/span&gt;, each contain a static method and an instance method to trigger events. &lt;/p&gt; &lt;p&gt; In the &lt;span class="qtext"&gt;c4&lt;/span&gt; class, event handlers are declared in &lt;span class="qtext"&gt;c2&lt;/span&gt; for the events inherited from &lt;span class="qtext"&gt;c1&lt;/span&gt;. The &lt;span class="qtext"&gt;main&lt;/span&gt; method of the &lt;span class="qtext"&gt;event_demo&lt;/span&gt; class registers events and calls all methods which can trigger events, whereby different possibilities are used to address the methods. The output displays an "X" after the method call for a handled event. &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;The event handler &lt;span class="qtext"&gt;cm4&lt;/span&gt;, declared for the &lt;span class="qtext"&gt;c2&lt;/span&gt; class, can only handle events which are triggered in this class or in its subclasses. Events which are triggered by the static method &lt;span class="qtext"&gt;cm1&lt;/span&gt; in &lt;span class="qtext"&gt;c1&lt;/span&gt;, are not handled, irrelevant of the class name which is specified for the call (also refer to &lt;span class="blue"&gt;Inheritance and Static Components&lt;/span&gt;).&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;The event handler &lt;span class="qtext"&gt;im4&lt;/span&gt;, declared for the &lt;span class="qtext"&gt;c2&lt;/span&gt; class, can also only handle events which are triggered in this class or in its subclasses. Unlike when calling static methods, the class of the object is always addressed when addressing an object using an object reference, and triggered events in the inherited method &lt;span class="qtext"&gt;im1&lt;/span&gt; of the &lt;span class="qtext"&gt;c2&lt;/span&gt; and &lt;span class="qtext"&gt;c3&lt;/span&gt; classes are handled.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-2483028308400456217?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/2483028308400456217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=2483028308400456217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2483028308400456217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2483028308400456217'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/inheritance-events.html' title='Inheritance Events'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-8987400258257040401</id><published>2009-06-23T16:03:00.002+05:30</published><updated>2009-06-23T16:04:19.036+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Inheritance'/><title type='text'>Inheritance and Events</title><content type='html'>&lt;p&gt; After its declaration in a superclass, an event is known in all subclasses of the inheritance tree in which it is visible, and can be triggered in the methods there. &lt;/p&gt; &lt;p&gt;An event handler can be declared with reference to all classes of the inheritance tree in which the event is visible for the event handler. However, it can only handle events which are triggered in classes which more specific or the same as the class for which it is declared. If the event is triggered in a method of a superclass of the class, for which an event handler is declared it cannot handle it. &lt;/p&gt; &lt;p&gt;Note the latter especially when triggering static events in static methods, since a static method is always executed in the class in which it was declared (also refer to &lt;span class="blue"&gt;Inheritance and Static Components&lt;/span&gt;). &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt;For event handlers for events declared in interfaces, the above applies correspondingly to the class in which the interface is bound &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-8987400258257040401?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/8987400258257040401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=8987400258257040401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/8987400258257040401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/8987400258257040401'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/inheritance-and-events.html' title='Inheritance and Events'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-889447061935584475</id><published>2009-06-23T16:03:00.001+05:30</published><updated>2009-06-23T16:03:38.519+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Inheritance'/><title type='text'>Inheritance and Instantiation</title><content type='html'>&lt;p&gt; If you instantiate a subclass, you instantiate all the superclasses at the same time, whereby the initialization of superclass attributes is ensured by the call of the superclass constructors, as described in &lt;span class="blue"&gt;Inheritance and Constructors&lt;/span&gt;. &lt;/p&gt; &lt;p&gt; For each individual class, the &lt;span class="qtext"&gt;CREATE PUBLIC|PROTECTED|PRIVATE&lt;/span&gt; additions to the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS&lt;/span&gt;&lt;/span&gt; statement control who can create an instance of the class or, in other words, can call its instance constructor. &lt;/p&gt; &lt;p&gt; The effects of this is are: &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; If you defined a superclass in a path of the inheritance tree using the &lt;span class="qtext"&gt;CREATE PRIVATE&lt;/span&gt;addition, outside users cannot instantiate a subclass, and a subclass cannot even instantiate itself, because it has no access to the instance constructor of the superclass. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; It would be useful, therefore, also to apply the &lt;span class="qtext"&gt;FINAL&lt;/span&gt; addition to a class that was defined using the &lt;span class="qtext"&gt;CREATE PRIVATE&lt;/span&gt; addition, in order to prevent a derivation of subclasses. Otherwise subclasses of such superclasses have the implicit &lt;span class="qtext"&gt;CREATE NONE&lt;/span&gt; addition. &lt;/p&gt; &lt;p&gt; The only exception to this rule is if a superclass that can be privately instantiated offers its &lt;span class="blue"&gt;friendship&lt;/span&gt; to its subclasses. The direct route is rarely the case here because the superclass must know its subclasses in order for it to be possible. However, a superclass can also offer friendship to an interface which, in turn, can be implemented by its subclasses. &lt;/p&gt; &lt;p&gt; Conversely, you cannot create objects of subclasses in their superclass, if these are declared using &lt;span class="qtext"&gt;CREATE PROTECTED&lt;/span&gt; or &lt;span class="qtext"&gt;CREATE PRIVATE&lt;/span&gt;, unless they are &lt;span class="grey"&gt;friends&lt;/span&gt; of its subclasses. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Possible Cases &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Superclass with no addition or CREATE PUBLIC &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Whether they are friends of the superclass or not, subclasses can have every &lt;span class="qtext"&gt;CREATE&lt;/span&gt; addition. Without addition they inherit the attribute &lt;span class="qtext"&gt;CREATE PUBLIC&lt;/span&gt;. The superclass instance constructor is visible to everyone. The subclass controls the visibility of its own instance constructor, independently of the superclass. &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Superclass with CREATE PROTECTED addition. &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Whether they are friends of the superclass or not, subclasses can have every &lt;span class="qtext"&gt;CREATE&lt;/span&gt; addition. Without addition they inherit the attribute &lt;span class="qtext"&gt;CREATE PROTECTED&lt;/span&gt;. The superclass allows its subclasses unlimited instantiation and therefore also the publishing of its &lt;span class="grey"&gt;protected&lt;/span&gt; instance constructor. &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Superclass with CREATE PRIVATE addition &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Subclass no friend of the superclass &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The subclass has the implicit addition &lt;span class="qtext"&gt;CREATE NONE&lt;/span&gt;. Since nobody other than the superclass itself can call its instance constructor, the subclass cannot be instantiated. None of the &lt;span class="qtext"&gt;CREATE&lt;/span&gt; additions is permitted since this would always lead to the unauthorized publishing of the superclass constructor. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Subclass is friend of the superclass &lt;/span&gt;&lt;/p&gt; &lt;p&gt; If the subclass has no addition, it inherits the attribute &lt;span class="qtext"&gt;CREATE PRIVATE&lt;/span&gt;. However, all &lt;span class="qtext"&gt;CREATE&lt;/span&gt; additions are permitted. As a friend, the subclass can publish the superclass' private constructor in any form. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-889447061935584475?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/889447061935584475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=889447061935584475' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/889447061935584475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/889447061935584475'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/inheritance-and-instantiation.html' title='Inheritance and Instantiation'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-5575762018583904619</id><published>2009-06-23T16:02:00.000+05:30</published><updated>2009-06-23T16:03:08.430+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Inheritance'/><title type='text'>Inheritance and Constructors</title><content type='html'>&lt;p&gt; &lt;span class="blue"&gt;Constructors&lt;/span&gt; are subject to the following inheritance rules. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Instance Constructors &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Each class has an instance constructor called &lt;span class="qtext"&gt;constructor&lt;/span&gt;. This name does not comply with the rule of unique component names within a path of an inheritance tree. Consequently, the instance constructors of the individual classes of an inheritance tree are totally independent of each other. &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Instance constructors of superclasses cannot be redefined in subclasses.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;They cannot be called explicitly using &lt;span class="qtext"&gt;[CALL METHOD] constructor&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; This avoids namespace conflicts. &lt;/p&gt; &lt;p&gt; The instance constructor of a class is called when you create an object using the &lt;span class="blue"&gt; &lt;span class="qtext"&gt;CREATE OBJECT&lt;/span&gt;&lt;/span&gt; statement. Since a subclass inherits all attributes from its superclasses that are visible to it, and since the content of these attributes can be set by instance constructors of its classes, the instance constructor of a subclass is responsible for ensuring that the instance constructors of all superclasses are called as well. This requires that the instance constructor of each subclass contains a &lt;span class="qtext"&gt;[CALL METHOD] super-&gt;constructor&lt;/span&gt; call of the instance constructor of the direct superclass even if it is not explicitly declared. Exceptions to this rule are the direct subclasses of the root node &lt;span class="qtext"&gt;object&lt;/span&gt;. &lt;/p&gt; &lt;p&gt; In superclasses that do not have an explicitly defined instance constructor, the implicit instance constructor is called. This constructor automatically ensures that the instance constructor of the next higher superclass is called. &lt;/p&gt; &lt;p&gt; When instance constructors are called, all non-optional input parameters of these constructors must be populated, as follows: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Parameter population at &lt;span class="qtext"&gt;CREATE OBJECT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Starting from the class of the created objects, the first explicitly defined instance constructor in the corresponding path of the inheritance tree is taken into account. This is the instance constructor of the class itself or the first explicitly defined instance constructor of a superclass.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Population at &lt;span class="qtext"&gt;[CALL METHOD] super-&gt;constructor&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Starting from the direct superclass, the first explicitly defined instance constructor in the corresponding path of the inheritance tree is taken into account.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; The interface of the first explicitly defined instance constructor is populated as is the case with a normal method - that is, &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;If no input parameters exist, no parameters are passed.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Optional input parameters can be populated using &lt;span class="qtext"&gt;EXPORTING&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Non-optional input parameters must be populated using &lt;span class="qtext"&gt;EXPORTING&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; If there are no explicitly defined instance constructors in the path of the inheritance tree below the root class &lt;span class="qtext"&gt;object&lt;/span&gt;, no parameters are passed. &lt;/p&gt; &lt;p&gt; Both at &lt;span class="qtext"&gt;CREATE OBJECT&lt;/span&gt; and at &lt;span class="qtext"&gt;[CALL METHOD] super-&gt;constructor&lt;/span&gt;, the next possible explicit instance constructor must be taken into account. If one exists, its interface must be populated. The same applies to exception handling in instance constructors. Using inheritance requires in-depth knowledge of the entire inheritance tree since when an object of a class is created that resides on a deep level of the tree, parameters may have to be passed to the constructor of a class that resides closer to the root node. &lt;/p&gt; &lt;p&gt; The instance constructor of a subclass is split into two parts by the &lt;span class="qtext"&gt;[CALL METHOD] super-&gt;constructor&lt;/span&gt; call, which is required from a syntactical point of view. In the statements before the call, the constructor behaves like a &lt;span class="grey"&gt;static method&lt;/span&gt;. This means it cannot access the instance attributes of its class. It is only after the call that instance attributes can be addressed. The statements before the call are used to determine actual parameters for the interface of the instance constructor of a superclass. Only &lt;span class="grey"&gt;static attributes&lt;/span&gt; or local data can be used for this. &lt;/p&gt; &lt;p&gt;When a subclass is instantiated, the system makes a nested call of the instance constructors from the subclass to the superclasses where the instance attributes can only be addressed at the deepest nesting level, that is, in the highest superclass. When the system returns to the constructors of the underlying subclasses, their instance attributes can then also be successively addressed. &lt;/p&gt; &lt;p&gt;The methods of subclasses are not visible in constructors. If an instance constructor calls an instance method of the same class using the implicit &lt;span class="grey"&gt;self reference&lt;/span&gt; &lt;span class="qtext"&gt; me&lt;/span&gt;, the method is called as it is implemented in the class of the instance constructor and not as the possibly redefined method of the subclass to be instantiated. This is an exception to the rule that when instance methods are called the implementation is always called in the class to whose instance the reference currently points. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Static Constructors &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Each class has a &lt;span class="grey"&gt;static constructor&lt;/span&gt; called &lt;span class="qtext"&gt;class_constructor&lt;/span&gt;. As far as the namespace in an inheritance tree is concerned, the static constructor is subject to the same rules as the instance constructor. &lt;/p&gt; &lt;p&gt;The static constructor is called when a subclass is first addressed within a program. However, all preceding static constructors of the entire inheritance tree must have been executed before. Otherwise, a static constructor can only be called once at the runtime of the program. This is why when a subclass is addressed for the first time the system searches the next higher superclass whose static constructor has not yet been called. This static constructor is executed first. Afterwards the constructors of all subsequent subclasses are called successively down to the subclass addressed. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-5575762018583904619?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/5575762018583904619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=5575762018583904619' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5575762018583904619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5575762018583904619'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/inheritance-and-constructors.html' title='Inheritance and Constructors'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-3424316652570269084</id><published>2009-06-23T16:01:00.002+05:30</published><updated>2009-06-23T16:02:16.924+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Inheritance'/><title type='text'>Inheritance and Static Components</title><content type='html'>&lt;p&gt; &lt;span class="grey"&gt;Static components&lt;/span&gt;, like all components, exist only once in each inheritance tree, and can be used as of the declaring class: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;A subclass can access all non-private static components of its superclasses. The class in which the static component is declared is always the class that is addressed.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;From outside, the class component selector can be used to access all visible static components. Each class can be specified in which the component exists (that is, the declaring class and each subclass). Regardless of the class name used in the class component selector, however, the class in which the component is declared is addressed.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; The class in which the component is declared is addressed, whether the static component is used internally or externally. This is important for: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Calling the &lt;span class="grey"&gt;static constructors&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Static constructors are called the first time you address a class. If you address a static component declared in a superclass using the class name of a subclass, only the static constructor of the superclass is called.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Access to the &lt;span class="grey"&gt;static attributes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A subclass has access to the content of all non-private static attributes of all superclasses. Conversely, a superclass shares its public and protected static attributes with all of its subclasses. When inherited, therefore, static attributes are not assigned to a single class; instead they are assigned to the subtree of the inheritance tree that consists of all subclasses of the defining class. Changes to the values are visible in all involved classes, regardless of the class used to address an attribute.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;The registration of &lt;span class="grey"&gt;event handlers&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;If an event handler is declared for a static event of a subclass inherited from a superclass, it can react to this event only if it is triggered by a method of the subclass or one of its subclasses. If the event is triggered in a static method of a superclass, it is not handled, even if the method is called in a subclass or if the name of the subclass is specified.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;span class="h4"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Calls a static method of a superclass using the name of a subclass. Before the method is executed, the static constructor of the superclass is executed, but not the static constructor of the subclass. The method returns the value set in the superclass. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext"&gt;CLASS c1 DEFINITION.&lt;br /&gt;  PUBLIC SECTION.&lt;br /&gt;    CLASS-DATA     a1 TYPE string.&lt;br /&gt;    CLASS-METHODS: class_constructor,&lt;br /&gt;                   m1 RETURNING value(r1) LIKE a1.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS c1 IMPLEMENTATION.&lt;br /&gt;  METHOD class_constructor.&lt;br /&gt;    a1 = 'c1'.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;  METHOD m1.&lt;br /&gt;    r1 = a1.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS c2 DEFINITION INHERITING FROM c1.&lt;br /&gt;  PUBLIC SECTION.&lt;br /&gt;    CLASS-METHODS class_constructor.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS c2 IMPLEMENTATION.&lt;br /&gt;  METHOD class_constructor.&lt;br /&gt;    a1 = 'c2'.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;DATA v1 TYPE string.&lt;br /&gt;&lt;br /&gt;START-OF-SELECTION.&lt;br /&gt;  v1 = c2=&gt;m1( ).&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;&lt;span class="h4"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt;This example shows how a subclass is used to change a static attribute of a superclass, and how the change is visible in a subclass of a different path in the inheritance tree. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext"&gt;CLASS c1 DEFINITION.&lt;br /&gt;  PUBLIC SECTION.&lt;br /&gt;    CLASS-DATA a1 TYPE string.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS c11 DEFINITION INHERITING FROM c1.&lt;br /&gt;  ...&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS c12 DEFINITION INHERITING FROM c1.&lt;br /&gt;  ...&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;c11=&gt;a1 = 'Hello Sister'.&lt;br /&gt;&lt;br /&gt;MESSAGE c12=&gt;a1 TYPE 'I'.&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;&lt;span class="h4"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt; For an example of static events, see &lt;span class="blue"&gt;Inheritance Events&lt;/span&gt;. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-3424316652570269084?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/3424316652570269084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=3424316652570269084' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3424316652570269084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3424316652570269084'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/inheritance-and-static-components.html' title='Inheritance and Static Components'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-1641067663464260924</id><published>2009-06-23T16:01:00.001+05:30</published><updated>2009-06-23T16:01:26.324+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Inheritance'/><title type='text'>Inheritance and the Component Namespace</title><content type='html'>A subclass contains all components of all its superclasses. Only the public and the protected components are visible. This is why all public and protected components of an inheritance tree lie within a single namespace and must have unique names. Private components, in contrast, must only be named uniquely within a class.&lt;br /&gt;&lt;br /&gt;When methods are &lt;span class="grey"&gt;redefined&lt;/span&gt;, the newly implemented method hides the identically named method of the superclass. As soon as the method is redefined, it replaces the old method to ensure that the name remains unique. The &lt;span class="grey"&gt;pseudo reference&lt;/span&gt; &lt;span class="qtext"&gt; super-&gt;&lt;/span&gt; can be used in subclasses to access a method of the direct superclass which is hidden as a result of a redefinition.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-1641067663464260924?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/1641067663464260924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=1641067663464260924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/1641067663464260924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/1641067663464260924'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/inheritance-and-component-namespace.html' title='Inheritance and the Component Namespace'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-2471295670665604684</id><published>2009-06-23T16:00:00.001+05:30</published><updated>2009-06-23T16:00:51.959+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Inheritance'/><title type='text'>Inheritance and Visibility</title><content type='html'>&lt;span class="h1"&gt;&lt;/span&gt;You cannot change the &lt;span class="blue"&gt;visibility area&lt;/span&gt; to which a component is assigned using inheritance. Component visibility affects inheritance as follows:  &lt;p&gt;&lt;span class="h2"&gt; Public Components &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The public visibility area of a subclass consists of all its own public components plus the public components of all its superclasses. From outside the class, public components are visible without restrictions. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Protected Components &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The protected visibility area of a subclass consists of all its own protected components plus the protected components of all its superclasses. If the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;OPEN FOR PACKAGE&lt;/span&gt;&lt;/span&gt; addition is not specified, the protected area is only visible in the class itself and in all its subclasses. If the addition is specified, the protected area is also visible in the current package. If the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;OPEN FOR PACKAGE&lt;/span&gt;&lt;/span&gt;addition is not specified protected seems the same as private from outside. If the addition is specified, within the current package protected has the effect of public and from outside it seems like private. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Private Components &lt;/span&gt;&lt;/p&gt; &lt;p&gt;The private visibility area of a subclass includes only the private components of this class. They are visible only in this class. The private components of superclasses cannot be used in subclasses. Only methods inherited from superclasses use (provided they have not been redefined) the private attributes of the superclass (even if the subclass has private attributes with the same name). &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Example of Protected Components &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Within a subnode in the inheritance tree, you can always access the protected components of superclasses. The classes affected - such as the static types of reference variables - must however be part of the inheritance tree. &lt;/p&gt; &lt;p&gt; In the following example, the reference variables &lt;span class="qtext"&gt;lrefx&lt;/span&gt; and &lt;span class="qtext"&gt;lref2&lt;/span&gt; can see the protected components of &lt;span class="qtext"&gt;cx&lt;/span&gt; in the context of the subclass &lt;span class="qtext"&gt; c2&lt;/span&gt;. The static type of &lt;span class="qtext"&gt;lref1&lt;/span&gt; is &lt;span class="qtext"&gt;c1&lt;/span&gt; and is in another subnode of the inheritance tree. It cannot see any protected components of &lt;span class="qtext"&gt;cx&lt;/span&gt;, in the context of &lt;span class="qtext"&gt;c2&lt;/span&gt;. In a stricter model (C++ or Java), access in this example would only be possible using &lt;span class="qtext"&gt;lref2&lt;/span&gt;. Access using &lt;span class="qtext"&gt;lrefx&lt;/span&gt; would not be permitted, since it would involve classes (not subclasses) seeing protected components from outside. At present, ABAP extends the view of &lt;span class="qtext"&gt;lrefx&lt;/span&gt; but only in a specific context. We intend, however, to introduce a stricter model and forbid access using &lt;span class="qtext"&gt;lrefx&lt;/span&gt;. For this reason, you should not use this option; it causes a warning to be displayed in the extended program check. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext"&gt;CLASS cx DEFINITION.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  PROTECTED SECTION.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    METHODS mx.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;ENDCLASS.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="qtext"&gt;CLASS cx IMPLEMENTATION.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  METHOD mx.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  ENDMETHOD.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;ENDCLASS.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="qtext"&gt;CLASS c1 DEFINITION INHERITING FROM cx.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;ENDCLASS.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="qtext"&gt;CLASS c2 DEFINITION INHERITING FROM cx.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  PUBLIC SECTION.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    METHODS m2.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;ENDCLASS.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="qtext"&gt;CLASS c2 IMPLEMENTATION.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  METHOD m2.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    DATA: lrefx TYPE REF TO cx,&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;          lref2 TYPE REF TO c2,&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;          lref1 TYPE REF TO c1.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    lrefx-&gt;mx( ). &lt;--- Warning!!&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    lref2-&gt;mx( ).&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    lref1-&gt;mx( ). &lt;--- Error!!&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  ENDMETHOD.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;ENDCLASS.&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-2471295670665604684?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/2471295670665604684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=2471295670665604684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2471295670665604684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2471295670665604684'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/inheritance-and-visibility.html' title='Inheritance and Visibility'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-22322180961789120</id><published>2009-06-23T15:59:00.001+05:30</published><updated>2009-06-23T15:59:24.417+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Inheritance'/><title type='text'>Inheritance and Interfaces</title><content type='html'>&lt;p&gt; &lt;span class="blue"&gt;Interfaces&lt;/span&gt; are independent constructs in ABAP Objects that support &lt;span class="grey"&gt;polymorphism&lt;/span&gt; of classses. The polymorphism of interfaces is based on the fact that each class implementing an interface can implement the methods of that interface differently. To the outside world, all interface components look similar which is why &lt;span class="grey"&gt;interface reference variables&lt;/span&gt; can point to objects of all classes that implement the associated interface. The interface concept exists independently of and in addition to the inheritance concept.The classes of an inheritance tree can implement any number of interfaces but each interface can be implemented only once in each inheritance tree. This ensures that each interface component &lt;span class="qtext"&gt;comp&lt;/span&gt; has a unique name in the entire inheritance tree &lt;span class="qtext"&gt;intf~icomp&lt;/span&gt; and that, starting with the class that implements it, it is contained in all subclasses. &lt;/p&gt; &lt;p&gt; &lt;span class="grey"&gt;Interface reference variables&lt;/span&gt; that can point to a class of the inheritance tree can also point to all subclasses. Having been implemented, interface methods are fully functioning components of a class and can be redefined in subclasses. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-22322180961789120?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/22322180961789120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=22322180961789120' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/22322180961789120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/22322180961789120'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/inheritance-and-interfaces.html' title='Inheritance and Interfaces'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-4723615890002317077</id><published>2009-06-23T15:58:00.001+05:30</published><updated>2009-06-23T15:58:49.740+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Inheritance'/><title type='text'>Inheritance and Polymorphism</title><content type='html'>&lt;p&gt; Since a subclass contains all components of all superclasses along the inheritance tree and the interfaces of methods cannot be changed, a reference variable typed with reference to a superclass or to an interface implemented by a superclass may contain references to objects of all subclasses of this superclass. This means that the content of a reference variable typed with reference to a subclass can always be assigned to reference variables typed with reference to one of its superclasses or the interfaces of these superclasses (&lt;span class="grey"&gt;Up Cast&lt;/span&gt;). In particular, the target variable can always be typed with reference to the class &lt;span class="qtext"&gt;object&lt;/span&gt;. &lt;/p&gt; &lt;p&gt; A static user can use a reference variable to address the components visible to it, which are contained in the superclass to which the reference variable refers. This means that it cannot address any specializations that have been added to the subclasses. With &lt;span class="blue"&gt;dynamic accesses&lt;/span&gt;, however, all components can be addressed. &lt;/p&gt; &lt;p&gt;When an instance method is redefined in one or more subclasses, different implementations of the method can be executed after a method call using the same reference variable, depending on where the class of the referenced object is located in the inheritance tree. The feature that different classes have the same interface and can therefore be addressed using reference variables of one type is called &lt;span class="grey"&gt;polymorphism&lt;/span&gt;. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-4723615890002317077?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/4723615890002317077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=4723615890002317077' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4723615890002317077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4723615890002317077'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/inheritance-and-polymorphism.html' title='Inheritance and Polymorphism'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-2165153724916829746</id><published>2009-06-23T15:57:00.000+05:30</published><updated>2009-06-23T15:58:18.229+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Inheritance'/><title type='text'>Abstract and Final Methods and Classes</title><content type='html'>&lt;p&gt; Using the &lt;span class="bold"&gt;&lt;span class="qtext"&gt;ABSTRACT&lt;/span&gt;&lt;/span&gt; and &lt;span class="bold"&gt;&lt;span class="qtext"&gt; FINAL&lt;/span&gt;&lt;/span&gt; additions of the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;METHODS&lt;/span&gt;&lt;/span&gt; and &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS&lt;/span&gt;&lt;/span&gt; statements, you can define abstract and final methods or classes.&lt;br /&gt;&lt;/p&gt; &lt;p&gt; Abstract methods are declared in abstract classes and cannot be implemented in the same class but only in a subclass of the inheritance tree. Abstract classes can consequently not be instantiated. A non-abstract method is a concrete method. Except for the instance constructor, the concrete instance methods of a class can also call its abstract methods. &lt;/p&gt; &lt;p&gt;Final methods cannot be redefined in subclasses. Final classes cannot have any more subclasses and constitute the final node of an inheritance tree. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In classes that are abstract and final at the same time, only the static components can be used. Instance components can be declared, but these cannot be used. For this reason, it is recommended that you specify both &lt;span class="qtext"&gt;ABSTRACT&lt;/span&gt; and &lt;span class="qtext"&gt;FINAL&lt;/span&gt; only for &lt;span class="grey"&gt;static classes&lt;/span&gt;. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-2165153724916829746?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/2165153724916829746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=2165153724916829746' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2165153724916829746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2165153724916829746'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/abstract-and-final-methods-and-classes.html' title='Abstract and Final Methods and Classes'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-3652791442105733685</id><published>2009-06-23T15:56:00.000+05:30</published><updated>2009-06-23T15:57:29.512+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Inheritance'/><title type='text'>Redefining Methods</title><content type='html'>&lt;p&gt; Each subclass contains the components of all classes that lie between this class and the root node in the inheritance tree. The visibility of a component is always the same and cannot be changed. However, it is possible to redefine the public and protected instance methods of all preceding superclasses using the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;REDEFINITION&lt;/span&gt;&lt;/span&gt; addition of the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;METHODS&lt;/span&gt;&lt;/span&gt; statement in order to adjust them to the requested specialization. The interface of a redefined method cannot be changed. The method is merely re-implemented under the same name. Constructors cannot be redefined; instead, &lt;span class="blue"&gt;special rules&lt;/span&gt; apply. &lt;/p&gt; &lt;p&gt;The method declaration remains with the superclass, and its previous implementation is also retained there. The implementation of the redefinition is generated additionally with the subclass and obscures the implementation of the superclass. A redefined method works with the private attributes of the subclass and not with possible private superclass attributes of the same name. &lt;/p&gt; &lt;p&gt;Each reference that points to a subclass object uses the redefined method, even if it was typed with reference to a superclass. In particular, this also applies to the &lt;span class="grey"&gt;self-reference&lt;/span&gt; &lt;span class="qtext"&gt;me&lt;/span&gt;. For example, if a superclass method &lt;span class="qtext"&gt;m1&lt;/span&gt; contains a call &lt;span class="qtext"&gt;[me-&gt;]m2( )&lt;/span&gt; or &lt;span class="qtext"&gt;CALL METHOD [me-&gt;]m2&lt;/span&gt; and if &lt;span class="qtext"&gt;m2&lt;/span&gt; is redefined in a subclass, the call of &lt;span class="qtext"&gt;m1&lt;/span&gt; in an instance of the superclass causes the original method &lt;span class="qtext"&gt;m2&lt;/span&gt; to be executed and the call of &lt;span class="qtext"&gt;m1&lt;/span&gt; in an instance of the subclass causes the redefined method &lt;span class="qtext"&gt;m2&lt;/span&gt; to be executed. &lt;/p&gt; &lt;p&gt; Within a redefined method the &lt;span class="grey"&gt; pseudo reference&lt;/span&gt; &lt;span class="qtext"&gt;super-&gt;&lt;/span&gt; can be used to access the obscured method, for example, to adopt and supplement its functions. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-3652791442105733685?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/3652791442105733685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=3652791442105733685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3652791442105733685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3652791442105733685'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/redefining-methods.html' title='Redefining Methods'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-4701280115660680718</id><published>2009-06-23T15:55:00.000+05:30</published><updated>2009-06-23T15:56:22.824+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Inheritance'/><title type='text'>Inheritance</title><content type='html'>&lt;p&gt; The concept of inheritance allows you to derive new classes from existing classes. To do this, you use the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;INHERITING FROM&lt;/span&gt;&lt;/span&gt;  addition of the &lt;span class="blue"&gt; &lt;span class="qtext"&gt;CLASS ... DEFINITION&lt;/span&gt;&lt;/span&gt; statement. The new class adopts or inherits all components of the existing class. The new class is called subclass, and the existing class is called superclass. &lt;/p&gt; &lt;p&gt;If you make no further declarations, a subclass contains exactly the components of the superclass. However, only the components of the public, protected, and package &lt;span class="grey"&gt;visibility section&lt;/span&gt;of the superclass are visible in the subclass. Although the private components of the superclass are also contained in the subclass, they are not visible. In a subclass, you can declare private components with the same name as the corresponding components of the superclass. Each class works with its private components. As long as a method inherited from the superclass is not redefined, it uses the private attributes of the superclass and not the possible subclass attributes of the same name. &lt;/p&gt; &lt;p&gt;If the superclass does not have a private visibility section, the subclass is an exact copy of the superclass. You can, however, add further components to the subclass. These components are used to specialize the subclass in relation to the superclass. If a subclass is then used as the superclass for a new class, you can then define a further level of specialization. &lt;/p&gt;  Each class can have several direct subclasses, but only one direct superclass. ABAP Objects applies the principle of &lt;span class="grey"&gt;single inheritance&lt;/span&gt;. If subclasses inherit from superclasses that are subclasses themselves, all classes involved represent an inheritance tree whose specialization increases the more deeper hierarchy levels are added. Specialization decreases the closer a level is located to the root node of the inheritance tree. The root node of all inheritance trees in ABAP Objects is the predefined empty class &lt;span class="qtext"&gt;object&lt;/span&gt;. This class is the most generic class because it does not contain attributes or methods. When you define a new class, you must not explicitly specify this class as a superclass because it always exists implicitly. In the inheritance tree, two neighboring nodes are known as the direct superclass and subclass, while all preceding and succeeding nodes are collectively referred to as superclasses and subclasses. The declaration of the components of a subclass is distributed among all superclasses of the inheritance tree.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-4701280115660680718?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/4701280115660680718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=4701280115660680718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4701280115660680718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4701280115660680718'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/inheritance.html' title='Inheritance'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-3465086822356579536</id><published>2009-06-23T15:53:00.000+05:30</published><updated>2009-06-23T15:54:44.615+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ABAP Objects'/><title type='text'>Definition of Classes and Interfaces</title><content type='html'>&lt;p&gt; In ABAP Objects, you can define classes and interfaces either globally or locally. You define global classes and interfaces with the &lt;span class="grey"&gt;Class Builder&lt;/span&gt; tool in the &lt;span class="grey"&gt;ABAP Workbench&lt;/span&gt;; they are then stored centrally in the &lt;span class="grey"&gt;class library&lt;/span&gt; in the &lt;span class="grey"&gt;repository&lt;/span&gt;. All ABAP programs in an &lt;span class="grey"&gt;AS ABAP&lt;/span&gt; can access these global classes and interfaces. Conversely, you can only use local classes and interfaces in the program that defines them. When an ABAP program uses a class, the system searches first for a local class, then for a global class of the same name. Otherwise, there is no difference in the use of local and global classes or interfaces. &lt;/p&gt; &lt;p&gt;Since local classes are only used by one program, it is generally sufficient to define the public interface - that is, the outwardly visible components appropriate for this program. Conversely, each global class is available throughout the system, which means that its public interface can only be typed with reference to data types that are themselves visible throughout the system. &lt;/p&gt; &lt;p&gt; The following sections describe classes and interfaces using the syntax for the definition of local classes and interfaces in an ABAP program. For the definition of global classes and interfaces, all language elements have a counterpart in the operating elements of the Class Builder. For more information, see the &lt;span class="lnkgrey"&gt;documentation&lt;/span&gt; for the Class Builder. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Defining Local Classes &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Local classes consist of ABAP source code enclosed between the &lt;span class="blue"&gt;&lt;span class="qtext"&gt; CLASS - ENDCLASS&lt;/span&gt;&lt;/span&gt; statements. A complete class definition consists of a declaration part and, if necessary, an implementation part. &lt;/p&gt; &lt;p&gt; The declaration part of a class &lt;span class="qtext"&gt;class&lt;/span&gt; consists of one statement block:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS class DEFINITION.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; ...&lt;br /&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;ENDCLASS.&lt;/span&gt;&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; This declaration part contains the declaration of the &lt;span class="blue"&gt;components&lt;/span&gt; (attributes, methods, events) of a class. All the components of a class must be assigned explicitly to a &lt;span class="blue"&gt;visibility section&lt;/span&gt; (&lt;span class="qtext"&gt;PUBLIC SECTION&lt;/span&gt;, &lt;span class="qtext"&gt;PROTECTED SECTION&lt;/span&gt;, &lt;span class="qtext"&gt;PRIVATE SECTION&lt;/span&gt;), which defines from where each component can be accessed. In global classes, the declaration part belongs to the global data declarations and should be at the start of the program. &lt;/p&gt; &lt;p&gt;If methods are declared in the declaration part of a class, the class needs an implementation part, which consists of one statement block:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS class IMPLEMENTATION.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; ...&lt;br /&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;ENDCLASS.&lt;/span&gt;&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; The implementation part of a class contains the implementation of all the &lt;span class="grey"&gt;methods&lt;/span&gt; of this class. Methods are &lt;span class="grey"&gt;procedures&lt;/span&gt; - that is, processing blocks of an ABAP program. The position of the implementation part in the source code is thus unimportant. For clarity, however, you should either put all the implementation parts of local classes at the end (as in subroutines), or directly after the relevant definition part. If you do the latter, note that you must then assign subsequent non-declarative statements explicitly to a &lt;span class="grey"&gt;processing block&lt;/span&gt;, such as &lt;span class="qtext"&gt;START-OF-SELECTION&lt;/span&gt;, so that they can be accessed. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Defining Local Interfaces &lt;/span&gt;&lt;/p&gt; &lt;p&gt; You define the local interface &lt;span class="qtext"&gt;intf&lt;/span&gt; using the&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="blue"&gt;&lt;span class="qtext"&gt;INTERFACE intf.&lt;/span&gt;&lt;/span&gt; and&lt;br /&gt; ...&lt;br /&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;ENDINTERFACE.&lt;/span&gt;&lt;/span&gt; statements. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;The definition contains all the components (attributes, methods, events) of the interface. In interfaces, you can define the same components as in classes. You cannot assign the components of a interface explicitly to a &lt;span class="grey"&gt;visibility section&lt;/span&gt;, because interface components always extend the public area of the class. There is no implementation part for interfaces, since the methods of an interface must be implemented in the same class that implements the interface. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-3465086822356579536?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/3465086822356579536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=3465086822356579536' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3465086822356579536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3465086822356579536'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/definition-of-classes-and-interfaces.html' title='Definition of Classes and Interfaces'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-952882987710395133</id><published>2009-06-23T15:52:00.000+05:30</published><updated>2009-06-23T15:53:44.791+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ABAP Objects'/><title type='text'>Object Orientation</title><content type='html'>&lt;p&gt; Object orientation (or, more correctly, object-oriented programming) is a problem-solving method that represents the real world in a series of software object. &lt;/p&gt; &lt;p&gt;Object-oriented programming is based on a progamming model in which data and functions are united in objects. The remaining language scope of ABAP mainly supports procedural programming, where the data is stored at other places than the objects and where programs that are modularized by procedures access this data. &lt;/p&gt; &lt;p&gt; This document defines a few general terms that are widely used in object orientation and in ABAP Objects. &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Objects&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt;Objects represent abstract or concrete objects of the real world. An object is a section of program code that has data (called attributes) and provides services called methods (sometimes also known as operations or functions). Methods typically work with private data in the object (attributes, also known as the object state), that are only visible within the object. This guarantees the internal consistency of the object, since the data is only changed by the methods, not by the user. This ensures that the object is consistent in itself. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;&lt;span class="h3"&gt; Classes&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt;Classes are program code that describes objects. Technically, an object is an instance of a class. In theory, you can create an infinite number of objects from a single class definition. Each instance of a class (object) has its own values for its attributes. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;&lt;span class="h3"&gt; Object References&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt;In a program, you identify and address objects using a unique object reference. They allow you to access the attributes and methods of an object. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; In object-oriented programming, objects usually have the following characteristics: &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Encapsulation&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt;Objects restrict the external visibility of their resources (attributes and methods). Each object hat an interface that determines how other objects or applications can use it. The implementation of the object is encapsulated (not visible outside the class). &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;&lt;span class="h3"&gt; Polymorphism&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt;Methods with the same name can behave differently in different classes. In object-oriented programming, you can use interfaces to address methods with the same name in different objects. The form of address always remains the same, but the actual method implementation is class-specific, and can be different in each class. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;&lt;span class="h3"&gt; Inheritance&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt;You can derive a class from another class. A derived class (subclass) inherits the data and methods of its superclass. You can add new methods to a subclass, or redefine existing methods. Redefined methods have the same name and interface as the original method. Their classes are therefore polymorphous, too. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;&lt;span class="h2"&gt;  &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Uses of Object Orientation&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt; Object-orientation has the following advantages:&lt;br /&gt;&lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Complex software systems become easier to understand, since an object-oriented architecture resembles reality more closely than other programming techniques.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Changes in object-oriented systems should be possible locally (at class level), without further changes being necessary in other parts of the system. This reduces the amount of maintenance required.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Polymorphism and inheritance enable many individual components to be reused.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Object-oriented systems require less adjustment and maintenance, because the majority of problems can be discovered and corrected in the design and development phases.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; Achieving these goals requires: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Object-oriented Programming Languages&lt;br /&gt;&lt;br /&gt;Object-oriented programming techniques do not necessarily require object-oriented programming languages. However, they do depend on the implementation of object-oriented constructions in the system kernel.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Object-oriented Tools&lt;br /&gt;&lt;br /&gt;Object-oriented tools help you create object-oriented programs in object-oriented languages. They allow you to store and visualize your program objects and the relationship between them.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Object-oriented Modeling&lt;br /&gt;&lt;br /&gt;Object-oriented modeling of a software system is the most important, most time consuming, and most difficult task required to achieve the above goals. Object-oriented design encompasses more than just object-oriented programming, and offers logical advantages that are independent of the eventual implementation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-952882987710395133?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/952882987710395133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=952882987710395133' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/952882987710395133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/952882987710395133'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/object-orientation.html' title='Object Orientation'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-8620994427244675391</id><published>2009-06-23T15:51:00.002+05:30</published><updated>2009-06-23T15:52:02.413+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='CLASS-METHODS'/><title type='text'>CLASS-METHODS - FOR EVENT</title><content type='html'>&lt;p&gt;&lt;span class="h2"&gt; &lt;span class="bold"&gt;Syntax&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;CLASS-METHODS meth&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;   FOR EVENT evt OF {class|intf}&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;   [IMPORTING p1 p2 ...[sender]].&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Effect &lt;/span&gt;&lt;/p&gt; &lt;p&gt; This statement declares the &lt;span class="grey"&gt;static method&lt;/span&gt; &lt;span class="qtext"&gt;meth&lt;/span&gt; as the &lt;span class="grey"&gt;event handler&lt;/span&gt; for the event &lt;span class="qtext"&gt;evt&lt;/span&gt; of the class &lt;span class="qtext"&gt;class&lt;/span&gt; or the interface &lt;span class="qtext"&gt;intf&lt;/span&gt;. The syntax and meaning of the additions are identical to the declaration of &lt;span class="blue"&gt;instance methods as event handlers&lt;/span&gt;. &lt;/p&gt; &lt;p&gt; Static event handlers can be called by the event &lt;span class="qtext"&gt;evt&lt;/span&gt; independently of an instance of the class.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In the class &lt;span class="qtext"&gt;dialog_box&lt;/span&gt;, a static event handler &lt;span class="qtext"&gt;close_box&lt;/span&gt; is defined for the event that is triggered when the user chooses to close a &lt;span class="grey"&gt;Control Framework&lt;/span&gt; (CFW) dialog box. &lt;/p&gt; &lt;p class="qtextml1"&gt; &lt;span class="qtext"&gt; CLASS dialog_box DEFINITION.&lt;br /&gt;  PUBLIC SECTION.&lt;br /&gt;    METHODS constructor.&lt;br /&gt;    ...&lt;br /&gt;  PRIVATE SECTION.&lt;br /&gt;    CLASS-DATA open_boxes TYPE i.&lt;br /&gt;    CLASS-METHODS close_box&lt;br /&gt;      FOR EVENT close OF cl_gui_dialogbox_container&lt;br /&gt;      IMPORTING sender.&lt;br /&gt;    ...&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS dialog_box IMPLEMENTATION.&lt;br /&gt;  METHOD constructor.&lt;br /&gt;    ... " create a dialogbox&lt;br /&gt;    open_boxes = open_boxes + 1.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;  METHOD close_box&lt;br /&gt;    ... " close the dialogbox referred by sender&lt;br /&gt;    open_boxes = open_boxes - 1.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-8620994427244675391?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/8620994427244675391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=8620994427244675391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/8620994427244675391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/8620994427244675391'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/class-methods-for-event.html' title='CLASS-METHODS - FOR EVENT'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-4289881884843672153</id><published>2009-06-23T15:51:00.001+05:30</published><updated>2009-06-23T15:51:25.557+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='CLASS-METHODS'/><title type='text'>CLASS-METHODS - class_constructor</title><content type='html'>&lt;p&gt;&lt;span class="h2"&gt; &lt;span class="bold"&gt;Syntax&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;CLASS-METHODS class_constructor.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Effect &lt;/span&gt;&lt;/p&gt; &lt;p&gt; This statement declares the static constructor &lt;span class="qtext"&gt;class_constructor&lt;/span&gt; of the class. It can only be used in the &lt;span class="grey"&gt;public&lt;/span&gt; &lt;span class="grey"&gt;visibility section&lt;/span&gt; of the declaration section of a class. &lt;/p&gt; &lt;p&gt; Each class has a predefined method &lt;span class="qtext"&gt;class_constructor&lt;/span&gt; in its public visibility section. Its functions can be implemented class-specifically by explicit declaration. Without explicit declaration, the static constructor is empty. &lt;/p&gt; &lt;p&gt;The static constructor is automatically called exactly once per class and internal session before the class is first accessed. An access to the class is the creation of an instance of the class or the addressing of a static component using the class component selector. &lt;/p&gt; &lt;p&gt;When a subclass is first accessed, the inheritance tree is searched for the next-highest superclass whose static constructor was not yet called. Then the static constructor of this superclass is executed followed by those of all subsequent subclasses up to the subclass in question. The static constructor must be fully executed, otherwise a runtime error occurs. &lt;/p&gt; &lt;p&gt;Like all static methods, the static constructor can only access the static components of its class. Furthermore, the static constructor cannot explicitly address its own class.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Notes &lt;/span&gt;&lt;/p&gt; &lt;p&gt;  &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt; Like instance constructors, static constructors are also an exception to the rule that all public components along a path in the inheritance tree are in one namespace.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; The execution time of the static constructor is not fixed. Only its call before the first access to the class is guaranteed. It can therefore happen that static methods are executed before the static constructor is ended.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; The execution sequence of static constructors is dependent on the program flow. Statc constructors must be implemented so that they can be executed in any sequence.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; In static constructors, you cannot declare class-based exceptions using &lt;span class="qtext"&gt;RAISING&lt;/span&gt;, since it is generally not specified whether the user of a class is the first user and whether or not he must handle exceptions propagated by the static constructor.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; If a &lt;span class="blue"&gt;statc component of a superclass&lt;/span&gt; is addressed using the name of a subclass, then the superclass is addressed and its static constructor is executed, but not the static constructor of the subclass.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;span class="h4"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt; When a class is first accessed, the static constructor of this class uses the system field &lt;span class="qtext"&gt;sy-repid&lt;/span&gt; to set the static attribute &lt;span class="qtext"&gt;access_program&lt;&gt; for the name of the program of an internal session that uses the class first.&lt;/span&gt; &lt;/p&gt; &lt;p class="qtextml1"&gt; &lt;span class="qtext"&gt; CLASS some_class DEFINITION.&lt;br /&gt;  PUBLIC SECTION.&lt;br /&gt;    CLASS-METHODS class_constructor.&lt;br /&gt;  PRIVATE SECTION.&lt;br /&gt;    CLASS-DATA access_program TYPE sy-repid.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS some_class IMPLEMENTATION.&lt;br /&gt;  METHOD class_constructor.&lt;br /&gt;    access_program = sy-repid.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-4289881884843672153?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/4289881884843672153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=4289881884843672153' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4289881884843672153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4289881884843672153'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/class-methods-classconstructor.html' title='CLASS-METHODS - class_constructor'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-5255764639411720581</id><published>2009-06-23T15:50:00.001+05:30</published><updated>2009-06-23T15:50:45.956+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='CLASS-METHODS'/><title type='text'>CLASS-METHODS - RETURNING</title><content type='html'>&lt;p&gt;&lt;span class="h2"&gt; &lt;span class="bold"&gt;Syntax&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;CLASS-METHODS meth&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  [IMPORTING &lt;span class="blue"&gt;parameters&lt;/span&gt;]&lt;/span&gt; [PREFERRED PARAMETER p]]&lt;br /&gt;&lt;span class="qtext"&gt;   RETURNING VALUE(r) &lt;span class="blue"&gt;typing&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  [{RAISING exc1|RESUMABLE(exc1) exc2|RESUMBALE(exc2) ...}&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  |{EXCEPTIONS exc1 exc2 ...}].&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Effect &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Declares a &lt;span class="grey"&gt;functional&lt;/span&gt; &lt;span class="grey"&gt;static method&lt;/span&gt; &lt;span class="qtext"&gt;meth&lt;/span&gt;. The additions have exactly the same syntax and meaning as those for &lt;span class="blue"&gt;functional instance methods&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The class &lt;span class="qtext"&gt;circle&lt;/span&gt; contains two functional static methods, &lt;span class="qtext"&gt;circumference&lt;/span&gt; and &lt;span class="qtext"&gt;area&lt;/span&gt;, which work with the constant &lt;span class="qtext"&gt;pi&lt;/span&gt;. &lt;/p&gt; &lt;p class="qtextml1"&gt; &lt;span class="qtext"&gt; CLASS circle DEFINITION.&lt;br /&gt;  PUBLIC SECTION.&lt;br /&gt;     CONSTANTS pi TYPE decfloat34&lt;br /&gt;                 VALUE '3.141592653589793238462643383279503'.&lt;br /&gt;     CLASS-METHODS: circumference IMPORTING r TYPE decfloat34&lt;br /&gt;                                RETURNING value(c) TYPE decfloat34,&lt;br /&gt;                    area        IMPORTING r TYPE decfloat34&lt;br /&gt;                                RETURNING value(a) TYPE decfloat34.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS circle IMPLEMENTATION.&lt;br /&gt;  METHOD circumference.&lt;br /&gt;    c = 2 * pi * r.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;  METHOD area.&lt;br /&gt;    a = pi * r ** 2.&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;DATA: circ   TYPE decfloat34,&lt;br /&gt;      area   TYPE decfloat34,&lt;br /&gt;      radius TYPE decfloat34.&lt;br /&gt;&lt;br /&gt;START-OF-SELECTION.&lt;br /&gt;&lt;br /&gt;  radius = '1.00'.&lt;br /&gt;  circ = circle=&gt;circumference( radius ).&lt;br /&gt;  area = circle=&gt;area( radius ).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-5255764639411720581?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/5255764639411720581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=5255764639411720581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5255764639411720581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5255764639411720581'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/class-methods-returning.html' title='CLASS-METHODS - RETURNING'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-3327947885819152702</id><published>2009-06-23T15:49:00.000+05:30</published><updated>2009-06-23T15:50:17.109+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Methods'/><title type='text'>METHODS - IMPORTING, EXPORTING, CHANGING, RAISING</title><content type='html'>&lt;p&gt;&lt;span class="h2"&gt; &lt;span class="bold"&gt;Syntax&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;METHODS meth [ABSTRACT|FINAL]&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  [IMPORTING &lt;span class="blue"&gt;parameters&lt;/span&gt; [PREFERRED PARAMETER p]]&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  [EXPORTING &lt;span class="blue"&gt;parameters&lt;/span&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  [CHANGING  &lt;span class="blue"&gt;parameters&lt;/span&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  [{RAISING exc1|RESUMABLE(exc1) exc2|RESUMABLE(exc2) ...}&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  |{EXCEPTIONS exc1 exc2 ...}].&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Extras: &lt;/span&gt;&lt;/p&gt; &lt;p&gt;    &lt;span class="blue"&gt; 1. &lt;span class="qtext"&gt;... IMPORTING parameters [PREFERRED PARAMETER p]&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blue"&gt; 2. &lt;span class="qtext"&gt;... EXPORTING parameters&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blue"&gt; 3. &lt;span class="qtext"&gt;... CHANGING parameters&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blue"&gt; 4. &lt;span class="qtext"&gt;... RAISING exc1|RESUMABLE(exc1) exc2|RESUMABLE(exc2) ...&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blue"&gt; 5. &lt;span class="qtext"&gt;... EXCEPTIONS exc1 exc2 ...&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blue"&gt; 6. &lt;span class="qtext"&gt;... ABSTRACT ...&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blue"&gt; 7. &lt;span class="qtext"&gt;... FINAL ...&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Effect &lt;/span&gt;&lt;/p&gt; &lt;p&gt; This statement declares a general instance method &lt;span class="qtext"&gt;meth&lt;/span&gt;. Use additions &lt;span class="qtext"&gt;ABSTRACT&lt;/span&gt; and &lt;span class="qtext"&gt;FINAL&lt;/span&gt; to make the method abstract or final. &lt;/p&gt; &lt;p&gt; The additions &lt;span class="qtext"&gt;IMPORTING&lt;/span&gt;, &lt;span class="qtext"&gt;EXPORTING&lt;/span&gt; and &lt;span class="qtext"&gt;CHANGING&lt;/span&gt; define the &lt;span class="blue"&gt;parameter interface&lt;/span&gt; of the method. After every addition, the corresponding formal parameters are defined by a specification of the list &lt;span class="blue"&gt; &lt;span class="qtext"&gt;parameters&lt;/span&gt;&lt;/span&gt;. The order of the additions is stipulated. &lt;/p&gt; &lt;p&gt; The other additions determine which exceptions the method can propagate or trigger and determine whether the method is abstract or final. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Within a method, you can use the logical expression &lt;span class="blue"&gt;&lt;span class="qtext"&gt; IS SUPPLIED&lt;/span&gt;&lt;/span&gt; to check whether an actual parameter was assigned to an optional formal parameter at the call.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="@@IMPORTING@@METHODS@@"&gt;&lt;/a&gt; &lt;a name="@@PREFERRED PARAMETER@@METHODS@@"&gt;&lt;/a&gt; &lt;p&gt;&lt;span class="h3"&gt; &lt;a name="!ABAP_ADDITION_1@1@"&gt;&lt;/a&gt; &lt;span class="bold"&gt;Addition 1&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;... IMPORTING parameters [PREFERRED PARAMETER p]&lt;/span&gt; &lt;br /&gt;&lt;!-- /A --&gt; &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Effect &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;IMPORTING&lt;/span&gt; defines input parameters. When calling the method, you need not specify an appropriate actual parameter for every non-optional input parameter. During the call, the content of the actual parameter is passed to the input parameter. The content of the input parameter - for which the reference transfer is defined - cannot be changed in the method. &lt;/p&gt; &lt;p&gt; Use &lt;span class="qtext"&gt;PREFERRED PARAMETER&lt;/span&gt; to identify an input parameter &lt;span class="qtext"&gt;p1 p2 ...&lt;/span&gt; of list &lt;span class="blue"&gt;&lt;span class="qtext"&gt;parameters&lt;/span&gt;&lt;/span&gt; after &lt;span class="qtext"&gt;IMPORTING&lt;/span&gt; as a preferred parameter. This specification makes sense only if all input parameters are optional. When calling the method with the syntax &lt;/p&gt; &lt;p&gt; &lt;span class="blue"&gt;&lt;span class="qtext"&gt;[CALL METHOD] meth( a ).&lt;/span&gt;&lt;/span&gt; &lt;/p&gt; &lt;p&gt; the actual parameter &lt;span class="qtext"&gt;a&lt;/span&gt; is assigned to the preferred parameter &lt;ab&gt;&lt;/ab&gt;&lt;/p&gt;&lt;p class="grey"&gt;functional method at an operand position.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="@@EXPORTING@@METHODS@@"&gt;&lt;/a&gt; &lt;p&gt;&lt;span class="h3"&gt; &lt;a name="!ABAP_ADDITION_2@2@"&gt;&lt;/a&gt; &lt;span class="bold"&gt;Addition 2&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;... EXPORTING parameters&lt;/span&gt; &lt;br /&gt;&lt;!-- /A --&gt; &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Effect &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;EXPORTING&lt;/span&gt; defines output parameters. When calling the method, you can specify an appropriate actual parameter for every output parameter. The content of the output parameter - which is defined for value transfer - is passed to the actual parameter at the call after the method has been completed successfully.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt;An output parameter that is defined for the reference transfer, behaves like an input/output parameter, which means that it is not initialized when the method is called. For this reason, it should not be read before the first write access. Beware also if content is added to such parameters, for example, when inserting rows in internal tables.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="@@CHANGING@@METHODS@@"&gt;&lt;/a&gt; &lt;p&gt;&lt;span class="h3"&gt; &lt;a name="!ABAP_ADDITION_3@3@"&gt;&lt;/a&gt; &lt;span class="bold"&gt;Addition 3&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;... CHANGING parameters&lt;/span&gt; &lt;br /&gt;&lt;!-- /A --&gt; &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Effect &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;CHANGING&lt;/span&gt; defines input/output parameters. When calling the method, you must specify an appropriate actual parameter for every non-optional input/output parameter. The content of the actual parameter is passed to the input/output parameter at the call, and after the method has been completed, the content of the input/output parameter is passed to the actual parameter.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The method &lt;span class="qtext"&gt;read_spfli_into_table&lt;/span&gt; of this example has an input and an output parameter, which are typed fully by reference to the ABAP Dictionary. &lt;/p&gt; &lt;p class="qtextml1"&gt; &lt;span class="qtext"&gt; CLASS flights DEFINITION.&lt;br /&gt; PUBLIC SECTION.&lt;br /&gt;   METHODS read_spfli_into_table&lt;br /&gt;      IMPORTING VALUE(id)  TYPE spfli-carrid&lt;br /&gt;      EXPORTING flight_tab TYPE spfli_tab.&lt;br /&gt;      ...&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;/p&gt; &lt;a name="@@RAISING@@METHODS@@"&gt;&lt;/a&gt; &lt;a name="@@RESUMABLE@@METHODS@@"&gt;&lt;/a&gt; &lt;p&gt;&lt;span class="h3"&gt; &lt;a name="!ABAP_ADDITION_4@4@"&gt;&lt;/a&gt; &lt;span class="bold"&gt;Addition 4&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;... RAISING exc1|RESUMABLE(exc1) exc2|RESUMABLE(exc2) ...&lt;/span&gt; &lt;br /&gt;&lt;!-- /A --&gt; &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Effect &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Use addition &lt;span class="qtext"&gt;RAISING&lt;/span&gt; to declare the &lt;span class="grey"&gt;class-based exceptions&lt;/span&gt; &lt;span class="qtext"&gt;exc1 exc2 ...&lt;/span&gt; that can be propagated from the method to the caller. &lt;/p&gt; &lt;p&gt; For &lt;span class="qtext"&gt;exc1 exc2 ...&lt;/span&gt;, you can specify all exception classes that are visible at this position and are subclasses of  CX_STATIC_CHECK or CX_DYNAMIC_CHECK. You must specify the exception classes in ascending order corresponding to their inheritance hierarchy. Each exception class may only be specified once. &lt;/p&gt; &lt;p&gt; With addition &lt;span class="qtext"&gt;RESUMABLE&lt;/span&gt;, an exception is declared in such a way that it can be propagated as a &lt;span class="grey"&gt;resumable exception&lt;/span&gt;. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Thus: &lt;/span&gt;&lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt; A resumable exception is propagated as such.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; The addition does not have any effect on a non-resumable exception.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; If a resumable exception is propagated with &lt;span class="qtext"&gt;RAISING&lt;/span&gt; without addition &lt;span class="qtext"&gt;RESUMABLE&lt;/span&gt;, it thus becomes non-resumable.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; If a class is declared as resumable, all of the subclasses listed need resumable too. &lt;/p&gt; &lt;p&gt; Exceptions of the categories CX_STATIC_CHECK and CX_DYNAMIC_CHECK must be declared explicitly, otherwise a propagation results in a violation of the interface. An interface violation results in a treatable exception CX_SY_NO_HANDLER. Exceptions of category CX_NO_CHECK are always declared implicitly and with addition &lt;span class="qtext"&gt;RESUMABLE&lt;/span&gt;..&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Notes &lt;/span&gt;&lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt; The declaration of exceptions of category CX_STATIC_CHECK is checked statically at the syntax check. For exceptions of category CX_DYNAMIC_CHECK, the check is executed at runtime.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; In a method in which class-based exceptions are declared with the addition &lt;span class="qtext"&gt;RAISING&lt;/span&gt;, you cannot use the statement &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CATCH SYSTEM-EXCEPTIONS&lt;/span&gt;&lt;/span&gt;. Instead, handle the relevant treatable exceptions in a &lt;span class="blue"&gt;&lt;span class="qtext"&gt;TRY&lt;/span&gt;&lt;/span&gt; control structure.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; An exception that is triggered as resumable in the method with &lt;span class="blue"&gt; &lt;span class="qtext"&gt;RAISE RESUMABLE EXCEPTION&lt;/span&gt;&lt;/span&gt;, should also be declared as resumable in the interface, as the exception would otherwise lose this property when you leave the method.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;span class="h4"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In class &lt;span class="qtext"&gt;math&lt;/span&gt;, you can propagate all exceptions represented by class CX_SY_ARITHMETIC_ERROR and its subclasses from within method &lt;span class="qtext"&gt;divide_1_by&lt;/span&gt;. If, for example, the input parameter &lt;span class="qtext"&gt;operand&lt;/span&gt; is filled at the call with the value 0, then the exception CX_SY_ZERODIVIDE is triggered, propagated, and can, as shown in the example, be handled by the caller in a &lt;span class="qtext"&gt;TRY&lt;/span&gt; control structure. &lt;/p&gt; &lt;p class="qtextml1"&gt; &lt;span class="qtext"&gt; CLASS math DEFINITION.&lt;br /&gt; PUBLIC SECTION.&lt;br /&gt;   METHODS divide_1_by&lt;br /&gt;      IMPORTING operand TYPE I&lt;br /&gt;      EXPORTING result  TYPE decfloat34&lt;br /&gt;      RAISING   cx_sy_arithmetic_error.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS math IMPLEMENTATION.&lt;br /&gt; METHOD divide_1_by.&lt;br /&gt;   result = 1 / operand.&lt;br /&gt; ENDMETHOD.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;START-OF-SELECTION.&lt;br /&gt;&lt;br /&gt;DATA oref TYPE REF TO math.&lt;br /&gt;DATA exc  TYPE REF TO cx_sy_arithmetic_error.&lt;br /&gt;DATA res  TYPE decfloat34.&lt;br /&gt;DATA text TYPE string.&lt;br /&gt;&lt;br /&gt;CREATE OBJECT oref.&lt;br /&gt;TRY.&lt;br /&gt;   oref-&gt;divide_1_by( EXPORTING operand = 4&lt;br /&gt;                      IMPORTING result = res ).&lt;br /&gt;   text = res.&lt;br /&gt; CATCH cx_sy_arithmetic_error INTO exc.&lt;br /&gt;   text = exc-&gt;get_text( ).&lt;br /&gt;ENDTRY.&lt;br /&gt;MESSAGE text TYPE 'I'.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;/p&gt; &lt;a name="@@EXCEPTIONS@@METHODS@@"&gt;&lt;/a&gt; &lt;p&gt;&lt;span class="h3"&gt; &lt;a name="!ABAP_ADDITION_5@5@"&gt;&lt;/a&gt; &lt;span class="bold"&gt;Addition 5&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;... EXCEPTIONS exc1 exc2 ...&lt;/span&gt; &lt;br /&gt;&lt;!-- /A --&gt; &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Effect &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Use addition &lt;span class="qtext"&gt;EXCEPTIONS&lt;/span&gt; to define a list of &lt;span class="blue"&gt;non-class-based exceptions&lt;/span&gt; &lt;span class="qtext"&gt;exc1 exc2...&lt;/span&gt;, which can be triggered with the statements &lt;span class="blue"&gt;&lt;span class="qtext"&gt; RAISE&lt;/span&gt;&lt;/span&gt; or &lt;span class="blue"&gt;&lt;span class="qtext"&gt;MESSAGE RAISING&lt;/span&gt;&lt;/span&gt; in the method. You specify identifiers &lt;span class="qtext"&gt;exc1 exc2 ...&lt;/span&gt; for the exceptions to be defined at will and directly. Exceptions defined in this way are bound to the method - similar to formal parameters - and cannot be propagated. &lt;/p&gt; &lt;p&gt; If such an exception is triggered in a method and no return value has been assigned to it in the addition &lt;span class="qtext"&gt;EXCEPTIONS&lt;/span&gt; of the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CALL METHOD&lt;/span&gt;&lt;/span&gt; statement in the method call, then a runtime error occurs. &lt;/p&gt; &lt;p&gt; You cannot use the additions &lt;span class="qtext"&gt;RAISING&lt;/span&gt; and &lt;span class="qtext"&gt;EXCEPTIONS&lt;/span&gt; simultaneously. Furthermore, you are not allowed to use the statement &lt;span class="blue"&gt; &lt;span class="qtext"&gt;RAISE EXCEPTION&lt;/span&gt;&lt;/span&gt; to raise a class-based exception in a method in whose interface non class-based exceptions are defined.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; For new developments, we recommend to use class-based exceptions, which are independent of the respective method.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In the class &lt;span class="qtext"&gt;math&lt;/span&gt;, for method &lt;span class="qtext"&gt;divide_1_by&lt;/span&gt; an exception &lt;span class="qtext"&gt;arith_error&lt;/span&gt; is defined, which is triggered in the method with the &lt;span class="qtext"&gt;RAISE&lt;/span&gt; statement if an arithmetic error occurs. If, for example, the input parameter &lt;span class="qtext"&gt;operand&lt;/span&gt; is filled with value 0 at the call, the exception &lt;span class="qtext"&gt;arith_error&lt;/span&gt; is triggered in the method-internal handling of exception CX_SY_ZERODIVIDE and handled after the call of the method by evaluating &lt;span class="qtext"&gt;sy-subrc&lt;/span&gt;. &lt;/p&gt; &lt;p class="qtextml1"&gt; &lt;span class="qtext"&gt; CLASS math DEFINITION.&lt;br /&gt; PUBLIC SECTION.&lt;br /&gt;   METHODS divide_1_by&lt;br /&gt;      IMPORTING  operand TYPE I&lt;br /&gt;      EXPORTING  result  TYPE decfloat34&lt;br /&gt;      EXCEPTIONS arith_error.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS math IMPLEMENTATION.&lt;br /&gt; METHOD divide_1_by.&lt;br /&gt;   TRY.&lt;br /&gt;       result = 1 / operand.&lt;br /&gt;     CATCH cx_sy_arithmetic_error.&lt;br /&gt;       RAISE arith_error.&lt;br /&gt;   ENDTRY.&lt;br /&gt; ENDMETHOD.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;START-OF-SELECTION.&lt;br /&gt;&lt;br /&gt;DATA res  TYPE decfloat34.&lt;br /&gt;DATA oref TYPE REF TO math.&lt;br /&gt;&lt;br /&gt;CREATE OBJECT oref.&lt;br /&gt;oref-&gt;divide_1_by( EXPORTING  operand = 4&lt;br /&gt;                  IMPORTING  result  = res&lt;br /&gt;                  EXCEPTIONS arith_error = 4 ).&lt;br /&gt;&lt;br /&gt;IF sy-subrc = 0.&lt;br /&gt; WRITE res.&lt;br /&gt;ELSE.&lt;br /&gt; WRITE 'Arithmetic error!'.&lt;br /&gt;ENDIF.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;/p&gt; &lt;a name="@@ABSTRACT@@METHODS@@"&gt;&lt;/a&gt; &lt;p&gt;&lt;span class="h3"&gt; &lt;a name="!ABAP_ADDITION_6@6@"&gt;&lt;/a&gt; &lt;span class="bold"&gt;Addition 6&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;... ABSTRACT ...&lt;/span&gt; &lt;br /&gt;&lt;!-- /A --&gt; &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Effect &lt;/span&gt;&lt;/p&gt; &lt;p&gt;  Use addition &lt;span class="qtext"&gt;ABSTRACT&lt;/span&gt; to define an abstract method &lt;span class="qtext"&gt;meth&lt;/span&gt;. Addition &lt;span class="qtext"&gt;ABSTRACT&lt;/span&gt; is allowed only in abstract classes, not in interfaces. An abstract method is not implemented in the implementation section of its class. To implement an abstract method, you must redefine it in a non-abstract subclass using addition &lt;span class="qtext"&gt;REDEFINITION&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Notes &lt;/span&gt;&lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Abstract methods can be defined in classes that are either abstract or final, but they can never be implemented and therefore are not usable.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Methods in interfaces are implicitly abstract, because interfaces do not contain method implementations.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; With the exception of instance constructors, the concrete instance methods of a class can also call their abstract methods.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;a name="@@FINAL@@METHODS@@"&gt;&lt;/a&gt; &lt;p&gt;&lt;span class="h3"&gt; &lt;a name="!ABAP_ADDITION_7@7@"&gt;&lt;/a&gt; &lt;span class="bold"&gt;Addition 7&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;... FINAL ...&lt;/span&gt; &lt;br /&gt;&lt;!-- /A --&gt; &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Effect &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Addition &lt;span class="qtext"&gt;FINAL&lt;/span&gt; is allowed only in classes, not in interfaces. Use addition &lt;span class="qtext"&gt;FINAL&lt;/span&gt; to define a final method &lt;span class="qtext"&gt;meth&lt;/span&gt;. A final method cannot be redefined in a subclass. In final classes, all methods are automatically final; the addition &lt;span class="qtext"&gt;FINAL&lt;/span&gt; is not allowed.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-3327947885819152702?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/3327947885819152702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=3327947885819152702' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3327947885819152702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3327947885819152702'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/methods-importing-exporting-changing.html' title='METHODS - IMPORTING, EXPORTING, CHANGING, RAISING'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-4500661878702731980</id><published>2009-06-23T15:48:00.001+05:30</published><updated>2009-06-23T15:48:49.654+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='CLASS-METHODS'/><title type='text'>CLASS-METHODS - IMPORTING, EXPORTING, CHANGING, RAISING</title><content type='html'>&lt;p&gt;&lt;span class="h2"&gt; &lt;span class="bold"&gt;Syntax&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;CLASS-METHODS meth&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  [IMPORTING &lt;span class="blue"&gt;parameters&lt;/span&gt; [PREFERRED PARAMETER p]]&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  [EXPORTING &lt;span class="blue"&gt;parameters&lt;/span&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  [CHANGING &lt;span class="blue"&gt;parameters&lt;/span&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  [{RAISING exc1|RESUMBALE(exc1) exc2|RESUMBALE(exc2) ...}&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  |{EXCEPTIONS exc1 exc2 ...}].&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Effect &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Declares a general &lt;span class="grey"&gt;static method&lt;/span&gt;  &lt;span class="qtext"&gt;meth&lt;/span&gt;. The additions define the parameter interface for the method and specify the exceptions that the method can raise and propagate. The additions have the same syntax and meaning as those for &lt;span class="blue"&gt;general instance methods&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; You cannot redefine static methods. This means that you cannot define them as abstract or final.&lt;br /&gt;&lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt; Static methods are always executed in the class in which they were declared, even if they were called in subclasses or using the names of subclasses.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-4500661878702731980?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/4500661878702731980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=4500661878702731980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4500661878702731980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4500661878702731980'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/class-methods-importing-exporting.html' title='CLASS-METHODS - IMPORTING, EXPORTING, CHANGING, RAISING'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-2036009368760296977</id><published>2009-06-23T15:47:00.001+05:30</published><updated>2009-06-23T15:47:58.995+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Methods'/><title type='text'>CLASS-METHODS</title><content type='html'>&lt;p&gt;&lt;span class="h2"&gt; &lt;span class="bold"&gt;Syntax Forms&lt;/span&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;br /&gt;&lt;br /&gt;&lt;span class="blue"&gt;General Static Methods&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. &lt;span class="qtext"&gt;CLASS-METHODS meth&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    [IMPORTING &lt;span class="blue"&gt;parameters&lt;/span&gt; [PREFERRED PARAMETER p]]&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    [EXPORTING &lt;span class="blue"&gt;parameters&lt;/span&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    [CHANGING &lt;span class="blue"&gt;parameters&lt;/span&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    [{RAISING exc1|RESUMBALE(exc1) exc2|RESUMBALE(exc2) ...}&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    |{EXCEPTIONS exc1 exc2 ...}].&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blue"&gt;Functional Static Methods&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. &lt;span class="qtext"&gt;CLASS-METHODS meth&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    [IMPORTING &lt;span class="blue"&gt;parameters&lt;/span&gt; [PREFERRED PARAMETER p]]&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    RETURNING VALUE(r) typing&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    [{RAISING exc1|RESUMBALE(exc1) exc2|RESUMBALE(exc2) ...}&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    |{EXCEPTIONS exc1 exc2 ...}].&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blue"&gt;Static Constructors&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3. &lt;span class="qtext"&gt;CLASS-METHODS class_constructor.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blue"&gt;Event Handlers&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;4. &lt;span class="qtext"&gt;CLASS-METHODS meth&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;     FOR EVENT evt OF {class|intf}&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;     [IMPORTING p1 p2 ... [sender]].&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Effect &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The &lt;span class="qtext"&gt;CLASS-METHODS&lt;/span&gt; statement declares a &lt;span class="grey"&gt;static method&lt;/span&gt; &lt;span class="qtext"&gt;meth&lt;/span&gt;. The &lt;span class="blue"&gt;naming conventions&lt;/span&gt; apply for the name &lt;span class="qtext"&gt;meth&lt;/span&gt;. &lt;/p&gt; &lt;p&gt; With the class component selector (&lt;span class="qtext"&gt;=&gt;&lt;/span&gt;), static methods can be used independently of objects. In static methods, you can only access the static components of the class or its superclasses if you do not use the component selector. &lt;/p&gt; &lt;p&gt; Using the variants of the &lt;span class="qtext"&gt;CLASS-METHODS&lt;/span&gt; statement, different types of method declaration are possible : &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt; &lt;span class="blue"&gt;General Static Methods&lt;/span&gt;&lt;br /&gt;The most general form of the &lt;span class="qtext"&gt;CLASS-METHODS&lt;/span&gt; statement allows you to define static methods with any number of input and output parameters.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; &lt;span class="blue"&gt;Functional Static Methods&lt;/span&gt;&lt;br /&gt;&lt;span class="grey"&gt;Functional methods&lt;/span&gt; can have any number of input parameters and exactly one return value as the output parameter.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; &lt;span class="blue"&gt;Static Constructors&lt;/span&gt;&lt;br /&gt;Static constructors are methods with the predefined name &lt;span class="qtext"&gt;class_constructor&lt;/span&gt;, which are automatically called before their class is first used. Static constructors have no parameter interface.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; &lt;span class="blue"&gt;Static Event Handlers&lt;/span&gt;&lt;br /&gt;Static &lt;span class="grey"&gt;event handlers&lt;/span&gt; are static methods, that are called by an event of a class or an interface. The only possible formal parameters of an event handler are input parameters that were defined as output parameters of the event.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Like all &lt;span class="blue"&gt;static components in the inheritance&lt;/span&gt;, the static methods of a superclass exist in all subclasses. A static method is always executed in the class in which it was declared. A static method which is visible from outside can be called using the class component selector, as can all names and classes in which it exists. The class in which it was declared is always the one that is addressed. This has an influence on the execution of the &lt;span class="grey"&gt;static constructor&lt;/span&gt; or on the &lt;span class="grey"&gt;event handlers&lt;/span&gt;. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="h4"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-2036009368760296977?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/2036009368760296977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=2036009368760296977' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2036009368760296977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2036009368760296977'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/class-methods.html' title='CLASS-METHODS'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-2522667480344367177</id><published>2009-06-23T15:46:00.000+05:30</published><updated>2009-06-23T15:47:00.715+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Methods'/><title type='text'>Kernel Methods</title><content type='html'>&lt;p&gt; For &lt;span class="bold"&gt;internal use&lt;/span&gt;, kernel methods can be implemented in the &lt;span class="grey"&gt;kernel&lt;/span&gt; instead of in ABAP. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Introduction &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Kernel methods allow you to directly call kernel functions implemented in C or C++. Kernel methods replace the previous concepts of &lt;span class="blue"&gt;C-Calls&lt;/span&gt; and &lt;span class="blue"&gt;System-Calls&lt;/span&gt;. After Release 6.20, no new C-Calls or System-Calls should be introduced. &lt;/p&gt; &lt;p&gt; Kernel methods offer the same checks and securities as normal ABAP methods. Except for the &lt;span class="blue"&gt;Constructors&lt;/span&gt; and the &lt;span class="blue"&gt;C Destructor&lt;/span&gt;, all ABAP methods can be implemented as kernel methods. An ABAP method can still be redefined as a kernel method and a kernel method can still be redefined as an ABAP method within a path of the inheritance hierarchy. &lt;/p&gt; &lt;p&gt;For the C developer, who wants to implement a kernel method, an API is available that allows simple, high-performing, and secure access to arguments. &lt;span class="blue"&gt;Class-based exceptions&lt;/span&gt; also continue to be supported. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Defining Kernel Methods &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Declaration in ABAP &lt;/span&gt;&lt;/p&gt; &lt;p&gt; A kernel method is declared like a normal ABAP method, in the &lt;span class="grey"&gt;Class Builder&lt;/span&gt; or in the declaration section of a local class. It is completely irrelevant for the declaration that a method is declared as a kernel method. In ABAP, a kernel method can therefore be used just as a normal ABAP method. &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Implementation in ABAP &lt;/span&gt;&lt;/p&gt; &lt;p&gt; You define a method as a kernel method by using the optional addition KERNEL MODULE kmod1 kmod2 ... to the &lt;span class="blue"&gt;METHOD&lt;/span&gt; statement in the implementation section of the class.&lt;span class="qtext"&gt; kmod1&lt;/span&gt;, &lt;span class="qtext"&gt;kmod2&lt;/span&gt;, ... are the names of the kernel modules that implement the method. The ABAP implementation of a kernel method must be empty, that is there cannot be any ABAP statements between &lt;span class="qtext"&gt;METHOD&lt;/span&gt; and &lt;span class="qtext"&gt;ENDMETHOD&lt;/span&gt;: &lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;METHOD meth BY Kernel MODULE kmod1 kmod2 ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;ENDMETHOD.&lt;/span&gt; &lt;/p&gt; &lt;p&gt; &lt;span class="blue"&gt;Constructors&lt;/span&gt; and the &lt;span class="blue"&gt;C Destructor&lt;/span&gt; cannot be implemented as kernel methods. There is a separate mechanism for the C destructor. &lt;/p&gt; &lt;p&gt; After kernel&lt;span class="qtext"&gt; MODULE&lt;/span&gt;, you can specify a list of kernel &lt;span class="qtext"&gt;kmod1&lt;/span&gt;, &lt;span class="qtext"&gt;kmod2&lt;/span&gt;, ... You can currently only specify C functions of the kernel for &lt;span class="qtext"&gt; kmod1&lt;/span&gt;, &lt;span class="qtext"&gt;kmod2&lt;/span&gt;, ... The list after kernel &lt;span class="qtext"&gt;MODULE&lt;/span&gt;is evaluated by the compiler from left to right. The first kernel module in the list that is registered in the kernel (see below) is used in the generation, &lt;/p&gt; &lt;p&gt; If no valid kernel module is found in the list, a syntax error occurs. There are still two standard C functions that can appear at the end of the list: &lt;span class="qtext400"&gt;FAIL&lt;/span&gt; and &lt;span class="qtext400"&gt;IGNORE&lt;/span&gt;. If one of these functions is specified at the end of the list, a syntax error does not occur if the previous list does not contain a valid module. With &lt;span class="qtext400"&gt;IGNORE&lt;/span&gt; the call of such a kernel method is ignored (behavior as with empty ABAP implementation) and in the case of &lt;span class="qtext400"&gt;FAIL&lt;/span&gt; the exception that can be handled of the class CX_SY_DYN_CALL_ILLEGAL_METHOD is raised. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Examples &lt;/span&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext"&gt;METHOD meth BY Kernel MODULE xx_impl_630 xx_impl_620 xx_impl_610.&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;First the system searches in the kernel for xx_impl_630, then for xx_impl_620, and then for xx_impl_610. If none of the functions are found, a syntax error occurs. &lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;METHOD meth BY Kernel MODULE xx_impl_630 xx_impl_620 FAIL.&lt;/span&gt; &lt;/p&gt; &lt;p&gt;First the system searches in the kernel for xx_impl_630. Lastly, the system searches for xx_impl_620. If none of the functions are found, no syntax error occurs and when the method is called, the exception that can be handled of the class CX_SY_DYN_CALL_ILLEGAL_METHOD is raised. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext"&gt;METHOD meth BY Kernel MODULE xx_impl_620 xx_impl_610 IGNORE.&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;First the system searches in the kernel for xx_impl_620. Lastly, the system searches for xx_impl_610. If none of the functions are found, no syntax error occurs and when the method is called, the empty ABAP implementation is called. &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Implementation in the kernel &lt;/span&gt;&lt;/p&gt; &lt;p&gt;Currently, only C functions can be used as kernel modules of kernel methods. The C functions can have any position in the kernel. No special includes of the &lt;span class="grey"&gt;ABAP runtime environment&lt;/span&gt;are required for implementing the C function. The C functions must have a specific interface. The interface itself is wrapped by the &lt;span class="grey"&gt;macro&lt;/span&gt; &lt;span class="qtext400"&gt;ARGUMENTS&lt;/span&gt; All necessary definitions and prototypes are in the include &lt;span class="qtext400"&gt;//src/include/abkmeth.h&lt;/span&gt;. This is the only include needed for defining C functions for kernel methods. &lt;/p&gt; &lt;p&gt; Since C functions can be defined in C and C++ , you must use &lt;span class="qtext400"&gt;externC&lt;/span&gt; in C++: &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;#include "abkmeth.h"&lt;br /&gt;...&lt;br /&gt;externC void name_of_cmodule( ARGUMENTS )&lt;br /&gt;{&lt;br /&gt;...&lt;br /&gt;}&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; A C function that implements a kernel method must be registered for the kernel method. If, after &lt;span class="qtext"&gt; METHOD meth BY Kernel MODULE&lt;/span&gt;, you specify the name of a C function that was not registered for the kernel method a syntax error occurs (as mentioned above). You can register several C functions for a kernel method. The sequence of the kernel modules &lt;span class="qtext"&gt;kmod1&lt;/span&gt;, &lt;span class="qtext"&gt;kmod2&lt;/span&gt;, ... specified in the list after &lt;span class="qtext"&gt;METHOD meth BY Kernel MODULE&lt;/span&gt; defines which of the registered C functions is used. This allows downward-compatible further development of kernel methods. &lt;/p&gt; &lt;p&gt; So that changes to the registration become active, you must recompile the destination &lt;span class="qtext400"&gt;lib&lt;/span&gt; of the project &lt;span class="qtext400"&gt;krn/runt&lt;/span&gt; and relink the kernel. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Registration &lt;/span&gt;&lt;/p&gt; &lt;p&gt; C functions are registered in the signature file &lt;span class="qtext400"&gt;//src/krn/runt/abkmeth.sig&lt;/span&gt; using the following syntax for kernel methods (all ABAP IDs must be specified in capital letters): &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;KERNEL_METHOD("CLASS","METH", cfunc,argcnt)&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; This definition registers the C function &lt;span class="qtext"&gt;cfunc&lt;/span&gt; for the kernel method &lt;span class="qtext"&gt; meth&lt;/span&gt; of a global class &lt;span class="qtext"&gt;class&lt;/span&gt;. The C function expects a number of &lt;span class="qtext400"&gt;argcnt&lt;/span&gt; arguments. &lt;/p&gt; &lt;p&gt; Kernel methods of local classes in class pools or other ABAP programs are registered using the following macros: &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;KERNEL_METHOD_CLASS_LOCAL("GCLASS","CLASS","METH",cmodule,argcnt)&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;KERNEL_METHOD_PROGRAM_LOCAL("PROG","CLASS","METH",cmodule,argcnt)&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; The technique is the same as with &lt;span class="qtext400"&gt;Kernel_METHOD&lt;/span&gt;, except that you must specify the global class &lt;span class="qtext"&gt;gclass&lt;/span&gt; for local classes is class pools and the program &lt;span class="qtext"&gt;prog&lt;/span&gt; for program-local classes. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Registering Arguments &lt;/span&gt;&lt;/p&gt; &lt;p&gt;All ABAP data objects (such as parameters, attributes, or global data) that are to be accessed in C functions for kernel methods, are treated as arguments of the C function. &lt;/p&gt; &lt;p&gt;The argument list of a C function for a kernel method is not limited to the interface parameters of the ABAP method and does not have to contain these completely. Before you access arguments within C functions for kernel methods, these arguments must be registered. &lt;/p&gt; &lt;p&gt; The &lt;span class="qtext400"&gt;argcnt&lt;/span&gt; arguments must be registered immediately after the C functions are registered using &lt;span class="qtext400"&gt;KERNEL_METHOD&lt;/span&gt;. A single argument is defined (registered) using one of the following macros: &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;ARGUMENT_basetype(index,"name",type_kind,"type",read_write)&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;ARGUMENT_[C|N|X](index,"name",type_kind,"type",read_write,length)&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;ARGUMENT_P(index,"name",type_kind,"type",read_write,length,decimals)&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;ARGUMENT_STRUCT(index,"name",type_kind,"type",read_write,ctype)&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; With these &lt;span class="grey"&gt;macros&lt;/span&gt; an argument is defined with the name &lt;span class="qtext400"&gt;name&lt;/span&gt; and an index &lt;span class="qtext400"&gt;index&lt;/span&gt;. &lt;/p&gt; &lt;p&gt; With &lt;span class="qtext400"&gt;basetype&lt;/span&gt; you must assign the type of the ABAP data object according to the following table. If the &lt;span class="qtext400"&gt;basetype&lt;/span&gt; is &lt;span class="qtext400"&gt;C&lt;/span&gt;, &lt;span class="qtext400"&gt;N&lt;/span&gt;, &lt;span class="qtext400"&gt;X&lt;/span&gt;, &lt;span class="qtext400"&gt;P&lt;/span&gt;, or &lt;span class="qtext400"&gt;STRUCT&lt;/span&gt;, you must specify more parameters than for other types. &lt;/p&gt; &lt;table border="1"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;span class="bold"&gt;&lt;span class="qtext400"&gt;basetype&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="bold"&gt;ABAP data type&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="bold"&gt;Type in C&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;C&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;c&lt;/span&gt; with length specification&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_CHAR (*) [Length]&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;C_GENERIC&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;c&lt;/span&gt; without length specification&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_CHAR*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;X&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;x&lt;/span&gt; with length specification&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_RAW (*) [Length]&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;X_GENERIC&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;x&lt;/span&gt; without length specification&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_RAW*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;N&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;n&lt;/span&gt; with length specification&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_CHAR (*) [Length]&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;N_GENERIC&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;n&lt;/span&gt; without length specification&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_CHAR*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;P&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;p&lt;/span&gt; with length and decimal specification&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_BCD (*) [Length]&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;P_GENERIC&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;p&lt;/span&gt; without length and decimal specification&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_BCD*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;D&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;d&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_DATE*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;T&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;t&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_TIME*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;I&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;i&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_INT*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;F&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;f&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_DOUBLE*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;STRING&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;string&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;StrRef*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;XSTRING&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;xstring&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;StrRef*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;INT2&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;s&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_SHORT*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;INT1&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;b&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_INT1*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;TABLE&lt;/span&gt;&lt;/td&gt; &lt;td&gt;All table types&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;TABH_REF*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;OBJ_REF&lt;/span&gt;&lt;/td&gt; &lt;td&gt;All object references&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;ObjRef*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;DATA_REF&lt;/span&gt;&lt;/td&gt; &lt;td&gt;All data references&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;FldRef*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;STRUCT&lt;/span&gt;&lt;/td&gt; &lt;td&gt;All structure types&lt;/td&gt; &lt;td&gt;Registered type &lt;span class="qtext400"&gt;ctype*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;ANY&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;any&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;void*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;DATA&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;data&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;void*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SIMPLE&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;simple&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;void*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;CSEQUENCE&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;csequence&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;void*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;XSEQUENCE&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;xsequence&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;void*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;NUMERIC&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;numeric&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;void*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;CLIKE&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;clike&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;SAP_CHAR*&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class="qtext400"&gt;C_POINTER&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;%_c_pointer&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext400"&gt;void**&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt; The following applies for the macro parameters: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="qtext400"&gt;name&lt;/span&gt; is the ID for any ABAP data object in uppercase letters that could also be used in an ABAP implementation of the kernel method. In particular, the ID can contain links with component selectors, for example &lt;span class="qtext"&gt;me-&gt;ATTR&lt;/span&gt; or &lt;span class="qtext"&gt;struc-comp&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="qtext400"&gt;index&lt;/span&gt; is a continuous number from 1 to &lt;span class="qtext400"&gt;argcnt&lt;/span&gt;. The arguments are accessed using this index.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;For &lt;span class="qtext400"&gt;type_kind&lt;/span&gt; you can specify either &lt;span class="qtext400"&gt;TYPE&lt;/span&gt; or &lt;span class="qtext400"&gt;TYPE_REF_TO&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="qtext400"&gt;type&lt;/span&gt; is the ID (in upper-case) for any data type in ABAP that could also be used in an ABAP implementation of the kernel method. &lt;span class="qtext400"&gt;type_kind&lt;/span&gt; and &lt;span class="qtext400"&gt;type&lt;/span&gt; are used to check the interface of the kernel method in ABAP.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;For &lt;span class="qtext400"&gt;read_write&lt;/span&gt; you can specify either &lt;span class="qtext400"&gt;READ&lt;/span&gt; or &lt;span class="qtext400"&gt;WRITE&lt;/span&gt;. This defines whether you can read or write access the argument and is evaluated in the access macros.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;For &lt;span class="qtext400"&gt;ARGUMENT_[C|N|X|P]&lt;/span&gt; you use &lt;span class="qtext400"&gt;length&lt;/span&gt; to specify the length of all ABAP data types with generic length (for &lt;span class="qtext"&gt;c&lt;/span&gt; and &lt;span class="qtext"&gt;n&lt;/span&gt; in characters, for &lt;span class="qtext"&gt;x&lt;/span&gt; and &lt;span class="qtext"&gt;p&lt;/span&gt; in bytes).&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;For &lt;span class="qtext400"&gt;ARGUMENT_P&lt;/span&gt; you use &lt;span class="qtext400"&gt;decimals&lt;/span&gt; to specify the number of &lt;span class="grey"&gt;decimal places&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;For &lt;span class="qtext400"&gt;ARGUMENT_STRUCT&lt;/span&gt; you use &lt;span class="qtext400"&gt;ctype&lt;/span&gt; to specify a suitable  C type. This type should be generated from an ABAP type definition using &lt;span class="qtext400"&gt;saphfile&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;span class="h4"&gt; Accessing Arguments &lt;/span&gt;&lt;/p&gt; &lt;p&gt;After registering the arguments, you can use the following macros to access them within the C function. With exception of the direct access to the data control block, the access macros do not require any includes of the &lt;span class="grey"&gt;ABAP runtime environment&lt;/span&gt;. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;ARGUMENT_basetype_READ(index,"name");&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; This &lt;span class="grey"&gt;macro&lt;/span&gt; returns the read address of an argument with the type &lt;span class="qtext400"&gt;const ctype&lt;/span&gt;, where &lt;span class="qtext400"&gt;ctype&lt;/span&gt; is defined by &lt;span class="qtext400"&gt;basetype&lt;/span&gt; according to the above table. The index and name of the argument must be passed. For the generic types you must specify additional parameters (see below). You only need the index to access the argument. However, to make the C function more legible and ensure that additional consistency checks can be executed, you must also specify the name. If the kernel is compiled in debugging mode, the system executes a consistency check between index and name; the specified C type and ABAP type of the argument are also checked. In the case of an error, a corresponding ABAP runtime error is triggered (KMETH_INVALID_ARGUMENT_ID, KMETH_INVALID_ARGUMENT_NAME, or KMETH_INVALID_CTYPE_LENG). No checks are executed in the optimized kernel. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;ARGUMENT_basetype_WRITE(index,"name");&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; This macro has the same semantics as &lt;span class="qtext400"&gt;ARGUMENT_basetype_READ&lt;/span&gt;. However, the system returns the write address. The system also checks whether the argument was defined as a write argument. If you try to write access a write-protected argument (for example, a constant), this triggers the ABAP runtime error KMETH_ARGUMENT_READ_ONLY. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;ARGUMENT_[C|N]_READ(index,"name",lengthU);&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;ARGUMENT_[C|N]_WRITE(index,"name",lengthU);&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;ARGUMENT_X_READ(index,"name",lengthR);&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;ARGUMENT_X_WRITE(index,"name",lengthR);&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; With these macros you must specify the expected length in bytes &lt;span class="qtext400"&gt;lengthR&lt;/span&gt; or in characters &lt;span class="qtext400"&gt;lengthU&lt;/span&gt; for the generic types &lt;span class="qtext"&gt;c&lt;/span&gt;, &lt;span class="qtext"&gt;x&lt;/span&gt;, and &lt;span class="qtext"&gt;n&lt;/span&gt; &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;ARGUMENT_P_READ(index,"name",lengthR,decimals);&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;ARGUMENT_P_WRITE(index,"name",lengthR,decimals);&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; With these macros you must specify the expected length in bytes (&lt;span class="qtext400"&gt;lengthR&lt;/span&gt;) and the number of decimal places (&lt;span class="qtext400"&gt;decimals&lt;/span&gt;) for the generic type &lt;span class="qtext"&gt;p&lt;/span&gt;. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;ARGUMENT_[C_GENERIC|N_GENERIC|CLIKE]_READ(index,"name",size_tU);&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;ARGUMENT_[C_GENERIC|N_GENERIC|CLIKE]_WRITE(index,"name",size_tU);&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;ARGUMENT_X_GENRIC_READ(index,"name",size_tR);&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;ARGUMENT_X_GENERIC_WRITE(index,"name",size_tR);&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; With these macros you must specify a variable of the type &lt;span class="qtext400"&gt;size_tU&lt;/span&gt; or &lt;span class="qtext400"&gt; size_tR&lt;/span&gt;, containing the length in bytes or characters, for the types &lt;span class="qtext400"&gt;C_GENERIC&lt;/span&gt;, &lt;span class="qtext400"&gt;X_GENERIC&lt;/span&gt;, &lt;span class="qtext400"&gt;N_GENERIC&lt;/span&gt;, and &lt;span class="qtext400"&gt;CLIKE&lt;/span&gt;. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;ARGUMENT_P_GENERIC_READ(index,"name",size_tR,decimals);&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;ARGUMENT_P_GENERIC_WRITE(index,"name",size_tR,decimals);&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; With these macros you must specify a variable &lt;span class="qtext400"&gt;decimals&lt;/span&gt; (for the &lt;span class="grey"&gt;decimal places&lt;/span&gt;) as well as the length &lt;span class="qtext400"&gt;size_tR&lt;/span&gt; for the type &lt;span class="qtext400"&gt;P_GENERIC&lt;/span&gt;. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;ARGUMENT_STRUCT_READ(index,"name",ctype);&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;ARGUMENT_STRUCT_WRITE(index,"name",ctype);&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; With these macros you must specify a suitable  C type&lt;span class="qtext400"&gt;ctype&lt;/span&gt; for all structured types &lt;span class="qtext400"&gt;STRUCT&lt;/span&gt;. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;ARGUMENT_C_POINTER(index,"name");&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; This &lt;span class="grey"&gt;macro&lt;/span&gt; is available specifically for the type &lt;span class="qtext400"&gt;%_c_pointer&lt;/span&gt;. This type is a special internal ABAP type that has exactly the byte length of a C pointer (4, 8, or 16 bytes, depending on platform). The type is always mapped to the predefined ABAP type &lt;span class="qtext"&gt;x&lt;/span&gt;. The macros for the type &lt;span class="qtext400"&gt;X&lt;/span&gt; or &lt;span class="qtext400"&gt;X_GENERIC&lt;/span&gt; are not used due to the variable length and platform-dependency. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;ARGUMENT_IS_SUPPLIED(index,"name");&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; This macro has the same semantics as the logical expression &lt;span class="qtext"&gt;IS SUPPLIED&lt;/span&gt; in ABAP. The same consistency checks are executed as for &lt;span class="qtext400"&gt;ARGUMENT_READ&lt;/span&gt;. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;ARGUMENT_DATA(index,"name",ctype);&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; This macro returns the data control block with the  C type &lt;span class="qtext400"&gt;const DATA *&lt;/span&gt;. The same consistency checks are executed as for &lt;span class="qtext400"&gt;ARGUMENT_READ&lt;/span&gt;. The macro is only active if the include &lt;span class="qtext400"&gt;//src/include/abdata.h&lt;/span&gt; of the &lt;span class="grey"&gt;ABAP runtime environment&lt;/span&gt; was included. &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Raising Exceptions &lt;/span&gt;&lt;/p&gt; &lt;p&gt; C functions that implement kernel method can raise &lt;span class="blue"&gt;class-based exceptions&lt;/span&gt;. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Registering Exceptions &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The relevant &lt;span class="bold"&gt;global&lt;/span&gt; exception classes must be registered with an extension of &lt;span class="qtext400"&gt;//src/include/abexcpc.h&lt;/span&gt;. Local exception classes cannot be registered. &lt;/p&gt; &lt;p&gt; In &lt;span class="qtext400"&gt;//src/include/abexcpc.h, the&lt;/span&gt;exception class is declared and any text IDs are defined: &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;//src/include/abexcpc.h&lt;br /&gt;...&lt;br /&gt;CX_ABSTR (CX_..., "CX_...")&lt;br /&gt;CX_TXTID (CX_..._bar, CX_..., "BAR")  /* special text for class */&lt;br /&gt;...&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; Classes can also be declared with their standard text only: &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;//src/include/abexcpc.h&lt;br /&gt;...&lt;br /&gt;CX_CLASS (CX_..., "CX_...")           /* class with standard text */&lt;br /&gt;...&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; The exact documentation is in the file &lt;span class="qtext400"&gt;//src/include/abexcpc.h&lt;/span&gt;. &lt;/p&gt; &lt;p&gt; You must extend the file &lt;span class="qtext400"&gt;//src/include/abexcpa.h&lt;/span&gt;so that any attributes of an exception class in a C function can be populated; you must specify the name, internal type (according to &lt;span class="qtext400"&gt;//src/include/abtypes.h), and the&lt;/span&gt; byte length: &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;//src/include/abexcpa.h&lt;br /&gt;...&lt;br /&gt;CX_ATTR (CX_..._attr1, CX_..., "ATTR1", TYPCSTRING, sizeofR(StrRef))&lt;br /&gt;CX_ATTR (CX_..._attr2, CX_..., "ATTR2", TYPC, LEN_UC2RAW(30))&lt;br /&gt;...&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; Finally, you must register exceptions as well as arguments in the file &lt;span class="qtext400"&gt;//src/krn/runt/abkmeth.sig.&lt;/span&gt; This is not forced but, during the syntax check, only registered exceptions are checked for their existence: &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;//src/krn/runt/abkmeth.sig&lt;br /&gt;...&lt;br /&gt;EXCEPTION(CX_...)&lt;br /&gt;...&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;&lt;span class="h4"&gt; Raising Exceptions &lt;/span&gt;&lt;/p&gt; &lt;p&gt; A C function can raise an exception by calling the following macros consecutively: &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;EXCEPTION_CREATE(CX_..._bar);&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;EXCEPTION_SET_CSTRING(CX_..._attr1, value, valueLength);&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;EXCEPTION_SET_C      (CX_..._attr2, value, valueLength);&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;EXCEPTION_RAISE();&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; Within the macros &lt;span class="qtext400"&gt;EXCEPTION_CREATE&lt;/span&gt; or &lt;span class="qtext400"&gt;EXCEPTION_RAISE&lt;/span&gt;, a long jump to Extri always takes place, that is the C function that implements the kernel method is exited in a long jump and the &lt;span class="grey"&gt;ABAP runtime environment&lt;/span&gt; takes control. Therefore, the C function should release its temporary memory before raising an exception. If the exception is caught in ABAP using &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CATCH&lt;/span&gt;&lt;/span&gt; without the &lt;span class="qtext"&gt;INTO&lt;/span&gt; addition, the long jump takes place in &lt;span class="qtext400"&gt;EXCEPTION_CREATE&lt;/span&gt;. If the exception is caught with the &lt;span class="qtext"&gt;INTO&lt;/span&gt; addition (the exception object is used) or not at all, the long jump takes place in &lt;span class="qtext400"&gt;EXCEPTION_RAISE&lt;/span&gt;. &lt;/p&gt; &lt;p&gt;The exceptions are processed in the runtime environment, as if they were raised in ABAP and the same dynamic checks are executed. &lt;/p&gt; &lt;p&gt; Currently, the following &lt;span class="grey"&gt;macros&lt;/span&gt;, which can be extended if necessary, are available for setting exception attributes. Strings, integer and C fields are supported. See the above sequence for use. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;EXCEPTION_SET_CSTRING_UC&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;EXCEPTION_SET_C&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; Value with length specification &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;EXCEPTION_SET_C_UC&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext400"&gt;EXCEPTION_SET_INT&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; Value with null termination &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Auxiliary Program for Kernel Methods &lt;/span&gt;&lt;/p&gt; &lt;p&gt;The ABAP program RSKMETH serves as a browser for the registration of kernel modules. You can use it to ascertain which C functions are registered for which kernel methods and which arguments/exceptions are registered for these functions. This is helpful when analyzing syntax errors, because with kernel methods information is processed that only exists in the kernel modules. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt;The following example is a simplified calculation class for floating point numbers. The class has an instance attribute in which the last result of each calculation is stored. A method executes a division and is implemented as a kernel method. If the divisor equals zero, the method triggers a class-based exception. &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Declaration Section of the Class in ABAP &lt;/span&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;CLASS cl_my_calculation DEFINITION ...&lt;br /&gt;...&lt;br /&gt;  DATA last_result TYPE decfloat16.&lt;br /&gt;...&lt;br /&gt;  METHODS div&lt;br /&gt;    IMPORTING p_dividend TYPE decfloat16 p_divisor TYPE decfloat16&lt;br /&gt;    RETURNING VALUE(p_result) TYPE decfloat16.&lt;br /&gt;...&lt;br /&gt;ENDCLASS.&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;&lt;span class="h3"&gt; Signature file &lt;span class="qtext400"&gt;//src/krn/runt/abkmeth.sig&lt;/span&gt; in the kernel &lt;/span&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;...&lt;br /&gt;KERNEL_METHOD(CL_MY_CALCULATION, DIV, xx_myDiv,4)&lt;br /&gt;  ARGUMENT_F(1, "P_DIVIDEND",     TYPE, "F", READ)&lt;br /&gt;  ARGUMENT_F(2, "P_DIVISOR",      TYPE, "F", READ)&lt;br /&gt;  ARGUMENT_F(3, "P_RESULT",       TYPE, "F", WRITE)&lt;br /&gt;  ARGUMENT_F(4, "ME-&gt;LAST_RESULT",TYPE, "F", WRITE)&lt;br /&gt;  EXCEPTION("CX_MY_DIV_BY_ZERO")&lt;br /&gt;...&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;&lt;span class="h3"&gt; C++ source code &lt;span class="qtext400"&gt;//src/krn/.../mycalc.cpp&lt;/span&gt; in the kernel &lt;/span&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext400"&gt;#include "abkmeth.h"&lt;br /&gt;...&lt;br /&gt;externC void xx_myDiv( ARGUMENTS ){&lt;br /&gt;&lt;br /&gt;  const SAP_DOUBLE *const dividend = ARGUMENT_F_READ(1,"P_DIVIDEND");&lt;br /&gt;  const SAP_DOUBLE *const divisor  = ARGUMENT_F_READ(2,"P_DIVISOR");&lt;br /&gt;  SAP_DOUBLE *result               = ARGUMENT_F_WRITE(3,"P_RESULT");&lt;br /&gt;  SAP_DOUBLE *last_result          = ARGUMENT_F_WRITE(4,"ME-&gt;LAST_RESULT");&lt;br /&gt;&lt;br /&gt;  if( 0 == *divisor )&lt;br /&gt;  {&lt;br /&gt;    EXCEPTION_CREATE(CX_MY_DIV_BY_ZERO);&lt;br /&gt;    EXCEPTION_RAISE();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  *result = *dividend / *divisor;&lt;br /&gt;  *last_result = *result;&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;&lt;span class="h3"&gt; Implementation section of the class in ABAP &lt;/span&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext"&gt;CLASS cl_my_calculation IMPLEMENTATION.&lt;br /&gt;...&lt;br /&gt;METHOD div BY KERNEL MODULE xx_myDiv.&lt;br /&gt;ENDMETHOD.&lt;br /&gt;...&lt;br /&gt;ENDCLASS.&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-2522667480344367177?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/2522667480344367177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=2522667480344367177' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2522667480344367177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2522667480344367177'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/kernel-methods.html' title='Kernel Methods'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-249458061589108232</id><published>2009-06-23T15:45:00.000+05:30</published><updated>2009-06-23T15:46:11.189+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Methods'/><title type='text'>The C Destructor in Methods</title><content type='html'>&lt;p&gt; A destructor is a special method which is called automatically when an object is deleted. Destructors can be used to release resources used by the object that are not included in the Garbage Collection. Currently ABAP Objects does not include a destructor, in which a regular ABAP processing block can be programmed. &lt;/p&gt; &lt;a name="@@destructor@@METHODS - internal@@"&gt;&lt;/a&gt; &lt;a name="@@NOT AT END OF MODE@@METHODS destructor (internal)@@"&gt;&lt;/a&gt; &lt;p&gt; For special cases and for &lt;span class="bold"&gt;internal use only&lt;/span&gt;, the predefined instance method &lt;span class="qtext"&gt;destructor&lt;/span&gt; can be declared in the public visibility section of a class:&lt;br /&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;CLASS class DEFINITION.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  PUBLIC SECTION.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    METHODS destructor [NOT AT END OF MODE].&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    ...&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;ENDCLASS&lt;/span&gt;. &lt;/p&gt; &lt;p&gt; In the implementation of the method &lt;span class="qtext"&gt;destructor&lt;/span&gt; only &lt;span class="bold"&gt;one&lt;/span&gt; statement can currently be used:&lt;br /&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="qtext"&gt;CLASS class IMPLEMENTATION.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  METHOD destructor.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;    SYSTEM-CALL c-destructor 'name' USING attr.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  ENDMETHOD.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;ENDCLASS&lt;/span&gt;. &lt;/p&gt; &lt;p&gt;This means that the destructor makes it possible to call a C routine name when an object is deleted. The routine must exist in the kernel in order that no syntax error occurs. &lt;/p&gt; &lt;p&gt; When the optional addition &lt;span class="qtext"&gt;NOT AT END OF MODE&lt;/span&gt; is used, the destructor is not executed if the &lt;span class="grey"&gt;internal mode&lt;/span&gt; is closed anyway. Usually a destructor is also executed at the end of a mode and should mainly be used to release external resources involved that are not released automatically when the mode is closed. &lt;/p&gt; &lt;p&gt; When the C routine is called, an attribute &lt;span class="qtext"&gt;attr&lt;/span&gt; of the class of any complex data type can be passed on to the routine. If several parameters are to be passed, an appropriate data type must be defined. &lt;/p&gt; &lt;p&gt; During the lifetime of an internal mode, the time when the method &lt;span class="qtext"&gt;destructor&lt;/span&gt; is executed depends on when the &lt;span class="grey"&gt;Garbage Collector&lt;/span&gt; is started. When an internal mode is closed, the destructors that are not declared with the addition &lt;span class="qtext"&gt;NOT AT END OF MODE&lt;/span&gt; are executed for all objects. In connection with inheritance, the destructors of the subclasses are executed before the destructors of the superclasses. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-249458061589108232?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/249458061589108232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=249458061589108232' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/249458061589108232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/249458061589108232'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/c-destructor-in-methods.html' title='The C Destructor in Methods'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-4847918643492926155</id><published>2009-06-23T15:44:00.002+05:30</published><updated>2009-06-23T15:45:20.870+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Methods'/><title type='text'>Interface Parameters in Methods</title><content type='html'>&lt;p&gt; Interface parameters in methods are input parameters (&lt;span class="qtext"&gt;IMPORTING&lt;/span&gt;, &lt;span class="qtext"&gt;CHANGING&lt;/span&gt; parameters) and output parameters (&lt;span class="qtext"&gt;EXPORTING&lt;/span&gt;, &lt;span class="qtext"&gt;CHANGING&lt;/span&gt;, &lt;span class="qtext"&gt;RETURNING&lt;/span&gt; parameters). In declarations with the statements &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;METHODS&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS-METHODS&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;EVENTS&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS-EVENTS&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; the following attributes are determined:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Passing parameters by reference or by value &lt;/span&gt;&lt;/p&gt; &lt;p&gt; With the exception of the return value (&lt;span class="qtext"&gt;RETURNING&lt;/span&gt; parameters), parameters can be passed both by value or reference. Passing by reference is standard with methods. If only a name &lt;span class="qtext"&gt;p&lt;/span&gt; is specified in the parameter declaration, the parameter is passed implicitly as a reference. If a &lt;span class="bold"&gt;&lt;span class="qtext"&gt;VALUE(p)&lt;/span&gt;&lt;/span&gt; is specified instead, then the parameter is passed as a value. The return value may only be passed as a value. Passing by reference can also be explicitly specified  with other parameters using &lt;span class="bold"&gt;&lt;span class="qtext"&gt;REFERENCE(p)&lt;/span&gt;&lt;/span&gt;. An &lt;span class="qtext"&gt;IMPORTING&lt;/span&gt; parameter transferred by reference, cannot be changed in the method.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Typing parameters&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt; All parameters must be &lt;span class="grey"&gt;typed&lt;/span&gt; during declaration using the addition &lt;span class="bold"&gt;&lt;span class="qtext"&gt;TYPE&lt;/span&gt;&lt;/span&gt; or the addition &lt;span class="bold"&gt;&lt;span class="qtext"&gt;LIKE&lt;/span&gt;&lt;/span&gt;. The following entries are allowed after &lt;span class="bold"&gt;&lt;span class="qtext"&gt;TYPE&lt;/span&gt;&lt;/span&gt; as parameter types:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Optional parameters&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt; All input parameters (&lt;span class="qtext"&gt;IMPORTING&lt;/span&gt;, &lt;span class="qtext"&gt;CHANGING&lt;/span&gt; parameters) can be defined in the declaration as optional parameters using the additions &lt;span class="qtext"&gt;OPTIONAL&lt;/span&gt; or &lt;span class="qtext"&gt;DEFAULT&lt;/span&gt;. These parameters must not necessarily be transfered when the method is called. With the addition &lt;span class="qtext"&gt;OPTIONAL&lt;/span&gt; your parameter remains initialized according to type, while the addition &lt;span class="qtext"&gt;DEFAULT&lt;/span&gt; allows you to enter a start value. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-4847918643492926155?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/4847918643492926155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=4847918643492926155' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4847918643492926155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4847918643492926155'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/interface-parameters-in-methods.html' title='Interface Parameters in Methods'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-2994745737615476689</id><published>2009-06-23T15:44:00.001+05:30</published><updated>2009-06-23T15:44:30.938+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Components of classes'/><title type='text'>Data Types and Constants</title><content type='html'>&lt;p&gt;&lt;span class="h2"&gt; Data Types &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Independent Types &lt;/span&gt;&lt;/p&gt; &lt;p&gt; You can use the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;TYPES&lt;/span&gt;&lt;/span&gt; statement to define any number of your own ABAP data types within a class. Types are not instance-specific and are only available once for all the objects in the class. &lt;/p&gt; &lt;p&gt; In particular, it is possible to define data types in the public visibility section of global classes, which makes the use of &lt;span class="grey"&gt;type groups&lt;/span&gt; in this context obsolete. &lt;/p&gt; &lt;p&gt;&lt;span class="h3"&gt; Bound Data Types &lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;span class="grey"&gt;Bound data types&lt;/span&gt; that occur as properties of instance or static attributes also belong to the static attributes of a class. After a &lt;span class="qtext"&gt;LIKE&lt;/span&gt; addition, the class name can be used to access the properties of instance attributes (exceptions to this rule are the statements &lt;span class="qtext"&gt;ASSIGN ... CASTING&lt;/span&gt; and &lt;span class="qtext"&gt;SELECT-OPTIONS ... FOR&lt;/span&gt;). In addition, a reference variable can be used with an object component selector without the object having previously been generated. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Constants &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Constants are special &lt;span class="grey"&gt;static attributes&lt;/span&gt; for which values are specified when they are declared. These values cannot be changed later. Use the  &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CONSTANTS&lt;/span&gt;&lt;/span&gt; statement to declare constants. Constants are not instance-specific - they are only available once for all the objects in the class. &lt;/p&gt; &lt;p&gt; In particular, it is possible to declare constants in the public visibility section of global classes, which makes the use of &lt;span class="grey"&gt;type groups&lt;/span&gt; in this context obsolete. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-2994745737615476689?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/2994745737615476689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=2994745737615476689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2994745737615476689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2994745737615476689'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/data-types-and-constants.html' title='Data Types and Constants'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-2511626995047607128</id><published>2009-06-23T15:43:00.001+05:30</published><updated>2009-06-23T15:43:54.728+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Components of classes'/><title type='text'>Events In Components of classes</title><content type='html'>n ABAP Objects, &lt;span class="blue"&gt;events&lt;/span&gt; are declared as components of classes. SAP makes a distinction between instance events and static events. Triggers and handlers can be objects and classes, depending on whether they are instance events, static events, or event handlers.  &lt;p&gt;&lt;span class="h2"&gt; Instance events &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Instance events are declared using the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;EVENTS&lt;/span&gt;&lt;/span&gt; statement. They can only be triggered in instance methods. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Static events &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Static events are declared using the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS-EVENTS&lt;/span&gt;&lt;/span&gt; statement. All methods (instance or static) can trigger them, but only static events can be triggered by static methods. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-2511626995047607128?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/2511626995047607128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=2511626995047607128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2511626995047607128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/2511626995047607128'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/events-in-components-of-classes.html' title='Events In Components of classes'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-7757109397482044470</id><published>2009-06-23T15:42:00.000+05:30</published><updated>2009-06-23T15:43:04.150+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Components of classes'/><title type='text'>Constructors In Components of Classes</title><content type='html'>&lt;p&gt; Constructors are special methods that produce a defined initial state for objects and classes. The state of an object is determined by its &lt;span class="grey"&gt;instance attributes&lt;/span&gt; and &lt;span class="grey"&gt;static attributes&lt;/span&gt;. You can assign contents to attributes using the &lt;span class="qtext"&gt;VALUE&lt;/span&gt; addition in the &lt;span class="qtext"&gt; DATA&lt;/span&gt; statement. Constructors are necessary when you want to set the initial state of an object dynamically. &lt;/p&gt; &lt;p&gt; Like normal methods, there are two types of constructor - instance constructors and static constructors. &lt;/p&gt; &lt;p&gt; For inheritance, some special rules apply to constructors that are not described here. These are covered in more detail in the &lt;span class="blue"&gt;inheritance context&lt;/span&gt;. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Instance Constructors &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Each class has one instance constructor. It is a predefined instance method of the &lt;span class="qtext"&gt;CONSTRUCTOR&lt;/span&gt; class. If you want to use the instance constructor, the &lt;span class="qtext"&gt;constructor&lt;/span&gt; method must be declared in a visibility area of the class using the &lt;span class="blue"&gt;&lt;span class="qtext"&gt; METHODS&lt;/span&gt;&lt;/span&gt; statement, and implemented in the implementation section. The visibility area in which the instance constructor can be declared, must be more general or equal to the instantiability defined by the addition &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CREATE&lt;/span&gt;&lt;/span&gt; of the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS&lt;/span&gt;&lt;/span&gt; statement, where the most specialized area is recommended. Unless it is explicitly declared, the instance constructor is an implicit method, which inherits and accesses the interface from the instance constructor in the upper class. &lt;/p&gt; &lt;p&gt; The declaration is carried out in a visibility area  of the declaration part due to technical reasons. The actual visibility of the instance constructor is controlled by the &lt;span class="qtext"&gt;CREATE PUBLIC|PROTECTED|PRIVATE&lt;/span&gt; additions of the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS&lt;/span&gt;&lt;/span&gt; statement. For more information refer to &lt;span class="blue"&gt;Visibility of Instance Constructors&lt;/span&gt;. &lt;/p&gt; &lt;p&gt; Instance constructors are called once for each instance. They are called automatically, immediately after you have created an instance using the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CREATE OBJECT&lt;/span&gt;&lt;/span&gt; statement. It is not possible to call an instance constructor directly using the &lt;span class="qtext"&gt;CALL METHOD&lt;/span&gt; statement. &lt;/p&gt; &lt;p&gt; An instance constructor can contain an interface with &lt;span class="qtext"&gt;IMPORTING&lt;/span&gt; parameters and exceptions. You define the interface using the same syntax as for normal methods in the &lt;span class="blue"&gt; &lt;span class="qtext"&gt;METHODS&lt;/span&gt;&lt;/span&gt; statement. The fact that there are no exporting parameters shows that constructors serve only to define the state of an object and have no other function. To transfer parameters and handle exceptions, use the &lt;span class="qtext"&gt;EXPORTING&lt;/span&gt; and &lt;span class="qtext"&gt;EXCEPTIONS&lt;/span&gt; additions to the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CREATE OBJECT&lt;/span&gt;&lt;/span&gt; statement. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Static Constructors &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Each class has a single static constructor. This is a predefined, public, &lt;span class="grey"&gt;static method&lt;/span&gt; of the class named &lt;span class="qtext"&gt;constructor&lt;/span&gt;. If you want to use the static constructor, you must declare the static method &lt;span class="qtext"&gt;class_constructor&lt;/span&gt; in the public section of the declaration part of the class using the &lt;span class="blue"&gt;&lt;span class="qtext"&gt; CLASS-METHODS&lt;/span&gt;&lt;/span&gt; statement, and implement it in the implementation part. The static constructor has no interface parameters and cannot trigger exceptions. Unless you declare it explicitly, it is merely an empty method. &lt;/p&gt; &lt;p&gt; The static constructor is called once per class and internal session. It is called automatically for the class &lt;span class="qtext"&gt;class&lt;/span&gt; before the class is accessed for the first time - that is, before one of the following actions:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Generating an instance of a class using &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CREATE OBJECT obj&lt;/span&gt;&lt;/span&gt;, where &lt;span class="qtext"&gt;obj&lt;/span&gt; has the data type &lt;span class="qtext"&gt;REF TO class&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Calling a static method using &lt;span class="blue"&gt;&lt;span class="qtext"&gt;[CALL METHOD] class=&gt;meth&lt;/span&gt;&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Registering a static &lt;span class="grey"&gt;event handler&lt;/span&gt; using &lt;span class="blue"&gt;&lt;span class="qtext"&gt;SET HANDLER class=&gt;meth for obj&lt;/span&gt;&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Registering an event handler for a &lt;span class="blue"&gt;static event&lt;/span&gt; of the class &lt;span class="qtext"&gt;class&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Addressing a &lt;span class="blue"&gt;static attribute&lt;/span&gt; with &lt;span class="qtext"&gt;class=&gt;a&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The static constructor is always called immediately before the action is executed, with one exception: If your first access to the class is to address a static attribute, the static constructor is executed at the beginning of the &lt;span class="grey"&gt;processing block&lt;/span&gt; (dialog module, event block, procedure) in which access takes place. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Notes &lt;/span&gt;&lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;The point at which the static constructor is called has not yet been finalized. SAP only guarantees that it will be called before the class is accessed for the first time. For this reason, static methods may be executed before the static constructor was ended.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;The execution sequence of static constructors is dependent on the program flow. Static constructors must be implemented in such a way that they can be executed in any sequence.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-7757109397482044470?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/7757109397482044470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=7757109397482044470' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/7757109397482044470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/7757109397482044470'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/constructors-in-components-of-classes.html' title='Constructors In Components of Classes'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-3839477818935517188</id><published>2009-06-23T15:41:00.000+05:30</published><updated>2009-06-23T15:42:05.153+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Components of classes'/><title type='text'>Methods in Components of classes</title><content type='html'>&lt;p&gt; Methods are internal &lt;span class="grey"&gt;procedures&lt;/span&gt; of a class that determine the behavior of an object. They can access all the attributes of their class and can thus change the object status. Methods have a parameter interface, through which the system passes values to them when they are called, and through which they can return values to the caller. The private attributes of a class can only be changed using methods. &lt;/p&gt; &lt;p&gt; A method &lt;span class="qtext"&gt;meth&lt;/span&gt; is declared in the &lt;span class="grey"&gt;declaration section&lt;/span&gt; of a class and in the &lt;span class="grey"&gt;implementation part&lt;/span&gt; of the class using the &lt;span class="grey"&gt;processing block&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="blue"&gt;&lt;span class="qtext"&gt;METHOD meth.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  ...&lt;/span&gt;&lt;br /&gt;&lt;span class="blue"&gt;&lt;span class="qtext"&gt;ENDMETHOD.&lt;/span&gt;&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; You can declare local data types and data objects in methods, just as in all procedures. Methods are called using the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CALL METHOD&lt;/span&gt;&lt;/span&gt; statement or one of its abbreviated forms. You can also call the method dynamically (dynamic invoke). &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Instance Methods &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Instance methods are declared using the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;METHODS&lt;/span&gt;&lt;/span&gt; statement. They can access all the attributes of a class and can trigger all its events. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Static Methods &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Static methods are declared using the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS-METHODS&lt;/span&gt;&lt;/span&gt; statement. They can access &lt;span class="grey"&gt;static attributes&lt;/span&gt; of a class and are only allowed to trigger &lt;span class="grey"&gt;static events&lt;/span&gt;. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Constructors &lt;/span&gt;&lt;/p&gt; &lt;p&gt; As well as the normal methods that are called using &lt;span class="qtext"&gt;CALL METHOD&lt;/span&gt;, there are two special methods called &lt;span class="blue"&gt;&lt;span class="qtext"&gt;constructor&lt;/span&gt; and &lt;span class="qtext"&gt;class_constructor&lt;/span&gt;&lt;/span&gt;, which are called implicitly when an object is created or when a class component is accessed for the first time. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Functional Methods &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Functional methods are methods with any number of &lt;span class="qtext"&gt;IMPORTING&lt;/span&gt; parameters and one &lt;span class="blue"&gt;&lt;span class="qtext"&gt;RETURNING&lt;/span&gt;&lt;/span&gt; parameter. Functional methods cannot only be called using &lt;span class="qtext"&gt;CALL METHOD&lt;/span&gt;. The following expressions can also be used to insert them at &lt;span class="blue"&gt;operand positions for functions and expressions&lt;/span&gt;:&lt;br /&gt;&lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Functional method without &lt;span class="qtext"&gt;IMPORTING&lt;/span&gt; parameters:&lt;br /&gt;&lt;br /&gt;&lt;span class="qtext"&gt;meth( )&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Functional method with a non-optional &lt;span class="qtext"&gt;IMPORTING&lt;/span&gt; parameter or a number of optional &lt;span class="qtext"&gt;IMPORTING&lt;/span&gt; parameters with a preferred parameter:&lt;br /&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  meth( f1 )&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Functional method with &lt;span class="qtext"&gt;IMPORTING&lt;/span&gt; parameters:&lt;br /&gt;&lt;br /&gt;&lt;span class="qtext"&gt;  meth( p1 = f1 ... pn = fn )&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; At this operand position it is also possible to link function modules together to make &lt;span class="grey"&gt;method chains&lt;/span&gt;. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="h4"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-3839477818935517188?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/3839477818935517188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=3839477818935517188' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3839477818935517188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3839477818935517188'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/methods-in-components-of-classes.html' title='Methods in Components of classes'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-3705662062863107412</id><published>2009-06-23T15:40:00.000+05:30</published><updated>2009-06-23T15:41:07.087+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Components of classes'/><title type='text'>Attributes</title><content type='html'>&lt;p&gt; Attributes are internal data objects of any ABAP data type within a class. The content of the attributes specifies the status of the object. You can also define reference variables, which you can then use to create and address objects. This allows objects to be accessed within classes. &lt;/p&gt; &lt;p&gt; Attributes are defined in the declaration part of a class. Public attributes are completely visible from outside the class and as such are part of the interface between objects and their user. To encapsulate the status of the object, you need to use protected or private attributes. You can also limit the changeability of non-private attributes using the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;READ-ONLY&lt;/span&gt;&lt;/span&gt; addition during the declaration. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Instance Attributes &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The content of instance attributes forms the instance-specific status of the object. Instance attributes are declared using the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;DATA&lt;/span&gt;&lt;/span&gt; statement. You cannot use the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;COMMON PART&lt;/span&gt;&lt;/span&gt; addition in classes. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Static Attributes &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The content of static attributes forms the instance-independent status of the object, which is valid for all instances of the class. Static attributes are available once for each class. They are declared using the &lt;span class="blue"&gt;&lt;span class="qtext"&gt;CLASS-DATA&lt;/span&gt;&lt;/span&gt; statement and are retained throughout the entire runtime. All the objects within a class can access its static attributes. Changes to a static attribute in an object are visible to all other objects within that class. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Data Types of Attributes &lt;/span&gt;&lt;/p&gt; &lt;p&gt; The data types of all attributes including the instance attributes and in particular the &lt;span class="grey"&gt;bound data types&lt;/span&gt; belong to the static properties of a class. Therefore, in a &lt;span class="qtext"&gt;LIKE&lt;/span&gt; addition, you can use the class component selector or reference variables to refer to the visible attributes of a class without first creating an object. In this way, the access to the properties of the public static attributes of global classes is possible in every program. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Reference to the data type of an instance attribute &lt;span class="qtext"&gt;attr&lt;/span&gt; of a global class &lt;span class="qtext"&gt;cl_global&lt;/span&gt;. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext"&gt;DATA dref TYPE REF TO cl_global.&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;DATA:  f1 LIKE cl_global=&gt;attr,&lt;/span&gt;&lt;br /&gt;&lt;span class="qtext"&gt;       f2 LIKE dref-&gt;attr.&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;&lt;span class="h2"&gt; Boxed Components &lt;/span&gt;&lt;/p&gt; &lt;p&gt; Attributes declared as structures can be declared as &lt;span class="grey"&gt;boxed components&lt;/span&gt; using the addition &lt;span class="blue"&gt;&lt;span class="qtext"&gt;BOXED&lt;/span&gt;&lt;/span&gt;, like substructures of nested structures. In boxed components, &lt;span class="grey"&gt;initial value sharing&lt;/span&gt;causes less memory to be used for little used structures of much used objects. A boxed component is a deep component administered using an internal reference, like strings and internal tables. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-3705662062863107412?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/3705662062863107412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=3705662062863107412' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3705662062863107412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3705662062863107412'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/attributes.html' title='Attributes'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-7708732458537624607</id><published>2009-06-23T15:39:00.001+05:30</published><updated>2009-06-23T15:39:56.976+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Classes'/><title type='text'>Visibility Sections in Classes</title><content type='html'>&lt;p&gt; The &lt;span class="grey"&gt;declaration section&lt;/span&gt; of a class can be split into up to three different visibility sections. &lt;/p&gt; &lt;p&gt; These sections define the external visibility of the &lt;span class="blue"&gt;class components&lt;/span&gt; and therefore the interfaces of the class for all users allowed by the &lt;span class="grey"&gt;package concept&lt;/span&gt;. Each component of a class must be explicitly assigned to one of the visibility sections. &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="bold"&gt;Public visibility section&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;All components declared in the public visibility section defined with &lt;span class="blue"&gt;&lt;span class="qtext"&gt;PUBLIC SECTION&lt;/span&gt;&lt;/span&gt; are accessible to all users as well as in the methods of all heirs and in the class itself. The public components are the interface of the class to each user.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="bold"&gt;Protected visibility section&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;All components declared in the protected visibility section defined with &lt;span class="blue"&gt;&lt;span class="qtext"&gt;PROTECTED SECTION&lt;/span&gt;&lt;/span&gt; are accessible in the methods of all heirs and in the class itself. The protected components form a specific interface between the class and its subclasses.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="bold"&gt;Private visibility section&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;All components declared in the private visibility section defined with &lt;span class="blue"&gt;&lt;span class="qtext"&gt;PRIVATE SECTION&lt;/span&gt;&lt;/span&gt; are only accessible in the methods of the class itself, and are not even visible to the heirs. The private components therefore do not form an interface to the users of the class.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; The following table groups the visibilities for a class: &lt;/p&gt; &lt;table border="1"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;span class="bold"&gt;Visible for&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;PUBLIC SECTION&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;PROTECTED SECTION&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class="qtext"&gt;PRIVATE SECTION&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Same class and its friends&lt;/td&gt; &lt;td&gt;X&lt;/td&gt; &lt;td&gt;X&lt;/td&gt; &lt;td&gt;X&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Any subclasses&lt;/td&gt; &lt;td&gt;X&lt;/td&gt; &lt;td&gt;X&lt;/td&gt; &lt;td&gt;-&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Any Repository objects&lt;/td&gt; &lt;td&gt;X&lt;/td&gt; &lt;td&gt;-&lt;/td&gt; &lt;td&gt;-&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt; A subclass cannot access the protected components from a subclass of a different branch in the hierarchy that is inherited from a common superclass. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Encapsulation &lt;/span&gt;&lt;/p&gt; &lt;p&gt;The three visibility sections form the basis for the important object property of encapsulation in ABAP Objects. When declaring a class, you should declare the minimum possible number of components in the public section and these public components must be created carefully. For global classes, they can no longer be changed after the class is released. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt;The class is the smallest encapsulation unit in ABAP Objects. A method can therefore use all components of all instances of the same class, except for the components of its own class. The exceptions to this rule are subclasses, which cannot access the private components of superclasses if they are not their &lt;span class="blue"&gt;friends&lt;/span&gt;. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Example &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In the method &lt;span class="qtext"&gt;m1&lt;/span&gt; of the class &lt;span class="qtext"&gt;c1&lt;/span&gt;, reference variables of the static type &lt;span class="qtext"&gt;c1&lt;/span&gt; can be used to access the protected attribute &lt;span class="qtext"&gt; a11&lt;/span&gt; and the private attribute &lt;span class="qtext"&gt;a12&lt;/span&gt; of any objects of &lt;span class="qtext"&gt;c1&lt;/span&gt;. In the method &lt;span class="qtext"&gt;m2&lt;/span&gt; of the subclass &lt;span class="qtext"&gt;c2&lt;/span&gt;, a reference variable of the static type &lt;span class="qtext"&gt;c2&lt;/span&gt; can similarly be used to access the protected attribute &lt;span class="qtext"&gt;a11&lt;/span&gt;. Access to the attribute using a reference variable of the static type &lt;span class="qtext"&gt;c1&lt;/span&gt; is not permitted, as otherwise it would also be possible to access an object of the superclass or another subclass. It is not possible to access the private attribute of the superclass with either reference variable. &lt;/p&gt; &lt;dl&gt;&lt;dd&gt; &lt;span class="qtext"&gt;CLASS c1 DEFINITION.&lt;br /&gt;  PUBLIC SECTION.&lt;br /&gt;    METHODS m1.&lt;br /&gt;  PROTECTED SECTION.&lt;br /&gt;    DATA a11 TYPE i.&lt;br /&gt;  PRIVATE SECTION.&lt;br /&gt;    DATA a12 TYPE i.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS c1 IMPLEMENTATION.&lt;br /&gt;  METHOD m1.&lt;br /&gt;&lt;br /&gt;    DATA lref1 TYPE REF TO c1.&lt;br /&gt;&lt;br /&gt;    lref1-&gt;a11 = 0. "OK&lt;br /&gt;&lt;br /&gt;    lref1-&gt;a12 = 0. "OK&lt;br /&gt;&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS c2 DEFINITION INHERITING FROM c1.&lt;br /&gt;  PUBLIC SECTION.&lt;br /&gt;    METHODS m2.&lt;br /&gt;ENDCLASS.&lt;br /&gt;&lt;br /&gt;CLASS c2 IMPLEMENTATION.&lt;br /&gt;  METHOD m2.&lt;br /&gt;&lt;br /&gt;    DATA: lref1 TYPE REF TO c1,&lt;br /&gt;          lref2 TYPE REF TO c2.&lt;br /&gt;&lt;br /&gt;    lref1-&gt;a11 = 0. "Syntax warning, access to a11 not permitted&lt;br /&gt;&lt;br /&gt;    lref2-&gt;a11 = 0. "OK&lt;br /&gt;&lt;br /&gt;    lref1-&gt;a12 = 0. "Syntax error, access to a11 not permitted&lt;br /&gt;&lt;br /&gt;    lref2-&gt;a12 = 0. "Syntax error, a12 not visible&lt;br /&gt;&lt;br /&gt;  ENDMETHOD.&lt;br /&gt;ENDCLASS.&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-7708732458537624607?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/7708732458537624607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=7708732458537624607' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/7708732458537624607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/7708732458537624607'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/visibility-sections-in-classes.html' title='Visibility Sections in Classes'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-4795011979870753487</id><published>2009-06-23T15:38:00.001+05:30</published><updated>2009-06-23T15:38:55.554+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Classes'/><title type='text'>Components of Classes</title><content type='html'>&lt;p&gt; The content of a class is composed of components. The components define the attributes of &lt;span class="blue"&gt;objects&lt;/span&gt; of a class. Each component is declared in the &lt;span class="blue"&gt;definition&lt;/span&gt; of the class in one of the four &lt;span class="blue"&gt;visibility areas&lt;/span&gt; that the interfaces define externally. Within a class, all its components are visible. All components are in the same namespace, which means that the names of all components in a class must be different. &lt;/p&gt; &lt;p&gt; The individual components are:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Attributes&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Methods&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Events&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="blue"&gt;Types and Constants&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;SAP makes a distinction between components of this type that are available on an instance-dependent basis for every object, and components that are only available once in a class and are instance-independent. The instance-dependent components are called &lt;span class="grey"&gt;instance components&lt;/span&gt;, the instance-independent components are known as &lt;span class="grey"&gt;static components&lt;/span&gt;. &lt;/p&gt; &lt;p&gt;In ABAP Objects, classes can define the components listed above. Since all components that can be declared in classes can also be declared in interfaces, this description also applies for interfaces. &lt;/p&gt; &lt;p&gt; The components of classes can be &lt;span class="blue"&gt;accessed&lt;/span&gt; from inside, and depending on the visibility, also from outside the class. If they are accessed from externally, &lt;span class="grey"&gt;component selectors&lt;/span&gt; must be used for addressing.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-4795011979870753487?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/4795011979870753487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=4795011979870753487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4795011979870753487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4795011979870753487'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/components-of-classes.html' title='Components of Classes'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-1963087704751879697</id><published>2009-06-23T15:37:00.001+05:30</published><updated>2009-06-23T15:37:54.493+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ABAP Objects'/><title type='text'>Classes</title><content type='html'>&lt;p&gt; The type of an &lt;span class="grey"&gt;object&lt;/span&gt; is known as its class. A class is an abstract representation, or, metaphorically speaking, a set of instructions for building objects. So that you can describe the properties of objects, classes contain &lt;span class="blue"&gt;components&lt;/span&gt;, which define the state and behavior  of objects. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Global and Local Classes &lt;/span&gt;&lt;/p&gt; &lt;p&gt; You can &lt;span class="blue"&gt;define&lt;/span&gt; classes globally in the class library in the &lt;span class="grey"&gt;repository&lt;/span&gt; or locally in an ABAP program. &lt;/p&gt; &lt;p&gt; Global classes are coded in a special ABAP program, a &lt;span class="grey"&gt;class pool&lt;/span&gt;, whereas local classes can be coded in almost every ABAP program. Global classes can be used and are visible in all ABAP programs, which is the case for local classes only in their own program. When a global class is used for the first time, the class pool is loaded into the &lt;span class="grey"&gt;internal mode&lt;/span&gt; of the user. The local classes of a class pool can be used by the pool's global classes. &lt;/p&gt; &lt;p&gt;Except for the storage type and the visibility, there are hardly any conceptual differences between global and local classes. One of the few differences is that in the public interface of a global class only references to public types are possible. These types are subdivided into global and local &lt;span class="grey"&gt;friends&lt;/span&gt;. &lt;/p&gt; &lt;p&gt;In principle, it also does not make any difference if you call a method of a local or global class. This is the reason why classes that are used by several programs are exclusively created in the class library. You should avoid, if possible, to reuse local classes using &lt;span class="grey"&gt;include programs&lt;/span&gt;. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-1963087704751879697?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/1963087704751879697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=1963087704751879697' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/1963087704751879697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/1963087704751879697'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/classes.html' title='Classes'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-1766290107940988309</id><published>2009-06-23T15:35:00.000+05:30</published><updated>2009-06-23T15:36:49.596+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ABAP Keyword Documentation'/><title type='text'>ABAP Objects</title><content type='html'>&lt;p&gt; ABAP Objects is the object-oriented extension of ABAP. &lt;/p&gt; &lt;p&gt; ABAP Objects contains a complete set of &lt;span class="blue"&gt;language elements&lt;/span&gt; that allow object-oriented programming on the basis of classes and interfaces. Object orientation in ABAP builds on the existing language, and is largely compatible with it. You can use ABAP Objects in existing programs. Vice versa, the &lt;span class="blue"&gt;Statements in ABAP Objects&lt;/span&gt; cover almost the complete ABAP language set; however, specific &lt;span class="blue"&gt;Obsolete Language Constructs&lt;/span&gt; are not allowed in connection with ABAP objects due to a clean-up of the ABAP language. &lt;/p&gt; &lt;p&gt;  &lt;/p&gt; &lt;p&gt; ABAP Objects supports:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;dl&gt;&lt;dd&gt;       &lt;span class="blue"&gt;Classes&lt;/span&gt;&lt;br /&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;dl&gt;&lt;dd&gt;       &lt;span class="blue"&gt;Interfaces&lt;/span&gt;&lt;br /&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;dl&gt;&lt;dd&gt;       &lt;span class="blue"&gt;Objects&lt;/span&gt;&lt;br /&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;dl&gt;&lt;dd&gt;       &lt;span class="blue"&gt;Object references&lt;/span&gt;&lt;br /&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;dl&gt;&lt;dd&gt;       &lt;span class="blue"&gt;Inheritance&lt;/span&gt;&lt;br /&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt;  The package SABAP_DEMOS_CAR_RENTAL contains a complete example application written in ABAP objects, for which the presentation layer is realized using a &lt;span class="lnkgrey"&gt;Web Dynpro&lt;/span&gt;. The Web Dynpro calls interface methods that are implemented in a class that, in turn, accesses classes that perform database accesses&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-1766290107940988309?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/1766290107940988309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=1766290107940988309' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/1766290107940988309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/1766290107940988309'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/abap-objects.html' title='ABAP Objects'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-5650317370372615651</id><published>2009-06-23T15:32:00.000+05:30</published><updated>2009-06-23T15:33:41.192+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ABAP Keyword Documentation'/><title type='text'>ABAP Programming Language - Overview</title><content type='html'>&lt;p&gt; ABAP is a programming language developed by SAP for programming commercial applications in the SAP environment. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; ABAP and SAP NetWeaver &lt;/span&gt;&lt;/p&gt; &lt;p&gt; In SAP NetWeaver, ABAP is the programming interface of the &lt;span class="grey"&gt;Application Server ABAP&lt;/span&gt; (AS ABAP). Prerequisite for the use of the ABAP programming language is the installation of an Application Server ABAP. Most of the components of an AS ABAP can be organized according to their tasks in the layers of a three-tier client-server architecture with presentation, application, and database layers. &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;The &lt;span class="grey"&gt;presentation layer&lt;/span&gt; is distributed on the workstations of individual users and represents the user interface of an AS ABAP ( &lt;span class="grey"&gt;SAP GUI&lt;/span&gt; or Web browser).&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;The &lt;span class="grey"&gt;application layer&lt;/span&gt; is realized by one or more &lt;span class="grey"&gt;application servers&lt;/span&gt;. The &lt;span class="grey"&gt;ABAP runtime environment&lt;/span&gt; contains the ABAP runtime environment in which ABAP programs are executed.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;The &lt;span class="grey"&gt;database layer&lt;/span&gt; consists of a &lt;span class="grey"&gt;database system&lt;/span&gt; in which the central dataset of an AS ABAP is stored.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; Next to the three layers are the following communication components: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="grey"&gt;Internet Communication Manager&lt;/span&gt; (ICM)&lt;/li&gt;&lt;/ul&gt; &lt;dl&gt;&lt;dd&gt;The Internet Communication Manager is a process of AS ABAP and allows direct communication with the internet via HTTP/HTTPS/SMTP. The ICM can be used to connect Web-based presentation components such as Web Dynpro ABAP and BSP. The ICM also allows an AS ABAP to work both as a client and as a server for Web Services. To access the ICM from within ABAP programs, the classes and interfaces of the &lt;span class="grey"&gt;Internet Communication Framework&lt;/span&gt; (ICF) are used. &lt;/dd&gt;&lt;/dl&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="grey"&gt;RFC interface&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;dl&gt;&lt;dd&gt; This is the classical functional interface of AS ABAP. A Remote Function Call is a call of a function in system different from the one in which the calling program is running. Calls are possible between different AS ABAP or between an AS ABAP and an external system. On an AS ABAP, the functions are realized in function modules. In external systems, specially programmed functions are called whose interface simulates a function module. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; The main role of ABAP programs in the application layer is the processing and formatting of data from the database layer and its transfer to, and receipt of input from the presentation layer or the communication components. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Scope and Application Areas of ABAP &lt;/span&gt;&lt;/p&gt; &lt;p&gt; ABAP is a 4GL language developed specifically for the mass processing of data in commercial applications. It offers the following advantages in comparison to elementary languages in which these functions are stored in libraries: &lt;/p&gt; &lt;ul class="disc"&gt;&lt;li&gt;Database access integrated into the language as &lt;span class="grey"&gt;Open SQL&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;Performance optimization of database accesses integrated into the ABAP runtime environment through the use of &lt;span class="grey"&gt;SAP buffering&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;&lt;span class="grey"&gt;Internal tables&lt;/span&gt; for dynamic storage and processing of tabular mass data in the working memory.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;The concept of Online Transaction Processing (OLTP integrated in the ABAP runtime environment, enabling several users to access the central database at the same time using the &lt;span class="grey"&gt;SAP LUW&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;The language has an integrated interface to other programming environments via &lt;span class="grey"&gt;Remote Function Call&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;ul class="disc"&gt;&lt;li&gt;The language has an integrated interface to &lt;span class="grey"&gt;XML&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The integration of these functions into the language is particularly advantageous for the static checkability and the performance of programs. In return, this means that ABAP also contains considerably more language elements than an elementary programming language. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Programming Models &lt;/span&gt;&lt;/p&gt; &lt;p&gt; ABAP supports an object-oriented programming model that is based on &lt;span class="grey"&gt;classes&lt;/span&gt; and &lt;span class="grey"&gt;interfaces&lt;/span&gt;and a procedural model based on &lt;span class="grey"&gt;subroutines&lt;/span&gt; and &lt;span class="grey"&gt;function modules&lt;/span&gt;. Both models are interoperable. &lt;/p&gt; &lt;p&gt;&lt;span class="h4"&gt; Note &lt;/span&gt;&lt;/p&gt; &lt;p&gt;  We recommend that you use &lt;span class="grey"&gt;ABAP Objects&lt;/span&gt; as much as possible for both new projects and for redesigning existing projects. &lt;/p&gt; &lt;p&gt;&lt;span class="h2"&gt; Multilingual Capability &lt;/span&gt;&lt;/p&gt; &lt;p&gt;ABAP programs can be programmed completely independently of language. This is enabled by the extraction of language-specific program components from the source code, which are then reloaded during program execution according to the environment. A &lt;span class="grey"&gt;text environment&lt;/span&gt; determines the precise program behavior, for example the order in which text is sorted, at runtime. ABAP supports &lt;span class="grey"&gt;code pages&lt;/span&gt;, &lt;span class="grey"&gt;single-byte code&lt;/span&gt;, &lt;span class="grey"&gt;double byte code&lt;/span&gt;, and &lt;span class="grey"&gt;Unicode&lt;/span&gt;. For use in a &lt;span class="grey"&gt;Unicode system&lt;/span&gt;, a program must fulfill certain prerequisites and be identified as a &lt;span class="grey"&gt;Unicode program&lt;/span&gt;. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-5650317370372615651?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/5650317370372615651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=5650317370372615651' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5650317370372615651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5650317370372615651'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/abap-programming-language-overview.html' title='ABAP Programming Language - Overview'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-9183791952294163287</id><published>2009-06-17T21:25:00.002+05:30</published><updated>2009-06-17T21:26:38.632+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ABAP Database Access'/><title type='text'>Example of a Logical Database</title><content type='html'>&lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;Let us consider the logical database TEST_LDB.&lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Structure&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/9f/db9be035c111d1829f0000e829fbfe/Image648.gif" /&gt;&lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Selections in the Selection Include&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;   SELECT-OPTIONS: SLIFNR   FOR LFA1-LIFNR,&lt;br /&gt;                   SBUKRS   FOR LFB1-BUKRS,&lt;br /&gt;                   SGJAHR   FOR LFC1-GJAHR,&lt;br /&gt;                   SBELNR   FOR BKPF-BELNR. &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Database Program&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;*-------------------------------------------------------*&lt;br /&gt;* DATABASE PROGRAM OF THE LOGICAL DATABASE TEST_LDB&lt;br /&gt;*-------------------------------------------------------*&lt;br /&gt;PROGRAM SAPDBTEST_LDB DEFINING DATABASE TEST_LDB.&lt;br /&gt;TABLES: LFA1,&lt;br /&gt;        LFB1,&lt;br /&gt;        LFC1,&lt;br /&gt;        BKPF. &lt;/p&gt;&lt;p&gt;*-------------------------------------------------------*&lt;br /&gt;* Initialize selection screen (process before PBO)&lt;br /&gt;*-------------------------------------------------------*&lt;br /&gt;FORM INIT.&lt;br /&gt; ....&lt;br /&gt;ENDFORM.                                "INIT &lt;/p&gt;&lt;p&gt;*-------------------------------------------------------*&lt;br /&gt;* PBO of selection screen (always before selection&lt;br /&gt;* screen&lt;br /&gt;*-------------------------------------------------------*&lt;br /&gt;FORM PBO.&lt;br /&gt; ....&lt;br /&gt;ENDFORM.                                "PBO &lt;/p&gt;&lt;p&gt;*-------------------------------------------------------*&lt;br /&gt;* PAI of selection screen (process always after ENTER)&lt;br /&gt;*-------------------------------------------------------*&lt;br /&gt;FORM PAI USING FNAME MARK.&lt;br /&gt;  CASE FNAME.&lt;br /&gt;    WHEN 'SLIFNR'.&lt;br /&gt;     ....&lt;br /&gt;    WHEN 'SBUKRS'.&lt;br /&gt;     ....&lt;br /&gt;    WHEN 'SGJAHR'.&lt;br /&gt;     ....&lt;br /&gt;    WHEN 'SBELNR'.&lt;br /&gt;     ....&lt;br /&gt;  ENDCASE.&lt;br /&gt;ENDFORM.                                "PAI&lt;/p&gt;&lt;p&gt;*-------------------------------------------------------*&lt;br /&gt;* Call event GET LFA1&lt;br /&gt;*-------------------------------------------------------*&lt;br /&gt;FORM PUT_LFA1.&lt;br /&gt;  SELECT * FROM LFA1&lt;br /&gt;          WHERE LIFNR      IN SLIFNR.&lt;br /&gt;    PUT LFA1.&lt;br /&gt;  ENDSELECT.&lt;br /&gt;ENDFORM.                                "PUT_LFA1&lt;/p&gt;&lt;p&gt;*-------------------------------------------------------*&lt;br /&gt;* Call event GET LFB1&lt;br /&gt;*-------------------------------------------------------*&lt;br /&gt;FORM PUT_LFB1.&lt;br /&gt;  SELECT * FROM LFB1&lt;br /&gt;          WHERE LIFNR      =  LFA1-LIFNR&lt;br /&gt;            AND BUKRS      IN SBULRS.&lt;br /&gt;    PUT LFB1.&lt;br /&gt;  ENDSELECT.&lt;br /&gt;ENDFORM.                                "PUT_LFB1 &lt;/p&gt;&lt;p&gt;*-------------------------------------------------------*&lt;br /&gt;* Call event GET LFC1&lt;br /&gt;*-------------------------------------------------------*&lt;br /&gt;FORM PUT_LFC1.&lt;br /&gt;  SELECT * FROM LFC1&lt;br /&gt;          WHERE LIFNR      =  LFA1-LIFNR&lt;br /&gt;            AND BUKRS      =  LFB1-BUKRS&lt;br /&gt;            AND GJAHR      IN SGJAHR.&lt;br /&gt;    PUT LFC1.&lt;br /&gt;  ENDSELECT.&lt;br /&gt;ENDFORM.                                "PUT_LFC1 &lt;/p&gt;&lt;p&gt;*-------------------------------------------------------*&lt;br /&gt;* Call event GET BKPF&lt;br /&gt;*-------------------------------------------------------*&lt;br /&gt;FORM PUT_BKPF.&lt;br /&gt;  SELECT * FROM BKPF&lt;br /&gt;          WHERE BUKRS      =  LFB1-BUKRS&lt;br /&gt;            AND BELNR      IN SBELNR&lt;br /&gt;            AND GJAHR      IN SGJAHR.&lt;br /&gt;    PUT BKPF.&lt;br /&gt; ENDSELECT.&lt;br /&gt;ENDFORM.                                "PUT_BKPF  &lt;/p&gt;&lt;p&gt;The PROGRAM statement has the addition DEFINING DATABASE TEST_LDB. This defines the database program as belonging to the logical database TEST_LDB. &lt;/p&gt;&lt;p&gt;The nodes of the structure are declared with the TABLES statement which generates the appropriate table work areas. You can also use the NODES statement to define database tables as nodes. If a node of a logical database is not a database table, you must use the NODES statement. The interface work areas are &lt;b&gt;shared&lt;/b&gt; by the database program and the user, and so act as an interface for passing data. The term "user" here can mean either an executable program to which the logical database is linked, or the function module LDB_PROCESS.&lt;/p&gt;&lt;p&gt;The subroutines INIT and PBO initialize the selection screen.&lt;/p&gt;&lt;p&gt;In the PAI subroutine, you can include an authorization check for the user input on the selection screen. Plausibility or value range checks are also possible. If a check fails, you can write an error dialog. The corresponding field on the selection screen is then made ready for input again. &lt;/p&gt;&lt;p&gt;The PUT_&lt;node&gt; subroutines read the database tables according to the selection criteria entered by the user and trigger the relevant events in the executable program. This program is intended only to show the essential structure of a logical database. It does not contain any refinements to improve response times. The order in which the subroutines are called is determined by the structure of the logical database.&lt;/p&gt;&lt;p&gt;&lt;a name="_970291738"&gt;&lt;/a&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/9f/db9be035c111d1829f0000e829fbfe/Image649.gif" /&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/span&gt; &lt;!--a11y--&gt;&lt;img src="http://help.sap.com/saphelp_47x200/helpdata/en/images/1x1.gif" tabindex="0" alt="Leaving content frame" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-9183791952294163287?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/9183791952294163287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=9183791952294163287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/9183791952294163287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/9183791952294163287'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/example-of-logical-database.html' title='Example of a Logical Database'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-3253675340270772526</id><published>2009-06-17T21:25:00.001+05:30</published><updated>2009-06-17T21:25:47.916+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ABAP Database Access'/><title type='text'>Logical Databases</title><content type='html'>&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Logical databases are special ABAP programs that retrieve data and make it available to application programs. The most common use of logical databases is still to read data from database tables by &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;linking&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; them to executable ABAP programs. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;However, from Release 4.5A, it has also been possible to call logical databases using the function module LDB_PROCESS. This allows you to call several logical databases from any ABAP program, nested in any way. It is also possible to call a logical database more than once in a program, if it has been programmed to allow this. This is particularly useful for programs with type 1. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Logical databases contain &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Open SQL&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; statements that read data from the database. You do not therefore need to use SQL in your own programs. The logical database reads the program, stores them in the program if necessary, and then passes them line by line to the application program or the function module LDB_PROCESS using an &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;interface work area&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Logical Databases - Views of Data&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;A logical database provides a particular view of database tables in the R/3 System. It is always worth using logical databases if the structure of the data that you want to read corresponds to a view available through a logical database. &lt;/p&gt;&lt;p&gt;The data structure in a logical database is hierarchical. Many tables in the R/3 System are linked to each other using foreign key relationships. Some of these dependencies form tree-like hierarchical structures. Logical databases read data from database tables that are part of these structures. &lt;/p&gt;&lt;p&gt;&lt;a name="_970041771"&gt;&lt;/a&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/Image2042.gif" height="520" /&gt;&lt;/p&gt;&lt;p&gt;The diagram illustrates how the R/3 System might represent the structure of a company. A logical database can read the lines of these tables one after the other into an executable program in a sequence which is normally defined by the hierarchical structure. The term logical database is sometimes used to mean not only the program itself, but also the data that it can procure.&lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Tasks of Logical Databases&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;As well as allowing you to read data from the database, logical databases also allow you to program other tasks centrally, making your application programs less complicated. They can be used for the following tasks: &lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;li&gt;Reading the same data for several programs. &lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;  &lt;dir&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The individual programs do not then need to know the exact structure of the relevant database tables (and especially not their foreign key relationships). Instead, they can rely on the logical database to read the database entries in the right order during the GET event. &lt;/span&gt;&lt;/p&gt;&lt;/dir&gt;  &lt;ul&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;li&gt;Defining the same user interface for several programs. &lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;  &lt;dir&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Logical databases have a built-in selection screen. Therefore, all of the programs that use the logical database have the same user interface.&lt;/span&gt;&lt;/p&gt;&lt;/dir&gt;  &lt;ul&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;li&gt;Central authorization checks &lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;  &lt;dir&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Authorization checks for central and sensitive data can be programmed centrally in the database to prevent them from being bypassed by simple application programs. &lt;/span&gt;&lt;/p&gt;&lt;/dir&gt;  &lt;ul&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;li&gt;Improving performance&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;  &lt;dir&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;If you want to improve response times, logical databases permit you to take a number of measures to achieve this (for example, using joins instead of nested SELECT statements). These become immediately effective in all of the application programs concerned and save you from having to modify their source code.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;/dir&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-3253675340270772526?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/3253675340270772526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=3253675340270772526' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3253675340270772526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/3253675340270772526'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/logical-databases.html' title='Logical Databases'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-8507876998741714326</id><published>2009-06-17T21:23:00.000+05:30</published><updated>2009-06-17T21:24:14.486+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ABAP Programming'/><title type='text'>Position of the Basis System Within the R/3 System</title><content type='html'>&lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;The following sections describe three different views of the R/3 System, which show the role of the Basis system. &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;&lt;a name="Z_6011"&gt;Logical View&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;The following illustration represents a logical view of the R/3 System. &lt;/p&gt;&lt;p&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb2e97358411d1829f0000e829fbfe/Image684.gif" /&gt;&lt;/p&gt;&lt;p&gt;The difference between the logical view and a hardware- or software-based view is that not all of the above components can be assigned to a particular hardware or software unit. The above diagram shows how the R/3 Basis system forms a central platform within the R/3 System. Below are listed the tasks of the three logical components of the R/3 Basis system.&lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Kernel and Basis Services&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The kernel and basis services component is a runtime environment for all R/3 applications that is hardware-, operating system- and database-specific. The runtime environment is written principally in C and C++. However, some parts are also written in ABAP. The tasks of the kernel and basis services component are as follows:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;li&gt;Running applications&lt;br /&gt;All R/3 applications run on software processors (virtual machines) within this component.&lt;/li&gt;  &lt;li&gt;User and process administration&lt;br /&gt;An R/3 System is a multi-user environment, and each user can run several independent applications. In short, this component is responsible for the tasks that usually belong to an operating system. Users log onto the R/3 System and run applications within it. In this way, they do not come into contact with the actual operating system of the host. The R/3 System is the only user of the host operating system.&lt;/li&gt;  &lt;li&gt;Database access&lt;br /&gt;Each R/3 System is linked to a database system, consisting of a database management system (DBMS) and the database itself. The applications do not communicate directly with the database. Instead, they use Basis services.&lt;/li&gt;  &lt;li&gt;Communication&lt;br /&gt;R/3 applications can communicate with other R/3 Systems and with non-SAP systems. It is also possible to access R/3 applications from external systems using a BAPI interface. The services required for communication are all part of the kernel and basis services component.&lt;/li&gt;  &lt;li&gt;System Monitoring and Administration&lt;br /&gt;The component contains programs that allow you to monitor and control the R/3 System while it is running, and to change its runtime parameters.&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;ABAP Workbench&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;The ABAP Workbench component is a fully-fledged &lt;b&gt;development environment&lt;/b&gt; for applications in the ABAP language. With it, you can create, edit, test, and organize application developments. It is fully integrated in the R/3 Basis system and, like other R/3 applications, is itself written in ABAP.&lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Presentation Components&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;The presentation components are responsible for the &lt;b&gt;interaction&lt;/b&gt; between the R/3 System and the user, and for &lt;b&gt;desktop component integration&lt;/b&gt; (such as word processing and spreadsheets).  &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;&lt;a name="Z_602"&gt;Software-oriented View&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;The following illustration represents a software-oriented view of the R/3 System. The software-oriented view describes the various software components that make up the R/3 System. In the software-oriented view, all of the SAPgui components and application servers in the R/3 System make up the R/3 Basis system.&lt;/p&gt;&lt;p&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb2e97358411d1829f0000e829fbfe/Image685.gif" /&gt;&lt;/p&gt;&lt;p&gt;The R/3 Basis system is a multi-tier client/server system. The individual software components are arranged in tiers and function, depending on their position, as a client for the components below them or a server for the components above them. The classic configuration of an R/3 System contains the following software layers: &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000080;"&gt;Database Layer&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The database layer consists of a central database system containing &lt;b&gt;all&lt;/b&gt; of the data in the R/3 System. The database system has two components - the database management system (DBMS), and the databse itself. SAP does not manufacture its own database. Instead, the R/3 System supports the following database systems from other suppliers: ADABAS D, DB2/400 (on AS/400), DB2/Common Server, DB2/MVS,INFORMIX, Microsoft SQL Server, ORACLE, and ORACLE Parallel Server.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The database does not only contain the master data and transaction data from your business applications, &lt;b&gt;all&lt;/b&gt; data for the &lt;b&gt;entire&lt;/b&gt; R/3 System is stored there. For example, the database contains the control and Customizing data that determine how your R/3 System runs. It also contains the program code for your applications. Applications consist of program code, screen definitions, menus, function modules, and various other components. These are stored in a special section of the database called the R/3 Repository, and are accordingly called Repository objects. You work with them in the ABAP Workbench. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000080;"&gt;Application Layer&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;The application layer consists of one or more application servers and a message server. Each application server contains a set of services used to run the R/3 System. Theoretically, you only need one application server to run an R/3 System. In practice, the services are distributed across more than one application server. This means that not all application servers will provide the full range of services. The message server is responsible for communication between the application servers. It passes requests from one application server to another within the system. It also contains information about application server groups and the current load balancing within them. It uses this information to choose an appropriate server when a user logs onto the system.&lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;color:#000080;"&gt;Presentation Layer&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The presentation layer contains the software components that make up the SAPgui (graphical user interface). This layer is the interface between the R/3 System and its users. The R/3 System uses the SAPgui to provide an intuitive graphical user interface for entering and displaying data. The presentation layer sends the user’s input to the application server, and receives data for display from it. While a SAPgui component is running, it remains linked to a user’s terminal session in the R/3 System. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;This software-oriented view can be expanded to include further layers, such as an Intenet Transaction Server (ITS). &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Software-oriented and Hardware-oritented View&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The software-oriented view has nothing to do with the hardware configuration of the system. There are many different hardware configuration possibilities for both layers and components. When distributing the layers, for example, you can have all layers on a single host, or, at the other extreme, you could have at least one host for each layer. When dealing with components, the distribution of the database components depends on the database sytsem you are using. The application layer and presentation layer components can be distributed across any number of hosts. It is also possible to install more than one application server on a single host. A common configuration is to run the database system and a single application server (containing special database services) on one host, and to run each further application server on its own host. The presentation layer components usually run on the desktop computers of the users. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Advantages of the Multi-tier Architecture&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The distribution of the R/3 software over three layers means that the system load is also distributed. This leads to better system performance. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Since the database system contains all of the data for the entire R/3 System, it is subject to a very heavy load when the sytsem is running. It is therefore a good idea not to run application programs on the same host. The architecture of the R/3 System, in which the application layer and database layer are separate, allows you to install them on separate hosts and let them communicate using the network.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;It also makes sense to separate program execution from the tasks of processing user input and formatting data output. This is made possible by separating the presentation layer and the application layer. SAPgui and the application servers are designed so that the minimum amount of data has to be transported between the two layers. This means that the presentation layer components can even be used on hosts that have slow connections to application servers a long way away.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The system is highly scalable, due to the fact that the software components of an R/3 System can be distributed in almost any configuration across various hosts. This is particularly valuable in the application layer, where you can easily adapt your R/3 System to meet increasing demand by installing further application servers.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Consequences for Application Programming&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The fact that the application and presentation layers are separate carries an important consequence for application programmers. When you run an application program that requires user interaction, control of the program is continually passed backwards and forwards between the layers. When a screen is ready for user input, the presentation layer is active, and the application server is inactive with regard to that particular program, but free for other tasks. Once the user has entered data on the screen, program control passes back to the application layer. Now, the presentation layer is inactive. The SAPgui is still visible to the user during this time, and it is still displaying the screen, but it &lt;b&gt;cannot accept user input&lt;/b&gt; The SAPgui does not become active again until the application program has called a new screen and sent it to the presentation server.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;As a consequence, the program logic in an application program that occurs between two screens is known as a &lt;b&gt;dialog step&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb2e97358411d1829f0000e829fbfe/Image686.gif" /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;&lt;a name="Z_6031"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;&lt;a name="Z_6031"&gt;User-oriented View&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The following illustration represents a user-oriented view of the R/3 System:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb2e97358411d1829f0000e829fbfe/Image687.gif" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;For the user, the visible components of the R/3 System are those that appear as a window on the screen. The windows are generated by the presentation layer of the R/3 System, and form a part of the R/3 Basis system.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Before the user logs onto the R/3 System, he or she must start a utility called SAP Logon, which is installed at the front end. In SAP Logon, the user chooses one of the available R/3 Systems. The program then connects to the message server of that system and obtains the address of a suitable (most lightly-used) application server. It then starts a SAPgui, connected to that application server. The SAP Logon program is then no longer required for this connection. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;SAPgui starts the logon screen. Once the user has successfully logged on, it displays the initial screen of the R/3 System in an R/3 window on the screen. Within SAPgui, the R/3 window is represented as a session. After logging on, the user can open up to five further sessions (R/3 windows) &lt;b&gt;within&lt;/b&gt; the single SAPgui. These behave almost like independent SAPguis. The different sessions allow you to run different applications in parallel, independently of one another. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Within a session, the user can run applications that themselves call further windows (such as dialog boxes and graphic windows). These windows are not independent - they belong to the session from which they were called. These windows can be either modal (the original window is not ready for input) or amodal (both windows are ready for input). &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The user can open other SAPguis, using SAP Logon, to log onto the same system or another R/3 System. The individual SAPguis and corresponding R/3 terminal sessions are totally independent. This means that you can have SAPguis representing the presentation layers of several R/3 Systems open on your desktop computer.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;!--a11y--&gt;&lt;img src="http://help.sap.com/saphelp_47x200/helpdata/en/images/1x1.gif" tabindex="0" alt="Leaving content frame" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-8507876998741714326?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/8507876998741714326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=8507876998741714326' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/8507876998741714326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/8507876998741714326'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/position-of-basis-system-within-r3.html' title='Position of the Basis System Within the R/3 System'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-8255429220978982497</id><published>2009-06-17T21:19:00.000+05:30</published><updated>2009-06-17T21:22:15.401+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Running ABAP Programs'/><title type='text'>Running ABAP Programs</title><content type='html'>&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;ABAP programs can only be executed in an R/3 System. The R/3 Basis system contains a component called Kernel &amp;amp; Basis Services that provides a cross-platform runtime environment for ABAP programs (see also &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;The Basis System&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;). &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Each ABAP program consists of self-contained &lt;b&gt;processing blocks&lt;/b&gt;, which may occur in any order in the source code. Processing blocks are sections of programs, made up of structure blocks. They are processed sequentially. A processing block can be called either from outside the ABAP program, or from a processing block within the same ABAP program (see also &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Structure of ABAP Programs&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;). When a processing block is called from outside the program, it can be called either by the ABAP runtime environment or another ABAP program. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;a name="_970402560"&gt;&lt;/a&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/e4/2adbd7449911d1949c0000e8353423/Image600.gif" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;To start an ABAP program, at least one of its processing blocks must be started from outside the program itself. Each ABAP program has a program type, which determines whether and how a program can be run. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Programs that can be run&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;These programs can be run by a user by entering the program name or a transaction code. They are they actual application programs within the R/3 System, and are explained in more depth later on. &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Type 1&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;You can start a type 1 program by entering its program name. For this reason, they are also known as &lt;b&gt;executable programs&lt;/b&gt;. When you start a type 1 program, processors are started in the runtime environment that call a series of processing blocks (event blocks) in a predefined sequence. The sequence is oriented towards reporting tasks. This is why executable programs are also known as &lt;b&gt;reports&lt;/b&gt;.  For further information, refer to &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Running Programs Directly - Reports&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;A special type of type 1 program is a &lt;b&gt;logical database&lt;/b&gt;.  You can start logical databases &lt;b&gt;together with reports&lt;/b&gt;. A logical database contains subroutines that are called by an invisible system program in a prescribed sequence for type 1 programs. The subroutines make certain reporting functions reusable. For further information, refer to &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Logical Databases&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Type M&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Type M programs can only be started using a transaction code. A transaction code starts a screen, which consists of the screen itself and its flow logic. Screen flow logic can call special processing blocks (dialog modules) in the corresponding ABAP program. Since type M programs contain mostly dialog modules, they are known as &lt;b&gt;module pools&lt;/b&gt;.  For further information about running module pools, refer to &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Dialog-controlled Program Execution - Transactions&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Programs that Cannot Be Run Directly&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;These programs cannot be started directly by a user. Instead, they contain processing blocks or other source code that can only be used by an application program that is already running. They are described in more detail in a later section. &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Type F&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Type F programs are not executable. They serve as a container for function modules. When you call a function module from an ABAP program, the entire main program is loaded into the internal session of the current program. Since type M programs contain mainly function modules, they are known as &lt;b&gt;function groups&lt;/b&gt;.  &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Function modules&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;  are a type of procedure. They are described in more detail in the &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Procedures&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; section. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Type K&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Type K programs are not executable.  They are container programs for global classes, and are known as &lt;b&gt;class definitions&lt;/b&gt;.  &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Classes&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;  belong to &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;ABAP Objects&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;  and are described in more detail in that section. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Type J&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Type J programs are not executable.  They are container programs for global interfaces, and are known as &lt;b&gt;interface definitions&lt;/b&gt;.  &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Interfaces&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;  belong to &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;ABAP Objects&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;  and are described in more detail in that section. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Type S&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Type S programs are not executable. They are container programs for subroutines that should only be called externally. When you call a subroutine from an ABAP program, the entire main program is loaded into the internal session of the current program. Since type S programs contain mainly subroutines, they are known as &lt;b&gt;subroutine pools&lt;/b&gt;.  &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Subroutines&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;  are a type of procedure. They are described in more detail in the &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Procedures&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; section. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Type I&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Type I programs cannot be run directly, and contain no callable processing blocks. They are used exclusively for modularizing ABAP source code, and are included in other programs. &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Include programs&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; are described in more detail in the Source Code Modules section. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Starting Programs in ABAP&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;For all programs that can be started directly, there are ABAP statements that you can use to call a program from another application program that is already running. For further information, refer to &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Program Calls&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-8255429220978982497?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/8255429220978982497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=8255429220978982497' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/8255429220978982497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/8255429220978982497'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/running-abap-programs.html' title='Running ABAP Programs'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-8549015855287431296</id><published>2009-06-10T20:08:00.000+05:30</published><updated>2009-06-10T20:11:56.167+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Complex Screen Elements'/><title type='text'>Calling ABAP Dialog Modules</title><content type='html'>&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The main task of the &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;screen flow logic&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; is to call dialog modules in an ABAP program. You can do this using the MODULE statement, which can be programmed in the four possible event blocks of screen flow logic. In the PBO event, you can use this statement to call any dialog module in the ABAP program that has been defined using &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;MODULE &lt;mod&gt; OUTPUT.&lt;br /&gt;...&lt;br /&gt;ENDMODULE.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;In the PAI, POH, and POV events, you can use the statement to call any dialog module in the ABAP program that has been defined using&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;MODULE &lt;mod&gt; [INPUT].&lt;br /&gt;...&lt;br /&gt;ENDMODULE.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;It is technically possible to have two dialog modules with the same name in the same program, one defined using OUTPUT, the other with INPUT. However, this is not recommended.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Since dialog modules in an ABAP program can be called from more than one screen, you can program functions that you need in several screens centrally in a single module. For example, it is usual to copy the contents of the OK-code field into an auxiliary variable and then reset the field in all PAI events. You could program this task in a single module that you would then call from the PAI event of all screens. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;If you need to distinguish between screen numbers in a dialog module, you can use the system field SY-DYNNR, which always contains the number of the current screen. This would allow you, for example, to analyze the function code in a single PAI module and then control the further program flow according to the screen number and function code. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The actual screen sequence is as follows: &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;a name="_979047055"&gt;&lt;/a&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/47/e07f652b9911d2954f0000e8353423/Image610.gif" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The screen display is prepared in the PBO event. The flow logic calls the corresponding ABAP dialog modules. Then, the screen is displayed. When this happens, control passes from the application server to the SAPgui. The screen accepts user input until the user triggers the PAI event. The control then returns to the application server. The program processes user input by calling the corresponding ABAP dialog modules. After the PAI processing is complete, the PBO processing of the next screen starts. The PAI processing and the PBO processing of the next screen form a single dialog step on the application server. The current screen remains visible until the PBO of the next screen is complete, but is not ready for input. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;There are various ways of calling the dialog modules in the flow logic. The syntax of the flow logic allows you to call dialog modules conditionally, and to control the transfer of data between the screen and the ABAP program. &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-8549015855287431296?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/8549015855287431296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=8549015855287431296' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/8549015855287431296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/8549015855287431296'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/calling-abap-dialog-modules.html' title='Calling ABAP Dialog Modules'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-7240660470619902098</id><published>2009-06-10T20:04:00.000+05:30</published><updated>2009-06-10T20:06:43.353+05:30</updated><title type='text'>Data Types in the ABAP Dictionary</title><content type='html'>&lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;The ABAP Dictionary allows you to define global data types. You can use the TYPE addition of an appropriate ABAP statement to refer to these data types in any ABAP program in the system.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;You define these data types using the &lt;/span&gt;&lt;img alt="Structure link" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/book.gif" border="0" /&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;ABAP Dictionary&lt;/span&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;.  The following input fields are relevant to data types:&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;a name="_955433711"&gt;&lt;/a&gt;&lt;a name="_955460010"&gt;&lt;/a&gt;&lt;a name="_955460344"&gt;&lt;/a&gt;&lt;a name="_955462219"&gt;&lt;/a&gt;&lt;a name="_956060074"&gt;&lt;/a&gt;&lt;a name="_956122560"&gt;&lt;/a&gt;&lt;a name="_956123931"&gt;&lt;/a&gt;&lt;a name="_956124075"&gt;&lt;/a&gt;&lt;a name="_956138610"&gt;&lt;/a&gt;&lt;a name="_956147481"&gt;&lt;/a&gt;&lt;a name="_986977370"&gt;&lt;/a&gt;&lt;a name="_986980039"&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3138358411d1829f0000e829fbfe/Image133.gif" width="585" height="463" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;There are three groups on the initial screen:&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:130%;"  &gt;Database Tables and Views&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;One of the most important tasks of the &lt;/span&gt;&lt;img alt="Structure link" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/book.gif" border="0" /&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;ABAP Dictionary&lt;/span&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt; is to administer database tables in the R/3 database. The Dictionary contains meta-descriptions of the database tables, and uses these to create the physical tables in the database. A view is a "virtual table" containing fields from one or more tables. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;In the description of a database table, the table lines consist of single fields or columns. An elementary data type must be assigned to each column. The elementary types in the ABAP Dictionary are data elements. Like data objects in ABAP programs, database tables and views have data types as attributes. A line of a database table or view has the data type of a &lt;b&gt;flat structure&lt;/b&gt;, which consists of individual data elements.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;In ABAP programs, you can use the TYPE addition with the data type of a database table or view. You may refer to the whole structure or to individual components:&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;... &lt;/span&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;TYPE &lt;dbtab&gt; ...&lt;/dbtab&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;refers to the complex data type of the structure,&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;... &lt;/span&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;TYPE &lt;dbtab&gt;-&lt;c&gt;&lt;sub&gt;i&lt;/sub&gt;&gt; ...&lt;/c&gt;&lt;/dbtab&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;refers to the elementary data type of component &lt;c&gt;&lt;sub&gt;i&lt;/sub&gt;&gt;.&lt;/c&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;If you define a complex data type &lt;t&gt; as a structure using&lt;/t&gt;&lt;/span&gt;&lt;/p&gt;  &lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;b&gt;&lt;p&gt;TYPES &lt;t&gt; TYPE &lt;dbtab&gt;.&lt;/dbtab&gt;&lt;/t&gt;&lt;/p&gt;  &lt;/b&gt;&lt;/span&gt;&lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;the components of the data type &lt;t&gt; inherit the names of the components of the database table or view, and can be addressed in the program using &lt;t&gt;-&lt;c&gt;&lt;sub&gt;i&lt;/sub&gt;&gt;.&lt;/c&gt;&lt;/t&gt;&lt;/t&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;To ensure compatibility with previous releases, you can still use the LIKE addition to refer to database tables or views, except within classes. The reason for this is that in earlier releases, the physical presence of the database tables as objects was emphasized, even though the Dictionary only contains meta-descriptions and data types.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Defining program-local data types by referring to database tables and views is one of the essential techniques for processing data from database tables in ABAP. Data objects that you define in this way always have the right type to contain data from the corresponding database table. ABAP Open SQL allows you to read a single field, a range of fields, or an entire database table or view into an internal table.&lt;/span&gt;&lt;/p&gt;&lt;dir&gt;  &lt;dir&gt;  &lt;dir&gt;    &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;img tabindex="0" alt="Example" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/beispiel.gif" /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;TYPES: city type spfli-cityfrom,&lt;br /&gt;       spfli_type TYPE STANDARD TABLE OF spfli WITH DEFAULT KEY.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;DATA: wa_city  TYPE city,&lt;br /&gt;      wa_spfli TYPE spfli_type.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;...&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;SELECT SINGLE cityfrom FROM spfli&lt;br /&gt;                       INTO wa_city&lt;br /&gt;                       WHERE carrid = 'LH' AND connid = '400'.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;...&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;SELECT * FROM spfli INTO TABLE wa_spfli.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;...&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;This example defines an elementary data type CITY that refers to a single field of the database table SPFLI and an internal table SPFLI_TYPE, whose line type is the same as the structure of the database table. The SELECT statement reads data from the database into the corresponding data objects.&lt;/span&gt;&lt;/p&gt;&lt;/dir&gt;  &lt;/dir&gt;  &lt;/dir&gt;    &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:130%;"  &gt;Data types&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Data types are the actual type definitions in the ABAP Dictionary. They allow you to define elementary types, reference types, and complex types that are visible globally in the system. The data types of database tables are a subset of all possible types, namely flat structures. Global object types (classes and interfaces) are not stored in the ABAP Dictionary, but in the class library. You create them using the Class Builder.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;For a detailed description of data types and their definitions, refer to the &lt;/span&gt;&lt;img alt="Structure link" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/book.gif" border="0" /&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Types&lt;/span&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt; section of the ABAP Dictionary documentation. The following descriptions mention the types only briefly, along with how you can refer to them from ABAP programs.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;Data Elements&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;p&gt;Data elements in the ABAP Dictionary describe individual fields. They are the smallest indivisible units of the complex types described below, and are used to specify the types of columns in the database. Data elements can be elementary types or reference types.&lt;/p&gt;    &lt;ul&gt;&lt;li&gt;&lt;b&gt;Elementary Types&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;dir&gt;  &lt;dir&gt;    &lt;p&gt;Elementary types are part of the dual-level domain concept for fields in the ABAP Dictionary. The elementary type has semantic attributes, such as texts, value tables, and documentation, and has a data type. There are two different ways to specify a data type:&lt;/p&gt;&lt;/dir&gt;  &lt;/dir&gt;      &lt;ul&gt;&lt;ul&gt;&lt;li&gt;By directly assigning an ABAP Dictionary type.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;  &lt;dir&gt;  &lt;dir&gt;    &lt;p&gt;You can assign a predefined ABAP Dictionary type and a number of characters to an elementary type. The ABAP Dictionary has considerably more predefined types than the ABAP programming language. The number of characters here is not the field length in bytes, but the number of valid characters excluding formatting characters. The data types are different because the predefined data types in the ABAP Dictionary have to be compatible with the external data types of the database tables supported by the R/3 System.&lt;/p&gt;  &lt;p&gt;When you refer to data types from the ABAP Dictionary in an ABAP program, the predefined Dictionary types are converted to ABAP types as follows:&lt;/p&gt;&lt;/dir&gt;  &lt;/dir&gt;  &lt;/span&gt;  &lt;p align="right"&gt;&lt;table border="1" width="558" cellpadding="7" cellspacing="1"&gt;  &lt;tbody&gt;&lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Dictionary type&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Meaning&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Maximum length n&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;ABAP type&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;DEC&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Calculation/amount field&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;1-31, 1-17 in tables&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;P((n+1)/2)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;INT1&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Single-byte integer&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;3&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Internal only&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;INT2&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Two-byte integer&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;5&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Internal only&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;INT4&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Four-byte integer&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;10&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;I&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;CURR&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Currency field&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;1-17&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;P((n+1)/2)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;CUKY&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Currency key&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;5&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;C(5)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;QUAN&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Amount&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;1-17&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;P((n+1)/2)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;UNIT&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Unit&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;2-3&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;C(n)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;PREC&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Accuracy&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;16&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Internal only&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;FLTP&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Floating point number&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;16&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;F(8)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;NUMC&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Numeric text&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;1-255&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;N(n)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;CHAR&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Character&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;1-255&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;C(n)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;LCHR&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Long character&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;256-max&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;C(n)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;STRING.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;String of variable length&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;1-max&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;STRING.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;RAWSTRING&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Byte sequence of variable length&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;1-max&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;XSTRING&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;DATS&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Date&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;8&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;D&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;ACCP&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Accounting period YYYYMM&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;6&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;N(6)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;TIMS&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Time HHMMSS&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;6&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;T&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;RAW&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Byte sequence&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;1-255&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;X(n)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;LRAW&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Long byte sequence&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;256-max&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;X(n)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;CLNT&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Client&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;3&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;C(3)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="19%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;LANG&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="33%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Language&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="27%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;internal 1, external 2&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="20%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;C(1)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;/tbody&gt;&lt;/table&gt;  &lt;/p&gt;  &lt;dir&gt;  &lt;dir&gt;    &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;("max" in LCHR and LRAW is the value of a preceding INT2 field. The "internal" length of a LANG field is in the Dictionary, the "external" length refers to the display on the screen. &lt;/span&gt;&lt;/p&gt;&lt;/dir&gt;  &lt;/dir&gt;      &lt;ul&gt;&lt;ul&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;li&gt;Assigning a domain&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;&lt;/ul&gt;  &lt;dir&gt;  &lt;dir&gt;    &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;The technical attributes are inherited from a domain. Domains are standalone Repository objects in the ABAP Dictionary. They can specify the technical attributes of a data element. One domain can be used by any number of data elements. When you create a domain, you must specify a Dictionary data type (see above table) and the number of characters. &lt;/span&gt;&lt;/p&gt;&lt;/dir&gt;  &lt;/dir&gt;      &lt;ul&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;li&gt;&lt;b&gt;Reference Types&lt;/b&gt;&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;  &lt;dir&gt;  &lt;dir&gt;    &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Reference types describe single fields that can contain references to &lt;b&gt;global&lt;/b&gt; classes and interfaces from the ABAP class library.&lt;/span&gt;&lt;/p&gt;&lt;/dir&gt;  &lt;/dir&gt;    &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;In an ABAP program, you can use the TYPE addition to refer directly to a data element. The predefined Dictionary data types of the domain are then converted into the corresponding ABAP types. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;If you define a local data type in a program by referring to a data element as follows:&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;b&gt;TYPES &lt;t&gt; TYPE &lt;data&gt;.&lt;/data&gt;&lt;/t&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;the semantic attributes of the data element are inherited and will be used, for example, when you display a data object with type &lt;t&gt; on the screen. Since all data types in the ABAP Dictionary are based on data elements, they all contain the corresponding semantic attributes.&lt;/t&gt;&lt;/span&gt;&lt;/p&gt;&lt;dir&gt;  &lt;dir&gt;  &lt;dir&gt;    &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;img tabindex="0" alt="Example" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/beispiel.gif" /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;TYPES company TYPE s_carr_id.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;DATA wa_company TYPE company.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;wa_company = 'UA '.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;WRITE: 'Company:', wa_company.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;This example defines a local type COMPANY that refers to the data element S_CARR_ID. The data element is linked to the identically-named domain S_CARR_ID. The domain defines the technical attributes as data type CHAR with length 3. The local data type COMPANY in the program therefore has the ABAP type C(3). COMPANY also adopts the semantic attributes of the data element. In the above example, we declare a data object WA_COMPANY with this type and display it on a list. If the user chooses F1 help for the output field, the help text stored in the ABAP Dictionary will appear in a dialog box.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;a name="_956139894"&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3138358411d1829f0000e829fbfe/Image134.gif" width="485" height="314" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/dir&gt; &lt;/dir&gt; &lt;/dir&gt;  &lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;a name="_956139894"&gt;&lt;/a&gt;&lt;/span&gt;&lt;a name="_956139894"&gt;&lt;/a&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;structures&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;A structure is a sequence of any other data types from the ABAP Dictionary, that is, data elements, structures, table types, or database tables. When you create a structure in the ABAP Dictionary, each component must have a name and a data type.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;In an ABAP program, you can use the TYPE addition to refer directly to a structure. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;If you define a local data type in a program by referring to a structure as follows: &lt;/span&gt;&lt;/p&gt;  &lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;b&gt;&lt;p&gt;TYPES &lt;t&gt; TYPE &lt;structure&gt;.&lt;/structure&gt;&lt;/t&gt;&lt;/p&gt;  &lt;/b&gt;&lt;/span&gt;&lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;the construction blueprint of the structure is used to create a local structure &lt;t&gt; in the program. The predefined Dictionary data types of the domains used by the data elements in the structure are converted into the corresponding ABAP types. The semantic attributes of the data elements are used for the corresponding components of the structure in the program. The components of the local structure &lt;t&gt; have the same names as those of the structure in the ABAP Dictionary.&lt;/t&gt;&lt;/t&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;To ensure compatibility with previous releases, it is still possible to use the LIKE addition in an ABAP program to refer to a structure in the ABAP Dictionary (except in classes). &lt;/span&gt;&lt;/p&gt;&lt;dir&gt;  &lt;dir&gt;  &lt;dir&gt;    &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;img tabindex="0" alt="Example" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/beispiel.gif" /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Suppose the structure STRUCT is defined as follows in the ABAP Dictionary:&lt;/span&gt;&lt;/p&gt;&lt;/dir&gt;  &lt;/dir&gt;  &lt;/dir&gt;    &lt;p align="right"&gt;&lt;table border="1" width="504" cellpadding="7" cellspacing="1"&gt;  &lt;tbody&gt;&lt;tr&gt;&lt;td valign="top" width="25%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Field name&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Type name&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="54%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Description&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="25%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;COL1&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;CHAR01&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="54%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Character field with length 1&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="25%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;COL2&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;CHAR08&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="54%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Character field with length 8&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="25%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;COL3&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;CHAR10&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="54%"&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Character field with length 10&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;/tbody&gt;&lt;/table&gt;  &lt;/p&gt;  &lt;dir&gt;  &lt;dir&gt;  &lt;dir&gt;    &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;The types CHAR01 to CHAR10 are data elements with corresponding domains. We can refer to this structure in ABAP:&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;b&gt;TYPES struct_type TYPE struct.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;DATA wa TYPE struct_type.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;wa-col1 = '1'.&lt;br /&gt;wa-col2 = '12345678'.&lt;br /&gt;wa-col3 = '1234567890'.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;This program creates a local structure in the program - STRUCT_TYPE - and a corresponding data object WA. We can address the components using the component names from the original structure.&lt;/span&gt;&lt;/p&gt;&lt;/dir&gt;  &lt;/dir&gt;  &lt;/dir&gt;    &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;Table Types&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Table types are construction blueprints for internal tables that are stored in the ABAP Dictionary. When you create a table type in the ABAP Dictionary, you specify the line type, access type, and key. The line type can be any data type from the ABAP Dictionary, that is, a data element, a structure, a table type, or the type of a database table. You can also enter a predefined Dictionary type directly as the line type, in the same way that you can with a domain. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;In an ABAP program, you can use the TYPE addition to refer directly to a table type. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;If you define a local data type in a program by referring to a table type as follows:&lt;/span&gt;&lt;/p&gt;  &lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;b&gt;&lt;/b&gt;&lt;p&gt;&lt;b&gt;TYPES &lt;t&gt; TYPE &lt;/t&gt;&lt;/b&gt;&lt;table&gt;&lt;b&gt;.  &lt;/b&gt;&lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;the construction blueprint of the table type is used to create a local internal table &lt;t&gt; in the program. The predefined Dictionary data types of the domains used by the data elements in the structure are converted into the corresponding ABAP types. The semantic attributes of the data elements are used for the corresponding components of the internal table in the program. &lt;/t&gt;&lt;/span&gt;&lt;/p&gt;&lt;dir&gt;  &lt;dir&gt;  &lt;dir&gt;    &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;img tabindex="0" alt="Example" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/beispiel.gif" /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Suppose the table type STRUCT_TABLE is defined in the Dictionary with the line type STRUCT from the previous example. We can refer to this in ABAP:&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;TYPES table_type TYPE struct_table.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;DATA: table_wa TYPE table_type,&lt;br /&gt;      line_wa  LIKE LINE OF table_wa.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;...&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;LOOP AT table_wa INTO line_wa.&lt;br /&gt;  ...&lt;br /&gt;  WRITE: line_wa-col1, line_wa-col1, line_wa-col1.&lt;br /&gt;  ...&lt;br /&gt;ENDLOOP.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;This program defines an internal table type TABLE_TYPE. From it, we define data objects TABLE_WA and LINE_WA. LINE_WA corresponds to the line type of the table type in the Dictionary, and is therefore compatible with the structure STRUCT.&lt;/span&gt;&lt;/p&gt;&lt;/dir&gt;  &lt;/dir&gt;  &lt;/dir&gt;    &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Arial;font-size:130%;"  &gt;Type Groups&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Before Release 4.5A, it was not possible to define standalone types in the ABAP Dictionary to which you could refer using a TYPE addition in an ABAP program. It was only possible to refer to flat structures. Structures in programs corresponded to the structures of database tables or structures in the ABAP Dictionary. In ABAP programs, you could only refer to database tables and structures in the ABAP Dictionary using LIKE. It was, however, possible to refer to individual components of the Dictionary type. Complex local data types such as internal tables or deep structures had no equivalent in the ABAP Dictionary. The solution to this from Release 3.0 onwards was to use type groups. Type groups were based on the include technique, and allowed you to store any type definitions globally in the Dictionary by defining them using TYPES statements.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;The definition of a type group is a fragment of ABAP code which you enter in the ABAP Editor. The first statement for the type group &lt;pool&gt; is always:&lt;/pool&gt;&lt;/span&gt;&lt;/p&gt;  &lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;b&gt;&lt;p&gt;TYPE-POOL &lt;pool&gt;.&lt;/pool&gt;&lt;/p&gt;  &lt;/b&gt;&lt;/span&gt;&lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;After this came the definitions of data types using the TYPES statement, as described &lt;/span&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;in Local Data Types in Programs&lt;/span&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;. It was also possible to define global constants using the CONSTANTS statement. All the names of these data types and constants must begin with the name of the type group and an underscore:&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;In an ABAP program, you must declare a type group as follows before you can use it:&lt;/span&gt;&lt;/p&gt;  &lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;b&gt;&lt;p&gt;TYPE-POOLS &lt;pool&gt;.&lt;/pool&gt;&lt;/p&gt;  &lt;/b&gt;&lt;/span&gt;&lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;This statement allows you to use all the data types and constants defined in the type group &lt;pool&gt; in your program. You can use several type groups in the same program.&lt;/pool&gt;&lt;/span&gt;&lt;/p&gt;&lt;dir&gt;  &lt;dir&gt;  &lt;dir&gt;    &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;img tabindex="0" alt="Example" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/beispiel.gif" /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Let the type group HKTST be created as follows in the ABAP Dictionary:&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;TYPE-POOL hktst.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;TYPES: BEGIN OF hktst_typ1,&lt;br /&gt;                col1(10) TYPE c,&lt;br /&gt;                col2 TYPE i,&lt;br /&gt;       END OF hktst_typ1.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;TYPES hktst_typ2 TYPE p DECIMALS 2.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;CONSTANTS hktst_eleven TYPE i VALUE 11.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;p&gt;This type group defines two data types HKTST_TYP1 and HKTST_TYP2, as well as a constant HKTST_ELEVEN with the value 11.&lt;/p&gt;  &lt;p&gt;Any ABAP program can use this definition with the TYPE-POOLS statement:&lt;/p&gt;  &lt;/span&gt;&lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;TYPE-POOLS hktst.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;DATA: dat1 TYPE hktst_typ1,&lt;br /&gt;      dat2 TYPE hktst_typ2 VALUE '1.23'.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;WRITE: dat2, / hktst_eleven.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;The output is:&lt;/span&gt;&lt;/p&gt;  &lt;span style=";font-family:Courier;font-size:85%;"  &gt;&lt;p&gt;            1,23&lt;/p&gt;  &lt;p&gt;        11&lt;/p&gt;  &lt;/span&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;p&gt;The data types defined in the type group are used to declare data objects with the DATA statement and the value of the constant is, as the output shows, known in the program.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;&lt;/span&gt;&lt;/dir&gt;  &lt;/dir&gt;  &lt;/dir&gt;   &lt;!--a11y--&gt;&lt;img src="http://help.sap.com/saphelp_47x200/helpdata/en/images/1x1.gif" tabindex="0" alt="Leaving content frame" /&gt;&lt;/table&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-7240660470619902098?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/7240660470619902098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=7240660470619902098' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/7240660470619902098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/7240660470619902098'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/data-types-in-abap-dictionary.html' title='Data Types in the ABAP Dictionary'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-7427849953347957419</id><published>2009-06-10T20:00:00.000+05:30</published><updated>2009-06-10T20:03:43.622+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Processing Screens'/><title type='text'>Pushbuttons on the Screen</title><content type='html'>&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Pushbuttons are the only elements of screens that trigger the PAI event when the user chooses them. In the attributes of a pushbutton, you can specify a function code up to 20 characters long. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Pushbuttons have a label - the text that you specify statically in the attributes - and can also have icons. If you set the &lt;i&gt;Output field&lt;/i&gt; attribute for a pushbutton, you can also set its text dynamically in the ABAP program. To do this, you must create a field in the ABAP program with the same name as the pushbutton. You must then assign the required text to the field before the screen is displayed. You can also assign icons to dynamic texts on pushbuttons by including the icon code in the text. The icon codes are all contained in the include program &lt;icon&gt;. For example, the ICON_CANCEL (&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba9a635c111d1829f0000e829fbfe/Image631.gif" /&gt;) icon has the code @0W@.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;In each PAI event, the function code, as long as it is not empty, is placed in the system field SYST-UCOMM (SY-UCOMM) and assigned to the OK_CODE field. Empty function codes are placed in neither the SY-UCOMM field nor the OK_CODE field. The function code of a pushbutton is empty if you have not entered it in the corresponding attribute in the Screen Painter. Before you can work with the OK_CODE field, you must assign a name to it in the Screen Painter. For further information, refer to &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Reading Function Codes&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The main way of allowing users to choose functions that trigger the PAI event and send function codes to the program is through the GUI status. The main reason is one of space - the GUI status can contain many more functions than you would be able to place on the screen as pushbuttons.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;However, you should use pushbuttons in the following cases:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;li&gt;Very important and frequently-used function codes that should appear on the screen as well as in the GUI status, for example, the &lt;i&gt;Execute&lt;/i&gt;, &lt;i&gt;Display&lt;/i&gt;, and &lt;i&gt;Change&lt;/i&gt; functions on the initial screen of the ABAP Editor. &lt;/li&gt;  &lt;li&gt;Applications that only use pushbuttons, where function codes in the GUI status make no sense - for example, in a calculator application. The function codes of the corresponding pushbuttons have no corresponding function in the GUI status elements, and only exist as attributes of screen elements. &lt;/li&gt;  &lt;li&gt;When you have a GUI status that is used for a large number of screens, but use it on screens that have a particular function that is not required anywhere else. In this case, you should place it on the screen as a pushbutton.&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;  &lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;When you define pushbuttons, you must ensure that your function code is either the same as a corresponding function in the GUI status, or does not accidentally coincide with the function code of an entirely different function. Although the consistency of function codes in GUI statuses is checked in the Menu Painter, this is not possible for pushbuttons, since the GUI status of a screen is not known until runtime. &lt;/span&gt;&lt;/p&gt;&lt;dir&gt;&lt;dir&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; &lt;img tabindex="0" alt="Example" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/beispiel.gif" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Pushbuttons on screens.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;PROGRAM DEMO_DYNPRO_PUSH_BUTTON.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;DATA: OK_CODE LIKE SY-UCOMM,&lt;br /&gt;      SAVE_OK LIKE OK_CODE,&lt;br /&gt;      OUTPUT(8) TYPE C.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;CALL SCREEN 100.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;MODULE USER_COMMAND_0100 INPUT.&lt;br /&gt;  SAVE_OK = OK_CODE.&lt;br /&gt;  CLEAR OK_CODE.&lt;br /&gt;  CASE SAVE_OK.&lt;br /&gt;    WHEN 'BUTTON_EXIT'.&lt;br /&gt;      LEAVE PROGRAM.&lt;br /&gt;    WHEN 'BUTTON_1'.&lt;br /&gt;      OUTPUT = 'Button 1'(001).&lt;br /&gt;    WHEN 'BUTTON_2'.&lt;br /&gt;      OUTPUT = 'Button 2'(002).&lt;br /&gt;    WHEN 'BUTTON_3'.&lt;br /&gt;      OUTPUT = 'Button 3'(003).&lt;br /&gt;    WHEN 'BUTTON_4'.&lt;br /&gt;      OUTPUT = 'Button 4'(004).&lt;br /&gt;    WHEN OTHERS.&lt;br /&gt;      OUTPUT = SAVE_OK.&lt;br /&gt;  ENDCASE.&lt;br /&gt;ENDMODULE.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The next screen (statically defined) for screen 100 is itself. It has the following layout:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;a name="_980050816"&gt;&lt;/a&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba9a635c111d1829f0000e829fbfe/Image738.gif" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The part of the element list relevant for the screen fields is as follows: &lt;/span&gt;&lt;/p&gt;&lt;/dir&gt;&lt;/dir&gt;  &lt;table border="1" width="100%" cellpadding="7" cellspacing="1"&gt;  &lt;tbody&gt;&lt;tr&gt;&lt;td valign="top" width="27%"&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Name&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="13%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Type&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="14%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Format&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="22%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Text&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="24%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Function code&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="27%"&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;OUTPUT&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="13%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;I/O&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="14%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;CHAR&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="22%"&gt; &lt;/td&gt;  &lt;td valign="top" width="24%"&gt; &lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="27%"&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;BUTTON1&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="13%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Push&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="14%"&gt; &lt;/td&gt;  &lt;td valign="top" width="22%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Pushbutton 1&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="24%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;BUTTON_1&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="27%"&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;BUTTON2&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="13%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Push&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="14%"&gt; &lt;/td&gt;  &lt;td valign="top" width="22%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Pushbutton 2&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="24%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;BUTTON_2&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="27%"&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;BUTTON3&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="13%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Push&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="14%"&gt; &lt;/td&gt;  &lt;td valign="top" width="22%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Pushbutton 3&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="24%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;BUTTON_3&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="27%"&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;BUTTON4&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="13%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Push&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="14%"&gt; &lt;/td&gt;  &lt;td valign="top" width="22%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Pushbutton 4&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="24%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;BUTTON_4&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="27%"&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;EXIT_BUTTTON&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="13%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Push&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="14%"&gt; &lt;/td&gt;  &lt;td valign="top" width="22%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Cancel&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="24%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;BUTTON_EXIT&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="27%"&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;OK_CODE&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="13%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;OK&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="14%"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;OK&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="22%"&gt; &lt;/td&gt;  &lt;td valign="top" width="24%"&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;dir&gt;&lt;dir&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The input option for the screen field OUTPUT has been switched off in the Screen Painter. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The screen flow logic is as follows: &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;PROCESS BEFORE OUTPUT.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;PROCESS AFTER INPUT.&lt;br /&gt;  MODULE USER_COMMAND_0100.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;When the user chooses a pushbutton, the PAI event is triggered. The function code of the pushbutton is assigned to the screen field OK_CODE, which is then passed onto the ABAP field with the same name. The module USER_COMMAND_0100 is then processed. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Firstly, the contents of the OK_CODE field are copied to the auxiliary variable SAVE_OK code, and OK_CODE is initialized. You should always do this, since it ensures that the screen field OK_CODE has always been initialized before the PBO event and can therefore not unintentionally contain an incorrect value.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Next, in the CASE structure, a text symbol is assigned to the OUTPUT field according to the button that the user chose. This is displayed in the output field on the screen. If the user chooses &lt;i&gt;Cancel&lt;/i&gt;, the program ends. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;/dir&gt;&lt;/dir&gt; &lt;!--a11y--&gt;&lt;img src="http://help.sap.com/saphelp_47x200/helpdata/en/images/1x1.gif" tabindex="0" alt="Leaving content frame" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-7427849953347957419?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/7427849953347957419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=7427849953347957419' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/7427849953347957419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/7427849953347957419'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/pushbuttons-on-screen.html' title='Pushbuttons on the Screen'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-5982919408935059820</id><published>2009-06-10T19:59:00.000+05:30</published><updated>2009-06-10T20:00:14.684+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='User Actions on Screens'/><title type='text'>Processing Input/Output Fields</title><content type='html'>&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Input/output fields can be either conventional fields in which the user can enter values using the keyboard or by selecting from a value list, or checkboxes or radio buttons, for which the mouse is required. All input/output fields have a name linking them to a screen field. The data type of the screen field determines the input format. For example, you cannot enter letters in a numeric field. The screen recognizes when you try to enter invalid values. Radio buttons and checkboxes always have the data type CHAR and length 1. A selected radio button or checkbox has the value ‘X’, when empty, both have the value SPACE. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The ABAP program must contain identically-named data objects that correspond to the screen fields, otherwise data may be lost (see also &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Linking ABAP Strings to Screen Fields&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;). The ABAP data types that correspond to the screen data types are listed in a table in the &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Data Types in the ABAP Dictionary&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; section. The ABAP fields for checkboxes and radio buttons must have type C and length 1. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;After the PBO event has been processed, the screen fields are filled with the values from the ABAP fields. Before or during the PAI event, the values from the screen fields are written to the ABAP fields. Note that only one radio button within a group can be selected. If more than one of the fields contains the value ‘X’, the program terminates. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;To ensure that screen fields and ABAP fields always correspond exactly, use the following procedure.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Local Program Fields&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;If you want to use input/output fields in one program only, you should create them in the ABAP program, activate the program, and then &lt;/span&gt;  &lt;img alt="Structure link" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/book.gif" border="0" /&gt; &lt;span style="font-family:Arial;font-size:85%;"&gt;copy&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; the fields from the ABAP program to the screen. Afterwards, however, you must avoid changing the fields in the ABAP program.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Screen Fields with Dictionary Reference&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;If your input/output fields are required in more than one program, and you want to use information from the ABAP Dictionary, such as field labels, field help, and input help, you should &lt;/span&gt;  &lt;img alt="Structure link" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/book.gif" border="0" /&gt; &lt;span style="font-family:Arial;font-size:85%;"&gt;copy&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; fields from the ABAP Dictionary. You can refer to both structures and database tables. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;You must then declare identically-named fields as an interface work area in the ABAP program using the TABLES statement. Declaring an identically-named field using a TYPES reference to the data type in the ABAP Dictionary is insufficient for data to be transferred between the screen and the ABAP program. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;To avoid naming conflicts between screen fields, work areas in programs, and database tables, it is often worth defining your own ABAP Dictionary structure for screens, containing all of the input/output fields you want to use for one or more screens of a program or for a package. The work areas that you declare with TABLES in the ABAP program then function exclusively as an interface between the program and the screen. If necessary, you can assign values between program fields and the interface work area.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The advantage of referring to ABAP Dictionary data types is that both the screen fields and the fields in the ABAP program are updated automatically if the data type changes.&lt;/span&gt;&lt;/p&gt;&lt;dir&gt;&lt;dir&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;img tabindex="0" alt="Example" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/beispiel.gif" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Local program fields&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;PROGRAM demo_dynpro_input_output.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;DATA: input  TYPE i,&lt;br /&gt;      output TYPE i,&lt;br /&gt;      radio1(1) TYPE c, radio2(1) TYPE c, radio3(1) TYPE c,&lt;br /&gt;      box1(1) TYPE c, box2(1) TYPE c, box3(1) TYPE c, exit(1) TYPE c.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;CALL SCREEN 100.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;MODULE init_screen_100 OUTPUT.&lt;br /&gt;  CLEAR input.&lt;br /&gt;  radio1 = 'X'.&lt;br /&gt;  CLEAR: radio2, radio3.&lt;br /&gt;ENDMODULE.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;MODULE user_command_0100 INPUT.&lt;br /&gt;  output = input.&lt;br /&gt;  box1 = radio1.&lt;br /&gt;  box2 = radio2.&lt;br /&gt;  box3 = radio3.&lt;br /&gt;  IF exit NE space.&lt;br /&gt;  LEAVE PROGRAM.&lt;br /&gt;ENDIF.&lt;br /&gt;ENDMODULE.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The  next screen number of screen 100 is 100 (statically-defined). Its layout is as follows:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;a name="_963911388"&gt;&lt;/a&gt;&lt;a name="_963911403"&gt;&lt;/a&gt;&lt;a name="_963912036"&gt;&lt;/a&gt;&lt;a name="_963912278"&gt;&lt;/a&gt;&lt;a name="_963913782"&gt;&lt;/a&gt;&lt;a name="_963914622"&gt;&lt;/a&gt;&lt;a name="_964000242"&gt;&lt;/a&gt;&lt;a name="_964001753"&gt;&lt;/a&gt;&lt;a name="_964003734"&gt;&lt;/a&gt;&lt;a name="_964004490"&gt;&lt;/a&gt;&lt;/span&gt; &lt;a name="_964004490"&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba9e735c111d1829f0000e829fbfe/Image240.gif" height="262" /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;a name="_964004490"&gt; &lt;span style="font-family:Arial;font-size:85%;"&gt; &lt;p&gt;The part of the element list relevant for the screen fields is as follows:&lt;/p&gt;&lt;/span&gt;&lt;/a&gt;&lt;/dir&gt;&lt;/dir&gt;&lt;a name="_964004490"&gt;  &lt;/a&gt;&lt;p align="left"&gt;  &lt;table border="1" width="100%" cellpadding="7" cellspacing="1"&gt;  &lt;tbody&gt;&lt;tr&gt;&lt;td valign="top" width="40%"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Name&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;span style="font-family:Courier New;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Type&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="18%"&gt;  &lt;span style="font-family:Courier New;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;defLg&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;span style="font-family:Courier New;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Format&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="40%"&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;INPUT&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;I/O&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="18%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;9&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;INT4&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="40%"&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;OUTPUT&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;I/O&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="18%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;11&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;INT4&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="40%"&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;RADIO1&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Radio&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="18%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;1&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;CHAR&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="40%"&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;BOX1&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Check&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="18%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;1&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;CHAR&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="40%"&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;RADIO2&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Radio&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="18%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;1&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;CHAR&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="40%"&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;BOX2&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Check&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="18%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;1&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;CHAR&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="40%"&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;RADIO3&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Radio&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="18%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;1&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;CHAR&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="40%"&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;BOX3&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Check&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="18%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;1&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;CHAR&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="40%"&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;EXIT&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Check&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="18%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;1&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;CHAR&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;tr&gt;&lt;td valign="top" width="40%"&gt; &lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;OK&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="18%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;20&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;  &lt;td valign="top" width="21%"&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;OK&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;dir&gt;&lt;dir&gt;&lt;a name="_964004490"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;p&gt;The screen fields OUTPUT, BOX1, BOX2, and BOX3 cannot accept user input.&lt;/p&gt;&lt;p&gt;The length of INPUT is such that the user can enter a nine-digit integer without thousand separators. However, the display in the OUTPUT field contains up to two thousand separators. Had we left the length of INPUT at 11 digits, a runtime error could have occurred. &lt;/p&gt;&lt;p&gt;The screen flow logic is as follows:&lt;/p&gt;&lt;/span&gt;  &lt;/a&gt;&lt;p&gt;&lt;a name="_964004490"&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;PROCESS BEFORE OUTPUT.&lt;br /&gt;  MODULE init_screen_100.&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a name="_964004490"&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;PROCESS AFTER INPUT.&lt;br /&gt;  MODULE user_command_0100.&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;a name="_964004490"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;The entries in the input fields are passed to the ABAP program in the PAI event, and assigned to the output fields in the dialog module USER_COMMAND_100. The next time the screen appears, the screen fields have been filled appropriately. The input fields are set in the PBO dialog module INT_SCREEN_100. If the user selects the screen field EXIT (value ‘X’), the program ends.&lt;/p&gt;&lt;p&gt;&lt;img tabindex="0" alt="Example" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/beispiel.gif" /&gt;&lt;/p&gt;&lt;p&gt;Screen fields with Dictionary reference&lt;/p&gt;&lt;/span&gt;  &lt;/a&gt;&lt;p&gt;&lt;a name="_964004490"&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;PROGRAM demo_dynpro_dictionary.&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a name="_964004490"&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;TABLES demo_conn.&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a name="_964004490"&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;DATA wa_spfli TYPE spfli.&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a name="_964004490"&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;CALL SCREEN 100.&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a name="_964004490"&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;MODULE init_screen_100 OUTPUT.&lt;br /&gt;  CLEAR demo_conn-mark.&lt;br /&gt;  MOVE-CORRESPONDING wa_spfli TO demo_conn.&lt;br /&gt;  CLEAR wa_spfli.&lt;br /&gt;ENDMODULE.&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a name="_964004490"&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;MODULE user_command_0100 INPUT.&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a name="_964004490"&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;  IF demo_conn-mark = 'X'.&lt;br /&gt;  LEAVE PROGRAM.&lt;br /&gt;ENDIF.&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a name="_964004490"&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;  MOVE-CORRESPONDING demo_conn TO wa_spfli.&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a name="_964004490"&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;  SELECT  SINGLE&lt;br /&gt;          cityfrom airpfrom cityto airpto fltime deptime arrtime&lt;br /&gt;    INTO  CORRESPONDING FIELDS OF wa_spfli&lt;br /&gt;    FROM  spfli&lt;br /&gt;    WHERE carrid = wa_spfli-carrid AND connid = wa_spfli-connid.&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a name="_964004490"&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;ENDMODULE.&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;a name="_964004490"&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;/a&gt;&lt;p&gt;&lt;a name="_964004490"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The statically-defined next screen for screen 100 is 100. It uses components of the structure DEMO_CONN, &lt;/span&gt;  &lt;/a&gt;&lt;img alt="Structure link" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/book.gif" border="0" /&gt; &lt;span style="font-family:Arial;font-size:85%;"&gt;copied&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; from the ABAP Dictionary, and looks like this:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;a name="_964008678"&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba9e735c111d1829f0000e829fbfe/Image241.gif" height="391" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The structure DEMO_CONN exists in the ABAP Dictionary specially for screens that use the flight data model. It contains the components of the database table SPFLI, but also a component MARK. MARK uses the domain S_FLAG, which may only have the values SPACE and X. On the above screen, the ABAP Dictionary text for MARK has been overwritten with ‘Cancel’. For all other fields, the ABAP Dictionary texts have been retained. The input attribute of some of the fields has been switched off in the Screen Painter.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Users can enter values for the airline and flight number. Automatic field checks against check tables in the ABAP Dictionary, field help, and input help are automatically available. The field checks are performed automatically before any of the dialog modules in the ABAP program are called. Users cannot enter values for the airline that do not exist in the check table SCARR, values for the flight number that are not in SPFLI, or values for MARK other than SPACE and X. There is no need to program any of these checks in the ABAP program. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The screen flow logic is as follows:&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;PROCESS BEFORE OUTPUT.&lt;br /&gt;  MODULE init_screen_100.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;PROCESS AFTER INPUT.&lt;br /&gt;  MODULE user_command_0100.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;The module USER_COMMAND_100 in the ABAP program reads data from the database table with the key fields specified (and checked) on the screen, and sends them back to the screen in the PBO module INIT_SCREEN_100. The work area DEMO_CONN, defined using the TABLES statement, serves as an interface between the program and the screen. Meanwhile the data from the database is processed in the work area WA_SPFLI. If the user selects the screen field ‘Cancel’ (value ‘X’), the program ends.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/span&gt;&lt;/dir&gt;&lt;/dir&gt; &lt;!--a11y--&gt;&lt;img src="http://help.sap.com/saphelp_47x200/helpdata/en/images/1x1.gif" tabindex="0" alt="Leaving content frame" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-5982919408935059820?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/5982919408935059820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=5982919408935059820' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5982919408935059820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5982919408935059820'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/processing-inputoutput-fields.html' title='Processing Input/Output Fields'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-5084645307473098048</id><published>2009-06-10T19:57:00.000+05:30</published><updated>2009-06-10T19:58:14.490+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ABAP User Dialogs'/><title type='text'>Processing Screen</title><content type='html'>&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;There are two ways of calling a screen. You can either use a transaction code, or the CALL SCREEN statement in an ABAP program. When you call a screen, the PROCESS BEFORE OUTPUT event (PBO) is called, and the corresponding event block in the screen flow logic is processed. The screen itself is then displayed until the user triggers the PROCESS AFTER INPUT (PAI) event by choosing a function. In between, there may be field or input help processing. The corresponding event blocks in the flow logic are processed, if they exist. The main purpose of event blocks in the screen flow logic is to call dialog modules in the ABAP program and to provide the ABAP program with data.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;User Actions on Screens&lt;/span&gt;&lt;/p&gt;&lt;p&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Calling ABAP Dialog Modules&lt;/span&gt;&lt;/p&gt;&lt;p&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Input Checks&lt;/span&gt;&lt;/p&gt;&lt;p&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Field Help, Input Help, and Dropdown Boxes&lt;/span&gt;&lt;/p&gt;&lt;p&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Modifying Screens Dynamically&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-5084645307473098048?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/5084645307473098048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=5084645307473098048' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5084645307473098048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5084645307473098048'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/processing-screen.html' title='Processing Screen'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-876109590549605771</id><published>2009-06-10T19:55:00.000+05:30</published><updated>2009-06-10T19:57:01.714+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ABAP User Dialogs'/><title type='text'>Screens</title><content type='html'>&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Screens are the most general type of user dialog that you can use in ABAP programs. You do not define them in ABAP programs, but instead in the Screen Painter. A screen consists of the input/output mask and the flow logic. You can define screens for any program with type 1, M, or F.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The screens in a single ABAP program can be combined to form &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;screen sequences&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;. You can call single screens or screen sequences either using a transaction code from outside the ABAP program, or by using the CALL SCREEN statement in the corresponding ABAP program. When you call a screen or screen sequence, the screen flow logic takes control of the &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;ABAP program execution&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;. You can define screen sequences dynamically by setting the next screen attribute for a screen dynamically in the ABAP program.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;A screen consists of the input/output mask and the flow logic. The screen flow logic is divided into the Process Before Output (PBO) event, which is processed before the screen is displayed, and the Process After Input (PAI) event, which is processed after a user action on the screen.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The following diagram shows the place of screens between the GUI status and the ABAP program:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;a name="_981803133"&gt;&lt;/a&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/e4/2adbef449911d1949c0000e8353423/Image759.gif" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The screen flow logic calls dialog modules in the ABAP program, either to prepare the screen for display (PBO event) or to process the user's entries (PAI event). Screens are dynamic programs, and have their own data objects, called screen fields. These are linked to the input/output fields that appear on the screen itself. When the screen is displayed, and when it finishes processing, the system passes data between the screen fields and data objects in the ABAP program. Data is copied between identically-named fields. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Each screen has a GUI status, containing a menu bar, standard toolbar, and an application toolbar. Like screens, GUI statuses are independent components of the ABAP program. You create them in the ABAP Workbench using the Menu Painter. You assign GUI statuses to screens dynamically in your ABAP programs. Each screen is linked to the current GUI status by a special screen field into which the corresponding function code is placed whenever the user chooses a function. The screen passes the function code to the ABAP program just like any other screen field. You can then read it in the program.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-876109590549605771?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/876109590549605771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=876109590549605771' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/876109590549605771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/876109590549605771'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/screens.html' title='Screens'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-5379842947821813155</id><published>2009-06-10T19:54:00.000+05:30</published><updated>2009-06-10T19:55:43.900+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ABAP User Dialogs'/><title type='text'>ABAP User Dialogs</title><content type='html'>&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;img tabindex="0" alt="This graphic is explained in the accompanying text" src="http://help.sap.com/saphelp_47x200/helpdata/en/c9/5472fc787f11d194c90000e8353423/Image72.gif" height="354" /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;This section describes the dialogs that you can use in ABAP to communicate with program users. It explains how to pass data between user dialogs and ABAP programs, how to define user dialogs within your programs, and how to process user input. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Currently, ABAP programs with type 1 (executable programs), M (module pools), and F (function groups) can contain their own user dialogs. In the future, it is planned to allow classes in ABAP Objects also to have screens. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Screens&lt;/span&gt;&lt;/p&gt;&lt;p&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Selection Screens&lt;/span&gt;&lt;/p&gt;&lt;p&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Lists&lt;/span&gt;&lt;/p&gt;&lt;p&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Switching Between Dialog Screens and List Display&lt;/span&gt;&lt;/p&gt;&lt;p&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;Messages&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-5379842947821813155?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/5379842947821813155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=5379842947821813155' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5379842947821813155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5379842947821813155'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/abap-user-dialogs.html' title='ABAP User Dialogs'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-4056000261681799553</id><published>2009-06-10T19:53:00.000+05:30</published><updated>2009-06-10T19:54:10.163+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Performance Notes'/><title type='text'>Reduce the Database Load</title><content type='html'>&lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;Unlike application servers and presentation servers, there is only one database server in your system. You should therefore aim to reduce the database load as much as possible. You can use the following methods: &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Buffer Tables on the Application Server&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;You can considerably reduce the time required to access data by buffering it in the application server table buffer. Reading a single entry from table T001 can take between 8 and 600 milliseconds, while reading it from the table buffer takes 0.2 - 1 milliseconds.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Whether a table can be buffered or not depends its technical attributes in the ABAP Dictionary. There are three buffering types: &lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;li&gt;&lt;b&gt;Resident buffering&lt;/b&gt; (100%) The first time the table is accessed, its entire contents are loaded in the table buffer.&lt;/li&gt;  &lt;li&gt;&lt;b&gt;Generic buffering&lt;/b&gt; In this case, you need to specify a generic key (some of the key fields) in the technical settings of the table in the ABAP Dictionary. The table contents are then divided into generic areas. When you access data with one of the generic keys, the whole generic area is loaded into the table buffer. Client-specific tables are often buffered generically by client. &lt;/li&gt;  &lt;li&gt;&lt;b&gt;Partial buffering&lt;/b&gt; (single entry) Only single entries are read from the database and stored in the table buffer.&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;  &lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;When you read from buffered tables, the following happens: &lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;li&gt;An ABAP program requests data from a buffered table. &lt;/li&gt;  &lt;li&gt;The ABAP processor interprets the Open SQL statement. If the table is defined as a buffered table in the ABAP Dictionary, the ABAP processor checks in the local buffer on the application server to see if the table (or part of it) has already been buffered.&lt;/li&gt;  &lt;li&gt;If the table has not yet been buffered, the request is passed on to the database. If the data exists in the buffer, it is sent to the program. &lt;/li&gt;  &lt;li&gt;The database server passes the data to the application server, which places it in the table buffer.  &lt;/li&gt;  &lt;li&gt;The data is passed to the program. &lt;/li&gt;&lt;/span&gt;&lt;/ol&gt;  &lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;When you change a buffered table, the following happens:  &lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;li&gt;The database table is changed and the buffer on the application server is updated. The database interface logs the update statement in the table DDLOG. If the system has more than one application server, the buffer on the other servers is not updated at once. &lt;/li&gt;  &lt;li&gt;All application servers periodically read the contents of table DDLOG, and delete the corresponding contents from their buffers where necessary. The granularity depends on the buffering type. The table buffers in a distributed system are generally synchronized every 60 seconds (parameter: rsdisp/bufreftime).&lt;/li&gt;  &lt;li&gt;Within this period, users on non-synchronized application servers will read old data. The data is not recognized as obsolete until the next buffer synchronization. The next time it is accessed, it is re-read from the database.&lt;/li&gt;&lt;/span&gt;&lt;/ol&gt;  &lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;You should buffer the following types of tables:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;li&gt;Tables that are read very frequently&lt;/li&gt;  &lt;li&gt;Tables that are changed very infrequently&lt;/li&gt;  &lt;li&gt;Relatively small tables (few lines, few columns, or short columns)&lt;/li&gt;  &lt;li&gt;Tables where delayed update is acceptable.&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;  &lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Once you have buffered a table, take care not to use any Open SQL statements that bypass the buffer. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The SELECT statement bypasses the buffer when you use any of the following:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;li&gt;The BYPASSING BUFFER addition in the FROM clause&lt;/li&gt;  &lt;li&gt;The DISTINCT addition in the SELECT clause&lt;/li&gt;  &lt;li&gt;Aggregate expressions in the SELECT clause&lt;/li&gt;  &lt;li&gt;Joins in the FROM clause&lt;/li&gt;  &lt;li&gt;The IS NULL condition in the WHERE clause&lt;/li&gt;  &lt;li&gt;Subqueries in the WHERE clause&lt;/li&gt;  &lt;li&gt;The ORDER BY clause&lt;/li&gt;  &lt;li&gt;The GROUP BY clause&lt;/li&gt;  &lt;li&gt;The FOR UPDATE addition&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;  &lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Furthermore, all Native SQL statements bypass the buffer.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Avoid Reading Data Repeatedly&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;If you avoid reading the same data repeatedly, you both reduce the number of database accesses and reduce the load on the database. Furthermore, a "dirty read" may occur with database tables other than Oracle. This means that the second time you read data from a database table, it may be different from the data read the first time. To ensure that the data in your program is consistent, you should read it once only and then store it in an internal table.&lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Sort Data in Your ABAP Programs&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The ORDER BY clause in the SELECT statement is not necessarily optimized by the database system or executed with the correct index. This can result in increased runtime costs. You should only use ORDER BY if the database sort uses the same index with which the table is read. To find out which index the system uses, use SQL Trace in the ABAP Workbench Performance Trace. If the indexes are not the same, it is more efficient to read the data into an internal table or extract and sort it in the ABAP program using the SORT statement.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Use Logical Databases&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;SAP supplies &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;logical databases&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; for all applications. A logical database is an ABAP program that decouples Open SQL statements from application programs. They are optimized for the best possible database performance. However, it is important that you use the right logical database. The hierarchy of the data you want to read must reflect the structure of the logical database, otherwise, they can have a negative effect on performance. For example, if you want to read data from a table right at the bottom of the hierarchy of the logical database, it has to read at least the key fields of all tables above it in the hierarchy. In this case, it is more efficient to use a SELECT statement.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-4056000261681799553?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/4056000261681799553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=4056000261681799553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4056000261681799553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4056000261681799553'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/reduce-database-load.html' title='Reduce the Database Load'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-4054427830986325628</id><published>2009-06-10T19:52:00.002+05:30</published><updated>2009-06-10T19:53:29.895+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Performance Notes'/><title type='text'>Minimize the Search Overhead</title><content type='html'>&lt;b&gt;&lt;span style="font-family:Arial;font-size:180%;color:#000080;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;You minimize the size of the result set by using the WHERE and HAVING clauses. To increase the efficiency of these clauses, you should formulate them to fit with the database table indexes. &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Database Indexes&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Indexes speed up data selection from the database. They consist of selected fields of a table, of which a copy is then made in &lt;b&gt;sorted&lt;/b&gt; order. If you specify the index fields correctly in a condition in the WHERE or HAVING clause, the system only searches part of the index (index range scan).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The primary index is always created automatically in the R/3 System. It consists of the primary key fields of the database table. This means that for each combination of fields in the index, there is a maximum of one line in the table. This kind of index is also known as UNIQUE. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;If you cannot use the primary index to determine the result set because, for example, none of the primary index fields occur in the WHERE or HAVING clause, the system searches through the entire table (full table scan). For this case, you can create secondary indexes, which can restrict the number of table entries searched to form the result set. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;You specify the fields of secondary indexes using the &lt;/span&gt;   &lt;span style="font-family:Arial;font-size:85%;"&gt;ABAP Dictionary&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;. You can also determine whether the index is unique or not. However, you should not create secondary indexes to cover all possible combinations of fields. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Only create one if you select data by fields that are not contained in another index, and the performance is very poor. Furthermore, you should only create secondary indexes for database tables from which you mainly read, since indexes have to be updated each time the database table is changed. As a rule, secondary indexes should not contain more than four fields, and you should not have more than five indexes for a single database table. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;If a table has more than five indexes, you run the risk of the optimizer choosing the wrong one for a particular operation. For this reason, you should avoid indexes with overlapping contents.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Secondary indexes should contain columns that you use frequently in a selection, and that are as highly selective as possible. The fewer table entries that can be selected by a certain column, the higher that column’s selectivity. Place the most selective fields at the beginning of the index. Your secondary index should be so selective that each index entry corresponds to at most five percent of the table entries. If this is not the case, it is not worth creating the index. You should also avoid creating indexes for fields that are not always filled, where their value is initial for most entries in the table. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;If all of the columns in the SELECT clause are contained in the index, the system does not have to search the actual table data after reading from the index. If you have a SELECT clause with very few columns, you can improve performance dramatically by including these columns in a secondary index. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Formulating Conditions for Indexes&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;You should bear in mind the following when formulating conditions for the WHERE and HAVING clauses so that the system can use a database index and does not have to use a full table scan.&lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Check for Equality and Link Using AND&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;The database index search is particularly efficient if you check all index fields for equality (= or EQ) and link the expressions using AND. &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Use Positive Conditions&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;The database system only supports queries that describe the result in positive terms, for example, EQ or LIKE. It does not support negative expressions like NE or NOT LIKE. &lt;/p&gt;&lt;p&gt;If possible, avoid using the NOT operator in the WHERE clause, because it is not supported by database indexes; invert the logical expression instead.&lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Using OR&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;The optimizer usually stops working when an OR expression occurs in the condition. This means that the columns checked using OR are not included in the index search. An exception to this are OR expressions at the outside of conditions. You should try to reformulate conditions that apply OR expressions to columns relevant to the index, for example, into an IN condition. &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Using Part of the Index&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;If you construct an index from several columns, the system can still use it even if you only specify a few of the columns in a condition. However, in this case, the sequence of the columns in the index is important. A column can only be used in the index search if all of the columns before it in the index definition have also been specified in the condition.&lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Checking for Null Values&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;The IS NULL condition can cause problems with indexes. Some database systems do not store null values in the index structure. Consequently, this field cannot be used in the index. &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Avoid Complex Conditions&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;Avoid complex conditions, since the statements have to be broken down into their individual components by the database system.  &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-4054427830986325628?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/4054427830986325628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=4054427830986325628' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4054427830986325628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4054427830986325628'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/minimize-search-overhead.html' title='Minimize the Search Overhead'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-5900371975278058440</id><published>2009-06-10T19:52:00.001+05:30</published><updated>2009-06-10T19:52:50.047+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Performance Notes'/><title type='text'>Minimize the Number of Data Transfers</title><content type='html'>&lt;b&gt;&lt;span style="font-family:Arial;font-size:180%;color:#000080;"&gt;&lt;a href="http://help.sap.com/saphelp_47x200/helpdata/en/aa/47349a0f1c11d295380000e8353423/frameset.htm" target="_top"&gt;&lt;img alt="Locate the document in its SAP Library structure" src="http://help.sap.com/saphelp_47x200/helpdata/en/images/locate.gif" align="baseline" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;In every Open SQL statement, data is transferred between the application server and the database system. Furthermore, the database system has to construct or reopen the appropriate administration data for each database access. You can therefore minimize the load on the network and the database system by minimizing the number of times you access the database. &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Multiple Operations Instead of Single Operations&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;When you change data using INSERT, UPDATE, and DELETE, use internal tables instead of single entries. If you read data using SELECT, it is worth using multiple operations if you want to process the data more than once, other wise, a simple select loop is more efficient. &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Avoid Repeated Access&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;As a rule you should read a given set of data once only in your program, and using a single access. Avoid accessing the same data more than once (for example, SELECT before an UPDATE).&lt;/p&gt;&lt;/span&gt;  &lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;&lt;p&gt;Avoid Nested SELECT Loops&lt;/p&gt;&lt;/span&gt;&lt;/b&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;A simple SELECT loop is a single database access whose result is passed to the ABAP program line by line. Nested SELECT loops mean that the number of accesses in the inner loop is multiplied by the number of accesses in the outer loop. You should therefore only use nested SELECT loops if the selection in the outer loop contains very few lines.&lt;/p&gt;&lt;p&gt;However, using combinations of data from different database tables is more the rule than the exception in the relational data model. You can use the following techniques to avoid nested SELECT statements: &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;ABAP Dictionary Views&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;You can define joins between database tables statically and systemwide as views in the ABAP Dictionary. ABAP Dictionary views can be used by all ABAP programs. One of their advantages is that fields that are common to both tables (join fields) are only transferred once from the database to the application server. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Views in the ABAP Dictionary are implemented as inner joins. If the inner table contains no lines that correspond to lines in the outer table, no data is transferred. This is not always the desired result. For example, when you read data from a text table, you want to include lines in the selection even if the corresponding text does not exist in the required language. If you want to include all of the data from the outer table, you can program a left outer join in ABAP. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The links between the tables in the view are created and optimized by the database system. Like database tables, you can buffer views on the application server. The same buffering rules apply to views as to tables. In other words, it is most appropriate for views that you use mostly to read data. This reduces the network load and the amount of physical I/O in the database. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Joins in the FROM Clause&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;You can read data from more than one database table in a single SELECT statement by using inner or left outer joins in the FROM clause. &lt;/p&gt;&lt;p&gt;The disadvantage of using joins is that redundant data is read from the hierarchically-superior table if there is a 1:N relationship between the outer and inner tables. This can considerably increase the amount of data transferred from the database to the application server. Therefore, when you program a join, you should ensure that the SELECT clause contains a list of only the columns that you really need. Furthermore, joins bypass the table buffer and read directly from the database. For this reason, you should use an ABAP Dictionary view instead of a join if you only want to read the data.&lt;/p&gt;&lt;p&gt;The runtime of a join statement is heavily dependent on the database optimizer, especially when it contains more than two database tables. However, joins are nearly always quicker than using nested SELECT statements.&lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Subqueries in the WHERE and HAVING Clauses&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;Another way of accessing more than one database table in the same Open SQL statement is to use subqueries in the WHERE or HAVING clause. The data from a subquery is not transferred to the application server. Instead, it is used to evaluate conditions in the database system. This is a simple and effective way of programming complex database operations.&lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Using Internal Tables&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;It is also possible to avoid nested SELECT loops by placing the selection from the outer loop in an internal table and then running the inner selection once only using the FOR ALL ENTRIES addition. This technique stems from the time before joins were allowed in the FROM clause. On the other hand, it does prevent redundant data from being transferred from the database.&lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;color:#000080;"&gt;Using a Cursor to Read Data&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;A further method is to decouple the INTO clause from the SELECT statement by opening a cursor using OPEN CURSOR and reading data line by line using FETCH NEXT CURSOR. You must open a new cursor for each nested loop. In this case, you must ensure yourself that the correct lines are read from the database tables in the correct order. This usually requires a foreign key relationship between the database tables, and that they are sorted by the foreign key. &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-5900371975278058440?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/5900371975278058440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=5900371975278058440' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5900371975278058440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/5900371975278058440'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/minimize-number-of-data-transfers.html' title='Minimize the Number of Data Transfers'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-4512980867350931710</id><published>2009-06-10T19:51:00.000+05:30</published><updated>2009-06-10T19:52:16.034+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Performance Notes'/><title type='text'>Minimize the Amount of Data Transferred</title><content type='html'>&lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;Data is transferred between the database system and the application server in blocks. Each block is up to 32 KB in size (the precise size depends on your network communication hardware). Administration information is transported in the blocks as well as the data. &lt;/p&gt;&lt;p&gt;To minimize the network load, you should transfer as few blocks as possible. Open SQL allows you to do this as follows: &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Restrict the Number of Lines&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;If you only want to read a certain number of lines in a SELECT statement, use the UP TO &lt;n&gt; ROWS addition in the FROM clause. This tells the database system only to transfer &lt;n&gt; lines back to the application server. This is more efficient than transferring more lines than necessary back to the application server and then discarding them in your ABAP program. &lt;/p&gt;&lt;p&gt;If you expect your WHERE clause to return a large number of duplicate entries, you can use the DISTINCT addition in the SELECT clause. &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Restrict the Number of Columns&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;You should only read the columns from a database table that you actually need in the program. To do this, list the columns in the SELECT clause. Note here that the INTO CORRESPONDING FIELDS addition in the INTO clause is only efficient with large volumes of data, otherwise the runtime required to compare the names is too great. For small amounts of data, use a list of variables in the INTO clause.&lt;/p&gt;&lt;p&gt;Do not use * to select all columns unless you really need them. However, if you list individual columns, you may have to adjust the program if the structure of the database table is changed in the ABAP Dictionary. If you specify the database table dynamically, you must always read all of its columns. &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Use Aggregate Functions&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;If you only want to use data for calculations, it is often more efficient to use the aggregate functions of the SELECT clause than to read the individual entries from the database and perform the calculations in the ABAP program. &lt;/p&gt;&lt;p&gt;Aggregate functions allow you to find out the number of values and find the sum, average, minimum, and maximum values. Following an aggregate expression, only its result is transferred from the database. &lt;/p&gt;&lt;/span&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family:Arial;font-size:130%;color:#000080;"&gt;Data Transfer when Changing Table Lines&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;When you use the UPDATE statement to change lines in the table, you should use the WHERE clause to specify the relevant lines, and then SET statements to change only the required columns. &lt;/p&gt;&lt;p&gt;When you use a work area to overwrite table lines, too much data is often transferred. Furthermore, this method requires an extra SELECT statement to fill the work area. &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/span&gt; &lt;!--a11y--&gt;&lt;img src="http://help.sap.com/saphelp_47x200/helpdata/en/images/1x1.gif" tabindex="0" alt="Leaving content frame" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8505976362135831828-4512980867350931710?l=sapabapnotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sapabapnotes.blogspot.com/feeds/4512980867350931710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8505976362135831828&amp;postID=4512980867350931710' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4512980867350931710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8505976362135831828/posts/default/4512980867350931710'/><link rel='alternate' type='text/html' href='http://sapabapnotes.blogspot.com/2009/06/minimize-amount-of-data-transferred.html' title='Minimize the Amount of Data Transferred'/><author><name>SANJU</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8505976362135831828.post-6868191914868739016</id><published>2009-06-10T19:50:00.002+05:30</published><updated>2009-06-10T19:51:38.057+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Performance Notes'/><title type='text'>Keep the Result Set Small</title><content type='html'>&lt;span style="font-family:Arial;font-size:85%;"&gt;  &lt;p&gt;You should aim to keep the result set small. This reduces both the amount of memory used in the database system and the network load when transferring data t
