0 umn 2011 erp terapan abap introduction session # 8

of 52 /52
1 UMN 2011 ERP Terapan ABAP Introduction Session # 8

Author: abel-hoover

Post on 26-Dec-2015

223 views

Category:

Documents


0 download

Embed Size (px)

TRANSCRIPT

  • Slide 1
  • 0 UMN 2011 ERP Terapan ABAP Introduction Session # 8
  • Slide 2
  • Topik Bahasan ABAP Workbench ABAP Dictionary List Processing Transaction Programming Interfaces for data transfer John Natal 2011 / UMN 1
  • Slide 3
  • What is ABAP/4? 2 ABAP/4 Advanced Business Applications Programming Language 4 th Generation ABAP/4 was developed using C++ SAP R/3 was made using ABAP/4 ABAP/4 is the Development Tool of SAP R/3
  • Slide 4
  • ABAP is a Tools 3 ABAP/4 It is used by SAP developers to build the transactions that make up the R/3 application. It is also used by corporations to customize their R/3 applications. ABAP/4 is not used by customers of SAP to develop complex applications from scratch, but is used instead to provide additional business functionality
  • Slide 5
  • The roles of ABAP/4 in SAP R/3 Two most common uses for ABAP/4: 1.Producing Custom Reports A REPORT is an ABAP program that reads specific data from SAPs database and then displays the data via a computer screen or a printed page. 2.Developing Custom Interfaces for SAP An INTERFACE is an ABAP program that moves data into SAP, or reads data from SAP and writes it out to a system file to be transferred to an external computer system, such as a legacy mainframe. 4
  • Slide 6
  • The roles of ABAP/4 in SAP R/3 Other uses for ABAP/4 1.Conversion Programs Change data into a format usable by SAP 2.Custom Transactions Similar to SAP standard transactions, but are written to fulfill some business functions not provided by SAP standard transactions. 5
  • Slide 7
  • The roles of ABAP/4 in SAP R/3 Final Notes: From an ABAPers Perspective, SAP is nothing more than a collection of database tables. The main concern of an ABAPers is how to present and modify these tables and their data as required by the user. 6
  • Slide 8
  • ABAP Workbench (SAP Development Tools) John Natal 2011 / UMN 7 SE 80 SE 38 SE 11 SE 37 etc
  • Slide 9
  • Object Navigator John Natal 2011 / UMN 8 SE80
  • Slide 10
  • Object Navigator John Natal 2011 / UMN 9 SE80 NAVIGATION AREA REPOSITORY OBJECTS DISPLAY AREA
  • Slide 11
  • Object Navigator John Natal 2011 / UMN 10 SE80
  • Slide 12
  • Object Navigator John Natal 2011 / UMN 11 SE80 REPOSITORY GROUPS
  • Slide 13
  • ABAP Editor John Natal 2011 / UMN 12 SE38
  • Slide 14
  • Useful T-CODE for ABAP Developers John Natal 2011 / UMN 13 SE11 ABAP/4 Dictionary Maintenance SE12 ABAP/4 Dictionary Display SE16 Data Browser SE24 Class Builder SE37 Function Builder SE38 ABAP Editor SE41 Menu Painter SE43 Maintain Menu Area SE51 Screen Painter SE71 SAPScript Layout Set SE80 Object Navigator / Development Workbench SE84 ABAP/4 Repository Information System SE87 Data Modeler Information System SE91 Maintain Messages SE93 Maintain Transaction
  • Slide 15
  • Useful T-CODE for ABAP Developers (Contd) John Natal 2011 / UMN 14 SM30 Maintain Table View SM31 Table Maintenance SM35 View Batch Input Session SM37 View Background Jobs SMOD - Editing/activating new customer enhancements CMOD - Editing/activating new customer enhancements SNRO - Object browser for number range maintenance SQ01 - ABAP/4 Query : Maintain Queries SQ02 - ABAP/4 Query : Maintain Funct. Areas SQ03 - ABAP/4 Query : Maintain User Groups ST22 - ABAP Dump analysis SU53 - Display Authorization Values for User SMARTFORMS Create/Change SAP Smartforms ABAPDOCU ABAP Documentation and Examples
  • Slide 16
  • General Syntax ABAP John Natal 2011 / UMN 15
  • Slide 17
  • General Syntax ABAP John Natal 2011 / UMN 16
  • Slide 18
  • General Syntax ABAP John Natal 2011 / UMN 17
  • Slide 19
  • John Natal 2011 / UMN 18 Displaying Data: Sample ABAP/4 Code
  • Slide 20
  • John Natal 2011 / UMN 19 Displaying Data: Setting Up the Page The first non-comment line in a Program. It names the Program and may affect the way in which output is formatted by the system
  • Slide 21
  • Displaying Data: The WRITE Statement 20 The most basic ABAP/4 Command which outputs text/data to the screen.
  • Slide 22
  • Displaying Data: The WRITE Statement 21 New Line without this, the output will be written on the current line
  • Slide 23
  • Displaying Data: The WRITE Statement 22 Column Position without this, the output will be written on the current column
  • Slide 24
  • Displaying Data: The WRITE Statement 23 String Output Limiter the output characters will be limited to the assigned quantity
  • Slide 25
  • Displaying Data: The WRITE Statement 24 Output can be either a variable or constant
  • Slide 26
  • Displaying Data: Using the FORMAT Command 25 FORMAT [INTENSIFIED] [INTENSIFIED OFF] [COLOR color] [COLOR OFF] [INVERSE] [INVERSE OFF] [RESET].
  • Slide 27
  • Displaying Data: Displaying Messages Syntax MESSAGE message type message number [WITH text]. message type a single character which defines the type of message displayed message number a three-digit code referring to a corresponding text found in the message ID specified in the REPORT statement WITH text additional text displayed together with the error message 26
  • Slide 28
  • Displaying Data: Displaying Messages 27 MessageTypeConsequences E Error The message appears and the application stops at the current point it is at. W Warning The message appears and the user must press enter for the application to continue. I Information A pop-up window opens with the message text, and the user must press Enter to continue. A Abend This message class cancels the transaction that the user is currently using. S Success This message provides an informational message at the bottom of the screen and does not impede the program in any way. X Abort This message aborts the program and generates an ABAP/4 Short Dump
  • Slide 29
  • Displaying Data: Displaying Messages 28 E Error The message appears and the application stops at the current point it is at.
  • Slide 30
  • Displaying Data: Displaying Messages 29 W Warning The message appears and the user must press enter for the application to continue.
  • Slide 31
  • Displaying Data: Displaying Messages 30 I Information A pop-up window opens with the message text, and the user must press Enter to continue.
  • Slide 32
  • Displaying Data: Displaying Messages 31 A Abend This message class cancels the transaction that the user is currently using.
  • Slide 33
  • Displaying Data: Displaying Messages 32 S Success This message provides an informational message at the bottom of the screen and does not impede the program in any way.
  • Slide 34
  • Displaying Data: Displaying Messages 33 X Abort This message aborts the program and generates an ABAP/4 Short Dump
  • Slide 35
  • Displaying Data: Displaying Messages 34 Important Note To output Messages, add the option MESSAGE ID name to the REPORT command. The message id name contains the standard texts for the error messages. To create a Message ID, just write the desired name (which has to start with either Z or Y) after the message-id option, then double-click the name.
  • Slide 36
  • 35 The End
  • Slide 37
  • Praktikum ABAP SE 80 SE 38 SE 11 SE 37 etc John Natal 2011 / UMN 36
  • Slide 38
  • 37 SAP R/3 Basics: Creating an ABAP/4 Program 2 ways to access the ABAP Editor : 1.Type SE38 in the Command Field,then press ENTER 2.Double Click, the Transaction Code Link SE38 in the Favorites Box in the Easy Access Menu * Applicable only if the Favorites Menu is already set-up.
  • Slide 39
  • 38 SAP R/3 Basics: Creating an ABAP/4 Program The Usual Path in the SAP Standard Menu: TOOLS > ABAP WORKBENCH > DEVELOPMENT > SE38 ABAP EDITOR
  • Slide 40
  • 39 SAP R/3 Basics: Creating an ABAP/4 Program Upon entering the ABAP Editor: Initial Screen 1. Type your program name in the Program Name Field All program names have to start with either a Z or a Y ! !
  • Slide 41
  • 40 SAP R/3 Basics: Creating an ABAP/4 Program 2. Make sure that the radio button is set at Source Code
  • Slide 42
  • 41 SAP R/3 Basics: Creating an ABAP/4 Program 3. Click Create
  • Slide 43
  • 42 SAP R/3 Basics: Creating an ABAP/4 Program Display is used for viewing a programs subobject without editing it Change is used for editing a programs subobject
  • Slide 44
  • 43 SAP R/3 Basics: Creating an ABAP/4 Program Change is used If you want to edit a program After Clicking Create, the Attributes Window will appear:
  • Slide 45
  • 44 SAP R/3 Basics: Creating an ABAP/4 Program Change is used If you want to edit a program 1. Type The Program Title,which is usually the Program description
  • Slide 46
  • 45 SAP R/3 Basics: Creating an ABAP/4 Program Change is used If you want to edit a program 2. Select EXECUTABLE PROGRAM under Type
  • Slide 47
  • 46 SAP R/3 Basics: Creating an ABAP/4 Program Change is used If you want to edit a program 3. Click SAVE or press ENTER
  • Slide 48
  • 47 SAP R/3 Basics: Creating an ABAP/4 Program After Clicking Save, an Object Directory Window will appear:
  • Slide 49
  • 48 SAP R/3 Basics: Creating an ABAP/4 Program Type &TMP in the Development Class Field And Click the Save Button
  • Slide 50
  • 49 SAP R/3 Basics: Creating an ABAP/4 Program OR Just simply click the Local Object button
  • Slide 51
  • 50 SAP R/3 Basics: Creating an ABAP/4 Program Important Note! The Programs that youll be making are saved as Local Objects simply because they will never be transported from your Development Server to your Production Server. In actual practice, a Workbench Change Request Number is issued by the system for the Basis Consultants to properly transport your code.
  • Slide 52
  • 51 SAP R/3 Basics: Creating an ABAP/4 Program After Clicking Saveor Local Object, You are now in the ABAP Editor You can now start ABAPING!