Sep 20, 2008

Internal table

Purpose of Internal Tables

• In ABAP/4, you work mainly with tables. Tables are the essential data structures in the R/3 System. Long-life data is stored in relational database tables.


• Besides database tables, you can create internal tables which exist only during the runtime of your program. ABAP/4 provides various operations for working with internal tables. You can, for example, search for, append, insert, or delete lines.


• The number of lines in an internal table is not fixed. Depending on requirements, the system increases the size of internal tables at runtime.


• You can use internal tables to perform table calculations on subsets of database tables. For example, you can read a certain part of a database table into an internal table (see Reading Data into an Internal Table).

From the internal table, you can then calculate totals or generate a ranked list.


• Another use for internal tables is reorganizing the contents of database tables according to the needs of your program. For example, you can read data relevant for creating a telephone list from one or several large customer tables into an internal table. During the runtime of your program, you can then access this list directly without having to perform a time-consuming database query for each call.

Structure of Internal Tables

In ABAP/4, you can distinguish between internal table data types, which define the structure of internal tables, and internal table data objects, which are the actual internal tables and can be filled with data. An internal table data type is an abstract definition of a data structure which can be used to declare data objects as internal tables.

Data type

An internal table is one of the two structured data types in ABAP/4. The other structured data type is the field string. An internal table consists of any number of lines which all have the same data type. The data type of the lines can be elementary or structured.

This definition opens a variety of internal table structures which range from lines consisting of one field to lines consisting of field strings which have internal tables as components.


You can define a data type as an internal table by using the TYPES statement with the OCCURS parameter. No memory is occupied when defining a data type.

Data object

A data object which has a data type defined as an internal table is the actual internal table you work with. It occupies memory and you can fill or read its lines.
You create a data object as an internal table by using the DATA statement either with the OCCURS parameter or by referring to another internal table by using the TYPE or LIKE parameters.

Identifying Table Lines

In order to access a certain line of a table, you must specify a field or combination of fields that can be used to identify the line. In the relational data model which is used to store long-life data in the R/3 System, the minimum combination required for this purpose is known as the key. The fields that define the key are called key fields.

Internal Table Index

The index is the sequential number of a table line. It is not a table field, but is created and managed automatically by the system.


You can use the index with the DELETE, INSERT, MODIFY, LOOP, and READ statements. In these statements, you can specify the index either as literal or as variable.
After processing a particular line of an internal table, the system field SY-TABIX generally contains the index of that line.

Internal Table Key

There are two kinds of internal table keys.

Self-defined Key

When reading lines from an internal table using the READ statement, you can specify a self-defined.

Standard Key

By definition, the key fields of an internal table are those fields which are not numeric (type F, I, and P) and are not internal tables. These key fields form the standard key of an internal table.


To obtain the standard key of an internal tables with nested structures (table lines which contain field strings as components), the system breaks down the sub-structures to the level of elementary fields.

LUW - Logical Unit of Work

An SAP logical unit of work (LUW) is a functionally complete set of steps within a business process in the R/3 System.

The process steps must be logically related.

SAP LUWs work on an all-or-nothing principle: Either all or none of its steps are carried out.

The business process to be mapped must be basic. For example, you would not have a single SAP LUW consisting of all of the steps between a customer processing an order and an invoice being produced. Instead, you would split this up into separate parts, each of which would then be represented in the R/3 System by its own LUW. What constitutes an "elementary" process depends on the overall process and how you have modeled it.

For further information, see the ABAP Editor Keyword documentation for the term transaction processing.

A database logical unit of work (LUW) is a non-separable sequence of database operations. At the beginning and end of the LUW, the database is in a consistent state.

The database LUW is either fully carried out by the database system, or is not carried out at all.

A database LUW is opened with every dialog step and by a database commit of the previous DB LUW.

The database LUW is closed with a database commit. It is only in the commit that the data is written to the database (after which it can no longer be reversed). Before the database commit, you can undo the changes using a database rollback. Here, the database is reset to the status that it had before the first change was made to the current DB LUW.

Data that has been written to the database permanently with a database commit cannot be rolled back.

Database LUWs allow you to encapsulate logically related actions from a business process. For example, when transferring sums of money in financial accounting, you must deduct an amount from one account and then add it to another account. Before and after the process, the data is consistent, but in between the two steps, it can be inconsistent.

For further information, see the ABAP Editor Keyword documentation for the term transaction processing.

The SAP R/3 System is based on the three-tier architecture of a client/server system. The three tiers are the database, application, and presentation server layers.

This architecture, along with the distribution of users' requests (user dispatching), leads to a highly efficient, cost-effective multi-user system.

The three-tier architecture means that a large number of users with low-cost desktop computers (with low performance) can be mapped to a small number of high-performance (and considerably more expensive) work processes on application servers. Each work process on an application server is assigned a work process on a high-performance database server.

Distributing user requests to work processes assigns individual clients at presentation server level to a work process for a particular period. In turn, the work process uses another work process in the database. After the work process has processed the user input in a dialog step, the user, along with the program context, is removed from the work process, which can then be used by another user.


The three-tier architecture is far more scalable than a "fat" client architecture, in which the Presentation and application levels run on one server. With three-tier architecture, the number of database users is considerably lower than the number of users active in the system. This has a positive effect on the behavior of the database.


The three-tier architecture of the R/3 System has certain consequences for process handling. When a work process is released for use by another user (client), an implicit database commit is triggered for the database process assigned to it (via a basis program).

Work processes on the application server and database are released before each user dialog. This Ensures that long user dialogs in which the system is "only displaying a screen" are not included in Database LUWs. The duration of the user interaction will be longer than the DB LUW duration.


Shorter database LUWs lead to less load on the database.

Implicit commits on the database are triggered whenever the work process has to wait. This includes:

When the system sends a new screen
When the system sends a dialog message
When you make a synchronous remote function call (RFC)
When you use the CALL TRANSACTION or SUBMIT statement.

Using an SAP LUW to represent a business process chain usually involves user dialogs as well as the changes to the database. The aim of an R/3 transaction is to represent the information exchanged in the SAP LUW as an indivisible unit in the database. This means that an SAP LUW can only use a single database LUW.

Since SAP LUWs usually involve several database LUWs, you need to bundle the database changes in a single database LUW within your transaction.

Few Technical definations..

1 Application Link Enabling (ALE)

The ALE concept supports the construction and operation of distributed applications.
The basic principle is the guarantee of a distributed, yet fully integrated, R/3 System installation.

It incorporates the controlled exchange of business data messages whilst ensuring data consistency across loosely coupled R/3 Systems.
The integration of various applications is achieved by using synchronous and asynchronous communication, rather than by means of a central database.
ALE comprises three layers:

• the applications services,
• the distribution services,
• the communications services.

2 Transaction Data

Transaction data is data that results from daily business management processes. Examples of transaction data are purchase order data and accounting data.

3 CO-PA

Abbreviation for Controlling - Profitability Analysis.

4 EDI - Electronic Data Interchange

Electronic Data Interchange is the electronic exchange of structured data (e.g. commercial documents) that is not limited to a single company, but which may take place between business partners at home or abroad who can be using different hardware, software and communication services.

5 Filter Object

A specific instance of the filter object type to which an organizational unit has been assigned, for example, "Plant" ® "Plant 0001".

6 Filter Object Type

A filter object type is a selection criterion in the distribution reference model that specifies the criteria which determine whether a function type can be used several times in a distributed system.

7 Function

A specific instance of a function type in the customer model.

8 Function Type

A function type defines a self-contained process in an application. An example of this is the posting for a movement of goods in inventory management.

9 Function Type, Distributable

A collection of function types which may be grouped together because of the related use of the various function types, and which may be seen as being distinct from other function types.

10 IDoc

Abbreviation of intermediate document (IDoc type )

11 IDoc Type - Intermediate Document Type

An intermediate document type is the structure of the data container used for transporting data from a system to a target system. It is independent of any specific application data.

12 Logical System

A logical system is a system in which different applications are integrated and run using common data. In SAP terms, this means a client in a database.

13 Information Structures

The most important key figures are selected from the mass of data arising from operational applications and are stored in special statistics files known as information structures. These include information on the time period, the characteristics and the key figures. An information structure can be distributed.

14 Key Figures

Key figures represent information that is periodically gathered or evaluated for characteristics (for example, lead time, deviation from schedule, capacity utilization, order stocks, quantities and rejects).

15 Bulk Processing

Several IDocs may be grouped into a packet and processed in a single step. This is called bulk processing.

16 Characteristic

A characteristic is a piece of information that can be used to effect a division in a group of objects, for example, plant, work center, material).

17 Message Type

The messages exchanged between systems are of various message types. The message type depends on the data contained and the process involved. It determines the technical structure of the message, the IDoc type. For example, the ORDERS message type is used for purchase order messages.

18 Periods

Periods include days, weeks, months and accounting periods.

19 Item Category

An item category is a classification that distinguishes between various types of item in, for example, an order (e.g. cost-free items, standard items). The way that processing is controlled depends on the item category.

20 Serialization

If several IDocs are sent within a short period of time then "overtaking" can occur, so that later changes arrive sooner than changes that were actually made earlier. In order to avoid incorrect updates being made, a serialization mechanism must be used that can spot "overtaking" and report it.

21 SOP

Sales & Operations Planning.

22 Customer Distribution Model

The customer stores the exact distribution of functions across his various systems in the customer distribution model. The logical systems and message flows are specified here, possibly based on defined listings.

23 Distribution Reference Model

The reference model is included in the standard delivery from SAP. It specifies which functions can be distributed and how, and which data is exchanged between the fucntions. The customer uses the reference model as the basis for his customer distribution model .

24 Workflow

A workflow is defined as a sequence of processing steps (work item ). There may be branching points within this sequence.

A workflow has a container. This holds the parameters used in the processing steps.
In order to terminate the processing steps of a workflow, an event is triggered. The parameters are passed from the current step to the workflow container.

The workflow manager checks which processing step should be called next. For example, if an 'Idoc read' step is terminated and a parameter indicating an error is passed, a step will be started that initiates manual processing.

An error will also cause an event to be triggered If a function module has been called directly. However, in contrast to the situation with a workflow, it does not cause a workflow step to be terminated, but rather an error workflow is started.

25 Work Item

A work item represents the run-time environment for a standard task that is defined once in the system. A standard task contains a method that can be used for processing a specific object.

Sep 19, 2008

SAP LOCK CONCEPT

SAP LOCK CONCEPT:

If several users are competing to access the same resource or resources, you need to find a way of synchronizing the access in order to protect the consistency of your data.

Example: In a flight booking system, you would need to check whether seats were still free before making a reservation. You also need a guarantee that critical data (the number of free seats in this case) cannot be changed while you are working with the program.

Locks are a way of coordinating competing accesses to a resource. Each user requests a lock before accessing critical data.

It is important to release the lock as soon as possible, so as not to hinder other users unnecessarily.

Whenever you make direct changes to data on the database in a transaction, the database system sets corresponding locks.

The database management system (DBMS) physically locks the table entries that you want to change (INSERT; UPDATE, MODIFY), and those that you read from the database and intend to change (SELECT SINGLE FROM FOR UPDATE). Other users who want to access the locked record or records must wait until the physical lock has been released. In such a case, the ABAP program waits until the lock has been released again.

At the end of the database transaction, the database releases all of the locks that it has set during the transaction.

In the R/3 System, this means that each database lock is released when a new screen is displayed, since a change of screen triggers an implicit database commits.

To keep a lock set through a series of screens (from the dialog program to the update program), the R/3 System has a global lock table at the application server level, which you can use to set logical locks for table entries.

One application server contains this lock table and a special enqueue work process, which administers all requests for logical locks in the R/3 System. All logical lock requests of the R/3 System run using this work process.

You can also use logical locks to "lock" table entries that do not yet exist on the database (inserting new lines). You cannot do this with physical database locks.

For further information, see the ABAP Editor Keyword documentation for the term Locking.
Logical locks are generated when an entry is written in the lock table. You use function modules to do this.

You can only set a lock if the relevant table entry is not already locked.

The SAP transaction receives information on the success of a lock request from a return code sent via the EXCEPTION interface of the function module. In other words, the control is returned to the program using the function module. The ABAP program does not need to wait.

The SAP transaction can react appropriately by analyzing the return code.

Another user cannot gain access to work with the same table entries that are already locked.

Depending on the bundling technique in use for database updates), the program must delete the lock entries it generated using a lock module, or have them deleted indirectly (see unit Organizing Database Updates).

If the user terminates the program that generated the lock entries (usually a dialog program), the locks are released automatically (implicitly). You can do this by entering /n in the command field, or with the statements LEAVE PROGRAM, LEAVE TO TRANSACTION, and 'A' or 'X'
Messages.

When you call an ENQUEUE function module, the dialog program tries to generate a lock entry.

The export parameters identify the table entry (or entries) that you want to lock.

The program that generates the locks (usually dialog program) analyzes the return code for lock requests and reacts accordingly.

If the lock could not be set; you should normally output an error message.

At the end of the dialog program, you can use the corresponding DEQUEUE function module to delete the entries from the lock table.

DEQUEUE function modules have no exceptions. If you try to release an entry that is not locked, this has no effect.

If you want to release all of the locks that you have set, at the end of your dialog program, you can use the function module DEQUEUE_ALL.

The lock table contains the lock arguments for each table (for lock arguments, see the following slide).

To display the lock table, use transaction SM12.

The entries in the lock table are standard. Locks are always set using the values of the key fields in a table. These form the lock argument.

You pass the values for the lock argument to the lock modules via their interface (function module IMPORT parameters).

If you fail to set any of these parameters, the system interprets it generically, that is, the lock is set for all table lines that meet the criteria specified in the other parameters. The client parameter is an exception to this rule, where the default client SY-MANDT applies.

Lock entries must be assigned to a lock mode.

There are three different lock modes:

Mode 'E' for write locks: This is set if you want to write data to the database (change, create, or delete).


Mode 'S' for read locks: This is set if you want to ensure that the data, which you are reading from the database in your program, is not changed by other users while the program is running. You do not want to change the data itself in your program.

Mode 'X' for write locks: Like mode 'E', mode 'X' is used for writing data to the database. The technical difference between mode 'X' and mode 'E' is that locks of mode 'X' are not accumulated while a program is being executed. (For further details, see the following pages).

If someone tries to lock the same data record again with a second program (different user), the various lock modes take effect as follows:

Write locks ('E' or 'X') mean that any lock attempts from other users are refused, irrespective of the mode in which the lock is attempted.

If a data record is locked in mode 'S' (shared), further locks in mode 'S' may be set by other users.

Lock attempts in other lock modes ('E' or 'X') are refused.

If you want to try to lock a data record more than once while a program is running (for example using a function module that you call up, which sets locks itself), the lock system reacts in the following way:

Mode 'E' write locks are not refused. Instead, a cumulative counter is incremented. The same applies to read locks (mode 'S').

If a data record is locked in mode 'E', a lock request generates a second lock, which is marked as a read lock.

If a data record is locked in mode 'S' and no further read locks are set by other users, a lock attempt in mode 'E' is possible. This generates a second entry in the lock table (for mode 'E').

If a data record is locked in mode 'X', all further lock requests are refused.

If you want to ensure that you are reading up-to-date data in your program (with the intention of changing and returning this to the database), you should use the following procedure for lock requests and database accesses in your program:

First, lock the data that you want to edit.

Then read the current data from the database.

In the next step, process (change) the data in your program and write this to the database.

In the final step, release the locks that you set at the beginning.

This procedure ensures that your changes run fully with lock protection and that you only read data that has been changed consistently by other programs (provided that these also use the SAP lock concept and follow the procedure described here).

Lock modules are created for lock objects and not tables.

Lock objects are maintained in the dictionary. Customer lock objects must begin with "EY" or "EZ".

A lock object is a logical object composed of a list of tables that are linked by foreign key
Relationships. Lock modules are generated for these objects and enable common lock entries to be set for all tables contained in the lock object. This allows combinations of table entries to be locked.

Example: A lock object that contains the tables SFLIGHT and SBOOK enables a flight with its bookings to be locked.

The list of tables for a lock object consists of a primary table. Further table entries are referred to as secondary tables. Only tables with foreign key relationships to the primary table can be used as secondary tables.

With lock objects, you can assign different names for the parameters that describe the fields of the lock arguments for the lock modules. The names of the table fields (key fields of the tables) are proposed by the system.

You can specify the lock mode (a write lock 'E' or 'X' or a read lock 'S') for each table. These function as default values for the lock modules.

After you have assigned tables and default lock modes, lock objects must be generated.

When you activate a lock object, the system generates an ENQUEUE and a DEQUEUE function module.

These have the names ENQUEUE_ and DEQUEUE_ respectively.

If you want to ensure that you are reading current data in your program (with the intention of changing and returning this to the database), you should use the following procedure in your program for lock requests and database accesses:

1. Lock the data that you want to edit.
2. Read the current data from the database.
3. Process (change) the data in your program and write this to the database.
4. Release the locks that you set at the beginning.

This procedure ensures that your changes run fully with lock protection and that you only read data, which has been changed consistently by other programs (with the restriction that these are also using the SAP lock concept and following the procedure described).

If you change the order of the four steps to Read -> Lock -> Change -> Unlock, you run the risk that the data read by your program will not be up to date. Your program can read data before another user's program writes changes to the database. This means that a user of your program will make decisions for entries that are not based on up-to-date data from the database. For this reason, you should always follow the recommended procedure.

Requesting a lock from a program is a communication step with lock administration. The
Communication step requires a certain time interval. If your program sets locks for several objects, this interval occurs more than once.

By using so-called local lock containers, you can reduce these communication intervals with lock administration. To do so, collect the required lock requests of your program and send them together to lock administration.

The locks (delayed execution) can be collected when the lock modules are called. For this purpose, qualify the IMPORT parameter_collect with 'X'. The data transferred via the lock module interface is then registered in a list (lock container) as a lock request that needs to be executed.

The lock container can be terminated using the FLUSH_ENQUEUE function module and sent to lock administration.

When the lock orders of a lock container can be executed, the lock container is deleted.

If one of the locks in a container cannot be set, the function module FLUSH_ENQUEUE triggers the exception FOREIGN_LOCK. In this case, none of the registered lock requests is executed. The registered locks remain in the lock container.

You can delete the contents of an existing lock container with the function module
RESET_ENQUEUE.

The specified function modules have release status internally-released.

ABAP List Viewer

ABAP List Viewer
The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).
Using ALV, we can have three types of reports:
1. Simple Report
2. Block Report
3. Hierarchical Sequential Report
There are some function modules which will enable to produce the above reports without much effort.
All the definitions of internal tables, structures
and constants are declared in a type-pool called SLIS.
Simple Report
The important function modules are:
•Reuse_alv_list_display
•Reuse_alv_fieldcatalog_merge
•Reuse_alv_events_get
•Reuse_alv_commentary_write
•Reuse_alv_grid_display
A. REUSE_ALV_LIST_DISPLAY: This is the function module which prints the data.
The important parameters are:
1. Export:
a. I_callback_program : report id
b. I_callback_pf_status_set : routine where a user can set his own pf status or change the
functionality of the existing pf -status.
c. I_callback_user_command : routine where the function codes are handled.
d. I_structure name : name of the dictionary table
e. Is_Layout : structure to set the layout of the report
f. It_fieldcat : internal table with the list of all fields and their attributes which are to
be printed (this table can be populated automatically by the function
module REUSE_ALV_FIELDCATALOG_MERGE)
g. It_events : internal table with a list of all possible events of ALVand their
corresponding routine names.
2. Tables:
a. t_outtab : internal table with the data to be output
B. REUSE_ALV_FIELDCATALOG_MERGE:
This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure_name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
The important parameters are:
1. Export:
a. I_program_name : report id
b. I_internal_tabname : the internal output table
c. I_inclname : include or the report name where all the dynamic forms are handled.
2. Changing
ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is declared in
the type pool SLIS.
C . REUSE_ALV_EVENTS_GET: Returns table of possible events for a a list type
1. Import:
Et_Events : The event table is returned with all possible CALLBACK events for the
specified list type (column ‘NAME’). For events to be processed by the
callback, their ‘FORM’ field must be filled. If the field is initialized, the event
is ignored. The entry can be read from the event table, the field ‘FORM’ filled
and the entry modified using constants from the type pool SLIS.
2. Export:
I_list_type:
0 = simple list
1 = hierarchical-sequential list
2 = simple block list
3 = hierarchical-sequential block list
D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
1. It_list_commentary : Internal table with the headings of the type slis_t_listheader.
This internal table has three fields:
Typ : ‘H’ - header, ‘S’ - selection, ‘A’ - action
Key : only when typ is ‘S’.
Info : the text to be printed
E. REUSE_ALV_GRID_DISPLAY: A new function in 4.6 version, to display the results in grid rather than as a list.
Parameters : same as reuse_alv_list_display
HIERARCHICAL REPORTS
A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
1. Export:
a. I_CALLBACK_PROGRAM
b. I_CALLBACK_PF_STATUS_SET
c. I_CALLBACK_USER_COMMAND
d. IS_LAYOUT
e. IT_FIELDCAT
f. IT_EVENTS
g. I_TABNAME_HEADER : Name of the internal table in the program containing the output data of the
highest hierarchy level.
h. I_TABNAME_ITEM : Name of the internal table in the program containing the output data of the
lowest hierarchy level.
i. IS_KEYINFO : This structure contains the header and item table field names which link the two tables
(shared key).
2. Tables
a. T_OUTTAB_HEADER : Header table with data to be output
b. T_OUTTAB_ITEM : Name of the internal table in the program containing the output data of the
lowest hierarchy level.
BLOCK REPORT
This is used to display multiple lists continuously.
The important functions used in this report are:
A. REUSE_ALV_BLOCK_LIST_INIT
B. REUSE_ALV_BLOCK_LIST_APPEND
C. REUSE_ALV_BLOCK_LIST_DISPLAY
D. REUSE_ALV_BLOCK_HS_LIST_APPEND
A. REUSE_ALV_BLOCK_LIST_INIT
Parameters:
a. I_CALLBACK_PROGRAM
b. I_CALLBACK_PF_STATUS_SET
c. I_CALLBACK_USER_COMMAND
This function module is used to set the default GUI status etc.
B. REUSE_ALV_BLOCK_LIST_APPEND
Export :
a. IS_LAYOUT : layout settings for block
b. IT_FIELDCAT : field catalog
c. I_TABNAME : Internal table name of the output data
d. IT_EVENTS : internal table name with all possible events
Tables :
a. T_OUTTAB : internal table with output data.
This function module adds the data to the block.
INTERNAL TABLES IN SLIS
Slis_t_fieldcat_alv :
This internal table contains the field attributes. This internal table can be populated automatically by using ‘REUSE_ALV_FIELDCATALOG_MERGE’.
Important Attributes:
a. col_pos : position of the column
b. fieldname : internal fieldname
c. tabname : internal table name
d. ref_fieldname : fieldname (dictionary)
e. ref_tabname : table (dictionary)
f. key(1) : column with key-color
g. icon(1) : icon
h. hotspot(1) : hotspot
i. Symbol(1) : symbol
j. Checkbox(1) : checkbox
k. just(1) : (R)ight (L)eft (C)ent
l. do_sum(1) : sum up
m. no_out(1) : (O)blig. (X)no out
n. outputlen : output length
o. seltext-l : long key word
p. seltext_m : middle key word
q. seltext_s : short key word
r. reptext_ddic : heading(ddic)
s. ddictxt(1) : (S)hort (M)iddle (L)ong
t. datatype : datatype
SLIS_T_EVENT :
Internal table for storing all the possible events of the ALV. This can be populated by the function module Reuse_alv_events_get
The columns are :
name : name of the event
form : name of the routine
SYNTAXES FOR THE ROUTINES
I_CALLBACK_PF_STATUS_SET
Syntax :
FORM set_pf_status USING rt_extab TYPE slis_t_extab
The table RT_EXTAB contains the function codes which are hidden in the standard interface.
I_CALLBACK_USER_COMMAND
Syntax :
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
The parameter r_ucomm contains the function code.
The structure rs_selfield has the details about the current cursor position.

Aug 28, 2008

Implementation Ques..

1. What are the responsibilities of a functional consultant in an implementation project?
a) Responsibilities in implementation project
- Preparing the functional specification documents.
- Review and approval of functional specifications.
- Designing a road map and setting approval from client.
- Changing existing configuration whenever needed.
- Setting up configuration for new enhancements.
- Handling basic issues of MM module.
b) Responsibilities in support project
- Handling customization, configuration, and enhancement related issues
- Handling tickets on Day to Day basis
- Monitoring S&D reports on daily basis required by clients
- Preparing functional specification documents
- Preparing end user training Documents
2. What are the responsibilities of a technical consultant in an implementation project?
Preparation of technical specifications, getting approvals from functional consultant and PM, assistance to functional consultant.
3.What is ERP and SAP? and why implementing SAP in an organization? Explain the special features of SAP over other ERPs?
SAP is an ERP package. SAP can be fit it any language. It is used to get exact data with a fraction of section which will be use fully for management to take correct decision in a short span of time. Using of sap means there is no need to maintain the
middle management in the organization because the CEO of the company is able to direct the executives directly with the system. SAP is able to integrate all functional organizational units together and retrieve exact data needed by management. Therefore, investing on middle management will become less. and the user will be able to access instance reports using the logistic information systems in SAP.
4.Explain the business flow of an implementation project?
- Project preparation
- Business blue prints
- Fit gap analysis
- Realization
- Go-live
- Support
5. Explain briefly about your role in current/previous project? (If you have one)
6. Explain your functional experience prior to SAP?
7. Can you explain the modern technologies in SAP? Do you use this in your current project?
8. Explain the terms "AS IS" and "FIT GAP ANALYSIS"?
Business blue print stage is called AS-IS process. Fit gap means, before implementing the SAP all the business data is in the form of documents, we cannot keep this data as is in the SAP. There should be a gap. So by filling this gap, we make configuration with the help of these documents. This is called as fit gap analysis. In this stage, we should analysis the gap between as is and is as process.
9. What are the responsibilities of "CORE TEAM" and "FUNCTIONAL TEAM" in an implementation?
Core Team are the power users who are selected for the SAP implementation. The Functional Team gather the initial implementation requirement from these core team users who will be the bridge between the SAP Functional Team and their department users with the expert work knowledge.

Aug 12, 2008

Idoc - basics

SAP IDOC

Basically an IDOC is formed of segments, and comprises of IDOC Type and IDOC Data. IDOC types defines the structure and format of the data being exchanged.

Typically an IDOC will have the following
• Control Record
• Data Records
• Status Records

Control Record:

Will have all the following.
• IDOC number
• IDOC TYPE
• Sender and Receiver Information
• Message Type
Please note that there is only one control record per IDOC and the structure of IDOC control record is the same for all IDOCs.

Data Record:

This basically contains the data, the header data and the line item data for a particular IDOC for example Sales Order or Purchase Order. These are multiple records.

Status Record:

This represents the different status the IDOC goes through. And a status record will have multiple statuses. A status code, Date and Time are assigned.

Aug 11, 2008

Modularization FAQ

1. Does every ABAP/4 have a modular structure?

Yes.

2. What is Modularization and its benefits?

If the program contains the same or similar blocks of statements or it is required to process the same function several times, we can avoid redundancy by using modularization techniques. By modularizing the ABAP/4 programs we make them easy to read and improve their structure. Modularized programs are also easier to maintain and to update.

3. Name the ABAP/4 Modularization techniques.

· Source code module.

· Subroutines.

· Functions.

4. How can we create callable modules of program code within one ABAP/4 program?

· By defining Macros.

· By creating include programs in the library.

5. M is the attribute type of the module program.

6. Is it possible to pass data to and from include programs explicitly?

No. If it is required to pass data to and from modules it is required to use subroutines or function modules.

7. What are subroutines?

Subroutines are program modules, which can be called from other ABAP/4 programs or within the same program.

8. What are the types of Subroutines?

· Internal Subroutines: The source code of the internal subroutines will be in the same ABAP/4 program as the calling procedure (internal call).

· External Subroutines: The source code of the external subroutines will be in an ABAP/4 program other than the calling procedure.

9. It is not possible to create an ABAP/4 program, which contains only Subroutines (T/F).

False.

10. A subroutine can contain nested form and endform blocks. (T/F)

False.

11. Data can be passed between calling programs and the subroutines using Parameters.

12. What are the different types of parameters?

Formal Parameters: Parameters, which are defined during the definition of subroutine with the FORM statement.

Actual Parameters: Parameters which are specified during the call of a subroutine with the PERFORM statement.

13. How can one distinguish between different kinds of parameters?

· Input parameters are used to pass data to subroutines.

· Output parameters are used to pass data from subroutines.

14. What are the different methods of passing data?

· Calling by reference: During a subroutine call, only the address of the actual parameter is transferred to the formal parameters. The formal parameter has no memory of its own, and we work with the field of the calling program within the subroutine. If we change the formal parameter, the field contents in the calling program also changes.

· Calling by value: During a subroutine call, the formal parameters are created as copies of the actual parameters. The formal parameters have memory of their own. Changes to the formal parameters have no effect on the actual parameters.

· Calling by value and result: During a subroutine call, the formal parameters are created as copies of the actual parameters. The formal parameters have their own memory space. Changes to the formal parameters are copied to the actual parameters at the end of the subroutine.

15. The method by which internal tables are passed is By Reference.

16. How can an internal table with Header line and one without header line be distinguished when passed to a subroutine?

Itab [] is used in the form and endform if the internal table is passed with a header line.

17. What should be declared explicitly in the corresponding ABAP/4 Statements to access internal tables without header lines & why?

Work Area. This is required as the Work Area is the interface for transferring data to and from the table.

18. A subroutine can be terminated unconditionally using EXIT. (T/F)

True.

19. A subroutine can be terminated upon a condition using CHECK Statement.



20. Function Modules are also external Subroutines. (T/F).

True.

21. What is the difference between the function module and a normal ABAP/4 subroutine?

In contrast to normal subroutines function modules have uniquely defined interface. Declaring data as common parts is not possible for function modules. Function modules are stored in a central library.

22. What is a function group?

A function group is a collection of logically related modules that share global data with each other. All the modules in the group are included in the same main program. When an ABAP/4 program contains a CALL FUNCTION statement, the system loads the entire function group in with the program code at runtime. Every function module belongs to a function group.

23. What is the disadvantage of a call by reference?

During a call by reference damage or loss of data is not restricted to the subroutine, but will instantly lead to changes to the original data objects.

24. A function module can be called from a transaction screen outside an ABAP/4 program. (T/F).

True.

25. What is an update task?

It is an SAP provided procedure for updating a database.

26. What happens if a function module runs in an update task?

The system performs the module processing asynchronously. Instead of carrying out the call immediately, the system waits until the next database update is triggered with the ‘COMMIT WORK’ command.

27. When a function module is activated syntax checking is performed automatically. (Y/N)

True.

28. What is the use of the RAISING exception?

The raising exception determines whether the calling program will handle the exception itself or leave the exception to the system.

29. What is the difference between internal tables and extract datasets?

· The lines of an internal table always have the same structure. By using extract datasets, you can handle groups of data with different structure and get statistical figures from the grouped data.

· You have to define the structure of the internal table at the beginning. You need not define the structure of the extract dataset.

· In contrast to internal tables, the system partly compresses exact datasets when storing them. This reduces the storage space required.

· Internal tables require special work area for interface whereas extract datasets do not need a special work area for interface.

30.It is possible to assign a local data object defined in a subroutine or function module to a field group. (T/F).

False.

31. What is the difference between field-group header and other field groups?

The header field group is a special field group for the sort criteria. The system automatically prefixes any other field groups with the header field group.

33. Can a filed occur in several field groups.

Yes. But it leads to unnecessary data redundancy.

34. When sorting the extract dataset the fields used as default sort key lie in the Header field group.
35. What does the insert statement in extract datasets do?

It defines the fields of a field group.

36.What does the extract statement do in extract datasets?

The data is written to virtual memory by extract commands.

37. A field-groups statement or an insert statement reverses storage space and transfers values. (T/F).

False.

38. While using extract datasets it is required to have a special workarea for interface (T/F)

False.

39. The LOOP-ENDLOOP on extract datasets can be used without any kind of errors (T/F)

False. It causes runtime errors.

40. The Maximum no of key fields that can be used in a header is 50.
41. While sorting field groups we cannot use more than one key field (T/F).

False.

42. While sorting, if the main storage available is not enough, the system writes data to an external help file. The SAP profile parameter, which determines this help file, is DIR_SORTTMP.



43. The extract statements in field groups can be used before or after processing the sort statements. (T/F)

FALSE.

BDC Faq..

1. What is full form of BDC Session?

Batch Data Communication Session.

2. What are the steps in a BDC session?

The first step in a BDC session is to identify the screens of the transaction that the program will process. Next step is to write a program to build the BDC table that will be used to submit the data to SAP. The final step is to submit the BDC table to the system in the batch mode or as a single transaction by the CALL TRANSACTION command.

3. How do you find the information on the current screen?

The information on the current screen can be found by SYSTEM à STATUS command from any menu.

4. How do you save data in BDC tables?

The data in BDC tables is saved by using the field name ‘BDC_OKCODE’ and field value of ‘/11’.

5. What is the last entry in all BDC tables?

In all BDC tables the last entry is to save the data by using the field name BDC_OKCODE and a field value of ‘/11’.

6. What is a multiple line field?

A multiple line field is a special kind of field which allows the user to enter multiple lines of data into it.

7. How do you populate data into a multiple line field?

To populate data into a multiple line field, an index is added to the field name to indicate which line is to be populated by the BDC session (Line index).

8. Write the BDC table structure.

BDC table structure

FIELD TYPE DESCRIPTION

Program CHAR (8) Program name of transaction.

DynPro CHAR (4) Screen number of transaction.

DynBegin CHAR (1) Indicator for new screen.

Fnam CHAR (35) Name of database field from screen.

Fval CHAR (80) Value to submit to field.

9. Does the CALL TRANSACTION method allow multiple transactions to be processed by SAP?

No. The CALL TRANSACTION method allows only a single transaction to be processed by SAP.

10. Does the BDC-INSERT function allow multiple transactions to be processed by SAP?

Yes.

11. What is the syntax for ‘CALL TRANSACTION’?

CALL TRANSACTION trans [using bdctab MODE mode].

Three possible entries are there for MODE.

A - Show all screens.

E - Show only screens with errors.

N - Show no screens.

Jul 24, 2008

User exits

What are user exits?

What is involved in writing them? What precautions are needed?
User defined functionality included to predefined SAP standards. Point in an SAP program where a customer's own program can be called. In contrast to customer exits, user exits allow developers to access and modify program components and data objects in the standard system.

On upgrade, each user exit must be checked to ensure that it conforms to the standard system.
There are two types of user exit:
User exits that use INCLUDEs.
These are customer enhancements that are called directly in the program.
User exits that use tables.
These are used and managed using Customizing.
Should find the customer enhancements belonging to particular development class.


What are the different ways in which you can make changes to SAP standard software ?

Customizing
Enhancements to the SAP Standard
Modifications to the SAP Standard
Customer Development

What is customizing?

Customizing is the setting of system parameters via SAP's own interface.

Why do you need enhancements?

The standard applications do not offer some of the functionality you need. The R/3 enhancement concept allows you to add your own functionality to SAP's standard business applications.

What are the different types of enhancements ?

Enhancements using customer exits
Customers' potential requirements which are not included in the standard software are incorporated in the standard as empty modification 'shells'. Customers can then fill these with their own coding. Enhancements can relate to programs, menus and screens. Upward compatibility is assured.

In other words, SAP guarantees that the jump from the standard software to the exit and the interface which call the exit will remain valid in future releases.

Enhancements to ABAP/4 Dictionary elements
These are ABAP/4 Dictionary enhancements (creation of table appends), text enhancements (customer-specific key words and documentation for data elements) and field exits (creation of additional coding for data elements).

What is customer development ?
Creating customer-specific objects within the customer name range.

What is SSCR ?
SSCR (SAP Software Change Registration) is a procedure, for registering all manual changes to SAP source coding and SAP Dictionary objects.

What is the difference between modifications and enhancements ?
Modifications mean making changes to the SAP standard functionality.
Enhancements mean adding some functionality to SAP standard functionality.

What are the disadvantages of modification ?
Modifying standard code can lead to errors
Modifications mean more work during software upgrades

What are the advantages of enhancements ?
Do not affect standard SAP source code
Do not affect software upgrades

when do you opt for modification ?
Customer exits are not available for all programs and screens within the R/3 standard applications. You can only use exits if they already exist within the SAP R/3 System . Otherwise you have to opt for modifications .

What are the various types of customer exits ?
Menu exits
Screen exits
Function module exits
Keyword exits

What is a menu exit ?
Adding items to the pulldown menus in standard R/3 applications .

13.What is a screen exit ?
Adding fields to the screens within R/3 applications. SAP creates screen exits by placing special subscreen areas within a standard R/3 screen and calling a customer subscreen from within the standard dynpro's flow logic.

What is a function module exit ?
Adding functionality to R/3 applications. Function module exits play a role in both menu and screen exits.

What is a keyword exit ?
Add documentation to the data elements of key words defined in the ABAP/4 Dictionary. The system displays this documentation whenever a user presses F1 to get online help for a screen field.

How do SAP organizes its exits ?
SAP organizes its exits in packages that are called SAP enhancements. Each SAP enhancement can contain many individual exits.

What is an add-on project ?
To take advantage of the exits available within standard R/3 applications, you need to create an add-on project. This project lets you organize the enhancement packages and exits you want to use. The add-on project also allows you to hang add-on functionality onto the exit hooks contained with SAP enhancements.

Jul 5, 2008

Internal Table type...

What Are Different Types Of Internal Tables and Their Usage

Standard Internal Tables

Standard tables have a linear index. You can access them using either the index or the key. If you use the key, the response time is in linear relationship to the number of table entries. The key of a standard table is always non-unique, and you may not include any specification for the uniqueness in the table definition.

This table type is particularly appropriate if you want to address individual table entries using the index. This is the quickest way to access table entries. To fill a standard table, append lines using the (APPEND) statement. You should read, modify and delete lines by referring to the index (INDEX option with the relevant ABAP command). The response time for accessing a standard table is in linear relation to the number of table entries. If you need to use key access, standard tables are appropriate if you can fill and process the table in separate steps. For example, you can fill a standard table by appending records and then sort it. If you then use key access with the binary search option (BINARY), the response time is in logarithmic relation to
the number of table entries.

Sorted Internal Tables

Sorted tables are always saved correctly sorted by key. They also have a linear key, and, like standard tables, you can access them using either the table index or the key. When you use the key, the response time is in logarithmic relationship to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique, or non-unique, and you must specify either UNIQUE or NON-UNIQUE in the table definition. Standard tables and sorted tables both belong to the generic group index tables.

This table type is particularly suitable if you want the table to be sorted while you are still adding entries to it. You fill the table using the (INSERT) statement, according to the sort sequence defined in the table key. Table entries that do not fit are recognised before they are inserted. The response time for access using the key is in logarithmic relation to the number of
table entries, since the system automatically uses a binary search. Sorted tables are appropriate for partially sequential processing in a LOOP, as long as the WHERE condition contains the beginning of the table key.

Hashed Internal Tables

Hashes tables have no internal linear index. You can only access hashed tables by specifying the key. The response time is constant, regardless of the number of table entries, since the search uses a hash algorithm. The key of a hashed table must be unique, and you must specify UNIQUE in the table definition.

This table type is particularly suitable if you want mainly to use key access for table entries. You cannot access hashed tables using the index. When you use key access, the response time remains constant, regardless of the number of table entries. As with database tables, the key of a hashed table is always unique. Hashed tables are therefore a useful way of constructing and
using internal tables that are similar to database tables.

Index Tables

Index table is only used to specify the type of generic parameters in a FORM or FUNCTION. That means that you can't create a table of type INDEX.

Internal tables are not DB tables. Standard and Sorted tables in combined are basically called as Index tables and there nothing else. Here is the hierarchy

ANY TABLE
|
------------------------------------
| |
Index Tables Hashed Table
|
------------------------------------
| |
Standard Table Sorted Table

Jul 3, 2008

Work process...

FACTS ON INCLUDE & APPEND Structures

Includes

With tables and structures it is possible to include the fields of another structure as well as to list the individual fields. Individual fields and includes can be combined as required.

If an include is changed, all the tables and structures that contain this include are automatically adjusted.

Example: Structure X is included in tables A and B. If another field is inserted into structure X, this field is also inserted in tables A and B.

Includes can also be nested, i.e. structure A includes structure B, which in turn includes another structure C etc. The maximum nesting depth is limited to nine. A path of nested includes in a table or structure therefore can have at most length nine (excluding the table/structure itself).

Only flat structures can be included. In a flat structure, each field either refers to a data element or is directly assigned a data type and length by direct type entry.

Only structures can be included in a table. Both tables and structures can be included in a structure, but only one table may lie on a path of nested includes.

Example: Table TAB1 includes structure STRUKT1, which in turn includes structure STRUKT2. Only table TAB1 lies on the path of nested includes. It is also possible to include TAB1 in a further structure STRUKT0, but no other table may be included in TAB1 because in this case two tables (TAB1 and TAB2) would lie on a path of nested includes.

Append Structures

Append structures are used for enhancements which are not provided for in the standard (special developments, country versions and adding customer fields to SAP standard tables).

An append structure is assigned to exactly one table. There can however be several append structures to one table. If an append structure is created or changed, the table assigned to it (appending object) is also activated again at activation and the changes also take effect there.

An append structure permits the following enhancements to a table or structure:

  • Add new fields
  • Add foreign keys to fields of the appending object
  • Add search help attachments to fields of the appending object

Appending an append structure or inserting fields in an existing append structure does not lead to the conversion of the table. The fields of the append structure are appended to the database table.

Append structures are created by customers in the customer name range and are thus protected against overwriting in upgrades or release upgrades. After a release upgrade, the new versions of the standard tables are imported and fields contained in append structures are appended to the new standard tables.

Note: Append structures can only be created for transparent tables and structures. It is not possible to add fields with an append structure for transparent tables containing a long field. Furthermore, append structures may not be created for tables and structures of the central Basis of the R/3 System.

SAP Interview Questions- Basics


  1. What is ERP? - ERP is a package with the techniques and concepts for the integrated management of business as a whole, for effective use of management resources, to improve the efficiency of an enterprise. Initially, ERP was targeted for manufacturing industry mainly for planning and managing core business like production and financial market. As the growth and merits of ERP package ERP software is designed for basic process of a company from manufacturing to small shops with a target of integrating information across the company.
  2. Different types of ERP? - SAP, BAAN, JD Edwards, Oracle Financials, Siebel, PeopleSoft. Among all the ERP’s most of the companies implemented or trying to implement SAP because of number of advantages aver other ERP packages.
  3. What is SAP? - SAP is the name of the company founded in 1972 under the German name (Systems, Applications, and Products in Data Processing) is the leading ERP (Enterprise Resource Planning) software package.
  4. Explain the concept of “Business Content” in SAP Business Information Warehouse? - Business Content is a pre-configured set of role and task-relevant information models based on consistent Metadata in the SAP Business Information Warehouse. Business Content provides selected roles within a company with the information they need to carry out their tasks. These information models essentially contain roles, workbooks, queries, InfoSources, InfoCubes, key figures, characteristics, update rules and extractors for SAP R/3, mySAP.com Business Applications and other selected applications.
  5. Why do you usually choose to implement SAP? - There are number of technical reasons numbers of companies are planning to implement SAP. It’s highly configurable, highly secure data handling, min data redundancy, max data consistency, you can capitalize on economics of sales like purchasing, tight integration-cross function.
  6. Can BW run without a SAP R/3 implementation? - Certainly. You can run BW without R/3 implementation. You can use pre-defined business content in BW using your non-SAP data. Here you simply need to map the transfer structures associated with BW data sources (InfoCubes, ODS tables) to the inbound data files or use 3rd part tool to connect your flat files and other data sources and load data in BW. Several third party ETL products such as Acta, Infomatica, DataStage and others will have been certified to load data in BW.
  7. What is IDES? - International Demonstration and Education System. A sample application provided for faster learning and implementation.
  8. What is WF and its importance? - Business Work Flow: Tool for automatic control and execution of cross-application processes. This involves coordinating the persons involved, the work steps required, the data, which needs to be processed (business objects). The main advantage is reduction in throughput times and the costs involved in managing business processes. Transparency and quality are enhanced by its use.
  9. What is SAP R/3? - A third generation set of highly integrated software modules that performs common business function based on multinational leading practice. Takes care of any enterprise however diverse in operation, spread over the world. In R/3 system all the three servers like presentation, application server and database server are located at different system.
  10. What are presentation, application and database servers in SAP R/3? - The application layer of an R/3 System is made up of the application servers and the message server. Application programs in an R/3 System are run on application servers. The application servers communicate with the presentation components, the database, and also with each other, using the message server. All the data are stored in a centralized server. This server is called database server.
  11. What should be the approach for writing a BDC program? - Convert the legacy system data to a flat file and convert flat file into internal table. Transfer the flat file into sap system called “sap data transfer”. Call transaction(Write the program explicitly) or create sessions (sessions are created and processed ,if success data will transfer).
  12. Explain open SQL vs native SQL? - ABAP Native SQL allows you to include database-specific SQL statements in an ABAP program. Most ABAP programs containing database-specific SQL statements do not run with different databases. If different databases are involved, use Open SQL. To execute ABAP Native SQL in an ABAP program, use the statement EXEC. Open SQL (Subset of standard SQL statements), allows you to access all database tables available in the R/3 System, regardless of the manufacturer. To avoid conflicts between database tables and to keep ABAP programs independent from the database system used, SAP has generated its own set of SQL statements known as Open SQL.
  13. What are datasets? - The sequential files (processed on application server) are called datasets. They are used for file handling in SAP.
  14. What are internal tables check table, value table, and transparent table? - Internal table: It is a standard data type object, which exists only during the runtime of the program. Check table: Check table will be at field level checking. Value table: Value table will be at domain level checking ex: scarr table is check table for carrid. Transparent table: - Exists with the same structure both in dictionary as well as in database exactly with the same data and fields.
  15. What are the major benefits of reporting with BW over R/3? Would it be sufficient just to Web-enable R/3 Reports? - Performance — Heavy reporting along with regular OLTP transactions can produce a lot of load both on the R/3 and the database (cpu, memory, disks, etc). Just take a look at the load put on your system during a month end, quarter end, or year-end — now imagine that occurring even more frequently. Data analysis — BW uses a Data Warehouse and OLAP concepts for storing and analyzing data, where R/3 was designed for transaction processing. With a lot of work you can get the same analysis out of R/3 but most likely would be easier from a BW.
  16. How can an ERP such as SAP help a business owner learn more about how business operates? - In order to use an ERP system, a
    business person must understand the business processes and how they work together from one functional area to the other. This knowledge gives the student a much deeper understanding of how a business operates. Using SAP as a tool to learn about ERP systems will require that the
    people understand the business processes and how they integrate.
  17. What is the difference between OLAP and Data Mining? - OLAP - On line Analytical processing is a reporting tool configured to understand your database schema ,composition facts and dimensions . By simple point-n-clicking, a user can run any number of canned or user-designed reports without having to know anything of SQL or the schema. Because of that prior configuration, the OLAP engine “builds” and executes the appropriate SQL. Mining is to build the application to specifically look at detailed analyses, often algorithmic; even more often misappropriate called “reporting.
  18. What is “Extended Star Schema” and how did it emerge? - The Star Schema consists of the Dimension Tables and the Fact Table. The Master Data related tables are kept in separate tables, which has reference to the characteristics in the dimension table(s). These separate tables for master data is termed as the Extended Star Schema.
  19. Define Meta data, Master data and Transaction data - Meta Data: Data that describes the structure of data or MetaObjects is called Metadata. In other words data about data is known as Meta Data. Master Data: Master data is data that remains unchanged over a long period of time. It contains information that is always needed in the same way. Characteristics can bear master data in BW. With master data you are dealing with attributes, texts or hierarchies. Transaction data: Data relating to the day-to-day transactions is the Transaction data.
  20. Name some drawbacks of SAP - Interfaces are huge problem, Determine where master data resides, Expensive, very complex, demands highly trained staff, lengthy implementation time.
  21. What is Bex? - Bex stands for Business Explorer. Bex enables end user to locate reports, view reports, analyze information and can execute queries. The queries in workbook can be saved to there respective roles in the Bex browser. Bex has the following components: Bex Browser, Bex analyzer, Bex Map, Bex Web.
  22. What are variables? - Variables are parameters of a query that are set in the parameter query definition and are not filled with values until the queries are inserted into workbooks. There are different types of variables which are used in different application: Characteristics variables, Hierarchies and hierarchy node, Texts, Formulas, Processing types, User entry/Default type, Replacment Path.
  23. What is AWB?. What is its purpose? - AWB stands for Administrator WorkBench. AWB is a tool for controlling, monitoring and maintaining all the processes connected with data staging and processing in the business information whearhousing.
  24. What is the significance of ODS in BIW? - An ODS Object serves to store consolidated and debugged transaction data on a document level (atomic level). It describes a consolidated dataset from one or more InfoSources. This dataset can be analyzed with a BEx Query or InfoSet Query. The data of an ODS Object can be updated with a delta update into InfoCubes and/or other ODS Objects in the same system or across systems. In contrast to multi-dimensional data storage with InfoCubes, the data in ODS Objects is stored in transparent, flat database tables.
  25. What are the different types of source system? - SAP R/3 Source Systems, SAP BW, Flat Files and External Systems.
  26. What is Extractor? - Extractors is a data retrieval mechanisms in the SAP source system. Which can fill the extract structure of a data source with the data from the SAP source system datasets. The extractor may be able to supply data to more fields than exist in the extract structure.

SAP ABAP interview questions


  1. What is an ABAP data dictionary?- ABAP 4 data dictionary describes the logical structures of the objects used in application development and shows how they are mapped to the underlying relational database in tables/views.
  2. What are domains and data element?- Domains:Domain is the central object for describing the technical characteristics of an attribute of an business objects. It describes the value range of the field. Data Element: It is used to describe the semantic definition of the table fields like description the field. Data element describes how a field can be displayed to end-user.
  3. What is foreign key relationship?- A relationship which can be defined between tables and must be explicitly defined at field level. Foreign keys are used to ensure the consistency of data. Data entered should be checked against existing data to ensure that there are now contradiction. While defining foreign key relationship cardinality has to be specified. Cardinality mentions how many dependent records or how referenced records are possible.
  4. Describe data classes.- Master data: It is the data which is seldomly changed. Transaction data: It is the data which is often changed. Organization data: It is a customizing data which is entered in the system when the system is configured and is then rarely changed. System data:It is the data which R/3 system needs for itself.
  5. What are indexes?- Indexes are described as a copy of a database table reduced to specific fields. This data exists in sorted form. This sorting form ease fast access to the field of the tables. In order that other fields are also read, a pointer to the associated record of the actual table are included in the index. Yhe indexes are activated along with the table and are created automatically with it in the database.
  6. Difference between transparent tables and pooled tables.- Transparent tables: Transparent tables in the dictionary has a one-to-one relation with the table in database. Its structure corresponds to single database field. Table in the database has the same name as in the dictionary. Transparent table holds application data. Pooled tables. Pooled tables in the dictionary has a many-to-one relation with the table in database. Table in the database has the different name as in the dictionary. Pooled table are stored in table pool at the database level.
  7. What is an ABAP/4 Query?- ABAP/4 Query is a powerful tool to generate simple reports without any coding. ABAP/4 Query can generate the following 3 simple reports: Basic List: It is the simple reports. Statistics: Reports with statistical functions like Average, Percentages. Ranked Lists: For analytical reports. - For creating a ABAP/4 Query, programmer has to create user group and a functional group. Functional group can be created using with or without logical database table. Finally, assign user group to functional group. Finally, create a query on the functional group generated.
  8. What is BDC programming?- Transferring of large/external/legacy data into SAP system using Batch Input programming. Batch input is a automatic procedure referred to as BDC(Batch Data Communications).The central component of the transfer is a queue file which receives the data vie a batch input programs and groups associated data into “sessions”.
  9. What are the functional modules used in sequence in BDC?- These are the 3 functional modules which are used in a sequence to perform a data transfer successfully using BDC programming: BDC_OPEN_GROUP - Parameters like Name of the client, sessions and user name are specified in this functional modules. BDC_INSERT - It is used to insert the data for one transaction into a session. BDC_CLOSE_GROUP - This is used to close the batch input session.
  10. What are internal tables?- Internal tables are a standard data type object which exists only during the runtime of the program. They are used to perform table calculations on subsets of database tables and for re-organising the contents of database tables according to users need.
  11. What is ITS? What are the merits of ITS?- ITS is a Internet Transaction Server. ITS forms an interface between HTTP server and R/3 system, which converts screen provided data by the R/3 system into HTML documents and vice-versa. Merits of ITS: A complete web transaction can be developed and tested in R/3 system. All transaction components, including those used by the ITS outside the R/3 system at runtime, can be stored in the R/3 system. The advantage of automatic language processing in the R/3 system can be utilized to language-dependent HTML documents at runtime.
  12. What is DynPro?- DynPro is a Dynamic Programming which is a combination of screen and the associated flow logic Screen is also called as DynPro.
  13. What are screen painter and menu painter?- Screen painter: Screen painter is a tool to design and maintain screen and its elements. It allows user to create GUI screens for the transactions. Attributes, layout, filed attributes and flow logic are the elements of Screen painter. Menu painter: Menu painter is a tool to design the interface components. Status, menu bars, menu lists, F-key settings, functions and titles are the components of Menu painters. Screen painter and menu painter both are the graphical interface of an ABAP/4 applications.
  14. What are the components of SAP scripts?- SAP scripts is a word processing tool of SAP which has the following components: Standard text. It is like a standard normal documents. Layout sets. - Layout set consists of the following components: Windows and pages, Paragraph formats, Character formats. Creating forms in the R/3 system. Every layout set consists of Header, paragraph, and character string. ABAP/4 program.
  15. What is ALV programming in ABAP? When is this grid used in ABAP?- ALV is Application List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options.
  16. What are the events in ABAP/4 language?- Initialization, At selection-screen, Start-of-selection, end-of-selection, top-of-page, end-of-page, At line-selection, At user-command, At PF, Get, At New, At LAST, AT END, AT FIRST.
  17. What is CTS and what do you know about it?- The Change and Transport System (CTS) is a tool that helps you to organize development projects in the ABAP Workbench and in Customizing, and then transport the changes between the SAP Systems and clients in your system landscape. This documentation provides you with an overview of how to manage changes with the CTS and essential information on setting up your system and client landscape and deciding on a transport strategy. Read and follow this documentation when planning your development project.
  18. What are logical databases? What are the advantages/ dis-advantages of logical databases?- To read data from a database tables we use logical database. A logical database provides read-only access to a group of related tables to an ABAP/4 program. Advantages: i)check functions which check that user input is complete, correct,and plausible. ii)Meaningful data selection. iii)central authorization checks for database accesses. iv)good read access performance while retaining the hierarchical data view determined by the application logic. dis advantages: i)If you donot specify a logical database in the program attributes,the GET events never occur. ii)There is no ENDGET command,so the code block associated with an event ends with the next event statement (such as another GET or an END-OF-SELECTION).
  19. What is a batch input session?- BATCH INPUT SESSION is an intermediate step between internal table and database table. Data along with the action is stored in session ie data for screen fields, to which screen it is passed, program name behind it, and how next screen is processed.
  20. How to upload data using CATT ?- These are the steps to be followed to Upload data through CATT: Creation of the CATT test case & recording the sample data input. Download of the source file template. Modification of the source file. Upload of the data from the source file.
  21. What is Smart Forms?- Smart Forms allows you to create forms using a graphical design tool with robust functionality, color, and more. Additionally, all new forms developed at SAP will be created with the new Smart Form solution.
  22. How can I make a differentiation between dependent and independent data?- Client dependent or independent transfer requirements include client specific or cross client objects in the change requests. Workbench objects like SAPscripts are client specific, some entries in customizing are client independent. If you display the object list for one change request, and then for each object the object attributes, you will find the flag client specific. If one object in the task list has this flag on, then that transport will be client dependent.
  23. What is the difference between macro and subroutine?- Macros can only be used in the program the are defined in and only after the definition are expanded at compilation / generation. Subroutines (FORM) can be called from both the program the are defined in and other programs . A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. Since debugging a MACRO is not really possible, prevent the use of them (I’ve never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION.

Jul 2, 2008

SAP R/3 INTERVIEW ARCHITECTURE QUESTIONS

1. What guarantees the integration of all application modules?

The R/3 basis system guarantees the integration of all application modules. The R/3 basis s/w provides the run time environment for the R/3 applications ensures optimal integration, defines a stable architectural frame for system enhancements, and contains the administration tools for the entire system.One of the main tasks of the basis system is to guarantee the portability of the complete system.

2. What are the central interfaces of the R/3 system?

Presentation Interface.

Database Interface.

Operating system Interface.

3. Which interface controls what is shown on the p.c.?

Presentation Interface.

4. Which interface converts SQL requirements in the SAP development system to those of the database?

Database Interface.

5. What is SAP dispatcher?

SAP dispatcher is the control agent that manages the resources for the R/3 applications.

6. What are the functions of dispatcher?

Equal distribution of transaction load to the work processes.

Management of buffer areas in main memory.

Integration of the presentation levels.

Organization of communication activities.

7. What is a work process?

A work process is where individual dialog steps are actually processed and the work is done. Each work process handles one type of request.

8. Name various work processes of R/3 system?

Dialog or Online (processes only one request at a time).

Background (Started at a specific time)

Update (primary or secondary)

Enque (Lock mechanism).

Spool (generated online or during back ground processing for printing).

9. Explain about the two services that are used to deal with communication.

Message Service: Used by the application servers to exchange short internal messages, all system communications.

Gateway Service: Enables communication between R/3 and external applications using CPI-C protocol.

10. Which work process triggers database changes?

Update work process.

11. Define service (within R/3)?

A service is a process or group of processes that perform a specific system function and often provide an application-programming interface for other processes to call.

12. What are the roll and page areas?

Roll and page areas are SAP R/3 buffers used to store user contexts (process requests). The SAP dispatcher assigns process requests to work processes as they are queued in the roll and page areas.

Paging area holds data from the application programs.

Roll area holds data from previous dialog steps and data that characterize the user.

13. What are the different layers in R/3 system?

Presentation Layer.

Application Layer.

Database Layer.

14. What are the phases of background processing?

Job Scheduling.

Job Processing.

Job Overview.

15. What components of the R/e system initiate the start of background jobs at the specified time?

The batch scheduler initiates the start of background job. The dispatcher then sends this request to an available background work process for processing.

16. Define Instance.

An instance is an administrative unit in which components of an R/3 systems providing one or more services are grouped together. The services offered by an instance are started and stopped at random. All components are parameterized using a joint instance profile. A central R/3 system consists of a single instance in which all-necessary SAP services are offered. Each instance uses separate buffer areas.

17. From hardware perspective, every information system can be divided into three task areas Presentation, Application Logic and Data Storage.

The R/3 Basis software is highly suitable for use in multi-level client/server architectures.

18. What are R/3 Basis configurations?

A central system with centrally installed presentation software.

Two-level client/server system with rolled out presentation software.

Two-level client/server system. Presentation and Application run on the same computer.

Three-level client/server system. Presentation, Application and database each run on separate computers.

19. What is a Service in SAP terminology?

A service refers to something offered by a s/w component.

20. What is Server in SAP terminology?

A component can consist of one process or a group and is then called the server for the respective service.

21. What is a client in SAP terminology?

A S/W component that uses the service (offered by a s/w component) is called a Client. At the same time these clients may also be servers for other services.

22.What is a SAP system?

The union of all s/w components that are assigned to the same databases is called as a SAP system.

23. What is the means of communications between R/3 and external applications?

The means of communication between R/2,R/3 and external applications is via the CPI-C handler or SAP Gateway, using the CPI-C Protocol.

24. What is the protocol used by SAP Gateway process?

The SAP Gateway process communicates with the clients based on the TCP/IP Protocol.

25. Expand CPI-C.

Common Program Interface Communication.

26. What is a Spool request?

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

27. What are different types of Log records?

V1 and V2. V1 must be processed before V2. But, we can have more than one V2 logs.

28. What are the types of Update requests?

An update request can be divided into one primary (V1) and several Secondary update components (V2). Time-critical operations are placed in V1 component and those whose timing is less critical are placed in V2 components. If a V1 update fails, V2 components will not be processed.

29. Dialog work processes perform only one dialog step and then available for the next request.

30. Explain what is a transaction in SAP terminology.

In SAP terminology, a transaction is series of logically connected dialog steps.

31. Explain how SAP GUI handles output screen for the user.

The SAP front-end s/w can either run on the same computer or on different computers provided for that purpose. User terminal input is accepted by the SAP terminal program SAP GUI, converted to SAP proprietary format and sent to the SAP dispatcher. The dispatcher coordinates the information exchange between the SAP GUIs and the work processes. The dispatcher first places the processing request in request queues, which it then processes. The dispatcher dispatches the requests one after another, to the available work process. The actual processing takes place in the work process. When processing is complete, the result of a work process is returned via the dispatcher to the SAP GUI. The SAP GUI interprets the received data and generates the output screen for the user.

How to change Transport request from Released to Modifiable

Step 1: Go to SE38 – Execute Program RDDIT076.  Step 2: Give your released requests number and execute again. Step 3: After executing, yo...