P. 1
0 ABAP Overview - 2hrs

0 ABAP Overview - 2hrs

|Views: 7|Likes:
Published by manu_2010

More info:

Published by: manu_2010 on Aug 21, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/16/2014

pdf

text

original

SAP R/3 System Overview & ABAP/4 Programming

Beyond the Obvious

SAP R/3 System • Overview of R/3 System

Logical View of R/3 System

ABAP/4 - SAP R/3 PROGRAMMING LANGUAGE

Advanced Business Application Programming

ABAP/4 • Fourth generation language • Event driven • All SAP R/3 applications and parts of Basis are developed in ABAP • Verbose language .

Topics of Discussion • • • • • • ABAP Development Workbench Data Dictionary Reports BDC SAP Script Module Pool .

ABAP Development Workbench .

.ABAP Development Workbench ABAP Development Workbench is a graphical programming environment which enables us to create new ABAP applications and change existing SAP applications.

ABAP Workbench .Transaction code -S001 Tools -> ABAP Workbench .

Transaction code .SE80 .Repository Browser .

Data Dictionary .SE11 .

Function Builder .SE37 .

Screen Painter .SE51 .

Creating a Program Click the button ABAP Editor in the Workbench .

…Creating a program The program attributes screen looks like this .

. Debugging ...

Runtime Analysis • Tells us how long do specific operations take during the run • Gives the trace list of subroutines that have been processed • SQL trace helps to trace database calls to find out the tables used by the application .

Development class • A set of logically related development environment objects. • A development class together with its objects is transportable. • Each development class is under the administration of one user. .

Creating development class .

Data Dictionary .

Data Dictionary • ABAP Development workbench tool • Stores system wide data definition • Completely integrated with ABAP Workbench .

Data Dictionary objects • Data Elements • Domains • Tables • Structures • Views .

REPORTS .

system fields used in reports • Understand the selection screens • Understand the program level events. commands. conditions & loops • Understand the data retrieval from the tables and Internal tables • Understand the modularization techniques. field symbols and logical databases .ABAP/4 Reporting Objectives • Understand data declarations.

Types of programs Type 1 • run on its own • Can be started it in the R/3 system without a transaction code • Can be executed in background Type M ( Module pool) • Program cannot run on its own and can be called via a transaction code Type I ( Include ) .

This can only be declared for fields within tables defined in the TABLES statement. Example SELECT-OPTIONS: S_KUNNR FOR KNA1KUNNR. KUNNR .Program Selections • SELECT-OPTIONS Statement SELECT-OPTIONS <Name> FOR <Table field> NO EXTENSION OBLIGATORY LOWER CASE SELECT-OPTIONS allows specification of multiple values and ranges.

KUNNR .Program Selections • PARAMETERS Statement PARAMETERS <Name> TYPE LIKE OBLIGATORY AS CHECKBOX DEFAULT This statement allows entry of a single value on the selection screen. Example : PARAMETER : P_KUNNR LIKE KNA1-KUNNR.

. PARAMETERS R3 RADIOBUTTON GROUP GR1.Blocking Selection Screen • A sample screen – SELECTION-SCREEN BEGIN OF BLOCK RAD1 WITH FRAME TITLE TEXT-002. PARAMETERS R2 RADIOBUTTON GROUP GR1. SELECTION-SCREEN END OF BLOCK RAD1. PARAMETERS R1 RADIOBUTTON GROUP GR1.

And this does not create a variable.DATA Definitions • TYPES Statement TYPES <name> TYPE or LIKE DECIMALS SAP allows the creation of new user defined data types. . Example : TYPES : CC LIKE BKPF-BUKRS DATA : NEW_CC TYPE CC. just a new type that can be used in creating a variable.

. Internal Tables are defined as an extension of a structure. with the addition of an OCCURS clause. T_KUNNR LIKE KNA1-KUNNR. (variable definitions) END OF <name>.Data Definitions • Internal Tables DATA : BEGIN OF <name> OCCURS x. END OF T_WRK. SW TYPE C. Example DATA : BEGIN OF T_WRK.

Program Level Events • • • • • • • • • INITIALIZATION. AT SELECTION-SCREEN AT SELECTION-SCREEN OUTPUT START-OF-SELECTION END-OF-SELECTION TOP-OF-PAGE END-OF-PAGE AT LINE-SELECTION AT USER-COMMAND .

• IF Statement CASE Statement .

Modularization techniques • Defining Macros • Include program • Subroutines • Function Module .

BDC .

already available in electronic form ) • Suitable for entering large amounts of data as it executes the transactions automatically • Similar to entering the data in the transactions manually .Batch Data Communication • To transfer data from non-SAP systems ( ie.BDC .

BDC Methods • Classical Method • Call Transaction • Call Dialog .

1) Program name 2) Screen number 3) Screen begin 4) Field name 5) Field value .Preparing a BDC Table • The BDC table should have five fields viz..

.no indu. Field value mat.MATNR RM03M-MBRSH . Prog name SAPMMO3M Screen No 0060 Scrn begin X Field name RM03M. sec 0080 X RM03M-WERKS target pla .Preparing a BDC Table For eg. . SAPMM03M .

SAP Script .

character format.SAP Script Objectives • Understand Forms. paragraph format etc. various components of forms such as windows. . symbols and function modules in SAP Script. pages. • Understand the control commands.

Forms • Controls the page layout and text formatting A form of the graphical Form Painter consists of • • • • • Header data Page layout Paragraph format Character format Documentation .

Control commands • PERFORM Command To Call an ABAP subroutine (form) from any program Syntax /: PERFORM <form> IN PROGRAM <prog> /: USING &VAR1& … /: CHANGING &VAR2& … /: ENDPERFORM .… SAP Script .

Function Modules in SAP Script • • • • • Form functions OPEN_FORM WRITE_FORM CLOSE_FORM START_FORM Opens the form output. Calls a form element Ends the form output. Starts a new form. . • Database • READ_TEXT passes Reads a text module and it to the specified work areas.

Module Pool .

Creating Screens Click screen painter button in Workbench .

Structure of program .

• • • • Process before output (PBO) Process after input (PAI) Process on value request (POV) Process on help request (POH) . Flow logic describes how the program reacts to the user actions. The events used for this purpose are.Flow logic The flow logic of a screen drives the processing sequence for that particular screen.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->