The New ABAP Debugger - An Introduction. Boris Gebhardt Christoph Stoeck SAP AG



Similar documents
Introducing the next generation of ABAP debugging the New ABAP Debugger

How to test and debug an ASP.NET application

SAP Certified Development Professional - ABAP with SAP NetWeaver 7.0

Database Studio is the new tool to administrate SAP MaxDB database instances as of version 7.5.

KEYBOARD SHORTCUTS. Note: Keyboard shortcuts may be different for the same icon depending upon the SAP screen you are in.

Enterprise Asset Management System

Release Document Version: User Guide: SAP BusinessObjects Analysis, edition for Microsoft Office

Microsoft Access 2010 handout

Fleet Maintenance Software

Splitting the Custom Container & Display more than one ALV

ABAP Debugging Tips and Tricks

Outlook 2010 Setup Guide (POP3)

Using the Query Analyzer

TestManager Administration Guide

ABAP for Functional Consultants

Decision Support AITS University Administration. Web Intelligence Rich Client 4.1 User Guide

Web Intelligence User Guide

Creating Advanced Reports with the SAP Query Tool

Creating a Web Service using IBM Rational HATS. For IBM System i (5250) Creating a Web Service using HATS 1

Business Explorer (BEx)

How to Implement the X.509 Certificate Based Single Sign-On Solution with SAP Netweaver Single Sign-On

Sage CRM. 7.2 Mobile Guide

Carry it Easy. User Guide

Versions Addressed: Microsoft Office Outlook 2010/2013. Document Updated: Copyright 2014 Smarsh, Inc. All right reserved

Training Simulator and Demo Software

How to set up your Secure in Outlook 2010*

Source A.Kishore SAP 4.7 Installation Guide (Part-2)

This web-based report provides information for single funds centers. The report can be run for one funds center or multiple single funds centers.

Internet Explorer 7. Getting Started The Internet Explorer Window. Tabs NEW! Working with the Tab Row. Microsoft QUICK Source

SoundLAB Software Download Software from the Bogen website:

SAP Business Intelligence (BI) Reporting Training for MM. General Navigation. Rick Heckman PASSHE 1/31/2012

Developing Own Crystal Reports

Windows XP Pro: Basics 1

PUBLIC. How to Use in SAP Business One. Solutions from SAP. SAP Business One 2005 A SP01

Quick Start Tutorial. Using the TASKING* Software Development Tools with the Intel 8x930 Family Evaluation Board

Symantec Enterprise Vault

TRIAL SOFTWARE GUIDE 1. PURPOSE OF THIS GUIDE 2. DOWNLOAD THE TRIALSOFTWARE 3. START WIDS 4. OPEN A SAMPLE COURSE, PROGRAM

Application Note C++ Debugging

MAS 500 Intelligence Tips and Tricks Booklet Vol. 1

Business Intelligence Overview. BW/BI Security. BW/BI Architecture. Business Explorer (BEx) BW/BI BEx Tools Overview. What is BEx?

SA-9600 Surface Area Software Manual

Welcome to MaxMobile. Introduction. System Requirements. MaxMobile 10.5 for Windows Mobile Pocket PC

COMMANDS 1 Overview... 1 Default Commands... 2 Creating a Script from a Command Document Revision History... 10

TAMUS Terminal Server Setup BPP SQL/Alva

Trial version of GADD Dashboards Builder

Surf it Easy. User Guide

edgebooks Quick Start Guide 4

Desktop, Web and Mobile Testing Tutorials

Working with SQL Server Integration Services

Welcome to MaxMobile. Introduction. System Requirements

Decision Support AITS University Administration. EDDIE 4.1 User Guide

Utilities ComCash

Microsoft Access 2010 Part 1: Introduction to Access

EXCEL FINANCIAL USES

Before you can use the Duke Ambient environment to start working on your projects or

As on other History Notes tabs, toolbar buttons are available to add and delete notes.

SIMIAN systems. Setting up a Sitellite development environment on Windows. Sitellite Content Management System

Presentations and PowerPoint

... Introduction... 17

Where do I find? Global Outlook options and features

IT Quick Reference Guides Using Windows 7

For Introduction to Java Programming, 5E By Y. Daniel Liang

Setting up SQL Translation Framework OBE for Database 12cR1

SAP CRM 7.02 SAP CRM 7.02, version for SAP HANA October 2012 English Document Version 3.1

DiskPulse DISK CHANGE MONITOR

DBACockpit for Oracle. Dr. Ralf Hackmann SAP AG - CoE EMEA Tech Appl. Platf. DOAG St. Leon-Rot 02. July 2013

Exclaimer Mail Archiver User Manual

Infoview XIR3. User Guide. 1 of 20

How to Implement a SAP HANA Database Procedure and consume it from an ABAP Program Step-by-Step Tutorial

Results CRM 2012 User Manual

Oracle Data Integrator for Big Data. Alex Kotopoulis Senior Principal Product Manager

UML Class Diagrams (1.8.7) 9/2/2009

Q N X S O F T W A R E D E V E L O P M E N T P L A T F O R M v Steps to Developing a QNX Program Quickstart Guide

Skype for Business Online Meetings

Excel Pivot Tables. Blue Pecan Computer Training Ltd - Onsite Training Provider :: :: info@bluepecan.co.

Introduction To Microsoft Office PowerPoint Bob Booth July 2008 AP-PPT5

Mapping ITS s File Server Folder to Mosaic Windows to Publish a Website

VMware Horizon FLEX User Guide

User Guide. Trade Finance Global. Reports Centre. October nordea.com/cm OR tradefinance Name of document 8/8 2015/V1

Education Solutions Development, Inc. APECS Navigation: Business Systems Getting Started Reference Guide

Task Force on Technology / EXCEL

How to Create an ecatt?

ESET REMOTE ADMINISTRATOR. Migration guide

Microsoft Office Access 2007 which I refer to as Access throughout this book

Microsoft Migrating to PowerPoint 2010 from PowerPoint 2003

Salesforce Classic Guide for iphone

Toad for Data Analysts, Tips n Tricks

Connecting to SAP BW with Microsoft Excel PivotTables and ODBO

Appendix A. CMS(Client Management Software)

TRACE32 Debugger Getting Started... ICD Tutorial About the Tutorial... 2

Model 288B Charge Plate Graphing Software Operators Guide

Creating Basic Reports with the SAP Query Tool

COGNOS REPORTING SYSTEM USER GUIDE

How to create and personalize a PDF portfolio

Video Administration Backup and Restore Procedures

Upgrading MySQL from 32-bit to 64-bit

isupport 15 Release Notes

QUICK START FOR COURSES: USING BASIC COURSE SITE FEATURES

Transcription:

The New ABAP Debugger - An Introduction Boris Gebhardt Christoph Stoeck SAP AG 1

Content Motivation & Goals Two Process Architecture Starting The New Debugger New Debugger UI Main Parts Customize The New Debugger UI Debugger Tools Breakpoints Error Handling Open Points & Outlook Exercise Q&A 2

Content Motivation & Goals Two Process Architecture Starting The New Debugger New Debugger UI Main Parts Customize The New Debugger UI Debugger Tools Breakpoints Error Handling Open points & outlook Exercise Q&A 3

Motivation We have already a powerful ABAP debugger. Why do we need a new one?? 4

Motivation - Demo Demo Conversion exit demo TPDA_CONV_EXIT2 with classic debugger 5

Current Status Classic Debugger Classic Debugger Technology Debugger and debuggee run in the same (internal) session Debugger dynpros placed in-between Consequences Not all ABAP code can be debugged (no RPERFs: Conversion / Field exit)) Not free of side effects (F1, F4 help, list output) Implementation of new features not always straight-forward No chance to use modern UI techniques (no ABAP allowed in the debugger!) We need a new ABAP debugger technology 6

New ABAP Debugger First Impression 7

Goals New ABAP Debugger Higher productivity for development & support using ABAP debugger More robust debugger architecture (no side effects) Possibility to implement new features (e.g. a diff tool for internal tables) faster and with less risks More flexible & extensible state-of-the-art debugger UI Use two separated sessions for the debugger and the application 8

Content Motivation & Goals Two Process Architecture Starting The New Debugger New Debugger UI Main Parts Customize The New Debugger UI Debugger Tools Breakpoints Error Handling Open Points & Outlook Exercise Q&A 9

Two Process Architecture The New Debugger is attached to a session Session 1 - Debuggee Session 2 - Debugger /h ABAP VM Debugger Engine UI 10

Two Process Architecture - Consequences /h The New Debugger is started in a separated session, after prompting /h The debuggee is inactive while the debugger is active. Advantage: During debugging you still see your last screen input 11

Two Process Architecture - Consequences The debugger is still available but inactive, when the program finished The debugger is not closed as long as the debuggee session is alive! You may detach the debugger by prompting /hx in the debuggee session Advantage: The debugger with all your settings, variables, breakpoints, is always available, when you restart debugging! 12

Two Process Architecture - Consequences Demo Conversion exit demo TPDA_CONV_EXIT2 with new debugger 13

Content Motivation & Goals Two Process Architecture Starting The New Debugger New Debugger UI Main Parts Customize The New Debugger UI Debugger Tools Breakpoints Error Handling Open Points & Outlook Exercise Q&A 14

Starting The New Debugger The New Debugger can be started with same commands (/h, Debugging in se38 ) as the Classic Debugger. There is a system parameter to define the default debugger for the whole system. (Default = Classic Debugger) abap/debuggertool = TPDA (->New Debugger) Additionally each user can specify his default debugger in the workbench settings. 15

Switching Between New <-> Classic Debugger Some techniques and features are still missing in the New Debugger -> Easy switch between the two debugger variants is provided RPERF_ILLEGAL_STATEMENT Dump will come up, if you switch to the classic debugger with a conversion- or Field exit 16

Content Motivation & Goals Two Process Architecture Starting The New Debugger New Debugger UI Main Parts Customize The New Debugger UI Debugger Tools Breakpoints Error Handling Open Points & Outlook Exercise Q&A 17

New Debugger UI Main Parts Control Area Desktops Process Info Source line / SY-Fields Tools 18

New Debugger UI Desktops User specific desktops Standard desktops The New Debugger provides: Three user specific desktops, which you can customize and save as your favorite debugger environment Six standard desktops, which should cover most of the common working conditions in the debugger: Standard: Stepping through the code (Editor, Stack, Quick Watch) Structures: Compare structures Tables: Compare tables Objects: Compare objects DetailDispls: Compare strings, simple fields Breakpoints: Maintain your breakpoints Save current layout of the user specific desktops. The customizing of the standard desktops is NOT saved! 19

New Debugger UI Working With Desktops Demo Demo : demonstrate desktops -> compare two internal tables (zbgtest_itab/itab/itab2) 20

Content Motivation & Goals Two Process Architecture Starting The New Debugger New Debugger UI Main Parts Customize The New Debugger UI Debugger Tools Breakpoints Error Handling Open Points & Outlook Exercise Q&A 21

Customize The New Debugger UI Change Tool Size 22

Customize The New Debugger UI Number of Tools 23

Customize The New Debugger UI Toolbar With the normal Back button (F3) you can Undo all your layout changes Close Tool Create Tool Exchange Tool Full screen mode Maximize horizontally Swap Tool Services of the tool Context menu 24

Customize The New Debugger UI Demo Debug a standard transaction (se80) and demonstrate the UI customizing possibilities 25

Content Motivation & Goals Two Process Architecture Starting The New Debugger New Debugger UI Main Parts Customize The New Debugger UI Debugger Tools Breakpoints Error Handling Open Points & Outlook Exercise Q&A 26

Debugger Tools Up to 4 parallel visible instances of a tool (e.g. compare 4 internal tables) Tools are integrated in debugger framework and benefit from the provided services to customize the UI. (Change size, position, close tool, ) Tools provide standard services 27

Debugger Tools - Services If a tool provides services then a tool icon is displayed in the toolbar. The standard services are Download of the tool content to a local file Search in specified columns (STRG+F) Each tool can add it s own additional services Search standard service 28

Debugger Tools Standard Tools Standard tools: Source display Stack Breakpoints Variables Detail views Structure Internal table Object Simple types 29

Debugger Tools Detail View Tools - Navigation Navigation between ABAP data structures Double-click in the Editor fills appropriate Detail View and fills/opens Quick Watch Double-click in Quick Watch fills/opens appropriate Detail View Double-click in Detail View exchanges current tool by appropriate Detail View 30

Debugger Tools New Tools - Architecture Debugger Engine ADI Debugger UI framework TOOL_FACTORY OK_CODE_HANDLER SUBSCREEN_HANDLER Tool interface Stack Editor Breakpoints Tool class IF_TPDA_TOOL Tools Function group - screens 31

Debugger Tools New Tools How TO Extensibility (even plug in of new tools) Create the class and the necessary function groups Implement interface IF_TPDA_TOOL and if necessary IF_TPDA_TOOL_DETAIL_VIEW Copy the data transfer mechanism between instances and dynpro from existing tools Implement your functionality in the tool class and design the screens Register your tool for other events you are interested in Insert a new entry into New Debugger customizing tables, to register your tool 32

Debugger Tools Demo Debug zbgtest_itab -> Services (search, download ) Navigation Features of editor, stack OO View Detail view (translation) Change variables (structure, table ) 33

Content Motivation & Goals Two Process Architecture Starting The New Debugger New Debugger UI Main Parts Customize The New Debugger UI Debugger Tools Breakpoints Error Handling Open Points & Outlook Exercise Q&A 34

Breakpoints Classic Debugger breakpoints live in an internal sessions These breakpoints are no longer available, if a new internal session is created (SUBMIT, CALL TRANSACTION, ) New Debugger breakpoints live in an external sessions These breakpoins are lost when the debuggee session is closed. 35

Breakpoints Classic Debugger Demo Debug RSDEPEND (breakpoint at write) with classic debugger 36

Breakpoints Create A Breakpoint Create/Deactivate/Delete a breakpoint in the Editor by double-clicking on a line Create dynamic breakpoints 37

Breakpoints Maintain Breakpoints Create/Delete/Activate/Deactivate breakpoints Specify how often the breakpoint shall be skipped before stopping 38

Breakpoints New Debugger Demo Debug RSDEPEND with new debugger (break-point at write) (set breakpoint at FORM=WRITE_DESCR / PRG=RSPFPAR) 39

Content Motivation & Goals Two Process Architecture Starting The New Debugger New Debugger UI Main Parts Customize The New Debugger UI Debugger Tools Breakpoints Error Handling Open Points & Outlook Exercise Q&A 40

Error Handling The ABAP debugger is a very important tool which must run ALWAYS. Fall back in case of error: An error during the initialization of New Debugger (e.g. no tools found) occurs. The user can switch to Classic Debugger. New Debugger catches all exceptions raised by the tools. In case of a severe error, the tool will be closed. An error, or even an application dump in the New Debugger UI itself, does not influence the debuggee. The UI of New Debugger is restarted from scratch and the user can continue debugging. 41

Content Motivation & Goals Two Process Architecture Starting The New Debugger New Debugger UI Main Parts Customize The New Debugger UI Debugger Tools Breakpoints Error Handling Open Points & Outlook Exercise Q&A 42

Current Status: 6.40 Two session debugger technology Already implemented Standard debug features (breakpoints, variables, stack, ) UI framework and sophisticated standard tools Watchpoints Already implemented Already implemented Not yet implemented Debugging of special sessions: batch, RFC, update, HTTP Special features of Classic Debugger (system areas, ) Not yet implemented Not yet implemented 43

Outlook: 7.0 New Debugger becomes default Match functionality of Classic Debugger Further enhancements Debugger Engine Sophisticated dynamic breakpoints (breakpoint at special exception, event, message, program) Debug macros New debugger UI Trace Tool (SQL Trace, SE30, ST01) Dynpro Tool (SCREEN, attributes of screen elements) Diff tool for all detail views 44

Content Motivation & Goals Two Process Architecture Starting The New Debugger New Debugger UI Main Parts Customize The New Debugger UI Debugger Tools Breakpoints Error Handling Open Points & Outlook Exercise Q&A 45

Exercise I System / logon info: SYSTEM W01 (sapwas01.wdf.sap.corp/00) CLIENT 100 USER DEMOxx (01-10) PASSWORD TRAIN ( or TRAINING change it to TRAIN please) Preparation: Change your workbench user settings to New Debugger Start debugging report ZBGTEST_S3_EX within SE38. The exercises in report ZBGTEST_S3_EX start all with a hard coded breakpoint so that you can reach them easily in the debugger. Exercise 1: Layout customizing (a) Play with the layout customizing of the New Debugger e.g try to maximize the Editor horizontally in order to see the full line length -> switch to the line length 72 using the service menu of the editor (b) Save your layout and restart the debugger to see that your new settings are loaded automatically 46

Exercise II Exercise 2: displaying / changing variables (a) (b) (c) Change the variables of the IF clause: If struc ='AA' and sy-subrc = 9 and sy-title is initial. so that you see the message on the debuggee screen. Try to use Jump to statement to get directly to the message without the need of changing variables. Try to jump back to the message statement after receiving the message Exercise 3: Object Detail View (a) When we create an instance of CL_GUI_ALV_GRID, we transfer the object reference CONTAINER. create object alv_control exporting i_parent = container. Please find out in which attribute of ALV_CONTROL the object reference CONTAINER is stored. Hint: Display the object reference CONTAINER and check the Display Reference Tab (b) Display ALV_CONTROL (inheritance) to find out why one of the following casts did not work. ref2?= alv_control. ref?= alv_control. 47

Exercise III Exercise 4: Table View / Breakpoints (a) Display ITAB in the table view (full screen), when you reached the first breakpoint of exc. 4 - How many lines are in the table check the content of the different columns (b) This internal table ITAB, which contains the content of DB table SFLIGHT, is exported to the ABAP memory and afterwards we submit a second report - Continue until you reach the second hard coded break-point of exc. 4 and check the table ITAB which is imported from our ABAP memory. - Try to find out how and why the table ITAB differs from our original SFLIGHT table (ITAB2) which we stored in the ABAP memory 48

Exercise IV Exercise 5: Table View / Breakpoints - Hint Set a breakpoint after the first export to memory. Run to this point and set a dynamic breakpoint at EXPORT in order to find potential over writers of our ABAP memory. After finding the EXPORT in function TPDA_MY_CONVERSION2, which overwrites our ABAP Memory with another table ITAB(1. row is different), correct the internal table ITAB before the EXPORT. (row 1 / MANDT = XX ->100) You will see that after this correction we reach the branch ITAB = ITAB2 and everything is ok. 49

Exercise V Optional Exercise 5: Detail View for single fields The content of a file is loaded in two long hex fields. Both hex-fields are are always manipulated identically and in parallel, but when we compare them at the end, they differ. Try top find out where the difference comes from. Hint: The program writes 123456789 in the text which is represented by the hex fields. Use the detail view for single fields and here the tabular and translation view for both fields in parallel and try to find the difference. (Use code page = 1100 for the translation view ) Take care of the variables X and X2 in report ZBGTEST_S3_EX2 50

Content Motivation & Goals Two Process Architecture Starting The New Debugger New Debugger UI Main Parts Customize The New Debugger UI Debugger Tools Breakpoints Error Handling Open Points & Outlook Exercise Q&A 51

Questions? Q&A 52