68
Client/Server Principles In SAP terminology, a service means a service provided by a software component (software-oriented view). This component can consist of a process (compare work process) or a group of processes (compare application server) and is then called a server for that service. Software components that use this service are called clients. At the same time, clients can also be servers for specific services. A server often also means a computer (host) on which software components that provide specific services are running (hardware-oriented view). SAP System Client/Server Configurations The fundamental services in a business application system are presentation services, application services, and database services. In a one-tier SAP configuration, all processing tasks are performed on one server, as in classic mainframe processing. Two-tier SAP System configurations are usually implemented using special presentation servers that

ABAP TUTORIALS

Embed Size (px)

DESCRIPTION

iTS ABAP TUTORIALS

Citation preview

Page 1: ABAP TUTORIALS

Client/Server Principles

In SAP terminology, a service means a service provided by a software component (software-oriented view). This component can consist of a process (compare work process) or a group of processes (compare application server) and is then called a server for that service. Software components that use this service are called clients. At the same time, clients can also be servers for specific services. A server often also means a computer (host) on which software components that provide specific services are running (hardware-oriented view).

SAP System Client/Server Configurations

The fundamental services in a business application system are presentation services, application services, and database services. In a one-tier SAP configuration, all processing tasks are performed on one server, as in classic mainframe processing. Two-tier SAP System configurations are usually implemented using special presentation servers that are responsible solely for formatting the graphical user interface. Many SAP System users use Windows PCs for example as presentation servers. An alternative two-tier configuration (not shown) is to install powerful desktop systems and to use these for presentation and applications also (two-tier client/server). This type of configuration is particularly useful for processing-intensive applications (such as simulations) or for software developers, but due to the additional administration requirements is usually used for test purposes only.

Page 2: ABAP TUTORIALS

In a three-tier configuration, separate servers are used for each tier. Using data from the database server, several different application servers can operate at the same time. To ensure that the load on individual servers is as even as possible and to achieve optimal performance, you can use special application servers for individual application areas such as distribution or financial accounting (logon and load balancing).

SAP Database Interface

Today, large amounts of data are usually administered using relational database management systems (RDBMS). These systems store the data and the relationships between the data in two-dimensional tables, which are known for their logical simplicity. The definitions of the data, tables, and table relationships are stored in the data dictionary of the RDBMS.Within ABAP, SAP OPEN SQL is used to access application data in the database, independent of the corresponding RDBMS. The SAP database interface converts the open SQL statements from the ABAP statements into the corresponding database statements. This means that application programs written in ABAP are database-independent. Native SQL commands can be used in ABAP.When interpreting open SQL statements, the SAP database interface checks the syntax of these statements and automatically ensures the local SAP buffers in the shared memory of the application server are utilized optimally. Data frequently required by the applications is stored in these buffers so that the system does not have to access the database server to read this data. In particular, all technical data such as ABAP programs, screens, and ABAP Dictionary information, as well as some business process parameters usually remain unchanged in a running system, making them ideal buffering candidates.

Page 3: ABAP TUTORIALS

The same applies to certain business application data, which is accessed as read-only

SAP Application Services

The operating system views the SAP runtime system as a group of parallel, cooperating processes. On each application server these processes include the dispatcher as well as work processes; the number of work processes depends on the available resources. Work processes may be installed for dialog processing, update, dialog free background processing and spooling.In addition to these work process types (dialog processing (D), update (V: for the German “Verbuchung”), lock management (E), background processing (B), spool (S), the SAP runtime system provides two additional services for internal and external communication (below are the restrictions on the number of work processes):The message server (MS or M) communicates between the distributed dispatchers within the SAP System and is therefore the prerequisite for scalability using several parallel-processing application servers.The gateway server (GW or G) allows communication between SAP, R/2 and external application systems.

Dialog: Every dispatcher requires at least two dialog work processes Spool: At least one for each SAP System (more than one allowed for each

dispatcher) Update: At least one for each SAP System (more than one allowed for each

dispatcher)

Page 4: ABAP TUTORIALS

Background processing: At least two for each SAP System (more than one allowed for each dispatcher)

Enqueue: Only one enqueue work process is needed for each system

SAP Application Hierarchy

You can view the Repository structure in the application hierarchy. You can navigate to the application hierarchy from the initial screen using Tools -> ABAP Workbench -> Overview -> Application Hierarchy. (Transaction SE81).The application components are displayed in a tree structure in the application hierarchy. Expanding a component displays all the development classes that are assigned to that component.You can select a sub-tree and navigate from the application hierarchy to the Repository Information System. The system then collects all development classes for the sub-tree selected and passes them to the Information System.

Logging on to the SAP system

The SAP System is a client system. The client concept enables the joint operation, in one system, of several enterprises that are independent of each other in business terms. During each user session you can only access the data of the client selected during the logon.A client is, in organizational terms, an independent unit in the SAP System. Each client has its own data environment and therefore its own master data and transaction data, assigned user master records and charts of accounts, and specific customizing parameters. A user master record linked to the relevant client must be created for users to be able to log on to the system. To protect access, a password is required for logon. The password is hidden as you type (you only see asterisks).

SAP systems are available in several languages. Use the Language input field to select the logon language for each session. Multiple logons are always logged in the system beginning with Release 4.6. This is for security as well as licensing reasons. A warning

Page 5: ABAP TUTORIALS

message appears if the same user attempts to log on twice or more. This message offers three options:

Continue with current logon and end any other logons in the system Continue with current logon without ending any other logons in the system

(logged in system) Terminate current logon

SAP Screen Elements

Command field: You can use the command field to go to applications directly by entering the transaction code. You can find the transaction code either in the SAP Easy Access menu tree (see next slide) or in the relevant application under System® Status.Menu bar: The menus shown here depend on which application you are working in. These menus contain cascading menu options.Standard toolbar: The icons in the system function bar are available on all SAP screens. Any icons that you cannot use on a particular screen are dimmed. If you leave the cursor on an icon for a moment, a small flag will appear with the name (or function) of that icon. You will also see the corresponding function key. The application toolbar shows you which functions are available in the current application.Title bar: The title bar displays your current position and activity in the system.Check boxes: Checkboxes allow you to select several options simultaneously within a

Page 6: ABAP TUTORIALS

group.Radio buttons: Radio buttons allow you to select one option only.Status bar: The status bar displays information on the current system status, for example, warning and error messages.A tab provides a clearer overview of several information screens.Options: You can set your font size, list colors, and so on here.

SAP Easy Access Standard

SAP Easy Access is the standard entry screen displayed after logon. Using the menu path Extras® Set start transaction you can select a transaction of your choice to be the default entry screen after logon.You navigate through the system using a compact tree structure that you can adapt to your own specific requirements. Use the menu path Extras® Settings to change your view of the tree structure. You can use this to display technical names (transaction codes).

You can also create a Favorites list of the transactions, reports, files and Web sites you use most.You can add items to your favorites list using the Favorites menu option or by simply dragging & dropping them with the mouse.

Page 7: ABAP TUTORIALS

SAP Transactions

Transactions form the basis of SAP program processing. A transaction is the smallest step that can be executed by the user. 4 – 20 character transaction codes are commonly used to quickly access specific

screens in SAP. Transaction codes are entered in the OK (Command) field in the SAP System. A number of commands are provided to facilitate SAP session management and

transaction processing Transaction codes are stored in table TSTC. The transaction code of a particular screen can be easily identified by accessing

the System menu and choosing the “Status” option. The transaction code will be displayed in the”Sap Data/Repository Data/Transaction” field.

Example Transaction Codes:SE80 – Repository BrowserSE38 – ABAP EditorSE11 – ABAP DictionarySM04 – Overview of Users

OK Field Commands:/o – Lists user’s sessions/oxxxx – Creates a new session and starts transaction xxxx/n – Cancels current transaction/nxxxx – Cancels current transaction and starts transaction xxxx/h – Turns on Debugger mode/nend – Logs off/i – Deletes current session

SAP Sessions

A “session” is an independent window to work in. Multiple sessions allow several tasks to be worked on at once. To open a new session, select “Create session” from the System menu or use transaction “/oxxxx”. Each user can have up to six parallel sessions open.When logging on to a system with more than one user ID, or onto multiple clients on the same system (for example, some servers have one client for coding and another client for testing) be sure not to confuse the different sessions!

SAP General System Functions

Page 8: ABAP TUTORIALS

Create session – starts a parallel session End session – terminates the current session User profile – provides user info (defaults, address, parameters) Services – start reports, display and maintain tables Utilities – access to debugger, SQL trace, resource usage List – find character string, download code, print, save to reporting tree Workflow – Access SAP Workflow Own spool requests – shows spool request for specified selection Own job – displays status of the SAP user’s background jobs Short message – allows the user to send a message to another SAP user Status – displays user & system data (eg., current screen/transaction code etc.) Log off – closes all parallel sessions for current logon ID

The system menu can be accessed from all SAP transactions. The System Services menu contains, among others, the following options:

Reporting: Starts reports (ABAP programs). Output controller: This is where you manage user-specific print requests. Table maintenance: This is where you process tables and views. Batch input: Administers batch input sessions and data transfer.

Page 9: ABAP TUTORIALS

Jobs: This is where you can administer jobs that are processed in the background. SAP Service: Enables you to log on to SAP’s SAPNet SAP Frontend

SAP Help on Screen Fields

Users can get help on fields by pressing “F1” or clicking the help button on the toolbar when the cursor is positioned in the field in question. A list of possible entries for a field can be obtained by pressing “F4” or clicking the arrow to the right of the field (see diagram, left). To select a value from the possible entry list, double click the entry or position the cursor on the value and press “F2”.

Users can get object-specific information (for example, about fields, new options, messages, etc.) anywhere in the system by positioning the cursor on the relevant object and pressing F1. Search helps are ABAP dictionary objects designed to provide the users with a mechanism to search for and then select the appropriate field values. Search helps are used to define input help (F4 help) for screen fields. Search fields are fields whose possible input values are sought in the possible entries (F4 help) process.

Page 10: ABAP TUTORIALS

Creating a table in SAP ABAP 24 Dec 2011   | ABAP

Here are the steps required to create a table in SAP ABAP.

Step 1: Go to transaction SE11 and input a table name.

Step 2:

In the Dictionary menu:Select the Database table option and enter the name of the table to be created (for our example, use ZWAL1). Click on the Create option.It will take you to the screen shown belowShort text: Short description of the table. (Test Table)On the Attributes tab:  Delivery Class: Indicates who is responsible for maintaining the table, whether it is a parameterization table, etc. (We shall specify type A, = Application). Table maintenance allowed: Enable/disable modifications to the table while its contents are being viewed. (If this is not marked, the table registers cannot be modified during a display transaction). (Mark this with an X)

Page 11: ABAP TUTORIALS

On the Fields tab: Fields: The name of the field. Key: Indicates whether the field is part of the primary key for the table. A field or group of fields form a key for a table if they identify one unique register in the table. Every table must have a primary key. Field type: The name of the data element that describes the field. (*) Data & Length: The type and length of the data. (*) Check table: A ‘*’ will appear in this table when the data element introduced refers to a domain which has a table of permitted values or when it is associated with a foreign key (See later). Short text: Description of the field. (*)(*) It is possible to define table fields that are not linked to data elements. We can define their type, length and description directly. To create these fields use the Data Element/Direct type  button. To return to using data elements, click on this button a second time. (Although this possibility exists, it is not recommended).On the Currency/quant. fields tab. Reference table & Ref. Field:Only monetary fields (CURR) and quantity fields (QUAN) need to be referenced to other fields in the dictionary. Both the table and the field must be specified for these reference fields. The reference fields must be of type Currency Key (CUKY) for currency fields and type UNIT for quantity fields. This means that when the data is displayed its format will include the value in the field to which it is referenced.Once all the entries all completed, press the “Technical Settings” button on the application toolbar or select Goto à Technical Settings from the menu.

Page 12: ABAP TUTORIALS

The Data Dictionary will prompt to save the table and the provide an development class (and request number, if applicable). The development class and request are exactly the same as explained with relation to the ABAP editor and programs.

Data Class: The data class is used to provide a logical definition of the physical location in the database where the table will be saved. The physical location for the table will be determined by the use to which it will be put, e.g., mainly for updating, or for consulting the data. For example, tables that contain master data will not be updated often but will be consulted frequently (For our example, use APPL0) Size category: This indicates approximately the number of registers that the table will hold. (Select size 3)When finished, click on the check button  (Ctrl + F2), the save button  (F11) and then activate  (Ctrl + F3). Return to the initial screen by clicking on the  button (F3), then check   (Ctrl + F2) and finally activate the table  (Ctrl + F3).The concept of Buffering is explained in a later slide.

Page 13: ABAP TUTORIALS

An index involves ordering the registers in a table according to the values in one or more of its fields. Consequently, defining an index consists in indicating the fields used for it. Check  (Ctrl + F2), save  and activate   (Ctrl + F3) the table before creating an index.If no indexes have been defined for the table, a popup dialog box will appear asking you if you want to create an index.When you click the “Yes” button in the popup, a window will appear asking for an identifier for the index. (We shall use Z01).This takes us to the screen shown above  where we introduce the fields that compose the index.Short text: Description of the index. (Index by Company code.)

Page 14: ABAP TUTORIALS

Unique Index / Non-unique: If we mark the unique index option, we shall create a unique index, i.e., no more than one entry is allowed in the table having the same values for the index fields.Field name: The fields that form the index. We can type in the names of the fields or select them by clicking on the  button. (In our case, select the MANDT and BUKRS fields).When the index fields have been defined, save the definition  (F11), check it  (Ctrl + F2) and activate it  (Ctrl + F3).

Create a Program in SAP ABAP 21 Nov 2011   | ABAP Programs

You can navigate to the ABAP Editor through the Menu. You can also create favorites for certain transactions and put it into your custom menu. You can type SE38 from anywhere in the SAP environment to redirect you to the ABAP editor (must come out to a Area Menu or prefix transaction code with /n). Tools such as the Function Builder, Data Dictionary, Screen Painter and Menu Painter are integrated to the ABAP editor and you can navigate to the Editor and load the corresponding program by double-clicking on a program name on a Program field. The ABAP Editor can be used to create Programs of different types (Module Pool, Report, Include, Subroutine Pool, etc.)

Page 15: ABAP TUTORIALS

Steps to create a Program in SAP ABAP

Creating Program Step 1

As indicated before, the ABAP Editor can be used to create Module Pool (Dialog Programs), Report Programs (which output lists or reports by accessing the database), Includes (non executable programs which can be included into a main program), Subroutine Pool (a collection of subroutines which can be reused) and several other types of programs.

On the ABAP Editor: Initial Screen, a program name should be given and “Create” push button needs to be pressed.

A Developer Key maybe required for the specific user to create/edit programs. This is supplied by SAP.

All custom programs should begin with “Z” or “Y” if they are report programs. There are other specific conventions that need to be used for creation of custom

Module Pools (SAPMZxxxxx), custom Subroutine Pools (SAPFZxxxxx), etc. which are covered in later topics.

Page 16: ABAP TUTORIALS

Creating Program Step 2

Enter the Title (a description), Type (such as Executable Program, Module Pool, etc. Right now enter Executable Program)

Choose an Application and a Status for the Program (these are all informational attributes)

The checkbox for “Fixed Point Arithmetic” is mostly checked. This is to indicate that Fixed point arithmetic will be used to perform all calculations. If it is not checked, packed numbers (Decimals in ABAP) will be treated as integers when used in assignments and calculations.

By checking the “Editor Lock” checkbox, one could prevent other users from making changes to the program.Once all the attributes have been filled, press the “Save” Button.

Page 17: ABAP TUTORIALS

Creating Program Step 3

Enter the development class in this dialog box. A Development class groups together a set of related ABAP workbench objects. Programs, Tables, Structures, Menus, Screens, Messages, and even data can be assigned a development class.

A Development class is particularly useful when transporting Objects from one SAP “Instance” (R/3 system) to another.

You could create a new development class from the Object Navigator (also called the Repository Browser).An object can be created as a Local Object which would be specific to the user. A development class $TMP is assigned to such local objects.

Local Objects cannot be transported to other SAP Instances.

Page 18: ABAP TUTORIALS

Creating Program Step 4

If a valid development class had been assigned in the previous step (NOT applicable for “Local Objects”), then the system asks for a transport request.

A transport request is used to track the changes and can be used to:o Group related changes to a request numbero Pull back changes made against a certain request numbero Transport objects to another SAP Instance

Transports are managed in a Correction and Transportation System (CTS) which can be accessed by the transactions SE01, SE09 and SE10.

Page 19: ABAP TUTORIALS

Creating Program Step 5

The program now appears in the editor. ABAP code can be incorporated into the program after the “REPORT” statement.

If a check syntax is run on the program, any syntax errors are thrown on the same window on the bottom portion. Clicking on a syntax error takes you to the appropriate line.

Correct the errors (if any). Activate the program (Ctrl+F3 can be used as a shortcut) before executing it. All programs need to be activated before executing.

 

Introduction to ABAP Workbench 4 Oct 2011   | ABAP

The ABAP Workbench is the integrated development environment available in SAP which allows for users to maintain ABAP objects such as Programs, Screens, Menus, Dictionary Objects (such as Tables, Views, Structures, etc.), Messages, and other objects

Page 20: ABAP TUTORIALS

which aid in the development and enhancement of the SAP environment.

What is the ABAP Workbench

Graphical programming environment

Use it to create ABAP Applications Enhance and change existing SAP Applications

Use it to to do the following:

Write ABAP Code Design dialogs or Screens Create Menus with the Menu Painter Maintain Database objects Debug an Application Do performance Analyses Manage Conflicts and Versions

The ABAP workbench is a highly sophisticated language environment which can be used to develop applications in the ABAP programming languages. Whether it be to develop report programs, module pools (dialog programs), function modules or to make

Page 21: ABAP TUTORIALS

enhancements to existing SAP programs, the Workbench provides an excellent Language Environment which can be effectively utilized to build ABAP applications

The tight integration between the different components of the Workbench, the easy navigation provided within and between the different tools, the context-sensitive help provided to pull up information about any field, ABAP statement, Table, Structure etc. makes it probably one of the best Language environments available in the market.

ABAP Workbench Menus Layout

OverviewProvides tools that help you survey the objects in your system. You use the functions in this menu to locate objects by application, type, or development class.Application Hierarchy, Object Navigator (Repository Browser), Business Object Browser, Data Browser, Transport Organizer are some of the tools accessible from this menu.

DevelopmentContains tools that you use for creating SAP applications. The tools that appear in the toolbar also appear in this menu.ABAP Dictionary, ABAP Editor, Function Builder, Class Builder, Screen Painter, and Menu Painter are some of the tools accessible from this menu

Page 22: ABAP TUTORIALS

TestContains tools that let you test a completed program.Runtime Analysis, SQL Trace, Dump Analysis, Extended Check, and the Computer-Aided Test Tool (CATT) are some of the tools accessible from this menu.

UtilitiesContains tools related to but not directly required by the development process.Documentation Maintenance, Support Packages (SPAM), Upgrade Utilities, SAP Query, Enhancements (SMOD and CMOD) are some of the tools available in this menu.

Note: In the SAP System, remember that the “System” and “Help” menus are always part of the Menu bar no matter where you navigate.

ABAP Workbench Tools

Object Browser SE80 ABAP/4 Editor SE38 Data Dictionary (DDIC) SE11 Function Builder SE37 Screen Painter SE51 Menu Painter SE41 Performance Trace ST05 Runtime Analysis SE30 ABAP Debugger /h Class builder SE24

Parallel Cursor Method in ABAP 3 17 Aug 2011   | ABAP

A program with the right functionality and smartly written, but with poor performance will not satisfy the client requirements. Business programs usually handle huge amounts of data. ABAP programs in SAP implementations are not an exception to this, and they need to give the user acceptable response times before they can be delivered to the client. Therefore, every developer should pay special attention to performance when building programs. Although too many times the development environment will not have an adequate data volume (and nearly always not as in real productive systems), there is always a lot that can be done to deliver good programs from a performance standpoint.

Database accesses are probably the first focus point; wrong sentences searching records in tables may lead to extremely poor response times, and this needs to be taken care of. However, there is another important area to bear in mind, which is forgotten more often

Page 23: ABAP TUTORIALS

that it could be thought: data processing within the program. This white paper, oriented to developers and technical designers, will explain an amazing alternative way of processing data (applicable when handling together header and position records) that will give great response times, making it possible to build complex programs that need to process big amounts of data in an acceptable time and achieving customer satisfaction.

Parallel Cursor Method

Performance is a very important point in program building. ABAP include, with each new version released, improved sentences for data base accessing, new kinds of internal tables… everything dedicated to get a better performance in the code built. There is a lot of investigation to be done as it is a complex and extremely wide area.

Although it is not always easy to have an adequate development environment to carry out acceptable volume test (as in real productive systems) that would help identify performance issues in the programs, there are some tools in the SAP Workbench that can be used to optimize the programs that are going to be delivered, mainly focused on database accessing. It is very important to analyze the SQL sentences to ensure the ones being used are the right ones. SAP provides with two powerful tools, such as the Runtime analysis (SE30) and the SQL Trace (ST05). They show how open SQL statements are converted into native SQL statements, measure database accesses and help to improve program performance. The correct use of the FOR ALL ENTRIES clause, the optimization in the selection of fields on SELECT clause and in the WHERE clause restriction, the use of indexes when accessing data… These are some of the important points that have to be taken into account. However, the ABAP program will handle and process the data after it is retrieved from the database. This is an important area that should not be forgotten when optimizing programs performance.

This will explains the parallel cursor method (PCM), a method that can be used to improve the programs performance in this second important point, when handling header and position records together. This is explained with a real life example, comparing the results obtained with two different versions of source code, one with the traditional data handling and one applying the method. The white paper also gives technical instructions to apply the method in the special case when the tables have a different key.

Sequential Method

Get the starting Run time.Loop the header internal table. Inside the master loop, item data will be looped and if any item data found, both the header and item data will be moved to another internal table.Get the Ending Run Time.The difference in End and Start run time is the actual time taken for sequential search.

SORT <Header Internal Table> BY <KEY Field> ASCENDING.SORT <Item Internal Table> BY <KEY Field> <KEY Field> ASCENDING. 

Page 24: ABAP TUTORIALS

CLEAR: <Header Work Area>.GET RUN TIME FIELD <Begin Time>LOOP AT <Header Internal Table> INTO <Header Work Area>. CLEAR: <Item Work Area>. LOOP AT <Item Internal Table> INTO <Item Work Area>. WHERE <KEY Field> EQ <Header KEY Field>. PROCESS the Header AND Item DATA. ENDLOOP.ENDLOOP.GET RUN TIME FIELD <End Time>Total TIME = End TIME – Begin TIME.

Parallel Method

Sort the header and item internal table.Get the starting Run time.Loop the header internal table. Inside the master loop, Item data will be looped by checking the index.If the key field of item data is greater than the key field of header data, then there is no item data is found and exit from the detail loop.If item data is equal to the key field of header data, move the header and item data to another internal table. Store the index of the item data. And continue the process.Get the Ending Run Time.The difference in End and Start run time is the actual time taken for Parallel Cursor.

SORT <Header Internal Table> BY <KEY Field> ASCENDING.SORT <Item Internal Table> BY <KEY Field> <KEY Field> ASCENDING. CLEAR: <Header Work Area>.INITIALIZE INDEX VariableGET RUN TIME FIELD <Begin Time>LOOP AT <Item Internal Table> INTO <Item Work Area>. CLEAR: <Header Work Area>. LOOP AT <Header Internal Table> INTO <Item Work Area>. FROM <INDEX Number> IF <Item KEY Field> Greater Than <Header KEY Field>

NO DATA found IN the item INTERNAL TABLE. EXIT. ELSE <Item KEY Field> Equal TO <Header KEY Field> Store the INDEX OF the item INTERNAL TABLE INTO a variable. PROCESS the Header AND Item DATA. ENDIF. ENDLOOP.ENDLOOP.GET RUN TIME FIELD <End Time>Total TIME = End TIME – Begin TIME.

Page 25: ABAP TUTORIALS

ABAP : Introduction for Beginners 6 5 Aug 2011   | ABAP

ABAP Stands for Advanced Business Application Programming.  ABAP is a programming language created and used by SAP for the development of application programs,including: Reports, Screens, Interfaces & Data conversions. All of SAP applications and even parts of its basis system were developed in ABAP. ABAP is an event driven programming language.User actions and system events control the execution of an application.

ABAP Overview

The Advanced Business Application Programming / 4GL (ABAP/4, commonly referred to as ABAP) is SAP’s proprietary language. More than 80% of SAP R/3 is developed using ABAP. The ABAP Program code is “generated” into Byte-code at the time of Activation of the program and is processed by the ABAP Processor which is part of the Kernel and Basis Services (a set of core programs developed in C) at the time of execution. Any ABAP Program, because it requires the BASIS modules, can run only within an SAP environment.

Many features of the programming language and ABAP editor environment resemble the COBOL / IBM Mainframe environment although much of it has been scaled down somewhat to give the language a modern look. The language is case-insensitive and each statement terminates with a period.

ABAP programs are event-driven to an extent though the event handling capabilities are not similar to full-fledged object-oriented languages such as Java or even Visual Basic. ABAP objects or classes can be defined and implemented using the “Class Builder” for use in report and dialog programs.

Reporting

Report programs produce lists and can be classified as conventional reports and interactive reports.Conventional reports do not allow interaction by the user; therefore; the basic list contains extensive information that the user must often sort through to find the relevant data.

Interactive reports allows for interaction (and drilldown) with the user;therefore the user can produce secondary, detailed lists off of the basic list by choosing the relevant data and requesting more information.

ALV Reports also allows interaction by the user, it can display large amount of data at one short in the form of excel sheet.

Page 26: ABAP TUTORIALS

Components of ABAP Program

An ABAP program contains the following components:Source code: containing the ABAP statementsScreens: Consist of the screen layout and associated flow logic. You normally create the layout of a screen using the Screen Painter  However, there are special kinds of screens, called selection screens and lists, whose layout and flow logic are designed exclusively using ABAP statements.Interface: contains all of the entries in the menus, the standard toolbar, the application toolbar, and function key settings. It contains titles and statuses. A status is a collection of function key settings and menus.Text elements: are language-specific. They can be translated either directly from the text element maintenance tool, or using a special translation tool.Documentation: is also language-specific. Always write documentation from the user’s point of view. If you want to document the programming techniques you have used, use comments in the program code instead.

Page 27: ABAP TUTORIALS

Variants: allow you to predefine the values of input fields on the selection screen of a program.

 

Structure of ABAP Program

ABAP is an event-driven programming language, and as such is suited to processing user dialogs. The source code of an ABAP program consists of two parts:Declarations: Declarations include the statements for global data types and objects, selection screens, and (in ABAP Objects) local classes and interfaces within the program.Processing Blocks (indivisible program units)Each processing block must be programmed as a single entity. There are two basic kinds of processing blocks:

Event Blocks:Event blocks are introduced by an event keyword. They are not concluded explicitly, but end when the next processing block starts.

Dialog Modules and Procedures:Dialog modules and procedures are introduced and concluded using keywords. The contents of all processing blocks form the processing logic.When you generate the program, these parts are compiled to form the load version. This is interpreted at run time.

Page 28: ABAP TUTORIALS

 ABAP Terms to Remember

A Program is a series of structured ABAP statements. It could be an Executable program or a Dialog Program.

A Report is normally an ABAP Program which outputs a list. Some people refer to the List as the Report and to the ABAP report as a report program.

A Module Pool is a non-executable program which contains “modules” that control dialog processing.

A List is an output of an ABAP Report program.There are Programs of other types such as “Include” (a non-executable block of code that can be included into a main program), Subroutine Pool (a pool of subroutines or

FORMs which can be executed from another executable block), a function pool which contains a group of related functions, and so on.

Page 29: ABAP TUTORIALS

ABAP Editor

The ABAP Editor is used to create ,maintain, and execute ABAP programs. You could navigate to the ABAP Editor through the SAP menu for ABAP

Workbench or by typing in the transaction code SE38 in the command input field. More details about the features of the ABAP editor is covered later. Some methods for executing ABAP programs include:

o The ABAP Editor: Tools -> ABAP Workbench ->ABAP Editor (pushbutton)

o The Reporting function:  System->Services->Reporting ABAP programs that you create must start with a “Y” or A “Z” and can be up to

30 characters in length.

The editor combines a character based text entry capability with graphical icons and menu options to perform many of the functions necessary to build complex ABAP applications.The ABAP development environment provides a wide variety of tools required by the programmer for developing and testing of applications.

Pictured above is the online debugging tool which enables the programmer to step into the program line by line. The online debugging tool provides the programmer with the

Page 30: ABAP TUTORIALS

capability to designate watch variables. These variables once chosen can be viewed as their values change from statement to statement while the program executes. The programmer can even change their values to simulate different processing scenarios.

The ABAP program editor provides many functions through the use of graphical push-buttons. Among these functions are:

Toggle from display mode to edit mode Syntax check –with limited auto correction Activation –activates the program. Execution- Executes the program Where used list- to find the tables, statements, data elements used in the

programs. Find and repeat find. ABAP help.

Page 31: ABAP TUTORIALS

ABAP Programming Execution

The individual processing blocks are called in a predetermined sequence at runtime, regardless of the position in which they occur in the program.  Once a processing block has been called, the statements within it are processed seqeuentially.Event block

If the system program or a user triggers an event for which the corresponding event block has been written in the processing logic, that event block is processed. The program flow is controlled either by the system or the user.

Modularization unit

When the system encounters a modularization unit call within a processing block, it calls the corresponding processing block.  In this case, the program flow is controlled by the programmer.

Assigning transaction codes

To allow a module pool to be executed, you must assign a transaction code to it.  You can (but do not have to) assign a transaction code to an executable (type 1) program.

Page 32: ABAP TUTORIALS

Basic ABAP Program Syntax

An ABAP program is comprised of a series of individual ABAP statements Each statement must end with a period.( full –stop) Key words are always the first word in a statement. Words must be separated by at least one blank. ABAP statements can be indented and extend over several lines.

ABAP Program Structure

Page 33: ABAP TUTORIALS

ABAP programs must start with either the PROGRAM or REPORT statement.

This statement is produced automatically when the program is created through the Repository Browser.

The REPORT statement is used for ABAP reports programs. The PROGRAM statement is used for general ABAP programs( for example,

module pool programs).

All global data declarations must be grouped together at the beginning of the program in a declaration section.The statement section can consist of various processing blocks.This subject is dealt with in the remaining chapters of this course.Always Adhere to ABAP program naming standards dictated by the client.

Chaining Statements in ABAP

To avoid repeating key words,ABAP allows you to “chain” statements together if these statements begin with the same key word.

The key word is followed by a colon. Each chained statement component is separated by a comma. Blanks can be inserted before and after the separators (which may be

colons,commas or periods).

 Comments

Page 34: ABAP TUTORIALS

Comments are inserted into the program in two ways:

By placing an asterisk(*) in column 1,the complete line is designated as a comment line.

By placing a double quotation mark(“) within a line the remainder of the line is considered a comment.

ABAP Program Attributes

One way to create a new program is:

Go into the program menu from the ABAP Editor: Initial Screen. Select the Create menu option or use the Create function key.

You can also create , maintain ,and execute programs from the Repository Browser ( this is the recommended method for creating programs). The program attributes must be maintained before proceeding. ABAP programs must be assigned to a development class or ,if applicable, identified as a local ,private object. (This is a requirement of SAPs Correctionand Transport System.) The application, class and type attributes are used for the management of ABAP programs.

Page 35: ABAP TUTORIALS

The application, title, status and type attributes are used for the management of ABAP programs. The application,title,status and type attributes are required. Other attributes are optional requirements. F1 and F4 are help keys which allow you to search for the significance of the attributes or a list of allowed input values.

The ABAP editor’s Execute functionis used to start an ABAP program directly from the editor. An ABAP module pool program is executed using transaction codes.

ABAP Objects – Pros and Cons 2 3 Aug 2011   | ABAP

ABAP Objects establishes a different level of data encapsulation. In procedural programming the state of an application is held by global variables. In object-oriented programming, however, the state is kept inside separate classes and/or dynamically created objects, and the distinction between public and private components further helps to separate what should be externally visible from internal implementations. Even without in-depth object-oriented modeling, you can easily benefit from these features in your application programs

With ABAP Objects, you get multiple instantiability for free. Together with ABAP Object’s automatic garbage collection, this means that you as a developer neither have to deal with associating data and functionality nor need to explicitly control the lifetime of your objects

ABAP Objects gives you the freedom to work with (standalone) interfaces. This relieves you of the burden of knowing exactly how certain functionality is implemented. It also enables you to exchange an implementation later on without the need for modifications in the code that uses the interface

ABAP Objects makes it easy to incorporate event-driven programming models. Through a “publish and subscribe” model, application components can be loosely coupled. This allows greater flexibility than with the procedural approach, where the coupling is much tighter and the flow of program control is more predetermined.

ABAP Objects Pros

Page 36: ABAP TUTORIALS

ABAP Objects is more explicit and therefore simpler than classical ABAP. Examples for pitfalls arising from implicit behavior in classical ABAP are the realization of important interfaces via global data or the dependence of submitted programs on events triggered by the runtime environment. In comparison, ABAP Objects is based on a few basic and orthogonal concepts and is – therefore – more reliable and less error-prone

ABAP Objects has cleaner syntax and semantics rules. Classical ABAP is an evolutionary-grown language, containing obsolete statements and overlapping concepts. In ABAP Objects, that is in classes and methods, many obsolete statements and additions are forbidden, many implicit syntax completions must be made explicit, and potentially incorrect handling of data is detected and obviated

ABAP Objects is the only way to use new ABAP technology, such as services for GUI Controls, BSPs, or Web Dynpro. Therefore, you will inevitably be confronted with ABAP Objects when using these technologies. In such cases, it is highly recommendable to switch to ABAP Objects completely. Try to avoid a mix of classical and object-oriented techniques within an application.

ABAP Objects Cons

In general, object oriented programming always means overhead, on the one hand in the implementation and on the other in the declaration of objects.

Performance objects are normally always used to keep an object (eg. material). SAP is based on bulk processing. Due to that, if you are processing 1000 materials, 1000 objects need to be generated or you need to enhance the object with some workaround which might not be state of the art. Fact: To keep data among more instances, it might become very tricky.

At the time there are too less skilled and experienced resources available, e.g. to maintain the code

To search for bugs in the code might be very challenging, inheritance makes an effective bug fixing almost impossible.

The much-lauded maintenance decrease, comes only to its positive result, if the bugs have the same root cause. The reality shows that SAP is mostly effected by self-contained problems.

The explicit higher programming effort does not effect a better result. Re usability is given by function modules as well.

ABAP Programming Language 24 Jul 2011   | ABAP

Page 37: ABAP TUTORIALS

The ABAP Programming language allows multi language applications which allows SQL Access so has been enhanced for use with object oriented language. It’s especially created for dialog-based business programs. ABAP Programming props up type-specific processing of information, type conversions and type casting are supported. It also enables using translatable text elements, using which you are able to develop multi-language programs. OPEN SQL standard is enabled from within ABAP which enables direct database accesses. ABAP Objects is the object-oriented enhancement from the ABAP programming language. The ABAP syntax is platform-independent. Which means that it has exactly the same meaning or function, regardless of the relational database system and operating-system for that application and presentation server.

ABAP Programming Syntax

For that ABAP Programming Syntax, Following rules apply.

ABAP programming is composed of individual lines. The very first word inside a statement is known as an ABAP keyword. Each statement finishes having a period. Words should always be separated by a minumum of one space. Comments could be indented as you want.

With key phrases, additions and operands, the ABAP runtime system doesn’t differentiate between upper and lowercase.

Even though ABAP programming runtime system doesn’t differentiate between upper and lowercase, it is customary to create key phrases as well as their additions in uppercase letters and operands in lowercase. This type of representation may also be utilized in this program. For indentations as well as for transforming uppercase/lowercase letters, you should use the Pretty Printer (the correspondingly labeled button within the Editor).

Using Comments in ABAP Programming

Comments can extend beyond one line. You could have several comments  in one line (though this isn’t suggested). Lines that start with asterisk * within the first column are acknowledged as comment lines through the ABAP runtime system and therefore are

Page 38: ABAP TUTORIALS

overlooked. Double quotes marks ” indicate the rest of the lines are a comment.You are able to mix consecutive comments by having an identical beginning right into a chained statement: Write exactly the same beginning area of the records then a colon. Following the colon, list the finish areas of the comments (separated by commas). Blank spaces and line breaks are permitted  before and after the separators. i.e. colons (;), commas (,), periods(.).

Observe that this short form basically signifies a simplified type of syntax, and doesn’t present an improvement in performance. Out of the box otherwise the situation, the ABAP runtime system processes each one of the individual statements.

You will find other ways of moving towards the documentation to have an ABAP Programming statement.The F1 key goes straight to the documentation for that statement for which the cursor is highlighted.

You will find several editors at use  for ABAP programming, with respect to the release and support package level. The option of editor is user-specific and it is produced in the item Navigator. Look into the configurations in utilities. You are choose the old editor or even the new editor.

ABAP Programming Development Objects

If you produce a ABAP Programming development object, or change after which save it, the SAP first stores just one inactive version within the Repository. Next, you get an active version as well as an inactive version from the object. once you finish the development of the object, you need to activate the inactive version from the object. This version becomes the brand new active version from the object.

Note that the request has been released and hence the transport of the developed objects to other systems are only possible if all objects in the request have been activated

Whenever you generate a development object, the machine produces another runtime object (LOAD compilation) as well as stores it within the Repository. This compiled version is the one which is executed at runtime.

Try being an active participant in ABAP Programming forum at SDN and very soon you will get to speed.

Why do you need ABAP Objects?

Page 39: ABAP TUTORIALS

ABAP Objects oriented programming lets you to be at par with the others as this is better methodology. To understand the recent concept of ABAP ,such as BAPI,  BADI,  WORKFLOW etc. For integration of ABAP with Microsoft Technologies and JAVA as these are build on OOPS concept. To exploit the class resources that has been provided by   SAP.

What is ABAP Objects all about?

Class and objectsThe main objective of ABAP Objects is to model real world entity · Each real world entity can be modeled by its characteristics and functionality · The real world entity when modeled into OOP world is known as Class, characteristics as attributes and functionality as methods.Classes can be of two types

1. Global Class: Global Classes can be accessed in any program. These classes can be accessed from anywhere and are  stored in the class repository and this is created using SE24 and should start with Z or Y.

2. Local Class:  Local Classes are limited to the program in which they are defined. These classes can be accessed from the program in which they are created and it can have any namespace.

Class Declaration in ABAP Objects

A Class declaration would contain two parts. 1) Definition 2) Implementation

CLASS test DEFINITION.{CLASS DEFINITION IS done here}ENDCLASS. CLASS test IMPLEMENTATION. {METHOD IMPLEMENTATION IS done here}ENDCLASS.

The above statements would define a local class.

Objects in ABAP Objects

Objects are instance of a Class or in other words they are run time entities. We can create any number of objects for a class.

Creating and accessing Objects.Data: obj type ref to test.Create object obj.WRITE : OBJ->ATTRIBUTE1.            (i.e. object name->attribute name)

Page 40: ABAP TUTORIALS

ABAP Procedural Programming Drawbacks 28 Jun 2011   | ABAP

SAP has come a long way from ABAP Procedural Programming to Object Oriented ABAP Programming.

ABAP Procedural Programming Drawbacks

Program Maintenance is complicated Difficulty in program management as program size  increases No data Hiding Very difficult to model real world entity Lack of extensibility

The Approach of ABAP Procedural Programming Emphasis on tasks Large programs are divided into smaller programs known as functions Most of the functions share global data Data move openly around the system from function to function

The Approach of ABAP Object Oriented Programming Emphasis on things that does those tasks Programs are divided into objects Data structures are designed such that they characterized the objects Functions that operate on the data of an object are tied together in the data

structure Data can be hidden and cannot be accessed by external functions New data and functions can be easily added whenever necessary

FIND: ABAP Keyword a Day 24 May 2011   | ABAP Programs

FIND:  Searches for patterns.

FIND <p> IN [SECTION OFFSET <off> LENGTH <len> OF] <text> [IGNORING CASE| RESPECTING CASE] [IN BYTE MODE|IN CHARACTER MODE] [MATCH OFFSET <0>]

Page 41: ABAP TUTORIALS

[MATCH LENGTH <l>].

The system searches the field <text> for the pattern <p>.

The SECTION OFFSET <off> LENGTH <len> OF addition tells the system to search only from the <off> position in the length <len>.

IGNORING CASE or RESPECTING CASE (default) specifies whether the search is to be case-sensitive.

In Unicode programs, you must specify whether the statement is a character or byte operation, using the IN BYTE MODE or IN CHARACTER MODE (default) additions.

The MATCH OFFSET and MATCH LENGTH additions set the offset of the first occurrence and length of the search string in the fields <p> and <l>.

Use FIND IN TABLE for searching in the internal table.

DATA: c_erpdb TYPE STRING VALUE 'ERP', result_tab TYPE match_result_tab. FIELD-SYMBOLS <match> LIKE LINE OF result_tab. FIND ALL OCCURRENCES OF c_erpdb IN `ERPDB.INFO - Unofficial ERP Knowledge Base` RESULTS result_tab. LOOP AT result_tab ASSIGNING <match>. WRITE: / <match>-OFFSET, <match>-LENGTH.ENDLOOP.

Visibility of OOABAP Components 11 May 2011   | ABAP

in OOABAP, Each class component has a visibility. The whole class definition is separated into three visibility sections:

PUBLIC : Data declared in public section can be accessed by the class itself, by its subclasses as well as by other users outside the class.

PROTECTED :  Data declared in the protected section can be accessed by the class itself, and also by its subclasses but not by external users outside the class.

PRIVATE: Data declared in the private section can be accessed by the class only, but not by its subclasses and by external users outside the class.

CLASS <class_name> DEFINITION. PUBLIC SECTION: CLASS-METHODS :....CLASS-DATA:...

Page 42: ABAP TUTORIALS

METHODS:....DATA:....PROTECTED SECTION: METHODS:....DATA:....PRIVATE SECTION: METHODS:....DATA:....ENDCLASS.

ALE IDOC Tutorial for ABAPers 3 May 2011   | IDOCs

The purpose of ALE IDOC is to help the ABAP Developers to get an idea on how to setup all the necessary configs needed to send and receive idocs. This is the MUST guide for you if you are wondering where to start with the ALE IDOC Development and this pretty much covers around all the required business cases. All the below steps are explained in detail.

1. Understanding and Configuring client to client setup: Walks you through defining logical system, assign logical system to the client, create RFC Destination and preparing distribution model, generating partner profile, view partner profile created in the sender system, view port information in sender, how to distribute customer distribution model and generate partner profile in the receiving client and a sample example of configuring and distributing material master across other systems.

2. System to system ALE setup: Create Logical Systems for both sender and Receiver, Assign Logical Systems to Clients, Create RFC Destination, Maintain Customer Distribution Model, Generate Partner Profile, Distribute Customer Distribution Model, Generating Partner Profile in the Receiving Logical Systems, Create /Change Material master records, Distributing Records in the Receiving logical system, Checking IDoc status in the receiver system and Check Material in Receiver System. 3. Two way server to server communication:  Practical examples to customizing for Sending Vendor master from one client to another, additional customizing required to send material master from one system to another and customizing for receiving idocs from another system.

4. Covers other important topics on IDOCS: T-RFC Reporting, Setting up Audit Reporting, Manually Process IDoc in Receiving System, Collect IDoc and Transfer,Creating Filter Objects, Segment FilteringCreating Reduced message type, Change Pointers Technique, Reprocessing IDocs not posted due to errors & Processing Idiocy waiting in the queue.

Page 43: ABAP TUTORIALS

5. Developing and Transmitting new IDoc:  Prepare data container in both sender and receiver, Prepare Segments(WE31), Prepare IDocs with the segments in both systems (WE30), Create new message type in both the systems (WE81), Link new message type with IDoc type in both systems (WE82), Maintain two logical systems, one for sender- another for receiver in both the systems (BD54) , Assign Logical System for Receiver to appropriate client in Receiver system and assign logical system for sender to appropriate client in sender system (SCC4) and Create RFC Destination for Receiver in sender system and for sender in receiver system(SM59), Create Customer Distribution Model for the Message type in sender systems(BD64), Generate the partner profile in the sender system(BD82), Distribute the CDM from sender system to the reciver system(BD64), Create the outbound program in sender system to populate and distribute the Idocs(SE38) , Develop Inbound Function Module in the Receiver System(SE37), Create new Idoc Object in Business Object Repository(SWO1) in Receiver system, Create a new task based on Application Idoc object(PFTC) in Receiver system, Allocate Function Module to the Message type(WE57) in Receiver system, Define settings for Inbound FM in Receiver system(BD51), Create New Process code for the Inbound process(WE42) in Receiver system, Assign Input Methods(BD67) in Receiver System & Generate Partner Profile in Receiver System(BD82).

6. Standard IDOC Extension: Building Append structure, adjusting exits to populate data in the extended idoc structure, linkage with the message type and the basic idoc type in sender system, adjusting partner profiles, testing, writing code in the receiving system and checking if the data has been received corrrectly.

7. Creating change documents for the new information & Configuring and developing for change pointers for a custom message type.

8. Downloading IDoc into Application Server: Creating the file port, changing outbound partner profiles, trigger the outbound process.

Working with BADI’s in SAP ABAP 12 Mar 2011   | ABAP Programs

Business addins are the enhancements to standard SAP’s version. They can be inserted to accommodate the business requirements.  Here are the steps in working with a custom BADI inside SAP.

Defining BADI

1. Go to SE18 and create the BADI definition. Provide appropriate description and the interface will be automatically created.2. Double click on the interface and create the required methods inside the methods tab

Page 44: ABAP TUTORIALS

and add required parameters.3.  Activate the BADI Definition.

Implementing BADI

1. Go to SE18, type in the BADI which has already been defined either the one previously created or the one which exists in the system.2. Click on Menu: Implementation -> Create and provide a implementation name.3. Double click on the method name and write the required code.

Here is what is usually happening where ever the BADI is called inside the ABAP program.

CL_EXITHANDLE=>GET_INSTANCE( EXPORTING exit_name = '<NAME OF BADI>' null_instance_accepted = 'X' CHANGING instance = oref_badi_instance )"Call to Methods defined in the badi definitionoref_badi_instance->'<any method name>'.

Object Oriented ABAP (OOABAP) – FAQs 2 7 Jul 2010   | FAQs

Here are some of the questions which you must know, when you say that you are good in Object Oriented Programming in SAP ABAP.

1.  Priniples of oops?2.  What is difference between procedural & OO Programming?3.  What is class?4.  What is object?5.  Can we instantiate a class within implementation of other class?6.  What is deferred key word ?7.  How we can refer to a class without defining it?8.  Can we put non declarative statement e.g. START-OF-SELECTION within a class9.  What is static attribute & method?

10. How to create a global class ?11. How can we pass importing parameter ? pass by value/pass by reference13. Can we changed pass by reference in any method ?14. What is preferred parameter ? more than one optional & no mandatory15. can we pass returing parameter by reference ? NO only pass by value16. can static method use instance attribute ?17. Can a method call itself?18. What is me variable?

Page 45: ABAP TUTORIALS

19. What is constructor ?What are type of constructor ?When it is called ?20. Can we have export parameter in Instance constructor?21. Can instance constructor raise exception ?22. When static constructor is called?23. Can we have interface for static class or constructor?24. What is abstract class ?25. Can we implement abstract method in abstract class ? if not then where it can be implemented?26. What is final class & Method ?27. Can subclass call super class constructor?28. Can we call static constructor more than once in a program?29. What is method redefinition?30. What is interface ?31. Can we implement interface in private section of any class ?32. Is it mandatory to implement all the methods of interface ?33. What is alias ? Instead of specifying full name of interface methods we can assign it a name which can directly trigger.34. What is Friendship?35. What is event handler method ?36. Can we have more than one event handler method for same event ?37. Can event have import parameter ?38. How you handled exception during programming?39. What is cleanup section ?40. What is BADI?41. What is check box for multiple use in BADI?42. How to search a BADI ?43. What is Value table and Check table, Difference between them?44. What are secondary index’s?45. What is the draw back of secondary index’s?46. What are conversion routines?47. At which level are they mantained?48. what are Predeifined data types?49. Which predefined data type uses conversion routines?50. What are logical units of work?51. When is difference btw native and open sql52. Difference between Modify and Update53. Which is more efficient for all entries or joins?54. When is implicit commit triggered.55. What are RFC?56. How do u create a destination system?57. What are different types of commits used?58. What are search helps?59. Types of tables?60. Difference between pool tables and cluster tables?61. What is a delivery class?62. What are the types of delivery class?

Page 46: ABAP TUTORIALS

63. Difference between System tables and control tables?64. What is normalization?65. What is BCNF?66. What is persistant class

Understanding and Working with BAPI’s 6 Jul 2010   | ABAP

A Business Application Programming Interface is a precisely defined interface providing access process and data in Business Applications Systems Such as SAP.

What are the Benefits of BAPI

Can be used in diverse languages / Development Environments(ABAP, Visual Basic, Java, C++, etc.)

Can be called from diverse platforms (COM, CORBA, Unix) Reduced development cost Reduced maintenance cost “Best-of-both-worlds” approach Rich functionality of the R/3 system User-specific front-ends

Steps involved in Creation of BAPI’s

1. Defining BAPI Data structures in SE112. Program a RFC enabled BAPI function module for each method3. Create a Business object for the BAPI in the BOR4. Documentation of the BAPI5. Generate ALE interface for asynchronous BAPIs6. Generate and release

Difference between Master Data, Transaction Data and Customizing Data 18 May 2010   | SAP General

Page 47: ABAP TUTORIALS

Customizing Data refers to the customized information for a particular Client. This includes data such as payment terms, discounts, pricing, tolerance limits, etc., which you do not normally change on a day-to-day basis.

Transaction Data is the day-to-day recording of business information such as purchase orders, sales returns, invoices, payments, collections, etc. This includes both system-generated data (tax, discount, etc., automatically calculated by the system during document posting) as well as user generated data.

Master Data is the control information required to decide how transaction data gets posted into various accounts (such as customers, vendors, GL, etc.). The master data is usually shared across modules (for example, customer master records are common both to FI and SD in SAP) obviating the need for defining it in various application areas. The master data remains in the system for fairly a long period.

Spool Requests 11 Apr 2010   | ABAP

Spool Requests are generated during dialogue or background processing and placed in the spool database with information about the printer and print format. The actual data is placed in the Tem Se (Temporary Sequential objects).

Purpose of Modification Assistant 10 Apr 2010   | ABAP

The Modification Assistant is the tool that offers you support when making modifications to the standard, by branching to a special modification mode whenever you are modifying objects from the standard in an ABAP workbench editor. Originals are initially protected in this mode and can only be changed with the help of the additional pushbuttons that are placed at your disposal. All changes that you make to the system are logged with the help of the Modification Assistant. This provides you with a detailed overview of modifications that is easy to read and that dramatically reduces the amount of effort needed to upgrade your system.

The Modification Assistant offers support in the following areas:

ABAP Editor Class Builder

Page 48: ABAP TUTORIALS

Screen Painter Menu Painter Text Element maintenance Function Builder ABAP Dictionary

If an object can be edited using the Modification Assistant, a dialogue box appears the first time that you attempt to edit that object informing you that editing functions are limited in modification mode. This dialogue box appears exactly once per user for each of the various kinds of transport objects.

Difference betwen Screen Painter and Menu Painter 9 Apr 2010   | ABAP

Screen Painter is an ABAP Workbench tool used to create or modify the screens for your transactions. The screen painter allows you to make modifications to screen attributes, the flow control logic, or the layout.

Menu Painter is a tool used to design the interface components. Status, Menu Bars, Menu Lists, F-key settings, Functions, and Titles are the components of Menu Painter.

What is SAP Script? What are the componets in SAP Script? 8 Apr 2010   | SAP Scripts

SAPscript is the SAP Systems own text-processing system which is used to generate documents containing logos, tables and other objects and which look like a pre-printed documents. SAPscript is tightly integrated and used for many text-processing tasks. SAP Standard Styles and  Layout Sets are always held in Client 000.

Layout Sets are used for the Page Layout of SAPscript documents. A layout set has the following elements:

Header Data: Data related to development (created by, development class, etc.) and the layout set information (which elements are used) are both stored in the header data. A start page must be entered here.

Page 49: ABAP TUTORIALS

Paragraph Formats: Paragraph formats are required in layout sets. However, they are also used for word processing in layout sets, for example, to format text elements.

Character Formats: You can also use character formats to format texts or paragraphs. Unlike paragraph formats, however, they are used to format text within a paragraph.

Windows: Windows are names and window types, which are not physically positioned until they are allocated to pages and units of measurement are specified.

Pages: Pages are defined to provide the system with a start and end point in text formatting.

Page Windows: Page windows are the combination of windows and pages, where the dimensions of a window and its position on a page are specified.

What is SAP Query or ABAP Query? 7 Apr 2010   | ABAP

ABAP Query (also known as an SAP Query or Query) is a powerful tool used to generate simple reports without any coding. Typically, an ABAP query is  created first by defining a User Group and a Functional Group. The functional group can either be created with reference to a logical table or a database table. Once the functional group is defined, the user group is assigned to the functional group. The last step is to create the query on the functional group that is generated.

An ABAP Query can be used to create the following three types of reports:

Basic Lists: Reports with basic formatting without any calculated fields. Statistics: Reports with statistical functions such as average, percentages, etc. Ranked Lists: Ranked lists are used for analytical purposes.

What is SAP Dynpro 6 Apr 2010   | ABAP

DynPro in SAP refers to Dynamic Programming relating to the screens and flow logic, which controls the processing and display of these screens. On a broader scale, a screen is also referred to as a DynPro.

Page 50: ABAP TUTORIALS

What is an RFC? 5 Apr 2010   | ABAP

A Remote Function Call (RFC) is a call to a function module running in a system different from the calling-system. The remote function can also be called from within the same system (as a remote call), but usually the calling-system and the called-system will be in different systems.

An RFC helps to take care of the following communication:

Communications between two independent SAP systems. Client-server communications between an external Client and an SAP system

acting as the server. Client-server communications between an SAP System acting as the Client and an

external server

What is BDC Programming in SAP? 3 Apr 2010   | ABAP

BDC (Batch Data Conversion) is an automated procedure for transferring large volumes of external or legacy data into the SAP system using batch input programming. There are three ways to do this:

Call Transaction Method Session Method Direct Input Method

Irrespective of the method, the techniques use the following steps:o Identify the screens of the transaction that the program will process.o Write a program to build the BDC table that will be used to submit the data (i.e., text file) to SAP.o Submit the BDC table to the system in the ‘batch mode’ or as a ‘single transaction’ by the CALL TRANSACTION command.

The Call Transaction method cannot be used when you want to process multiple transactions. Instead, use the BDC-insert function to achieve this

Page 51: ABAP TUTORIALS

What are Internal Tables? 2 Apr 2010   | ABAP

Internal Tables are standard data type objects which exist only during the Runtime of an ABAP program. They are used to perform table calculations on subsets of database tables and for re-organizing the contents of database tables according to a user’s need. Internal tables fulfill the need for arrays in ABAP.

There are three types of internal tables:

Standard Tables with a ‘linear’ index. The key is always ‘non-unique.’ Sorted Tables with either a ‘unique’ or ‘non-unique’ key. Hashed Tables (they do not have a linear index) with the key defined always as

‘unique.’

Different types of ABAP Programs 1 Apr 2010   | ABAP

There are nine types of ABAP Programs in SAP:

1 Executable Programs (ABAP Reports) I INCLUDE Program M Module Pool/Dialogue programs S Sub-Routine Pool J Interface Pool K Class Pool T Type Pool F Function Group X XSLT Program

Purpose of Drilldown or interactive report 1 Apr 2010   | ABAP

A Drill-Down Report, also called an Interactive Report, is a report with more detail. Imagine that you are looking at a Balance Sheet, presented as a drill-down report. The topmost list, also known as the Basic List, contains the top-level information such as current assets, fixed assets, etc., under the grouping assets on one side of the Balance Sheet. The drill-down functionality helps you select a line item from the Basic List (e.g., fixed assets) and drill-down further to a detailed list (secondary list) which displays

Page 52: ABAP TUTORIALS

various components of the fixed assets such as land, buildings, machinery, etc. You may drill-down even further by double clicking the building line, which will bring up the next detailed list and so on.

You will be able to create a drill-down report with a maximum drill level of 20; that is, including the Basic List you will have a total of 21 levels in a single drill-down report.

Methods for modifying SAP Standard Tables 26 Mar 2010   | ABAP

You can modify SAP ‘Standard Tables’ using:

Append Structures Customizing INCLUDES