+ All Categories
Home > Documents > ABAP Tcodes Description

ABAP Tcodes Description

Date post: 06-Dec-2015
Category:
Upload: siva-teja-peddaiahgari
View: 54 times
Download: 3 times
Share this document with a friend
Description:
ABAP T-CODES Description With Explaination
Popular Tags:
99
SAP — ABAP INTERVIEW QUESTIONS '#'i4'$'i4'i4'#'i4'i4'i¢'i4'i4'#'i4'i4'i¢'i°'i°'#'i¢'#'i4'$'i¢ '#'i¢'i4'i4'i4'i4'i4'i4'i4'i4'$'#'i4'i4'#'i¢'i¢'i¢'i¢'#'i4'i ¢'i¢ ******* *******% TRANSACTION CODES SE30 ABAP Objects Ru ntime Analysis SE32 ABAP Text Element Maintenance SE33 Context Builder SE35 ABAP/4 Dialog Modules SE36 Logical databases SE37 ABAP Function Modules
Transcript
Page 1: ABAP Tcodes Description

SAP — ABAP

INTERVIEW

QUESTIONS

'#'i4'$'i4'i4'#'i4'i4'i¢'i4'i4'#'i4'i4'i¢'i°'i°'#'i¢'#'i4'$'i¢

'#'i¢'i4'i4'i4'i4'i4'i4'i4'i4'$'#'i4'i4'#'i¢'i¢'i¢'i¢'#'i4'i¢'i¢

*******fi*******%

TRANSACTION CODES

SE30 ABAP Objects Ru ntime Analysis

SE32 ABAP Text Element Maintenance

SE33 Context Builder

SE35 ABAP/4 Dialog Modules

SE36 Logical databases

SE37 ABAP Function Modules

SE38 ABAP Editor

Page 2: ABAP Tcodes Description

SE39 Splitscreen Editor: Program Compare

SE40 MP: Standards Maint. and Translation

SE41 Menu Painter

SE43 Maintain Area Menu

SE51 Screen Painter

SE52 Parameterized screenpainter call

SE55 Internal table view maintenance call

SE56 internal call: display table view

SE57 internal delete table view call

SE61 R/3 Documentation

SE62 Industry Utilities

SE63 Translation: Initial Screen

SE71 SAPscript form

SE72 SAPscript Styles

SE73 SAPscript font maintenance (revised)

SE74 SAPscript format conversion

Page 3: ABAP Tcodes Description

SE75 SAPscript Settings

SE76 SAPscript: Form Translation

SE77 SAPscript Translation Styles

SE78 SAPscript: Graphics administration

SE80 Object Navigator

SE81 Application Hierarchy

SE82 Application Hierarchy

SE84 R/3 Repository Information System

SE85 ABAP/4 Repository Information System

SE86 ABAP Repository Information System

SE88 Development Coordination Info System

SE89 Maintain Trees in Information System

SE91 Maintain Messages

SE92 New SysLog Msg Maintenance as of 46A

SE93 Maintain Transaction Codes

SE94 Customer enhancement simulation

SE95 Modification Browser

SEPS SAP Electronic Parcel Service

Page 4: ABAP Tcodes Description

SERP Reporting: Change Tree Structure

SEU Repository Browser

SF01 C|ient—Specific File Names

SFAW Field Selection Maintenance

SCMP View / Table Comparison

SCUO Table Analyses And Comparison

SCU1 Table Comparison — Export to Tape

SCU2 Table Comparison Against Tape

SCU3 Table History

SE16 Display Table Content

SE17 Generate Table Display

SE54 Generate table view

SM31 Table maintenance

SM31_OLD Old Table Maintenance

SM32 Maintain Table Parameter ID TAB

SM33 Display Table ParameterID TAB

Page 5: ABAP Tcodes Description

Introduction

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.

What is SAP R/3?

Ans In 1972, five systems analysts began working nights and weekends to create standard software with

realtime data processing

SAP R/3 refers to Sysh-zms Application and Product for data processing Real-time having a 3 tier architecture

i.e. Presentation layer, Application layer and Database layer.

Their vision was to develop and market standard enterprise software which would integrate all business

processes.

Facts about SAP

Page 6: ABAP Tcodes Description

0 Leading global provider of client/server business software solutions.

0 Number one vendor of standard business application software.

0 Fourth-largest independent software supplier in the world.

0 Available in 14 languages.

0 More than 7500 customers in over 90 countries have chosen SAP.

why SAP?

Ans

0 Highly configurable.

0 Highly secure data handling.

0 Minimize data redundancy, Maximize data consistency.

0 Can capitalize on economic of sales like purchasing.

0 Tight integration cross function.

Disadvantag of SAP?

Ans

0 Expensive.

0 Not very flexible.

0 Difficult in customizing.

SAP Basics feature

* Configuration of the SAP modules

o Transaction SPRO - this is the main tree for all the configuration.

* Function Key

Page 7: ABAP Tcodes Description

o F1 - Help

o F4 - Possible entries or matchoode for the field you are accessing

o F5 - Selection screen

o F7 - Previous screen

o F8 - Next screen

o F9 - Techniml info

o CT RL+X — Cut

o CT RL+C - Copy

o CTRL+V - Paste

* Navigation

o /n Skip to the next record if you are processing one batch input session

o /bend Cancel a batch input foreground process

o /nend Close all R/3 sessions and Iogoff

o /nxxx x Call the transaction xxxx in the same session

Page 8: ABAP Tcodes Description

o /o Generate a session list

o /oxxx x Call the transaction xxxx in an additional session

o /i Delete the current session

o /h Turn the debug mode on

o /$tab Reset all buffers (for System Administrators)

o /$syn c Synchronize instances buffers (for System Administrators)

In 4.x, you can have long SAP transaction code up to a maximum of 20 character

Differa1t typa of ERP ?

SAP, BAAN, JD Edwards, Oracle Financials, Siebel, Peop|eSoft. Among all the ERP's most of the companies

implemented or trying to implement SAP because of number of advantages over other ERP packages.

Explain the concept of “Busin Content" in SAP Busin 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

Page 9: ABAP Tcodes Description

with the information they need to carry out their tasks. These information models essentially contain roles,

workbooks, queries, InfoSou rces, InfoCubes, key figures, characteristics, update rules and extractors for SAP R/3,

mySAP.com Business Applimtions and other selected applications.

Why do you usually choose to impIema1t SAP?

There are number of techniml 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 mpitalize on

economits of sales like purchasing, tight integration-cross function.

Can BW run without a SAP R/3 implementation?

Certainly. You can run BW without R/3 implementation. You an 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.

What is IDES?

International Demonstration and Education System. A sample application provided for faster learning and

implementation.

Page 10: ABAP Tcodes Description

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.

What are prsaflsation, 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.

What is SAP EASY ACCESS?

Ans It displays a user menu that displays the option to perform tasks like creating & modifying transaction

reports & web addresses.

What is SAP Netweaver?

SAP Netweaver is Es integrated technology platform and is the technical foundation for all SAP

Page 11: ABAP Tcodes Description

applications since the SAP Business Suite. SAP Netweaver is marketed as a service-oriented application and

intgration platfonn. SAP Netweaver provides the development and runtime environment for SAP applications and

can be used for custom development and integration with other applications and systems.

what is Web dyna pro?

Web Dynpro (WD) is a proprietary web application user interface technology developed by SAP AG and exists

in a 1 Both have in general the same functionality, but usually one flavor is improved after the other, so

temporary one flavor is more advanced than the other. Hence, the decision for one of the two flavors shall be

based on organizational and business circumstances, but not on functionality.

Main advantages of Web Dynpro over other technologies

0 typed access for design time checks, e.g. navigation links and messages are accessed via types instead of

string keys like in E

diverse services for backend access, like aRFC, g and Web Service data models

integration with SAP Interacfive Forms by Adobe, which are interactive PDF forms, during design (same

IDE) and run time (data sharing)

Page 12: ABAP Tcodes Description

0 integration with business process management and business rules management (since Netweaver CE 7.1

EHP 1)

0 designed to support development big scale applications by adding multiple grouping layers on top of Java

packages (DCs, SCs, products)

0 runs on different clients e.g. web browser, mobile device, widget engine

Main disadvantages

0 proprietary, running only on SAP servers

0 less flexible due to support for multiple clients (i.e. custom html is not possible). To reduce the limitations,

several measures have been taken. For example, WD supports so-called ‘‘islands‘‘ for e.g. flash

applications that enrich the Web Dynpro UI element collection by rich UI elements.

ABAP DICTIONARY [SE1 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.

What are the different type of data dictionary objects?

Answer

Page 13: ABAP Tcodes Description

Data Dictionary Objects

* Tables

* Views

* Domain

* Data Element

* Type Groups

* Search Helps/Matchcode Objects

* Lock objects

* Structures

* Table Types

What are tabl?

Ans It creates a structure — the table work area in a program for the database tables, views or structure

What are Fora'gn Keys?

You can define the relationships between tables in the ABAP Dictionary by creating foreign keys.Using foreign keys,

you an easily create value checks for input fields. Foreign keys an also be used to link several tables in a @ or

Page 14: ABAP Tcodes Description

a lock ob]'ect.

Field Assignment in the Fora'gn Key

A foreign key links two tables T1 and T2 by assigning fields of table T1 to the primary key fields of table T2.

Table T1 is called the foreign key table (dependent table) and table T2 the check table (referenced table). The

pair of fields for the two tables must have the same data type and length. One field of the foreign key table

therefore corresponds to each key field of the check table. This field is called the fora'gn key fieId.A foreign key

permits you to assign data records in the foreign key table and check table. One record of the foreign key table

uniquely identifies one record of the check table using the entries in the foreign key fields.

Check Field and Value d1eck

One of the foreign key fields is marked as the check field. This means that the foreign key relationship is

maintained for this field.

When an entry is made in the check field, there is a check whether the check table contains a record with the key

defined by the values in the foreign key fields. If this is so, the entry is valid. OthenNise the system rejects the

entry.

In this example the entry FIeId2 = 2 and FIeId4 = 2 would be rejected since T2 does not contain a record with the

Page 15: ABAP Tcodes Description

key FieId5 = 2 and FieId6 = 2.

If you do not want to check against all the key fields of the check table, you can exclude fields of the foreign key

table from the assignment of the fields to the check table with generic and constant foreign keys.

Variants

Variants allow you to save sets of input values for programs that you often start with the same selections. You an

use them for any programs except subroutine pools

Search helps

SEARCH HELP:

The input help (F4 help) is a standard function of the R/3 System. It permits the user to display a list of possible

values for a screen field. A value can be directly copied to an input field by list selection.

What are all the diffa'enc betwea1 search helps and match code objects?

Match Code

Matchcodes were replaced with Search Helps starting with Release 4.0. Please use search helps to assign an input

help to a field.

Page 16: ABAP Tcodes Description

Existing matchcodes were automatically converted to search helps. A matchcode object is hereby converted to a

collective search help with the same name. Each matchcode ID of the matchcode object is converted into an

elementary search help with the same name and assigned to the collective search help created from the matchcode

object.

A matchcode is a means of finding data records stored in the system. The matchcode is defined in the ABAP

Dictionary in two steps:

You first define the relevant tables and fields for the search in a matchcode object. A matchcode object describes

the set of all possible search paths for a search string.

You then create one or more matchcode IDs for a matchcode object. A matchcode ID describes a special search

path for a search string. The matchcode ID defines the fields or field combinations to be used in the search.

Search Help

With this function you an search for objects, thereby defining and linking different selection conditions for the

search help.

You can call this function by:

- Selecting Object -> Search... () in the main menu bar of the Integration Builder

Page 17: ABAP Tcodes Description

- Placing the cursor on a software component version and selecting Search... () in the context menu (only in the

Integration Repository)

In this (rise the software component version is defined as the search criteria.

What Function doa data dictionary perform?

Ans Oentral information repository for application and system data. The ABAP Dictionary contains data

definitions (metadata) that allow you to describe all of the data structures in the system (like tables, views, and

data types) in one place. This eliminates redundancy.

What is the difference between data elemafls and domain?

A: Data element

ABAP/4 Development Workbench (BC-DWB)

A data element describes the contents of a field. For example, a data element contains the F1 help texts and

the key

word texts (field texts) for displaying the field on the screen.

Several table fields with identical contents an refer to the same data element.

Domain

ABAP/4 Development Workbench (BC-DWB)

A domain describes the technical attributes of a table field.

These techniml attributes include the data type and the field length.

Page 18: ABAP Tcodes Description

Several fields with the same techniml attributes can refer to the same domain. In this case, each of these fields

has

the technical attributes specified in this domain.

What are client-depa1dant tabl and independent tabl?

In SAP systems we have many clients. A client independent table contains data that can be accessed from

any client. Generally these tables contain SAP control data, language indicators and transaction codes.

Client Dependent tables contain data which is applicable to one specific client. These tables contain data

related to a particular company, for eg. structure of the company, basic commercial data etc..

How to distinguish them?

All client — dep tables have the field MANDT, other don't.

What is Primary key, foreign key ? what is primary index? secondary index?

Ans: Primary index: the primary index contains key fields of a table and a pointer to non-key fields of the table.

The primary index is created automatimlly when a table is created in database and moreover you an further

define reference to the primary index which are known as Secondary index.

How many index can be created for a table?

Page 19: ABAP Tcodes Description

Ans: 9.

What is data class?

Ans: The data class specifies in which table space the table is created in database.

Give few nama of pooled tabl in sap?

Ans: A pool table has many to one relation with the table in the database. For one table in the database there are

many tables in the dictionary. Tha table in the database has a diff name than in the table in the data dict, it has diff

no of fields and field names are different. A pooled table is stored in the pool at the database level. A table pool is a

databse table with a special struct that enables the data of many R3 tables to be stored in it. It an hold only

pooled tables.

Give few nama of transparent tabl?

Ans: A transparent table has a one to one relataionship in the database. The table in the dictionary has the same

name, same no of fields, and the fields have the same name as in the R3 table defn. A transparent tabel has

application data (Master and Transaction).

What is a buffs‘ and how many typa?

Ans: Buffer is nothing but which stores data temporarily. there are two types of buffers. they are Roll and Page

Page 20: ABAP Tcodes Description

areas.

Pages : it stores the application data.

Roll area: it stores the data of previous pages. Data areas of used programs are created in roll areas for each

internal session.

What is table mainta1ance generator and how to create that? What is the tmnsaction code?

Ans: Table maintanence generator is nothing but making a table available for adding records and deleting records.

The transaction code used is SM30.

How to add new fields to a standard sap table?

Ans: 1. Appended structures 2. Customizing tables

What are lock objects?

Ans: Lock objects are nothing but which holds a data for particular field value until you remove a lock..

In Data dictionary in the table creation,What is the purpose of Technical settings.

To identify the Size of the Table Created and to Set whether buffering needs to be done for the table or not.

What are the contafls in technical specifications?

Ans There are five contents in Technical Settings: Data Class, Size Category, Buffering Permission, Buffering

Type and Logging.

Page 21: ABAP Tcodes Description

What is view? Diffa'ent type of view. Explain?

Ans View - A view is a virtual table containing fields from one or more tables. A virtual table that does not

contain any data, but instead provides an applimtion-oriented view of one or more ABAP Dictionary tables.

Different Types of View:

1) Maintenance

2) Database — It is on more than two tables.

3) Projection — It is only on one table.

4) Help

What are the advantaga and disadvantag of using views in ABAP programming ?

advantages: view is used to retrieve the data very fastly from the database tables

*memory wastage is reduced

*faster than joins to retrieve the data from database tables

disadvantages:

view is not a container,it will not hold the data

Page 22: ABAP Tcodes Description

*view memory is not permanent memory

How data is stored in cIusta' table?

A cluster table conatins data from mulitple DDIC tables.

It stores data as a name value pair ( varkey, vardata)

What are aggregate object?

Aggregate Object — Views, Match Code and Lock objects are tailed aggregate objects because they are fonned

from several related table.

What is the difference between Table and Template?

table is a dynamic and template is a static

What is the difference between Primary key and Unique Key?

Ans Primary Key — It an accepts 0 value and cannot be NULL.

Unique Key — It can be NULL.

What is the transaction code for Table mainta1ance?

Ans SM30

What are the check tabl and value tabl?

Ans Check Table: The ABAP Dictionary allows you to define relationships between tables using foreign keys . A

dependent table is tailed a foreign key table, and the referenced table is called the check table. Each key field of

Page 23: ABAP Tcodes Description

the check table corresponds to a field in the foreign key table. These fields are tailed foreign key fields. One of the

foreign key fields is designated as the check field for checking the validity of values. The key fields of the check

table can serve as input help for the check field.

Value Table: Prior to Release 4.0, it was possible to use the value table ofa domain to provide input help. This is

no longer possible, primarily because unexpected results could occur if the value table had more than one key field.

It was not possible to restrict the other key fields, which meant that the environment of the field was not

considered, as is normal with check tables.

In cases where this kind of value help was appropriate, you can reconstruct it by creating a search help for the

data elements that use the domain in question, and using the value table as the selection method.

Check table will be at field level checking.

Value table will be at domain level checking ex: scarr table is check table for carrid.

What is the difference between tabl and structure?

Ans Tables:

1) Data is permanently stored in tables in the database.

Page 24: ABAP Tcodes Description

2) Database tables are generated from them.

Structure:

1) It contains data temporarily during program run-time.

2) No Database tables are generated from it.

What are lock objects?

Ans Reason for Setting Lock: Suppose a travel agent want to book a flight. The customer wants to fly to a

particular city with a certain airline on a certain day. The booking must only be possible if there are still free places

on the flight. To avoid the possibility of overbooking, the database entry corresponding to the flight must be locked

against access from other transactions. This ensures that one user an find out the number of free places, make

the booking, and change the number of free places without the data being changed in the meantime by another

transaction.

The R/3 System synchronizes simultaneous access of several users to the same data records with a lock

mechanism. When interactive transactions are programmed, locks are set and released by (ailing function modules

(see Function Modules for Lock Requests). These function modules are automatically generated from the definition

of lock objects in the ABAP Dictionary.

Two types of Lock: Shared and Exclusive

Page 25: ABAP Tcodes Description

What is the difference between a pool table and a transpara1t table and how they are stored at the

database level?

Ans Pool Table -

1) Many to One Relationship.

2) Table in the Dictionary has the different name, different number of fields, and the fields have the different name

as in the R3 Table definition.

3) It can hold only pooled tables.

Transparent Table —

1) One to One relationship.

2) Table in the Dictionary has the same name, same number of fields, and the fields have the same name as in the

R3 Table definition.

3) It can hold Application data.

A table in the database in which all records from the pooled tables assigned to the table pool are stored

corresponds to a table pool. The definition of a pool consists essentially of two key fields (Tabname and Varkey)

and a long argument field (Vardata).

Page 26: ABAP Tcodes Description

Table Clusters Several logitzl data records from different cluster tables an be stored together in one physical

record in a table cluster.

A cluster key consists of a series of freely definable key fields and a field (Pageno) for distinguishing continuation

records. A cluster also contains a long field (Vardata) that contains the contents of the data fields of the cluster

tables for this key. If the data does not fit into the long field, continuation records are created. Control information

on the structure of the data string is still written at the beginning of the Vardata field.

What are Hashed Tabl ‘P

Ans Hashed tables - This IS the most appropriate type for any table where the main operation is key access. You

cannot access a hashed table using its index. The response time for key access remains constant, regardless of the

number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if

you want to construct and use an internal table, which resembles a database table or for processing large amounts

of data.

Name the tabl, which is used to see all the tmnsaction available.

Ans See tables, TSTC and TSTCT for all the transaction available

Page 27: ABAP Tcodes Description

What happa1s wha1 a table is activated in DD?

Ans When the table is activated, a physical table definition is created in the database for the table definition stored

in the ABAP dictionary. The table definition is translated from the ABAP dictionary of the particular database.

It is available for any insertion, modification and updation of records by any user.

10

ABAP WORKBENCH |SE38[

What is ABAP WorkBa1ch?

ABAP Workbench is a set of programs for developing enterprise resource management (1) applications that run

in the 3g subsystem from E. The latest version includes ABAP Objects, an ob]'ect-oriented programming

language. R/3 will also run programs written in the earlier ABAP/4 language.

What is the typical structure of an ABAP progmm?

Ans HEADER, BODY, FOOTER.

What is the meaning of ABAP editor integrated with ABAP data dictionary?

Ans ABAP Editor: Tool in the ABAP Workbench in which you enter the source code of ABAP programs and check

Page 28: ABAP Tcodes Description

their syntax. You an also navigate from the ABAP Editor to the other tools in the ABAP Workbench.

What is OPEN SQL vs NATIVE SQL?

Ans Open SQL — These statements are a subset of standard SQL. It consists of DML command (Select, Insert,

Update, Delete). It can simplify and speed up database access. Buffering is partly stored in the working memory

and shared memory. Data in buffer is not always up-to-date.

Native SQL — They are loosely integrated into ABAP. It allows access to all functions containing programming

interface. They are not checked and converted. They are sent directly to the database system. Programs that use

Native SQL are specific to the database system for which they were written. For e.g. to create or change table

definition in the ABAP.

What do an EXEC SQL stmt do in ABAP? What is the disadvantage of using it?

Ans To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the

ENDEXEC statement as follows:

EXEC SQL [PERFORMING

].

ENDEXEC.

Page 29: ABAP Tcodes Description

What are the differenc between SAP memory and ABAP memory?

Ans ABAP Memog is a memory area in the internal session (roll area) of an ABAP program. Data within this area is

retained within a sequence of program calls, allowing you to pass data between programs that call one another. It

is also possible to pass data between sessions using SAP Memory.

SAP Memog is a memory area to which all sessions within a SAPgui have access. You can use SAP memory either

to pass data from one program to another within a session (as with ABAP memory) or to pass data from one

session to another.

What are field symbols and field groups? Have you used “component idx of structure" clause with field

groups?

Ans Field Symbol — They are placeholder or symbolic names for the other fields. They do not physimlly reserve

space for a field, but point to its contents. It can point to any data objects.

Field-symbols

Field Group — Field groups does not reserve storage space but contains pointers to existing fields.

An extract dataset consists of a sequence of records. These records may have different structures. All records with

Page 30: ABAP Tcodes Description

the same structure fonn a record type. You must define each record type of an extract dataset as a field group,

using the FIELD-GROUPS statement

What is the advantage of structure? How do you use them in the ABAP progmms?

11

Ans GLOBAL EXISTANCE (these could be used by any other program without creating it again).

What do an extract statement do in the ABAP progmm?

Ans Once you have declared the possible record types as field groups and defined their structure, you can fill the

extract dataset using the following statements:

EXTRACT .

When the first EXTRACT statement occurs in a program, the system creates the extract dataset and adds the first

extract record to it. In each subsequent EXTRACT statement, the new extract record is added to the dataset

What is a collect statement? How is it diffaent from appa1d?

Ans Collect : If an entry with the same key already exists, the COLLECT statement does not append a new line, but

adds the contents of the numeric fields in the work area to the contents of the numeric fields in the existing entry.

Page 31: ABAP Tcodes Description

Append — Duplicate entries occurs.

There is no period after Native SQL statements. Furthennore, using inverted commas (”) or an asterisk (*) at the

beginning ofa line in a native SQL statement does not introduce a comment as it would in normal ABAP syntax.

You need to know whether table and field names are case-sensitive in your chosen database.

What are range? What are number rang?

Ans Main function of ranges to pass data to the actual selection tables without displaying the selection screen.

Min, Max values provided in selection screens.

It is often necessary to directly access individual records in a data structure. This is done using unique keys.

Number ranges are used to assign numbers to individual database records for a commercial object, to complete the

key. Such numbers are e.g. order numbers or material master numbers.

164) Name a few system global variabl you can I.|se in ABAP progmms?

Ans SY—SUBRC, SY-DBCNT, SY-|_ILLI, SY—DATUM, SY—UZEIT, SY—UCOMM,

SY-TABIX. .

SY-|_IL|_I is absolute number of lines from which the event was triggered.

Page 32: ABAP Tcodes Description

How do you take care of performance issu in your ABAP progmms?

Ans Performance of ABAP programs an be improved by minimizing the amount of data to be transferred. The data

set must be transferred through the network to the applimtions, so reducing the amount of time and also reduces

the network traffic.

Some measures that can be taken are:

- Use views defined in the ABAP/4 DDIC (also has the advantage of better reusability).

- Use field list (SELECT clause) rather than SELECT *.

- Range tables should be avoided (IN operator)

- Avoid nested SELECT S.

How to find the return code of an stmt in ABAP programs?

Ans Open SQL has 2 system fields with return codes:

1) SY—SUBRC

2) SY-DBCNT

What are the different type of ABAP statements?

Ans There are six types of ABAP statements:

Page 33: ABAP Tcodes Description

1) Declarative - Types, Data, Tables

2) Modularization - Event Keywords and Defining Keywords

3) Control - If...E|se, While, Case

4) Call - Perform, Call, Set User Command, Submit, Leave to

5) Operational - Write, Add, Move

6) Database - Open SQL & Native SQL

What is runtime analysis? Have you used this?

Ans It checks program execution time in microseconds. When you go to SE30. If you give desired program name in

performance file. It will take you to below screen. You an get how much fast is your program.

Is ABAP a GUI language?

Ans Yes, ABAP IS AN EVENT DRNEN LANGUAGE

What are user exits? What is involved in writing them? What precautions are needed?

Ans User defined functionality included to predefined SAP standards. Point in an SAP program where a customer's

own program an be called. In contrast to customer exits, user exits allow developers to access and modify

12

Page 34: ABAP Tcodes Description

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:

1. User exits that use INCLUDEs - These are customer enhancements that are called directly in the

program.

2. User exits that use TABLEs - These are used and managed using Customizing. Should find the

customer enhancements belonging to particular development class.

2.

How do you get help in ABAP?

Ans HELP-SAP LIBRARY, by pressing F1 on a keyword.

What are the evafls used in ABAP in the order of execution?

Ans Events are:

. INITIALIZATION

. AT SELECTION—SCREEN

. AT SELECTION—SCREEN ON

. START—OF-SELECTION

. TOP-OF-PAGE

. TOP-OF-PAGE DURING LINE SELECTION

Page 35: ABAP Tcodes Description

. END-OF-PAGE

. END-OF-SELECTION

. AT USER-COMMAND

10. AT LINE-SELECTION

11. AT PF

12. GET

13. GET LATE.

14. AT User Command

EDm\lO1U'I-hluklb-I

In the ‘select’ statement what is “group by"?

Group by clause is used to fetch the data from the table by the specified field

ex.se|ect count (*) from emptable group by deptno where deptno = 1.

It is used to find the number of employees present in the specified department no.

What are the various typa of selection screen event?

Page 36: ABAP Tcodes Description

Ans SELECTION—SCREEN BEGIN OF BLOCK ABC WITH FRAME TITLE T01.

SELECTION—SCREEN BEGIN OF SCREEN 500 AS WINDOW.

CALL SELECTION—SCREEN 500 STARTING AT 10 10.

What is step-loop? Explain all the steps?

Ans A step loop is a repeated series of field-blocks in a screen. Each block can contain one or more fields, and

can extend over more than one line on the screen.

Step loops as structures in a screen do not have individual names. The screen can contain more than one

step-loop, but if so, you must program the LOOP...ENDLOOPs in the flow logic accordingly. The ordering of

the LOOP...ENDLOOPs must exactly parallel the order of the step loops in the screen. The ordering tells the

system which loop processing to apply to which loop. Step loops in a screen are ordered primarily by

screen row, and secondarily by screen column.

Transaction ‘|Z61 (development class SDWA) implements a step loop version of the table you saw in

transaction ‘I260.

Static and Dynamic Step Loops

What are the system fields? Explain?

Ans The ABAP system fields are active in all ABAP programs. They are filled by the runtime environment, and

you an query their values in a program to find out particular states of the system. Although they are variables,

Page 37: ABAP Tcodes Description

you should not assign your own values to them, since this may ovenNrite information that is important for the

nonnal running of the program. However, there are some isolated cases in which you may need to overwrite a

system variable. For example, by assigning a new value to the field SY-LSIND, you an control navigation within

details lists.

What are the system fields u have worked with? Explain?

Ans I had worked with the following (30) system fields:

1) SY-DBSYS - Central Database

2) SY-HOST - Server

3) SY-OPSYS - Operating System

4) SY-SAPRL — SAP Release

5) SY-SYSID - System Name

13

6) SY-LANGU - User Logon Language

7) SY-MANDT — Client

8)SY-UNAME - Logon User Name

Page 38: ABAP Tcodes Description

9) SY—DATLO — Lmzl Date

10) SY-DATUM - Server Date

11) SY-TIMLO — Lmzl Time

12) SY-UZE1T - Server Time

13) SY-DYNNR - Screen Number

14) SY-REPID - Current ABAP program

15) SY-TCODE - Transaction Code

16) SY-U|_INE - Horizontal Line

17) SY-V|_INE — Vertical Line

18) SY-INDEX - Number of current loop Pass

19) SY-TABIX - Current line of internal table

20) SY-DBCNT - Number of table entries processed

21) SY-SUBRC - Return Code

22) SY-UCOMM - Function Code

23) SY-LINCT - Page Length of list

Page 39: ABAP Tcodes Description

24) SY-LINNO - Current Line

25) SY-PAGNO - Current Page Number

26) SY-LSIND — Index of List

27) SY-MSGID - Message Class

28) SY-MSGNO - Message Number

29) SY-MSGTY - Message Type

30) SY-SPONO - Spool number during printing

How are the date and time field valu stored in SAP?

Ans DD.MM.YYYY. HH:MM:SS

Are programs cIia1t dependent?

Ans Yes, group of users can access these programs with a client number.

What are the different type of data typa?

Ans There are three types of data types:

Data Types

Elementary Complex References

Page 40: ABAP Tcodes Description

Fixed Variable Structure Table Data Object

Variable

What is Asynchronous and Synchronous Update?

Ans Asynchronous Update — The program does not wait for the work process to finish the

update. Commit Work.

Synchronous Update — The program wait for the work process to finish the update.

Commit Work and Wait.

What are the ga1emI naming conventions of ABAP programs?

Ans Should start with Y or Z.

14

What are Internal Tabl?

An internal table is a temporary table stored in RAM on the applimtion sewer. It is created and filled by a program

during execution and is dismrded when the program ends. Like a database table, an internal table consists of one

or more rows with an identical structure, but unlike a database table, it mnnot hold data after the program ends

Size of the internal tabl?

The size of the internal tables are set using the ‘occurs n‘ clause. Here n refers to a integer number that specifies

Page 41: ABAP Tcodes Description

the size. Usually its given as ‘occurs 0‘ which creates an itab with the memmory space of 8kb.

What is the basic differa1ce inta11aI tabl and database tabl? How can we differa1tiate by looking

at the tabl? Handling of internal tab

The basic difference is database tables are stored in DB server

and the internal tables are virtual tables these are created run time only

Internal tables are created dynamimlly, the memory of internal tables is not

permant memory, for internal tables the memory will be created in the application server and it is external memory

and terminates after the program termination.

Types of internal tables

There are three types of Internal Tables exist.

1.Standard Internal Tables: These tables have a linear index and can be accessed using the index or the key. The

response time is in linear relationship with number of table entries. These tables are useful when user wants to

address individual table entries using the index.

Page 42: ABAP Tcodes Description

2.Sorted Internal Tables: These tables also have an index and the key. But, the response time is in logarithmic

relationship with number of table entries, since it uses binary search algorithm instead of linear search. These

tables are useful when user wants the table to be sorted while additional entries have to be added.

3.Hashed Internal Tables: These tables have no index, but have the key. The response time is constant irrespective

of number of table entries, since it uses a Hash algorithm. These tables are useful when user wants to access the

entries with key only.

Effective ways of I.|sing Internal Tabl?

Create Internal table without Header. Do all the internal table operations by Creating Workarea. This would be the

effecient way of coding. Don‘t forget to CLEAR Workarea whenever it is required.

How to Eliminate duplicate entri In the internal tabl?

To delete all duplitzte entries from a sorted internal table (e.g. just after SORT), you an use the DELETEADJACENT DUP|_ICATES FROM itab statement. You an use the COMPARING adition to limit the fields that are usedto test for duplicate entries e.g.SORT i_tab by matnr werks |ogort.DELETE ADJACENT DUPLICATES FROM itabCOMPARING matnr werks.A|| duplicates withe same combination of matnr and werks will be deleted

How to control Internal Tabl?

The control breaks in an Internal Table areAt first

At new

At end of

Sum

15

Page 43: ABAP Tcodes Description

Control Levels are of 5 types :1) AT FIRST

2) AT NEW

3) AT END OF

4) AT LAST

5) ON CHANGE OF

Explain row type and line type concept

line type refers to the structure of an internal tab|e,whereas row type is the actual part that contains the data andit refers to the table body.creating internal table using line type and row type concept is for reusability

purpose. Line type and Row type are defined at DDIC LEVEL.

Explain internal table with and without heada-7Internal tables are of two types

1. tables with header line

2. tables without header line.

With header line.

Data an be directly go to header first and will be placed in body when we used APPEND statement. It can't beused for nesting of internal tables.

ex: data: itab like mara occurs 0 with header line.

or

itab like standard table of ekko with header line.

Then itab is a internal with header line so you can use itab directly.ex:

select * from itab INTO TABLE itab where matnr in p_matnr.

loop at itab.

write:/10 itab-f|d1.

..................

Page 44: ABAP Tcodes Description

..................

::::::::::::::::::

end loop.

Tables without header line:

For these tables we need to create a explicit header [workarea] and doing anything for data should be through thatexplicit header only.

ex:

data: itab like mara,

wa like mara.

itab is a internal table without header line [only body] and wa is the explicit workarea.for this itab when you want to populate data you have to do like this.

select * from mara into wa where mantr in p_matnr.

append itab from wa.

endselect.

For accessing data of internal table

loop at itab into wa.

write:/10 wa-fld 1,

endloop.

16

SCREEN PAINTER [SE51]

What are Screa1 Paintas?Screen Painter is an ABAP Editor tools allowed us to create dialog screen. Dialog screen usually created as a screento catch user input. It can be accessed by tcode SE51.

Screen Painter Architecture:1. Screen Attribut

Page 45: ABAP Tcodes Description

Define screen title, define its type (nonnal, subscreen).

2. Flow logic

Flow logic control flow of program. The event block is introduced by the corresponding keyword statement, and itconcludes either when the next block is introduced, or at the end of the program.

There are four event blocks, each of which is introduced with the screen keyword PROCESS:

PROCESS BEFORE OUTPUT.

RROCESS AFTER INPUT.RROCESS ON HELP-REQUEST.RROCESS ON VALUE-REQUEST.

Flow logic structured on event, in above example we can see there are two event involved, “process before output“(PBO) and “process after input“ (PAI).

PBO processed before the screen is displayed. It allow us to define toolbar and title, positioning the cursor, showingand hiding fields and changing field attributes dynamically.

PAI processed after user command (double click, push button). It is allow us to validate user input, and detenninenext process based on user command.

In flow logic, we only define module name to define program flow, to create “real code“, double click on modulename to create it, then write program in it.

3. Layout Editor

We use layout editor to place screen element in screen layout. There are two modes in editing layout: Graphimland alphanumeric. Both modes offer the same functions but use different interfaces. In graphiml mode, you use adrag and drop interface similar to a drawing tool. In alphanumeric mode, you use your keyboard and menus. It iseasier to work in graphiml mode, to toggle between this mode, in SE51 go to: Utilities->Settings: in screen paintertabs check graphiml layout editor.

Layout editor containing this tools:

i. Element pallete

Page 46: ABAP Tcodes Description

On left screen you will find list of element (textbox, label, checkbox) you an use. Drag and drog element to put iton screen.

ii. Name & Text

Aftef put element on screen, write its name and text (in textbox, text will set default value).

iii. Attributes Window

Double click the element to display its attributes, or select it then click :Goto->Secondary window->attributes. Forexample, in textbox element, we an set its length, read only mode, in this window.

iv. Dictionary/program field.

If we want to create a field refer to field in data dictionay or field already declared in program, use this menu tocreate text field with the same type compared to its referral.

17

4. EIema1t list.Element list shown all element in screen. We rarely use this menu, because it easier to maintain element in layouteditor.

What are the evafls in Screen Programming?

Ans There are two events in Screen Programming:

1. PBO (Process Before Output) — Before the screen is displayed, the PBO event is processed.

2. PAI (Process After Input) — When the user interacts with the screen, the PAI event is processed.

3. POH (Process On Help) - are triggered when the user requests field help (F1). You can program the appropriatecoding in the corresponding event blocks. At the end of processing, the system carries on processing the currentscreen.

4. POV (Process On Value) - are triggered when the user requests possible values help (F4). You can program theappropriate coding in the corresponding event blocks. At the end of processing, the system mrries on processingthe current screen.

Page 47: ABAP Tcodes Description

What are the difference between call screen and leave screen?

Ans Qll Screen: Calling a single screen is a special case of embedding a screen sequence. If you want to preventthe called screen from covering the current screen completely, you an use the (‘ALL SCREEN statement with theSTARTING AT and ENDING AT

CALL SCREEN 1000.

CALL SCREEN 1000 STARTING AT 10 10 ENDING AT 20 20.

LEAVE SCREEN statement ends the current screen and calls the subsequent screen.

LEAVE SCREEN.

LEAVE TO SCREEN 2000.

What are differenc between At selection-screen and At selection-screen output?

Ans AT SELECTION-SCREEN event is triggered in the PAI of the selection screen once the ABAP runtimeenvironment has passed all of the input data from the selection screen to the ABAP program.

AT SELECTION-SCREEN OUTPUT - This event block allows you to modify the selection screen directly before it isdisplayed.

What are the elements of selection screen?Ans There are 5 elements of selection screen:Selection-screen include blocksSelection-screen include parametersSelection-screen include select-optionsSelection-screen include commentSelection-screen include push-button

List of Screa1 elemafls.Ans There are 13 screen elements:i. Input / output fields

ii. Text fields

iii. Checkbox

iv. Radio button

v. Push Button

Page 48: ABAP Tcodes Description

vi. Drop down list

vii. Subscreen

viii. Table control

ix. Tabstrip control

x. Custom control

xi. Box

xii. Status icons

xiii. OK_CODE fields

How many default Tab Strips are thee? How to insert more Tabs in it?Ans There 2 default Tab strips. Screen painter attributes contain Tab Title, which is used to insert more tabs in tabstrip.

What are differa1t typa of screa1 keywords?Ans There are four types of screen keywords: Module, Loop, Chain and Field.

What are screen painter? Menu painter? Gui statI.|s? ..etc.

Ans dynpro - flow logic + screens.menu painter -

18

GUI Status - It is subset of the interface elements (title bar, menu bar, standard tool bar, push buttons) used for acertain screen.The status comprises those elements that are currently needed by the transaction.

Doa SAP has a GUI screa1 painter or not? If y what operating systems is it available on?Ans Yes.

Operating System — Windows based

Screen Painter — Alpha numeric Screen Painter

Menu Painter

Purpose

Page 49: ABAP Tcodes Description

The Menu Painter is one of the tools of the ABAP Workbench. You use it to design user interfaces for your ABAPprograms and to define the functions that you want to use within these interfaces.

Featura :ABAP programs contain a wide variety of functions which fall into different mtegories within the userinterface. An instance of the user interface consisting of a menu bar, a standard toolbar, an application toolbar, anda function key setting, is called a GUI status. The GUI status and GUI title defines how the user interface looks andbehaves in an ABAP program.

MODU LARIZATION TECH NIQU ES

What is an instance?

Ans When you all a function module, an instance of its function group plus its data, is loaded into the memoryarea of the internal session. An ABAP program an load several instances by (ailing function modules from differentfunction groups.

What is Function group? Difference between function group and function module?Ans Function Groups act as containers for Function Modules that logically belong together.Function Groups1) These cannot be defined in a Function Module.2) It cannot be called.3) They are containers for Function Module.Function Modules1) These must be defined in a Function Group.2) It can be called from any program.3) They are not containers for Function Group.

How to Create any functions? How to go about it?Ans Steps for creating the Functions:

First Procedure:

1) /nSE37

2) Goto

3) Function Group (FG)

4) Create Group

5) Name of FG (ZREKHA_FG)

Page 50: ABAP Tcodes Description

6) Short Text

7) Save

Local Object

Second Procedure

1) Environment

2) Inactive Object

3) Function Group (ZREKHA_FG)4) Activate

5) Back

Third Procedure

1) Name of Function Module (ZREKHA_FM)2) Create

3) Write FG Name (ZREKHA_FG)

19

4) Short Text

5) Save

Fourth Step:

Call function ‘ZREKHA_FM’.

Function modul used in F4 help.

Ans There are two types of function modules used in F4 help:

1) F4IF_FIELD_VALUE_REQUEST

2) F4IF_INT_TABLE_VALUE_REQUEST

What are the exceptions in function module?

Ans Exceptions: Our function module needs an exception that it an trigger if there are no entries in table SPF|_Ithat meet the selection criterion. The exception NOT_FOUND serves this function.

COMMUNI(‘A'|'ION_FAILURE & SYSTEM_FAILURE

Page 51: ABAP Tcodes Description

What are differa1t typa of attribut of Function Module?Ans There are 6 attributes of FM:

. Import

. Export

. Table

. Changing

. Source

. Exception

OIU1-kluhlb-I

What are the include programs?Ans When the same sequence of statements in several programs is to be written repeatedly. They are coded ininclude programs (External programs) and are included in ABAP/4 programs.

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 atcompilation /generation. Subroutines (FORM) an be called from both the program they 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 loml subroutine (which can be tailed external). A FUNCTION is (more or less) a subroutine that iscalled 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 (mlled internal) use a FORM. If the subroutine iscalled external (used by more than one program) use a FUNCTION.

Can you call a subroutine of one program from another progmm?Ans Yes, only external subroutines Using ‘SUBMIT’ statement

20

BDC (Batch Data Communication)

What are Convasion & Interface programs in SAP?Ans CONVERSION: Legacy system to flat file.INTERFACE: Flat file to SAP system.

Page 52: ABAP Tcodes Description

What is the structure of a BDC sessions.

What is BDC?It is a type of CONVERSION in SAP. To convert Non-SaP data to SAP

Type of BDC's?

Ans There are two types of BDC's:1) Transaction Method

2) Session Method

Advantag & Disadvantage of differa1t typa of BDC's?Ans Transaction Method:

1) It is faster than session method.

2) While executing, it starts from starting.

Session Method:

1) It is slower than transaction method.

2) While executing, it does not start from starting.

How to write a BDC - how do u go about it?

Ans Steps for writing BDC

1) /nSE38

2) Declare Tables, Data (for ITAB) and Data (for BDCITAB)

3) Call function ‘Upload’.

4) Write code for the First Screen, Radio Button, Filename, Change Button, Second Screen, Utilities (CreateEntries), Third Screen and Save.

5) Call transaction ‘SE11’ using BDCITAB mode ‘A’.

6) Save, Check Errors, Activate and Execute.

What is a batch input ion?

Ans BATCH INPUT SESSION is an intennediate step between internal table and database table. Data along with theaction is stored in session i.e. data for screen fields, to which screen it is passed, program name behind it, and how

Page 53: ABAP Tcodes Description

next screen is processed.

Create session — BDC_OPEN_GROUP

21

Insert batch input — BDC_INSERTClose session — BDC_CLOSE_GROUP

What is the alternative to batch input ssion?Ans Qll Transaction Method & Qll Dialog

A situation: An ABAP program creat a batch input sion. We need to submit theprogmm and the batch ion in background. How to do it?

Ans Go to SM36 and create background job by giving job name, job class and job steps

(JOB SCHEDU|_ING)

What are the problems in procing batch input ions? How is batch input proc

differa1t from proclng on line?

Ans Two Problems: -

1) If the user forgets to opt for keep session then the session will be automatically removed from the sessionqueue (log remains). However, if session is processed we may delete it manually.

2) If session processing fails, data will not be transferred to SAP database table.

Is Sasion Method, Asynchronous or SynchronoI.|s?Ans Synchronous

What are the fields in a BDC_Tab and BDCDATA Table?Ans Fields of BDC_Tab & BDCDATA Table:

Sr. No Fields - Description

1) Program - BDC Module pool

2) Dynpro - BDC Screen Number

3) Dynbegin - BDC Screen Start

4) Fname - Field Name

Page 54: ABAP Tcodes Description

5) Fval - BDC field value

Ans BDCDATA

What do you do when the system crash in the middle of a BDC batch ion?Ans We will look into the error log file (SM35). Check number of records already updated and delete them frominput file and run BDC again.

What do you do with errors in BDC batch ions?

Ans We look into the list of incorrect session and process it again. To correct incorrect session, we analyze thesession to detennine which screen and value produced the error. For small errors in data we correct theminteractively othenNise modify batch input program that has generated the session or many times even the datafile.

What are the function module in BDC?Ans There are three function module in BDC:1) BDC_OPEN_GROUP

2) BDC_INSERT

3) BDC_CLOSE_GROUP

Write the steps to execute ion method.

Ans Steps for execution Session Method:

1) System

2) Service

3) Batch Input

4) Session

5) Choose Session Name

6) Process

7) Asks for Mode (Display All Screen, Display Errors & Background)

What are the different type of mode (run code) in Call Transaction method?Ans There are three modes in Call Transaction:

Page 55: ABAP Tcodes Description

A — Displays All Screen

E — Display Errors

N — Background Processing

Differa1ce b/w call transaction and ion.

22

Call transaction session

1. synchronous updation only synchronous updationoptional

2. errors an handled error log is createdexplicitely

3. faster slower

4. less amount of data more can transfer

5. updation takes place updation takes place

during program execution once the session being created

What is the difference between Upload and WS_Upload ?

The diffrence between WS_Upload and Upload is when you use function Upload it prompts for a dailog box where inyou need to key in the file |o¢2tion.Where as in (rise of WS_Upload you specify the file location in the function inputparameters itself

If I want to execute a program only in background not in foreground is there any option for this?The sm37 transaction an be used for running a program in the background. Also in the session method whileprocessing the session you can specify the processing type as background or foreground.

What kind of BDC programs are writta1 ?There are five types of BDC methods available. They are 1.Batch input session 2.Ca|| Transaction 3.Recording4.Direct Input and 5.LSMW

How to read fil and proc BD¢‘s automatically?To read file from Presentation server use Upload or GUI Upload or WS upload and to read file from Applimtionserver use Opend Dataset,Read dataset and Close dataset

Page 56: ABAP Tcodes Description

In ion method sy-subrc is not returned whereas in call transaction method sy-subrc is returned .what dog it mean?

While to transfer the data from the through if any errors occurs until the errors are the complete the data is nottransfer to the SAP system.

the system compulsory shows the errors. that errors are stored into the error logs (Transaction is SM35).

so the session method should not return any value.

In call transaction method data is directly pass to the SAP system.

So its compulsory return the value.

Because of the call transaction is the function.

A function should return the value mandatory.

23

LSMW

ISM Workba1ch: What is it?

The LSM Workbench is an R/3-based tool that supports You when transferring data from non-SAP systems (“LegacySystems“) to SAP systems‘ once or periodically.

The tool supports conversion of data of the legacy system in a convenient way. The data can then be imported intothe SAP system via batch input, direct input, BAPIs or IDocs

Ad va ntages

The main advantages of the ISM Workbench:

0 Part of the SAP system and thus independent of individual platforms

0 A variety of technical possibilities of data conversion:

0 Data consistency due to standard import techniques:

— Batch input

— Direct input

Page 57: ABAP Tcodes Description

— BAPIs (Business Application Programming Interfaces)

— IDocs (Intermediate Documents)

The import technique to be used in an individual case depends on the business object.Generation of the conversion program on the basis of defined rules

Clear interactive process guide

Interface for data in spreadsheet format

Creation of data migration objects on the basis of recorded transactions

0 Charge-free for SAP customers and SAP partners

Project, Subproject and Object

On the initial screen, you can create a new project, corresponding subprojects and objects via Edit -> Create newentry.

0 Project: An ID with a maximum of 10 characters to name your data transfer project. If you want to transfer

data from several legacy systems, you may create a project e.g. for every legacy system.

0 Subproject: An ID with a maximum of 10 characters that is used as further structuring attribute.0 Object: An ID with a maximum of 10 characters to name the business object.

What is differa1ce betwea1 BDC & LSMW?The differences between LSMW and BDC are as follows: LSMW is generally for nonnal SAP applimtions, while BDCis mainly for any customized application.

24

LSMW provides various methods for the migration of data, namely, those of direct input, Batch input recording andIDOC. BDC however, simply makes use of recording. There are two ways of implementing BDC, the call transactionmethod and the session method.

In LSMW, mapping is taken (are of with the help of SAP, whereas in BDC one has to provide explicit mapping

Page 58: ABAP Tcodes Description

directions.

Coding is not very flexible in LSMW, whereas in BDC, coding is very flexible and applications can be easilycustomized. This is mainly because LSMW is devised specially for functional consultants who do not performcoding, while BDC is mainly made use of by techniml consultants, who do perform coding

REPORTSHow many types of reports are there in SAP?A report is a presentation of data in a specific format & organized structure.

1) Classical report2) Interactive report3) ABAP query

4) LDB report

5) ALV report

6) SAPSCRIPT

7) SMARTFORMS

Class.is'a.l.ReltQJ:ts

What are Classical Reports?

0 These reports consist of only one screen /list as an output.0 It displays data using the write statement inside a loop.

0 They are nonnal reports &do not contain any sub report.

Events in Classical ReportINI'|'IA|_IZA'|'ION

AT SELECTION—SCREENSTART-O F—SELECT IONEND-OF-SELECTIONTOP-OF-PAGEEND-OF—PAGE

.°‘E":"!*’!"t"

Clau of Classical reporta l_INE-SIZE

25

Page 59: ABAP Tcodes Description

o l_INE-COUNTo MESSAGE-IDNO STANDARD PAGE HEADING

How do u display a data in a Detail List?Ans By using two statements:

1) Top-of-page during line-selection

2) At line-selection

s

What are Interactive Reports?

Ans An output list which displays just the basic details & allow user to interact, so that a new list is populatedbased on user-selection. With interactive list, the user can actively control data retrieval and display during thesession.

What are the commands I.|sed for interactive reporls?Ans Top-of-Page during line-selection

What is PF-STATUS?Ans PF-Status is used in interactive report for enhancing the functionality. If we go to SE41, we can get menus,items and different function keys, which we are using for secondary list in interactive report.

What is the significance of HIDE?Ans Its stores the click value and display the related record in the secondary list.

Where do u code the HIDE statement?Ans In a LOOP statement

What are the evafls used in Interactive Reports.Ans There are three events of Interactive Reports:

I. At PF(nn)

II. At line-selection

III. At user-command

Systems fields used for Interactive Lists AND Lists

Ans Interactive System Fields: SY-LSIND, SY-CPAGE, SY-|_ILLI, SY-|_ISEL, SY-|_ISTI,SY-LSTAT, SY-STACO, SY-STARO

Page 60: ABAP Tcodes Description

Lists: SY-COLNO, SY-|_INCT, SY-|_INNO, SY-|_INSZ, SY-PAGNO,

SY—TVARO. .SY-TVAR9, SY-WTITL

How do u move on to the next screen in interactive reporting?Ans Write code of the following:

1) Top-of-Page during line-selection

2) At line-selection

What is read line?Ans READ LINE and READ CURRENT LINE — These statements are used to read data from the lines of existing listlevels. These statements are closely connected to the HIDE technique.

How do you validate the selection criteria of a report? And how do you display initialvalu in a selection screen?

Ans The selection criteria is validated in the processing block of the AT SELECTION SCREEN event for the inputvalues on the screen and respective messages can be sent.

To display initial values in the selection screen:

1) Use INITIALIZATION EVENT

2) Use DEFAULT VALUE option of PARAMETERS Statement

3) Use SPA/GPA Parameters (PIDs).

Validate: - by using match code objects.

Display :- Parameters default ‘xxx’.

Select-options for spfli-(2 rrid.

26

Initial values in a selection screen:INI'|'IA|_IZA'|'ION.

DNO-LOW = 10.

DNO-HIGH = 30

SIGN I.

Page 61: ABAP Tcodes Description

OPTION NB.

APPEND DNO.

What is an interactive report? What is the obvious diffaence of such report compared

with classical type reports?

Ans An Interactive report is a dynamic drill down report that produces the list on users choice.

Difference: -

a) The list produced by classiml report doesn't allow user to interact with the system where as the list produced byinteractive report allows the user to interact with the system.

B) Once a classical report, executed user looses control where as Interactive, user has control.

C) In classical report, drilling is not possible where as in interactive, drilling is possible.

A

What Is SAP Queri ?Many times a need arises for SAP Users and Functional Consultants to generate quick reports without getting anyABAP coding done — time taken to complete the coding in development, transport and test it in QA system andthen transport to production — is sometimes too long. In such cases, ABAP/4 query is a tool provided by SAP forgenerating these kind of reports.Type of Report Desired:Before starting to write an ABAP query, its advisable to decide the type of report that the user wants. ABAP queryprovides the following type of reports:

Basic List Simple report

Statistics Report containing statistical functions like Average &Percentage

Ranked List Report written for analytical purpose

What are the advantaga and disadvantag of ABAP query tool?

Ans Advantages: No programming knowledge is required.

Page 62: ABAP Tcodes Description

Disadvantages: Depending on the complexity of the database tables, it may not be easy for the user to select thenecessary data correctly.

Is a logical database a requirement] must to write an ABAP quay?Ans No, it is not must to use LDB. Apart from it, we have other options:1) Table join by Basis Table

2) Direct Read of table

3) Data Retrieval by Program

SAESS:l1'R3SWhat is SAP Script? What is the purpose of SAP Script? Diffaence betweenSAP Script and Report?Ans SAP Script — It is the integrated text management system of the SAP R/3 System. Two types — PC Editor &Line Editor.

Reports - It is the way to display data fetched from database table onto screen or directly output it to a printer.Two types — Classical and Interactive.

What are the different functions used in sap script? What are the parameters used in each Function?Ans There are three different functions used in SAP Script:1) OPEN_FORM2) WRITE_FORM3) CLOSE_FORMParameters in Each Function:1) OPEN_FORM-ExportingFormLanguage

27

2) WRITE_FORM—ExportingElementWindow

3) CLOS E_FO RM

What are standard layouts sets in the SAP Script?Ans There are four standard layouts in the SAP Script:1) Header2) Logo

Page 63: ABAP Tcodes Description

3) Main Window4) Footer

Differa1ce betwea1 UPLOAD and WS_UPLOAD?

Ans UPLOAD - File transfer with dialog from presentation server file to internal table. Data which is available ina file on the presentation server is transferred in an internal table. ASCII & Binary files can be transferred.WS UPLOAD - To read data from the presentation server into an internal table without a user dialog, usethe function module WS_UPLOAD. The most important parameters are listed below.

What are the typa of windows in SAP Script?Ans There are five Standard Layouts in SAP Script:1) Page

2) Window

3) Page Window

4) Paragraph Format

5) Character Format

What are the function modul used in a SAP Script drive‘ program?Ans There are three functions used in SAP Script:

1) OPEN_FORM

2) WRITE_FORM

3) CLOSE_FORM

64) Logo in SAP Script?

Ans RSTXLDMC OR

Steps for making and inserting Logo in SAP Script:First Procedure:

1) Draw the picture

2) Save it

3) /nSE78

4) Write name & Choose Color

Page 64: ABAP Tcodes Description

5) Click on Import

6) Browse picture

7) Enter

Second Procedure

1) /nSE71

2) Insert

3) Graphics

4) Click on stored on document server5) Execute

6) Choose name of BMAP

If I forgot some command in SAP Script e.g.: suppras zero display - How to do find it?

Ans Suppressing of entire screens is possible with this command. This command allows us to perform screenprocessing “in the background". Suppressing screens is useful when we are branching to list-mode from atransaction dialog step.

Can thee be more than 1 main window in SAP Script?

Ans No, there cannot be more than 1 main window in SAP Script bemuse in WRITE_FORM, it asks for theparameter Window that will create the problem.

WRITE_FORM—

Exporting

Element

Window

What is the difference between OPEN_FORM and CLOSE_FORM?

28

Ans OPEN FORM — This module opens layout set printing. This function must be tailed up before we an work withother layout set function like WRITE_FORM.

Page 65: ABAP Tcodes Description

WRITE FORM — Output text element in fonn window. The specified element of the layout set window entered isoutput. The element must be defined in the layout set.

CLOSE FORM — End layout set printing. Form printing started with OPEN_FORM is completed. Possible closingoperations on the form last opened are mrried out. Fonn printing must be completed by this function module. Ifthis is not carried out, nothing is printed or displayed on the screen.

What are the page windows? How many main windows will be there in a page window?Ans Page Window: In this window, we define the margins for left, width, upper and height for the layout of Header,Logo, Main, & Footer.

How to debugg a script?Ans Go to SE71, give layout set name, go to utilities select debugger mode on.

How many maximum ions can be opa1 in SAPgui?Ans There are maximum 6 sessions open in SAPgui.

What are logical database? What are the advantag/disadvantag of logical database?Ans To read data from a database tables we use logical database.A logitzl database provides read-only access to a group of related tables to an ABAP/4 program.

What is SAP Script and layout set?Ans The tool, which is used to create layout set is called SAP Script. Layout set is a design, appearance andstructure of document.

What are the ABAP commands that link to a layout set?Ans Control Commands, System Commands

What are the different elements in layout sets?Ans PAGES, Page windows, Header, Paragraph, Character String, Windows.

Can you use if tha1 else, pa'form..etc statements in sap script?Ans Yes.

How do you numba' pag in SAP Script layout outputs?Ans & page & &next Page &

What tak most time in SAP script programming?

Page 66: ABAP Tcodes Description

Ans LAYOUT DESIGN AND LOGO INSERTION.

How do you use tab sets in layout sets?Ans Define paragraph with defined tabs.

How do you backup SAP Script layout sets? Can you download and upload? How?

Ans SAP script backup :- In transaction SE71 goto Utilities -> Copy from client -> Give source form name, sourceclient (000 default), Target fonn name.

Download :- SE71, type form name -> Display -> Utilities -> fonn info -> List -> Save to PC file.

Upload :- Create fonn with page, window, page window with the help of downloaded PC file. Text elements forPage windows to be copied from PC file.

mfiuW What is a Logical Database? Advantaga & disadvantag.Ans Logiml Databases are special ABAP programs that retrieve data and make it available to application programs.

Use of LDB — is used to read data from database tables by linking them to executable ABAP programs.

Advantages: - The programmer need not worry about the primary key for each table. Bemuse Logical databaseknows how the different tables relate to each other, and can issue the SELECT command with proper where clauseto retrieve the data.

1) An easy-to-use standard user interface.

2) Check functions, which check that user input is complete, correct, and plausible.

3) Meaningful data selection.

4) Central authorization checks for database aocesses.

29

5) Good read access performance while retaining the hierarchical data view determined by the application logic.6) No need of programming for retrieval, meaning for data selection

Disadvantages: -

Page 67: ABAP Tcodes Description

1) If you do not specify a logical database in the program attributes, the GET events never occur.

2) 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).

3) Fast in (rise of lesser no. of tables But if the table is in the lowest level of hierarchy, all upper level tables shouldbe read so performance is slower.

What are the evafls used for Logical Database?

Ans Two Events —

1) GET - This is the most important event for executable programs that use a logical database. It occurs when thelogitzl database has read a line from the node

and made it available to the program in the work area declared using the statement NODES

. The depth to which the logiml database is read is determined by the GET statements2) PUT - The PUT statementdirects the program flow according to the structure of

the logitzl database.

What is the difference between Get and Get Late?

Ans GET - After the logical database has read an entry from the node

.GET LATE - After all of the nodes of the logical database have been processed that are belowin the database hierarchy.

If u are using Logical Database how will u modify the selection-screen elements?Ans Select-options : dname for deptt-dname.

What is sequa1ce of event triggered in report?Ans There are 6 events in report:

1) Initialization

2) At Selection-Screen

3) Start-of-Selection

Page 68: ABAP Tcodes Description

4) Get

5) Get Late

6) End-of-Selection

7) Top-of-Page

8) End-of-Page

9) At Line Selection

10) At User Command

11) At PF (nn)

Al.)LReB9.I:IS

What is ALV programming in ABAP? Wha1 is this grid used in ABAP?

ALV is Application List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules which an be putinto use to embellish the output of a report. This set of ALV functions is used to enhance the readability andfunctionality of any report output. Qses arise in sap when the output of a report contains columns extending morethan 255 characters in length. In such cases, this set of ALV functions an help choose selected columns andarrange the different columns from a report output and also save different variants for report display. This is a veryefficient tool for dynamically sorting and arranging the columns from a report output. The report output can containup to 90 columns in the display with the wide array of display options.

Which call functions are I.|sed in ALV reports?

The commonly used ALV functions used for this purpose are;. REUSE_ALV_VAR]ANT_DEFAULT_GET

. REUSE_ALV_VAR]ANT_F4

. REUSE_ALV_VAR]ANT_EXISTENCE

. REUSE_ALV_EVENTS_GET

. REUS E_ALV_COM M ENTARY_WRITE

. REUSE_ALV_FIELD(‘ATALOG_MERGE

Page 69: ABAP Tcodes Description

. REUSE_ALV_|_IST_DISPLAY

NIOSU1-khuklb-I

30

8. REUSE_ALV_GRID_DISPLAY9. REUSE_ALV_POPUP_TO_SELECT

How you call this function in your report?After completion of all the data fetching from the database and append this data into an Internal Table. say I_1TAB.Then use follwing function module.CALL FUNCTION ‘REUSE_ALV_GRID_DISPLAY‘EXPORTINGI_CALLBACK_PROGRAM = ‘Prog.name‘I_STRUCTURE_NAME = ‘I_ITAB‘I_DEFAULTI_SAVE =TABLEST_OUT|'AB = I_ITAB.IF SY—SUBRC <> 0.WRITE: ‘SY—SUBRC: ‘, SY—SUBRC .ENDIF.ENDFORM. “ GET_FINAL_DATA

ABAP List Viewer

The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, alot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).Using ALV, we an 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 mlled S|_IS.

Simple Report

The important function modules are:

Page 70: ABAP Tcodes Description

- Reuse_a|v_|ist_disp|ay

- Reuse_a|v_fie|d¢2ta|og_merge

- Reuse_a|v_events_get

- Reuse_a|v_commentary_write

- Reuse_a|v_grid_disp|ay

A. REUSE_ALV_LIST_DISPLAY:

This is the function module which prints the data.

B. REUSE_ALV_FIELDflTALOG_MERGE:

This function module is used to populate a fieldcatalog which is essential to display the data in ALVc . REUSE_ALV_EVENTS_GET:

Returns table of possible events for a a list type

D. REUSE_ALV_COMMENTARY_WRITE :

This is used in the Top-of-page event to print the headings and other comments for the list.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_a|v_|ist_disp|ay

H IERARCH I$L RE PORTSA. RE USE_ALV_H I E RSEQ_LISI'_DISPLAY

BLOCK REPORT

This is used to display multiple lists continuously.The important functions used in this report are:A. REUSE_ALV_BLOCK_|_IST_INIT

B. REUSE_ALV_BLOCK_|_IST_APPEND

c. REUSE_ALV_BLOCK_|_IST_DISPLAY

D. REUSE_ALV_BLOCK_HS_|_IST_APPEND

A. REUSE_ALV_BLOCK_LISI'_INIT

Page 71: ABAP Tcodes Description

This function module is used to set the default GUI status etc.B. REUSE_ALV_BLOCK_LIST_APPEND

This function module adds the data to the block.INTERNAL TABLES IN SLISSIis_t_fieIdcat_aIv :

31

This internal table contains the field attributes. This internal table an be populated automatimlly by using‘REUSE_ALV_FIELD(‘ATALOG_MERGE'.

Important Attributes:

a. co|_pos : position of the column

b. fieldname : internal fieldname

c. tabname : internal table name

d. ref_fie|dname : fieldname (dictionary)

e. ref_tabname : table (dictionary)

f. key(1) : column with key-color

g. icon(1) : icon

h. hotspot(1) : hotspot

i. Symbo|(1) : symbol

j. Checkbox(1) : checkbox

k. just(1) : (R)ight (L)eft (C)ent

I. do_sum(1) : sum up

m. no_out(1) : (O)b|ig. (X)no out

. outputlen : output length

. seltext-I : long key word

. se|text_m : middle key word

. se|text_s : short key word

reptext_ddic : heading(ddic)

Page 72: ABAP Tcodes Description

. ddictxt(1) : (S)hort (M)idd|e (L)ong

datatype : datatype

SLIS_T_EVENT :

Internal table for storing all the possible events of the ALV. This can be populated by the function moduleReuse_a|v_events_get

The columns are :

name : name of the event

form : name of the routine

SYNTAXES FOR THE ROUTINES

I_mLLBAcK_PF_s1'A'rus_sE'r

The table RT_EXTAB contains the function codes which are hidden in the standard interface.I_mLLBAcK_usER_coMMAND

The structure rs_se|fie|d has the details about the current cursor position.

run.-1.:-co:

[3] How can the ALV be used by customers?

The methods of the class CL_GUI_ALV_GRID, which are required for an ALV grid that cannotbe edited, are released for use in customer-specific programs (see also Note 695910). Thedocumentation is accessed in the class documentation.

The object-oriented ALV wrapper, which is provided in Basis Release 6.40, is also released forcustomers. For more information, see the corresponding class documentation, as well as thesample report SALV*.

The methods of the classes CL_GUI_ALV_TREE CL_GUI_ALV_TREE_SINIPLE,CL_ALV_TABLE_CREATE and the ALV function modules are not released for use by thecustomer.

The class CL_ALV_TABLE_CREATE is not released.

Page 73: ABAP Tcodes Description

[4] Why do the scroll keys sometimes not work?

The scroll keys do not work in the ALV grid control because the front end and back end havebeen separated within this control-based technology. As a result, the back end does not have anydirect control over the actual display, and the data can no longer be distributed over individualpages. In addition, several 'scrollable' grid objects can be displayed on a screen. Each gn'drepresents a separate object and it is unclear to which of these objects the scroll keys should

apply.

32

[5] Why is the Excel button missing in hierarchical sequential lists?In the case of hierarchical sequential lists, you cannot use the XXL interface to export data, dueto the differences in format between the header line and the item line.

[6] Why is the sort sequence incorrect?

The sorting in the ADC is always carried out on the basis of the internal values that are saved onthe database.

Fields in which the external display differs from the internal display (conversion exit, forexample, for PS_POSNR) therefore appear unsorted in the extemal display.

If the fields are sorted according to the external display, then the relevant field domain must beentered in the ASEXDOM table. For all fields on which this domain is based, note that thesorting is converted to the external display; this conversion applies across the system for all ALVoutputs.

[7] Is it possible to total different currencieslunits of measure?

For hierarchical sequential lists, it is not possible (for technical reasons) to total amounts withdifferent currencies or units of measure. If you total using such a column, an 'X' appears instead

Page 74: ABAP Tcodes Description

of the total.

Within the ALV grid and the single-level list, the different currencies/measures are displayedseparately in the totals formation.

[8] When you use wildcards (*) to filter data, you can filter single values. Then all of thevalues of the output table that correspond to the pattern are filtered (search variable CP,contains pattem).

For areas, you must specify the CP variable for the filter criteria and the variable for restrictingthe area (BT, between) Due to the interfaces, you are unable to do this. Therefore, you shouldonly filter areas ‘from ...until ' with complete values and without wildcards.

Some tips and tricks:

Sample reports: There are numerous ALV reports that you can use to check the functions of theALV. These reports all begin with BCALV_TEST_ The reports are delivered in SupportPackages. See Note 412795 for information.

&SOS: To ensure that the ALV displays and functions properly, it is important that the fieldcatalog and output table agree without any errors. The ALV consistency check is provided forthis purpose. You can access this check within the list by calling &SOS in the OKCODE field.For the fullscreen and GRID, you can reach it via the print preview and then &SOS, or byholding down the Shift key and simultaneously double-clicking the right mouse button on theempty, gray background of the display.

[9]Selection: In large lists it is useful to restrict the search area by selecting the relevantcolumns or lines.

Search direction:

By default, the search starts at the cursor position.For this reason, it is useful to enter the search direction in the search dialog.

33

Page 75: ABAP Tcodes Description

Search term:You can enter the search term manually.If you call the search function using the context menu, the value is directly used as a search term.

The search term is then searched for and displayed within the selected area in the searchdirection entered.

[10] Why are the functions for filtering and sorting not available in the ALV tree?

The ALV tree is called with a certain sequence and hierarchy of nodes. This hierarchy is specificand should always be retained. Therefore, the functions for filtering and sorting are not availablein the ALV tree.

[11] Why is it not possible to filter with wildcards (*) in columns with conversion exits?When you use the filter function in the ALV, conversion exits are taken into account. Theseconversion exits convert the external value that was entered into the relevant intemal value. Thedata table is then filtered with the internal values.

If you enter a wildcard instead of a correct external value in the filter dialog box, it is unclearwhich intemal value should be matched to this confusing value (see also Note 1024501). Theconversion exit may return an error message.

[12] The detailed dialog box of a line displays information about the columns that aredisplayed in the grid, as well as those that are hidden. Therefore, the order of the columnsin the detailed dialog box cannot correspond 1:1 with the grid view.

The order of the hidden columns does not correspond to the order in the ALV view.

The hidden columns are included. Their position depends on the changes in visibility and on theorder in the "Change layout" dialog, so it may change as a result.

[13] Why is the setting of the summation level drilldown of an ALV Grid(collapsedlexpanded) not transferred to the print preview and the refresh on a one-to-one

Page 76: ABAP Tcodes Description

basis?

Subtotals and the sorting can be transferred only with a value of the summation level drilldown.When you expand one of the summation level drilldowns in the grid display, the value of thislevel is transferred for all other subtotals in the print preview and the refresh.

If you want to print grids with different subtotal levels, you must expand or collapse individualsubtotals in the print preview. When you print this list from the print preview, the specific levelsof the individual subtotal levels are retained.

[14] How do I select nodes in the ALV tree?

If you want to select a node, you must select the entire line by clicking the node icon. In the caseof selected nodes, the entire line is displayed in yellow. If only the text in the hierarchy column ishighlighted in yellow, this does not apply as selected.

[15] The search is performed in the data table transferred to the ALV.

The subtotals and totals only exist virtually and are not attached to the database table.Therefore, the system does not find values in these lines.

If the summation levels are collapsed, the system counts entries that it finds but does not display

34

them as selected, since an automatic expansion of subtotal levels is not possible for technicalreasons. In this case, the search should be performed using the expanded table.

SMARIEQRMS

What are SMARTFORMS?SAP Smart Forms is used to create and maintain fonns for mass printing in SAP Systems.As output

medium SAP Smart Forms support a printer, a fax, e-mail, or the Internet (by using the generatedXML output).

Page 77: ABAP Tcodes Description

SAP introduced SmartFonns in 1998 to overcome the limitations in SAP Scripts. SmartFonns are easier todevelop, maintain and transport than SAP Script.

Advanatga of Smart Forrns0 They help adapting forms without any programming knowledge due to entirely graphical user interfaceWhen activating the smart form the system automatically generates the function module and at the runtime

0 To make any changes we have to use the Drag & Drop, Cut & Paste. These actions do not include writingof coding lines or using a script language.

0 We can insert static and dynamic tables. These include the line feeds in the individual table cells,triggering events for table headings and subtotals and sorting data before output.

0 The smart fonns allow the user to include graphits, which an be displayed as a part of the fonn or as

background graphics. During printout the user can suppress the background graphic as and whennecessary.

0 Web Publishing is possible using the generated XML output

Differa1ce b/w smartfonns and scripts.

Script Sma rtforms

client dependant independant

not possible multiple page formats are possiblecompulsory without main window it an

labels are used labels cannot

not generated once session created function module

Screa1s in SMARTFORMS

The screen is divided into three sections-

Navigation window consist of nodes and sub nodes. They contain all the elements (text, window etc) that belongto sap forms

Mainta1ance window shows attributes of the elements

Page 78: ABAP Tcodes Description

Form printer window shows the layout of the page

Whenever we create smart forms, SAP creates/generates a function modu|e.Un|ike SAPscripts , SAP FORMS allowyou to change language.

In the navigation window you will find

Global Data Declamtions : The Data defined here an be used throughout the smartform for coding purposes.Form Interface : Here all the data which will be passed to the smartfonn from the Print program is defined.Right-Clicking on the Pages will allow creation of New Page, Window, Graphic or Address.

Printing will take place on the basis of ‘next page’ field.

But processing will happen as per the sequence in navigation window!

35

Why did u switch to SAP?Ans BE

What will you code in START-OF-SELECTION & END-OF-SELECTON & why?Ans START-OF-SELECTION

SELECT * FROM DEPTT INTO CORRESPONDING FIELDS OF ITABWHERE DEPTNO IN DEPTNO.

APPEND ITAB.

ENDSELECT.

LOOP AT ITAB.

WRITE : / 10 ITAB-DEPTNO.

HIDE : ITAB-DEPTNO.

ENDLOOP.

END-OF-SELECTION

What are joins and differa1t typa joins?Ans There are four types of Joins:

1) Self Join

Page 79: ABAP Tcodes Description

2) Inner Join

3) Outer Join

4) Equi Join

Which is the default join?Ans INNER JOIN

What are Extracts?Ans Extracts are dynamic sequential datasets in which different lines an have different structures. We an accessthe individual records in an extract dataset using a LOOP.

What is get cursor field?

Ans GET CURSOR statement transfers the name of the screen element on which the cursor is positioned during auser action into the variable .

GET CURSOR FIELD [OFFSET] [LINE

] [VALUE ] LENGTH ].

What are select options and what is the diff from pammetas?ANS:-select options provide ranges where as parameters do not.

SELECT-OPTIONS declares an internal table which is automatimlly filled with values or rangesof values entered by the end user. For each SELECT-OPTIONS , the system creates a selection table.

SELECT-OPTIONS FOR .

A selection table is an internal table with fields SIGN, OPTION, LOW and HIGH.

The type of LOW and HIGH is the same as that of .

The SIGN field can take the following values: I Inclusive (should apply) E Exclusive (should not apply)

The OPTION field can take the following values: EQ Equal GT Greater than NE Not equal BT Between LE Lessthan or equal NB Not between LT Less than CP Contains pattern GE Greater than or equal NP No pattern.diff:-

PARAMETERS allow users to enter a single value into an internal field within a report.

Page 80: ABAP Tcodes Description

SELECT-OPTIONS allow users to fill an internal table with a range of values.

For each PARAMETERS or SELECT -OPTIONS statement you should define text elements by choosingGoto - Text elements - Selection texts - Change.

Eg :- Parameters name(30).

when the user executes the ABAP/4 program,an input field for ‘name‘ will appear on the selection screen.You anchange the comments on the left side of the input fields by using text elements as described in Selection Texts.

36

What is the inside concept in select-options?

Ans Select-options specify are displayed on the selection screen for the user to enter values.

Different Properties of Select-options:

1) Visible Length

2) Matchcode Object

3) Memory ID

4) Lowercase

5) Obligatory

6) No Display

7) Modify ID

What is the difference between Free and Refrsh?

Ans Fg - You can use FREE to initialize an internal table and release its memory space without first using theREFRESH or CLEAR statement. Like REFRESH, FREE works on the table body, not on the table work area. After aFREE statement, you can address the internal table again. It still occupies the amount of memory required for itsheader (currently 256 bytes). When you refill the table, the system has to allocate new memory space to the lines.Refresh - This always applies to the body of the table. As with the CLEAR statement, the memory used by the table

Page 81: ABAP Tcodes Description

before you initialized it remains allocated. To release the memory space, use the statement

Can we have more than one selection-screa1 and how?

Ans Yes, we an have more than one selection screen.

Selection-screen begin of block honey with frame title text-101.

Select-options : deptno for zrekha_deptt-deptno.

Selection-screen end of block honey.

Selection-screen begin of block honeyl with frame title text-102.

Select-options : dname for zrekha_deptt-dname.

Selection-screen end of block honeyl.

How to declare select-option as a pammeta-7Ans SELECT-OPTIONS: specify are displayed on the selection screen for the user to enter values.Select-options: dname for dent-dname No Extensions No Intervals.

160) What is CTS and what do you know about it?

Ans CTS stands for Correction and Transport System. The CTS provides a range of functions that help you tochoose a transport strategy optimally suited to your requirements. We recommend that you follow the transportstrategy while you plan and set up your system landsmpe.

Correction and Transport System (CTS) is a tool that helps you to organize development projects in the ABAPWorkbench and in Customizing, and then transport the changes between the SAP Systems and clients in yoursystem landscape. This documentation provides you with an overview of how to manage changes with the CTS andessential information on setting up your system and client landsmpe and deciding on a transport strategy. Readand follow this documentation when planning your development project. For practical information on working withthe Correction and Transport System, see Correction and Transport Organizer and Transport Management System.

write syntax for Mge Error (Report)?

Ans AT SELECTION-SCREEN.

Page 82: ABAP Tcodes Description

SELECT * FROM ZREKHA_DEP'|'|' INTO CORRESPONDING FIELDS OF ITABWHERE DEPTNO IN DEPTNO.

ENDSELECT.

If SY-DBCNT = 0.

MESSAGE E000 WITH ‘NO RECORDS FOUND’.

ENDIF.

How can I copy a standard table to make my own Z_TABLE?Ans Go to transaction SE11. Then there is one option to copy table. Press that button. Enter the name of thestandard table and in the Target table enter Z_tab|e name and press enter.

What is the table, which contain the details of all the name of the programs and forms?Ans Table contains vertical and horizontal lines. We can store the data in table as blocks. We can scroll dependsupon your wish. And these all are stored in database (data dictionary).

What are IDOCs?Ans IDO(‘s are intennediate documents to hold the messages as a container.

37

Common Tabl used by SAP MM

Below are few important Common Tables used in Materials Management Modules:

EINA Purchasing Info Record- General DataEINE Purchasing Info Record- Purchasing Organization DataMAKT Material Descriptions

MARA General Material Data

MARC Plant Data for Material

MARD Storage Lomtion Data for MaterialMAST Material to BOM Link

MBEW Material Valuation

MKPF Header- Material Document

Page 83: ABAP Tcodes Description

MSEG Document Segment- Material

MVER Material Consumption

MVKE Sales Data for materials

RKPF Document Header- Reservation

T023 Mat. groups

T024 Purchasing Groups

T156 Movement Type

T157H Help Texts for Movement Types

MOFF Lists what views have not been createdA501 Plant/Material

EBAN Purchase Requisition

EBKN Purchase Requisition Account AssignmentEKAB Release Documentation

EKBE History per Purchasing Document

EKET Scheduling Agreement Schedule LinesEKKN Account Assignment in Purchasing DocumentEKKO Purchasing Document Header

EKPO Purchasing Document Item

IKPF Header- Physical Inventory DocumentISEG Physical Inventory Document ItemsLFA1 Vendor Master (General section)

LFB1 Vendor Master (Company Code)

NRIV Number range intervals

RESB Reservation/dependent requirementsT161T Texts for Purchasing Document Types

Following are the list of Important MM tables. Please check if its useful.

Inventory Management:

+—— +————— ————|

Page 84: ABAP Tcodes Description

| Table | Description |

+—— +————— ————|

Material | MSEG | Material document / transaction details |Document/Movements | MKPF | Material document header information |+—— +————— ————|

Material Stock Balances | MARD | Material stock || MBEW | Material stock with valuation |

+—— +————— ————|Sales Order Stock | MSKA | Stock balance with associated sales || | order data |+—— +————— ——|Stock Transport | EKUB | Index for Stock Transport Orders for |

| MDUB | Material || | Reading View of Stock Transport Ord. for|

38

| | Release 0rd. |

II +-- +----- --I| Special Stocks | MKOL | Consignment, material provided to| | | vendor, etc. |I +-- +----- --Iaterial Master Data:+-- +———— ||Tab|e | Description |+-- +———— |Materials | MARA | General Data, material type, group, I| | configurable & batch ind. || MAKT | Short Texts, descriptions || MARM | Conversion Factors || MVKE | Sales Org, distribution channel I| MARC | classification || MBEW | Plant Planning Data || MLGN | Valuation Data |

| MLGT | Warehouse Management Inventory Data || MVER | Warehouse Management Storage Type || MAPR | Data |

| MARD | Consumption Data |

Page 85: ABAP Tcodes Description

| MCHA | Pointer for Forecast Data |

| MCHB | Storage lomtion data with stock |

| | balances |

| | Batches |

| | Batch Stocks |

MIIIIIII| | MLAN | Sales data, tax indimtor, tax IIIIIIIIIIIIII +-- +---- I

39


Recommended