SAP_ABAP_workbench_tutorial.pdf

(612 KB) Pobierz
BC ABAP Workbench Tutorial
BC ABAP Workbench Tutorial
Release 4.6C
151953562.006.png 151953562.007.png
BC ABAP Workbench Tutorial
SAP AG
Copyright
© Copyright 2001 SAP AG. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose
without the express permission of SAP AG. The information contained herein may be changed
without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software
components of other software vendors.
Microsoft ® , WINDOWS ® , NT ® , EXCEL ® , Word ® , PowerPoint ® and SQL Server ® are registered
trademarks of
Microsoft Corporation.
IBM ® , DB2 ® , OS/2 ® , DB2/6000 ® , Parallel Sysplex ® , MVS/ESA ® , RS/6000 ® , AIX ® , S/390 ® ,
AS/400 ® , OS/390 ® , and OS/400 ® are registered trademarks of IBM Corporation.
ORACLE ® is a registered trademark of ORACLE Corporation.
INFORMIX ® -OnLine for SAP and Informix ® Dynamic Server TM are registered trademarks of
Informix Software Incorporated.
UNIX ® , X/Open ® , OSF/1 ® , and Motif ® are registered trademarks of the Open Group.
HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C ® , World Wide
Web Consortium,
Massachusetts Institute of Technology.
JAVA ® is a registered trademark of Sun Microsystems, Inc.
JAVASCRIPT ® is a registered trademark of Sun Microsystems, Inc., used under license for
technology invented and implemented by Netscape.
SAP, SAP Logo, R/2, RIVA, R/3, ABAP, SAP ArchiveLink, SAP Business Workflow, WebFlow,
SAP EarlyWatch, BAPI, SAPPHIRE, Management Cockpit, mySAP.com Logo and mySAP.com
are trademarks or registered trademarks of SAP AG in Germany and in several other countries
all over the world. All other products mentioned are trademarks or registered trademarks of their
respective companies.
2
April 2001
151953562.008.png 151953562.009.png
SAP AG
BC ABAP Workbench Tutorial
Icons
Icon
Meaning
Caution
Example
Note
Recommendation
Syntax
Tip
April 2001
3
151953562.001.png
BC ABAP Workbench Tutorial
SAP AG
Contents
BC ABAP Workbench Tutorial...................................................................................... 6
BC ABAP Workbench Tutorial ....................................................................................................................7
Note to the Reader .......................................................................................................................................8
About the Tutorial ........................................................................................................................................9
Prerequisites...............................................................................................................................................11
Terminology ................................................................................................................................................12
A Word About Interfaces ...........................................................................................................................13
Choosing Names for SAP Objects............................................................................................................14
Learning More.............................................................................................................................................15
Lesson 1: Understanding the Workbench Tools ....................................................................................16
Introduction to Lesson 1 ...........................................................................................................................17
Exercise 1: Opening the Workbench........................................................................................................18
Exercise 2: Learning the Workbench Tools ............................................................................................19
Exercise 3: Navigating an Object List ......................................................................................................21
Exercise 4: Creating a Program ................................................................................................................22
Exercise 5: Setting a Marker .....................................................................................................................24
Exercise 6: Creating a Transaction ..........................................................................................................25
Review of Lesson 1 ....................................................................................................................................26
Lesson 2: Working with Tables.................................................................................................................27
Introduction to Lesson 2 ...........................................................................................................................28
Exercise 1: Creating a Table Object .........................................................................................................30
Exercise 2: Specifying Table Fields .........................................................................................................31
Exercise 3: Defining Data Elements and Domains .................................................................................33
Exercise 4: Reusing Domains ...................................................................................................................35
Exercise 5: Defining a Value List ..............................................................................................................37
Exercise 6: Specifying Technical Settings ..............................................................................................38
Exercise 7: Activating a Table...................................................................................................................39
Review of Lesson 2 ....................................................................................................................................40
Lesson 3: Designing Screens ...................................................................................................................41
Introduction to Lesson 3 ...........................................................................................................................42
Exercise 1: Creating a Screen...................................................................................................................43
Exercise 2: Placing an Element on a Screen...........................................................................................44
Exercise 3: Refining a Screen ...................................................................................................................46
Exercise 4: Checking the Screen Layout.................................................................................................48
Exercise 5: Setting the OK Field ...............................................................................................................49
Review of Lesson 3 ....................................................................................................................................50
Lesson 4: Specifying a GUI Status ...........................................................................................................51
Introduction to Lesson 4 ...........................................................................................................................52
Exercise 1: Create a GUI Status................................................................................................................53
Exercise 2: Add Menus to Your Interface ................................................................................................54
Exercise 3: Define Function Keys.............................................................................................................55
4
April 2001
151953562.002.png 151953562.003.png
SAP AG
BC ABAP Workbench Tutorial
Exercise 4: Specify PushButtons .............................................................................................................56
Exercise 5: Finish Up .................................................................................................................................57
Review of Lesson 4 ....................................................................................................................................58
Lesson 5: Coding the Transaction ...........................................................................................................59
Introduction to Lesson 5 ...........................................................................................................................60
Exercise 1: Writing Flow Logic .................................................................................................................61
Exercise 2: Creating Modules ...................................................................................................................62
Exercise 3: Specifying Global Variables..................................................................................................63
Exercise 4: Coding the Modules...............................................................................................................64
Exercise 5: Creating a Message Class.....................................................................................................66
Exercise 6: Testing Your Transaction......................................................................................................67
Exercise 7: Running the Debugger...........................................................................................................68
Review of Lesson 5 ....................................................................................................................................69
Lesson 6: Working in a Team....................................................................................................................70
Introduction to Lesson 6 ...........................................................................................................................71
Exercise 1: Creating a Development Class .............................................................................................73
Exercise 2: Examining Change Request List ..........................................................................................74
Exercise 3: Adding Another Programmer................................................................................................75
Exercise 4: Creating a Program ................................................................................................................76
Exercise 5: Releasing the Change Request ............................................................................................77
Review of Lesson 6 ....................................................................................................................................79
April 2001
5
151953562.004.png 151953562.005.png
Zgłoś jeśli naruszono regulamin