Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 56

SAP ABAP ALL

IMP IQ'S
BY
MR. Babu
DDIC Objects

1) What are the technical properties of a table and explain about them?
Ans:- There are 7 types of tech. properties .They are
a) Delivery Class: - It is used to control the Transport of the table data.
 In Real time we mostly use the delivery class 'C'.
 In case of delivery class 'A' the table can maintained in any system (development,
quality, production systems).
 A: Application table (master and transaction data).
 C: Customer table, data is only maintained by the customer.
 L: Table for storing temporary data.
 G: Customer table, SAP may insert new data records but may not overwrite or delete existing ones.
 The customer namespace must be defined in table TRESC. To define the customer namespace use
report RDDKOR54. You can start it directly from the table maintenance by choosing Customer
namespace definition on the Attributes tab.
 E: System table with its own namespace for customer entries. The customer namespace must be
defined in table TRESC. To define the customer namespace use report RDDKOR54. You can start it
directly from the table maintenance by choosing Customer namespace definition on the Attributes
tab.
 S: System table, data changes have the status of program changes.
 W: System table (e.g. table of the development environment) whose data is transported with its own
transport objects (e.g. R3TR PROG, R3TR TABL, etc.).

b) Data Browser/table view maintenance:- This property is used to specify the whether the
table can be maintained or not.
 In real time we mostly use “Display/maintenance allowed “option.

c) Data Class:- It is used to specify the type of the data to be maintained in the table.
 In Real time we mostly use APPLO or APPL1.
 APPL0 – Master data – Access frequently & updated rarely
 APPL1 – Transactional data – Access frequently & updated frequently

d) Size Category :- It is used to specify the initial space required for the table in the data
base.
Size Category : The size category value specifies the probable space required for a table in the database.

 The category value ranges from 0 to 14 with each category having some fixed storage area value in the database .

 In real time we mostly use '0' category.

e) Buffering:- it is used to control the traffic in the data base when the table accessed by the
lots of users.
Buffering : The buffering status specifies whether a table can be buffered or not.

 Buffering a table improves the performance when accessing the data records contained in the table.
 For buffering status we have the following options :

         Buffering not allowed


         Buffering allowed but switched off
         Buffering switched on

 If Buffering is switched on we need to specify the type of buffering :

Single records buffering : Only the records of a table which are actually accessed are loaded into the buffer.
This buffering is preferable for large tables where there are frequent single-record accesses (using SELECT SINGLE ...) 

Fully buffered :  If a read access is made to a record, all records of the table are transferred to the buffer.
This buffering is preferable for comparatively small tables for which the access range is large.Tables best suited to full buffering are small,
frequently read, and rarely updated.

Generic Area buffered : When one record of the table is accessed, all the records whose left justified part of the key  (generic key area)
match this record are loaded . The generic key is a part of the primary key of the table that is left-justified.
The number of key fields to be entered must lie between 1 and the number of key fields -1.
The individual generic areas are treated like independent tables that are fully buffered.
 In Real time we mostly use the mode “Buffering not allowed ".

f) Enhancement category: - It is used to enhance the particular fields of the table.


 In Real time we mostly use “Can be Enhanced (DEEP)”.

g) Table Maintenance generator: - It is used to maintain the table using SM30.


 If logging is activated, every change (with UPDATE, DELETE) to an existing data record by a user or an
application program is recorded in a log table in the database.
The logs can be displayed with Transaction table history  -  SCU3 .

2) What is the purpose of Table Maintenance Generator (TMG)?


Ans: - Itis used to maintain(Change,create, modify) the custom tables using the standard T-Code
SM30.
To make this feature work care should be taken while creating the database table that in the 'Delivery and Maintenance' tab, the
'Table View Maint.' should have the "Maintenance allowed" property defined.
Q) What are the events in TMG?
Ans: 1. Before saving the data in the database.
2. After saving the data in the database.
3. Before deleting the data display.
4. After deleting the data display.
5. Creating a new entry.

3) What are the steps to create TMG?


Ans: - Following steps can be used to create the TMG.
a) Execute SE11
b) Select the Radio button DB Table
c) Provide the Table name & click on change
d) Click on utilities.
e) Click on TMG.
f)Select the auth. group as &NC& and Provide the functiongroup as your table name
 If the table needs to be maintained by only particular group of people, then the Authorization group needs to be filled
otherwise fill it as NC. To maintain the authorization group refer to SU21.
g) Select the one-step radio button.
h) Enter overview screen number (could be any). [4 digit only]
i)Click on save.
4) What are the types of data base tables and differences between them?
Ans: - There are 3 types of data base tables.
1) Transparent tables: - One to One relationship.
2) Pooled tables: - Many toOne relationship.
3) Cluster tables: - Many to One relationship.
 In Real time we mostly use transparent tables.
 The differences between them :-

Transparent Tables Pooled Tables Cluster tables


1. They have one-one Relationship with
the data base tables Many– One Many – One
2. Secondary indexes can be created. Not Possible Not Possible
3. Both Open & native SQL can be used. Only Open SQL Only Open SQL
4.The Table name ,fields name and
no .of fields are similar in DDIC and Table names and filed Table names and filed
data base names are different names are different
5.It Follows both Binary and linear
Search Binary Search Linear Search
It is sorted with another It is stored with another set
6. There is one similar table in set of tables called table of tables called Table
underlined data dictionary. pool Cluster.

5) Is it possible to create custom transaction code to maintain the table? If yes, how to create it?
Ans: - Yes, We can create by using the custom T-Code using SE93.

6) What are the differences between Include structure and Append structure?
Ans:-
.INCLUDE Structure .APPEND Structure
1. It can used for multiple tables or structures. 1. It is specific for the particular table.
2. It can be inserted at any position. 2. It can inserted only at end of the table.
3.It is not possible with the standard tables.
3.It is possible with the standard tables.

4.All the steps of Include structure must be 4. All the steps of Append structure must
saved in either our own package or $TMP be saved in our own package
5.The table must be in change mode 5. It can be inserted in Display mode also

7) How to identify the standard tables? (Indications)


Ans:-
 The tables which doesn't start with Z or Y.
 The tables which can't be seen in the CHANGE mode.

8) How to see the relationship between the tables?


Ans:-
 Using SQVI T-Code.
 While maintain data in the child table (Foreign key relationship).

9) How many types of Indexes are there and explain about them?
Ans:- Indexes are used to avoid the duplicate data while accessing the table. They are 2
types of Indexes
1) Primary index: It is generated by the system using the key field of the tables. Key
fields hold the unique data. We can create 16 primary indexes per table. We can create the
primary indexes for custom tables (Z tables)
2) Secondary Index: These are created and maintained by the ABAPer.We can create 9
secondary indexes per table.We can create the secondary indexes for both custom& standard
tables.

10) What are the differences between Value and Check tables?
Ans:-
Check table Value table
1. It is maintained at the TABLE level. 1. It is maintained at the DOMAIN level.
2. It can be used to extract the data in the 2. It can't be used to extract data since it is linked
programs. with the domain/ not physical table.
3. Link can be provided to the tables. 3. Link can't be provided.
4. It forces the user to select any one of the 4. It does not force the user since it has empty value
check table field entries. by default.

11) What are the types of Views and explain about them?
Ans: - Views are the imaginary tables. Views can be created using one or more tables.
Views are logical Database. It does not contain the data permanently.
At Run time onlyView contains the data.
1) Database View: - It is used to combine the multiple tabled data by joining them. Fetch the
Data from more than one table & display it.
2) Projection View: - It is used tosuppress /HIDE the unwanted fields of the table. It can be
defined using one table only.
3) Maintenance View: - It is used to combine the multiple tables data and maintained them by
SM30 (TMG) or SAP system itself.
4) Help View: -It is used in the search help methods by SAP.

12) What are the Search Help, types and explain about them?
Ans: - It is used to provide all the possible entries to the input variable as search help.
1) Elementary Search help: - It is created using one base table or help view.
2) Collective Search help: - It is the collection of Elementary Search help.
Search Help Exit is used to control the possible entries of a search help.
13) What are the Lock objects and explain about the different lock modes?
Ans:- The parallel access for the same data by the multiple users can be controlled using LOCK
OBJECTS.Avoids the concurrency access of multiple users on the same Database.
 The custom lock object name should start with 'E' followed by the table name.
Ex: - E < ZB16_Student >.
 It generates two function modules one start with ENQUEQE and other start with
DEQUEQE.
 ENQUEQE - To LOCK the table or object.
 DEQUEQE - To UNLOCK the table or object.
Types of Locks:
1) Write/Exclusive: The locked data can be read by one user only. All other Lock requests
are rejected.
2) Read/Shared: The multiple users can display the same data. If the user tries to Edit the
data,all other users cannot access the data.
3) Exclusive but not Cumulative: It can be requested only once by the given transaction
codes. All other lock requests are rejected.
14) What are the difference between Table and Structure?
Table Structure
1.Table contains the data 1.Structure does not contains the data
2.It must contains at least 1 field as 2. It does not contain primary fields.
primary Fields.
3.Database must contains Delivery class & 3.It does not contains Delivery class &
Technical settings. Technical settings.

15) Is it possible to create a table/structure without creating any data element and domains?
Ans:- Yes , we can create using the predefined types.
 If the table or structure is created using predefined types, the symbol ' + ' is appeared
instead of field labels while maintaining the tables.
 Reusability is not possible with the Predefined Types.
16) Explain about data element and domain.
Ans:- Data Element :- It is one of the data dictionary object which can be used to maintain the
field labels (descriptions) of the fields in the table or structure.
Domain: - It is one of the data dictionary object which can be used to maintain the
technical properties of the fields in the table or structure such are Type (char,
numc....etc), length (10,20...etc)
17) How to adjust the table/View?
Ans :- If there was any changes made at the table level the system will throw an error as
'structure change at field level '. The table must be adjusted to rectify this error.
 The T-Code SE14 or the path: Utilities --->data base objects ---> data base utility can be
used to adjust the table.

18) What are the different ways to provide search helps?


Ans:- We can provide in 3 ways .
 Using value table.
 Foreign key relationship.
 Elementary and collective search help.

19) What is type group and explain?


Ans :- It is one of the data dictionary objects.
 It is used to define the Global types and constants which can be referred anywhere in the
system.
 The ABAP statement TYPE-POOLS is used to call/define the type group.
20) What is table typeand explain?
Ans: It is one of the data dictionary object used to define the global internal table &which starts
with LVC are used instead of TYPES SLIS.

21) What is the Max. No. of structures that can be included in a table or Structure?

Ans :-Maximum.

22) Can you use all the Views in the ABAP Program?

Ans :- No , We can use only Projection view and database view in the Program.

23) In which table are the programs, Tables, Development classes are sorted in?

Ans:- The Programs are sorted in the table TADIR and the development class packages in TDEVC,

Data base tables in DD02L and DD02T.

Q)Explain about the tables TADIR and TRDIR?


Ans:TADIR is a table that can hold the data dictionary tables & TRDIR can stores the programs.
Actually TRDIR is not a table; it is a view of transparent table REPOSRC. 
TRDIRE ---All client independent programs
24) When youcreate new entries in the table the field values are always in Uppercase. How do you
get the data with mixed case?

Ans :- The reason for this is that the Domain for the Field in the table might have Lowercase
checkbox unchecked. Check the LOWERCASE CHECKBOX to preserve the case of your data.

25) System Landscape:

Ans: Landscape is an arrangement of servers

a) Development system: It is an environment where all the developments, configurations &


changes are done.
b) Quality system: It is an environment where all the developments, configurations & changes
are tested without any errors by the functional, technical consultants & end
users.
c) Production system: It is an environment where all the end uses work. It is the live system
Where all the original data is maintained.

26) Transaction code?

Ans: They are the commands through which the corresponding application is executed. In SAP
each screen is associated with T-Code.

a) Standard T code: They are the system provided to work with the pre-defined applications. The
standard T-codes could only be the combination of any alphabets/alpha-numeric
Ex: SQVI, SE11, SE38 (SE-System Engineering, SM – System Machine, SQ-System query)

b) Custom T code: They are created & maintained by ABAP Technical Consultant

SE93 is used to work with custom Tcode.

REPORTS
1) Explain about ABAP Queries?
Ans :- It is the system provided tool to generate the reports. It doesn't require any programming
knowledge.
2) What are the Transaction Codes associated with ABAP Queries?
Ans:- The T-Codes SQ03 , SQ02, SQ01 are used to work with the ABAP Queries.

3) What are the purposes of SQ01, SQ02 and SQ03?


Ans :-
SQ03 :- It is used to maintain the user groups. An user group is a collection of Info sets and
Queries.
SQ02 :- It is used to maintain the Info sets .
SQ01 :- It is used to maintain the Queries .

4) Is it possible to write an ABAP code in Queries?


Ans :- Yes .
5) What is the difference between TYPE and LIKE?
Ans :-
TYPE: - It is used to refer the data type, data elements,fields etc in the table.
Syntax:- DATA : <gv-var> TYPE <I/D/F/C......>.
 This Statement doesn't copy the existing properties of the objects.
LIKE :- It is used to refer the variables & fields in the table while declaring the data in the
program .
Syntax: - DATA : <gv-var> LIKE <I/D/F/C......>.
 This Statement copies the existing properties of the objects.

6) What is the default type and length of the variable?


Ans :- The default type is Character ( C ) and length is one (1).

7) What are the differences between Work Area and Field Symbol?

Work Area Field Symbol


1. It is the data variable . 1. It is a Pointer.
2. The ABAP statement is DATA is used to 2. The ABAP statement FIELD-SYMBOLS is used
declare or define . to declare .
3. The ABAP statement INTO is used to assign 3. The ABAP statement ASSIGNING is used to
the work area . assign the FIELD-SYMBOLS .
4. The ABAP statement MODIFY must be used
to modify the internal table . 4.No need to use MODIFY , Since it is a pointer .
5.Not Possible to declare by referring the
keyword 'ANY' . 5. It is possible with 'ANY' .
6.No need to specify within the Angular 6.It Must be specify within the Angular brackets
brackets (<>) . (<>) .
8) Explain about Types.
Ans :- TYPES :- It is used to declare the TYPES to club the multiple fields from the multiple
tables as a single unit & used to declare the internal table with Header Line.
DATA: It is used to declare the data variables in an application program.
Syntax: - TYPES: BEGIN OF <typ_dbtab1_dbtab2>,
<F1> TYPE <data element1/dbtab1-F1/dbstr_F1>,
.
.
<F5> TYPE <data element5/dbtab1-F5/dbstr_F5>,
END OF <typ_dbtab1_dbtab2>.
* declare the work area
DATA : <wa-dbtab1_dbtab2> TYPE <typ-dbtab1_dbtab2>.

9) What are the different types of internal tables and explain about them?
Ans :-
 Internal Tables :- They are the intermediate tables to hold the multiple records at run
time.
 There are 3 types of internal tables.
 STANDARD Internal tables :-Pushing the data from work area to internal table is always
Through 'APPEND' keyword. It accepts the duplicate records. Searching of a record is
Linear Search. Here all fields are non-unique.

Linear Search :- The system starts searching from first record until the required record is found.
Syntax :-
DATA : <gt_dbtab> TYPE STANDARD TABLE OF <dbtab/dbstr.....>.

 SORTED Internal table :- Pushing the data from work area to internal table is always
through 'INSERT/APPEND' keyword. It may/may not accept theDuplicate records.
Searching of a record is Binary Search. Sorted internal table cannot be sorted explicitly.

Binary search :- The total of records are divided in to two equal parts (n/2) then the system
starts searching in the second half. If the required record is not found in the
second half then the system start searching in the first half.

Syntax :-
DATA : <gt_dbtab> TYPE SORTED TABLE OF <dbtab/dbstr.....> WITH
UNIQUE/NON-UNIQUE KEY <k-f1><k-f2>.
 The ABAP statements 'UNIQUE or NON-UNIQUE KEY' must be specified while
declaring the sorted internal tables.
 The SORTED Internal Tables can't be sorted explicitly since the data is sorted
while extracting from the data base tables.
 HASHED Internal tables :- Pushing the data from work area to internal table is always
through 'COLLECT' keyword. It won’t accept the Duplicate records. Searching of a
record is Midpoint Algorithm.
Syntax :-
DATA : <gt_dbtab> TYPE HASHED TABLE OF <dbtab/dbstr.....> WITH
UNIQUE/NON-UNIQUE KEY <k-f1><k-f2>.

 They can be accessed using the KEY Fields. The ABAP statements 'UNIQUE or
NON-UNIQUE KEY' must be specified while declaring the Hashed internal tables.

Q) Some Keywords?
Ans:
Append:
It is the keyword, to transfer the data from work area to at last record of the internal table.
Insert:
It is the keyword, to transfer the data from work area to internal table based on the key-filed.
Collect:
It is the keyword, 1st checks the internal table whether the record is available or not. If not, it
actslike append otherwise it adds the numeric field from work area to numeric fields in the
internal table.
Lines:
It is the keyword which returns no of records available in the internal table.
Occurs:
It is the keyword; it allocates 8KB of memory for the internal table by default. If the data in the
Internal table exceeds 8KB then it will bring one more 8KB of memory & so on up to 2GB.
Clear: It clears the contents of the work area & internal table with header line. ( ITAB[ ] )
Refresh: It clears the contents of the internal table only.
Free: It clears the contents of internal table as well as memory which is allocated for that.

10) How to define SELECT-OPTIONS without specifying the table name?


Ans :- By declaring a Global Variable and use it as a reference while defining a select option
instead of TABLES statement .
TABLES: This statement is used to specify the database tables/database structure names
Which can be used as a reference while declaring the SELECT-OPTIONS
 This statement in not advisable since it creates unnecessary work areas.

11) Explain few of the additions to PARAMTERS and SELECT-OPTIONS statements.


Ans :-

Obligatory: It is the keyword to provide the input field as mandatory


Default: It is the keyword to provide the default values to the input variable

As checkbox: It is the keyword to define the checkboxes in the selection screen

Radio button group: It is the keyword to define the radio button in the selection screen

As list box: It is the keyword to define the dropdown list in the selection screen

Memory ID: It is the keyword to access the field value from one session to another session

Additions of SELECT-OPTIONS

a) NO-EXTENSIONS: This addition is used to hide the multiple selection button in the
Selection screen.

b) NO-INTERVALS: This addition is used to hide the higher limit of select-options in the

Selection screen.

c) DEFAULT: This addition is used to pass the default values to lower & upper limits

d) MATCH CODE: This addition is used to assign the elementary search help to the input field

12) What are the differences between PARAMETERS and SELECT-OPTIONS?


PARAMETERS SELECT-OPTIONS
1. Defines/accepts the single I/P fields. 1. Defines the Range input Fields.
2.The ABAP statements TYPE/LIKE is used to refer the
Reference 2. The ABAP statement FOR is used.
3. The operator 'IN' is used in the
3. The Operator 'EQ' or '=' is used in the WHERE condition. WHERE condition.
4. Here Check boxes &radio buttons can be used. 4. Here not possible.
5. Incase of mandatory it extracts nothing since the system 5. It extracts all the records case of
considers it as EQUAL to Space. empty single input.
6. They are possible with multiple
6. Multiple selections are not possible. selection buttons.

13) Differences between Work area and internal tables?


Ans:-
Work Area Internal Tables
1. It Holds single record at a time. 1. Holds Multiple records.
2. It doesn't have BODY. 2. It has BODY [].
3.The Record by record is 3. In case of internal table with header line the record by
processed through the work area record is processed through header line.

14) What are the different ways to declare the Internal Table and which is preferable?
Ans :-There are two ways to declare the Internal tables.
1) Syntax :-
DATA : <gt_dbtab> TYPE STANDARD TABLE OF <dbtab/dbstr.....>.
//Preferable.
2) Syntax :-
DATA:<gt_dbtab> TYPE TABLE OF <typ_dbtab /dbtab/dbstr> WITH HEARDER LINE.
//Not preferable.

15) What are the performance tips do you follow while developing an object?
(or)
What are the performance tips do you follow to improve the performance in the given program?
Ans: 1) Don't use select - end select loop and select * while extracting data.
2) You must sort internal tables before using control break statements.
3) You must sort internal tables before using binary search addition with READ table
statement.
4) Copy and delete internal tables/ db tables outside of the loop.
5) The Base internal table must be checked whether it has data or not before using the
FOR ALL ENTRIES Statement.
6) The internal Table must be SORTED before DELETE ADJUSCENT TABLE statement.
7) The TABLES statement is not advisable since it creates lot of unwanted Work Areas.

16) What are the performance tools do you perform before the object is released (or) once the
development is completed?
Ans :- They are used to release the objects without errors , warnings and with better
performance .Following are the diff. types of performance tools :-

1) Extended program check(SLIN or program -->Check -->Extended program check).


This tool is used to list out the performance related errors & warnings in a
particulardevelopment.
2) Code Inspector (SCI or program -->Check -->Code Inspector).
This tool is used to perform different types of checks such as
Performance checks, security checks, extended program checks.
3) Runtime Analysis (SE30 or System-->Utilities-->Runtime Analysis).
This tool is used to know run time of the program/T code.
4) SQL Tracer (ST05 ).
This tool is used to list out the indexes taken while extracting the data.

17) Explain about the System Fields with which you have worked?
Ans :-
Field Name Description
INDEX Loop Index
TABIX Index of the internal table
TBCNT processed data base in the database table
LILLI Selected list line
SUBRC Return value of ABAP statement
LSIND Index of detailed list
T-Code Current Transaction code
UCOMM Fun. Code of PUSH button

Q: Explain Some Additions to report statement?

Ans: 1.No standard page heading: This addition is used to hide the page heading.

2. Line size: This addition is used to specify the width of the basic output list

3. Line count: This addition is used to specify the length of a page in a basic list

4. Message ID: This addition is used to specify the message class

18) Explain some of the useful additions of WRITE statement?


Ans:- Some of the useful Additions to WRITE statement.
 ....WRITE :/ ---->Display the data in a new line.
 ....WRITE :/n (m) ----->Displays 'm' characters form position 'n'.
 ....COLOR ----> display the data in different colors.
 ....AS CHECKBOX ---->Display the checkboxes in the output.
 ....AS ICON ---->Display the icons such are traffic lights .
 ....NO_GAP ---->To remove the gaps in the data.
 ....UNIT ---->used for the quantity fields with the required data.

19) Explain about constants, Text Symbols, Selection Texts and Variants?
Constants :-They are used to avoid the hard coded text and improve the reusability in the
program.
Text Symbols :- The ABAP Statement TEXT followed by the symbol number ( XXX) can used to
define or call the text symbol.
Selection texts :- They are used to maintain the Field labels (descriptions) of the input fields in
the selection screen.
Variants :- They are used to save the input values to avoid the data entry errors to save the data
entry time.

20) Explain about String Comparison Operations and Mathematic Functions?


Ans: String comparison operators: -The below string comparison operators can be used to
compare the string data variables.
Operator
Contains Any (CA)
Not Contains Any (NA)
Contains Only (CO)
Contains Not Only (CN)
Contains Pattern(CP)
No Pattern (NP)
Contains String (CS)
Contains No String(NS)

CA: This condition becomes true when the source string contains only one of the characters in
the target string.
NA: It behaves just opposite to CA statement.
CO: This condition becomes true, when the source string contains only the entire target string.
CN: It behaves just opposite to CO.
CP: It is true when the source string contains the specified pattern is available in the target
string.
NP: It behaves just opposite to CP.
CS: It is true when the source string contains the target string in Upper/Lower case
NS: It behaves just opposite to CS.

Mathematical Functions: - The below Mathematical operators can be used on the numbers.
Operator Statement
Equal To EQ
Not Equal To NE
Less Than LT
Greater Than GT
Less Than or Equal To LE
Greater Than or Equal
To GE

22) Explain about the useful String Operations?


Operator Description
STRLEN Returns the length of the string
To combine the multiple strings into one
CONCATENATE string
To replace with one string to another target
REPLACE string
FIND Find the target String
SPLIT Splits the source string into diff strings

23) Explain about Debugger, Break points and Watch points?


Ans :- Debugger :- This tool is used to check the program.
Break Points:-The Break point can be set on the particular statement line of the program.
 Break points are of 4 types.We can place up to 30 break points in the program.
1. Session Break Point: They can be set by pressing an icon set/delete breakpoint icon.
2. Static Break Point: The ABAP statement BREAK-POINT/BREAK is used to set the
Static break point.The program must be in change mode to set the
Static break point.These are placed in any version of the program.
3. Dynamic Break Point: It is used to stop the source code. If it is not possible to set the
Break point at the particular statement, it stops the program at
First statement line. Placed using STOP button in the application
Toolbar. These are placed in active version of the program.
4. External Break Point: It is used to stop & start the cross application components such
As RFC, BAPI from one system to another.
Watch Points:-The Watch points can be set in the debugger tool only based on the particular
field value (Condition). We can place up to 10 watch points in the program.

Q) Differences between Classical &New debugger?


Ans:
Classical debugger New debugger
1.It is the old debugger 1.It is introduced from the version ECC 5.0
2.It runs on the same session to check & resolve 2.It runs on the separate session
the issues in the program
3.Lots of limitations such as for variables can 3.It is very efficient tool to check lots of data
Only be checked. Variables at a time.

24) Explain some of the useful additions of Selection-Screen?


Ans :-
SELECTION-SCREEN: - This statement is used to format the selection screen.
Some of the useful Additions:-
 ......BEGIN OF BLOCK: - This Addition is used to combine all the fields as a block.
 ......BEGIN OF BLOCK....WITH FRAME: - It is used to define the Frames around the input
fields in the selection screen.
 .....WITH FRAME TITLE:-It is used to define the titles of the Frames.
 .....SKIP: - It is used to keep the blank lines in between the selection -screen.
 .....ULINE: - To display horizontal lines in the selection-screen.
 .....BEGIN OF LINE: - It is used to input fields in the same line (one beside another).

25) What are the Selection-Screen events, explain?


 AT SELECTION-SCREEN OUTPUT ->This event is triggered at the selection screen
based on the user action. It is used to modify the selection screen.
 AT SELECTION-SCREEN -> This event is triggered after providing Input to the
screen & before leaving the selection screen.

 AT SELECTION-SCREEN ON -> This event is triggered at the selection screen


based on the input field.

 AT SELECTION-SCREEN ON BLOCK -> This event is triggers as entries block of


the selection screen & used to validate the entire block.

 At SELECTION-SCREEN ON RADIOBUTTON GROUP ->This event is triggered on


the radio button group of the selection screen.

 At selection -screen ON VALUE REQUEST FOR ->this event is triggered at the


time of user clicks on F4 button & used to provide the list of possible values to
input variable. The standard function module ‘F4_INT_TABLE_VALUE_REQUEST’
can be used to display the possible entries/populated internal table as search help

 At selection -screen ON HELP-REQUEST FOR ->this event is triggered at the time


of user clicks on F1 button .The standard function module
‘HELP_OBJECT_SHOW’ (with technical information) &
DSYS_SHOW_FOR_F1HELP’ (with out technical information) can be used to
provide the Help document to the input variable.

 The function module DYNP_VALUES _READ is used to read the selection screen
input values.

26) What are the differences between Normal Search (SELECT…ENDSELECT) and Pointer Search
(INTO TABLE)?
Ans :-
Normal Search(SELECT…..ENDSELECT) Pointer Search(INTO Table)
1.It is a loop 1.It is a statement
2.It extracts record by record from the data base 2.It extracts all the satisfied records from
tables into a work area or header line the data base table in single step.
3.The ABAP statement 'APPEND' must be used to
append record by record into an internal table 3.No need to use 'APPEND'
4.Some times it may give runtime error while
debugging 4.It doesn’t give any short dumps
5.Not advisable due to lack of performance 5.It is most advisable.

27) Explain about the Parallel Cursor Method?


Ans: - This Method is used for better Performance in case of the nested loops (Loop within the
loop).
Steps to use this Method:-
 Read the 2nd internal table (Item table) within the loop of the first mail internal table
(gt_header) with the required keys and get the index of the current record.
 Set the loop to the 2nd Internal table (ITEM internal table) to process the data from the above
SET INDEX and EXIT out of this loop for the unmatched data.

28) What are Linear Search and Binary Search?


Linear Search :- The system starts searching from first record until the required record is found.
Binary search :- The total of records are divided in to two equal parts (n/2) then the system
starts searching in the second half. If the required record is not found in the
second half then the system start searching in the first half.

29) What is the prerequisite to use “FORALL ENTRIES”?


Ans :- The base internal table which can be used in the 'FOR ALL ENTRIES' statement must be
checked whether it has data or not.

Q) Joins & types of Joins?


Ans: Joins are used to fetch the data from more than one table.
1. Inner join: pick the data from both the tables if & only if there is one or more than one
entry is available in R.H.S table with corresponding L.H.S table.
2. Left Outer join: pick the data from L.H.S table even though there is no match found in
R.H.S table. It is only possible for 2 tables.
3. For all entries: It 1st picks the data based on the where condition, next it based on, ON
condition. More than 2 tables join leads to time out/short dump. So, we go for, For All
entries.
30) What is the prerequisite to use “BINARY SEARCH” addition with READ TABLE statement?
Ans :- The Internal table must be sorted before BINARY SEARCH addition is used .
31) Explain about Loop termination statements?
Ans :- The following statements are used to come out of the loops and continue with the next
loop statements. Loops are used to process the multiple iterations & data records.
 EXIT :- This statement is used to come out of the loops and continue with the next
statements after the loops .
 STOP :- This statement is used to stop the LOOP and the next program execution.
 CONTINUE :- This statement is used to stop the current loop process and continue with
the next iteration.
 CHECK :- This statement is used to stop the loop process and continue with the next
loop iteration based on the specified conditions .
 CHECK = CONDITION + CONTINUE.
32) Explain about Correction and Transportation System (CTS)?
Ans :- This tool is used to record the changes made in the system.
 It is also used to release the Transport Request (TR) from one system to another
system (Dev --->Quality ---->Production).
 The T-Codes SE01/SE09/SE10 is used to work with this tool (CTS).

33) Types of transport requests and Explain about them.


Ans: Transport request: - It is an unique request number generated by the system while saving the
object under the package name.
The Transport requests of 4 types.
 Customizing Requests: They are created for the configuration & for the client dependent
changes.
 Work bench requests : They are created while saving all the workbench objects such as
DDIC objects(Tables, Structures, Transaction codes)
 Transport of Copies: They are created to transport the configurations, developments &
changes into another SAP system.
 Relocations : They are used to modify the existing TR for adding & deleting the objects.

34) Explain about the events associated with Classical Reports?


Ans :- Following are the EVENTS associated with the Classical Reports .
 LOAD-OF-PROGRAM: This event triggers at the time of loading the program
Into a memory.
 INITIALIZATION: This event is triggered before the selection screen is
displayed. It is used to provide the default values to the selection screen.
 AT SELECTION-SCREEN: This event is triggered after providing the input to
the screen & before leaving the screen. It is used to validate the given input.
 START-OF-SELECTION:This event is triggered after leaving the selection
screen & before the selection screen. It is used to fetch the data from the DB.
 END-OF-SELECTION: This event is triggered after completion of the logic. It is
used to display the output.
 TOP-OF-PAGE: This event is triggered at the top of each page. It is used to
display the header information.
 END-OF-PAGE : This event is triggered at the end of each page. It is used to
display the footer information.

35) Which is the default event?


Ans :-The default event is START-OF-SELECTION .If no event is used the entire program is
executed under this event.

36) In which order the events of the Classical Reports are triggered by the driver program?
Ans :-
 LOAD-OF-PROGRAM
 INITIALIZATION
 AT SELECTION-SCREEN
 START-OF-SELECTION
 END-OF-SELECTION
 TOP-OF-PAGE
 END-OF-PAGE

37) What are the differences between Classical Reports and ABAP Queries?
Ans :-
ABAP Queries Classical reports
1.It is the system provided tool to
generate the reports. 1. It is an Utility.
2.It doesn’t require any programming
language . 2. It requires the programming language .
3.It is not possible to change the system
generated program without having 3.It can be change since it is in Custom name space (Z
Access key. or Y) .
4.It provides the generic Functions in 4. It doesn’t provide any generic functions hence the
the output to sort the data, change the code changes are required to sort the data, change the
layout etc . layout and etc.
5. Column Alignment is done by the
system . 5.It is COMPLEX to Align the Columns .

38) What are the events associated with Interactive Reports?


Ans :- Following are the EVENTS associated with the Interactive Reports .
 AT LINE-SELECTION: This event is triggered at the time of user clicks on any
record of any list.
 AT USER-COMMAND: This event is triggered at the time of user clicks on any
menu item.
 TOP-OF-PAGE DURING LINE-SELECTION: This event is triggered at the top of
each secondary list.
 AT PF-STATUS: This event is triggered at the time of user clicks on F1 to F12
function keys. This event is not triggered along with AT LINE-SELECTION.
Hence it can be ignored & used SET PF-STATUS statement.
 SET PF-STATUS: This event is triggered at the time of attaching our own GUI to
the list.
39) What are differences between Classical & Interactive reports?
Ans:
 The Classical reports are used to display the entire information in a single/ basic list
 The Interactive Reports are used to display the summarized information in the basic list
& detailed information in the next drill down list. Up to 20 secondary lists are provided

Q) Techniques used to identify the record which was clicked by the user in the previous list?
Ans: HIDE, SY-LISEL & GET-CURSOR
HIDE: It is the keyword which maintains the copy of the previous list with output line numbers
& their content. Whenever the user clicks on any record of any list then AT LINE-SELECTION
event will be triggered, list index is incremented by 1 & that particular record will be moving
from HIDE area to work area. Hide is always maintained after Write statement.
The both HIDE & SY-LISEL techniques generate the next list based on the line selection, not
based on field selection. If you want to generate the next list based on the field selection, then
we go for GET-CURSOR technique.
GET-CURSORtechnique writes the field name as well as field value which is clicked by the user

40) What are the System Fields associated with Interactive Reports?
Ans :- System fields associated with Interactive reports .
Field name Description
LSIND Index of the next drill down - contents of the current list Index no
LISEL Selected list line value-contents of the selected record
LILLI Selected list line number – contains the exact line no of the selected record
UCOMM Fun. Code of the selected push button/Menu item
PFKey Function Key

41) What are the Control Break Statements, explain about them?
Ans :-
Control Break statements: - They are used to control the data flow of an internal table.
 The Control break statements start with AT.....and end with ENDAT.
 These statements should be used within the LOOP statements only
 Following are the different types of Control break statements.
 AT FIRST: - This event is triggered at the first record of an internal table. This is used to
display the Header information.
 AT NEW: - This event is triggered at the first record of each block. This is used to display the
individual headings.
 AT END OF: - This event is triggered at the last record of each block. This is used to display
the total/sub totals in the internal table.
 AT LAST: - This event is triggered at the last record of an internal table .
 ON CHANGE OF: - It is a special control break statement which can be used outside of the
loop statement also.
 It is almost similar to AT NEW statement but it doesn't consider the preceding fields.
 It can be used on the multiple fields using SET operators (AND, OR, BETWEEN).

42) What is the difference between ATNEW and ONCHANGE OF?


Ans :-
AT NEW ON CHANGE OF
1. Must be used within the loops. 1. Can be used outside of the loop
statements also.
2. It consider preceding fields as well 2. It doesn't consider.
3. It can be used on the selected fields also
3. Not possible to use with the SET operators. using the SET operators.
4. The work area is impacted by replacing all the
next fields with Asterisk (*)marks. 4. Work Area doesn’t Impact

42) What are the differences between SELECT SINGLE and UPTO 1 ROWS?
Ans :-
SELECT SINGLE UPTO 1 ROWS
1. It extracts single record from the data 1. It extracts all the records into a buffer and moves
base table on the specified key fields. the first record in to an application program
2. It doesn’t require END SELECT
statement 2. It requires END SELECT.
3. This is used to fetch the exact record. 3. This is used for validation.
4. It hit the database only once. 4. It hits the database twice.

Q: Types of execution modes?

Ans: The programs or the transaction codes can be executed in 2 modes.

1. Foreground: In this mode the programs or the transaction codes executed directly by providing
the input values. It requires user interaction.

2. Background: The programs or the transaction codes can be scheduled to get them executed
periodically. It doesn’t require any user interaction. The T-code SM36 is used to define the
background jobs & SM37 is used to monitor the background jobs.

The standard function modules JOB_OPEN, JOB_SUBMIT, JOB_CLOSE are used to work with the
background jobs in the program.

The background jobs can be debug using the command JDBG.

43) What are the Modularization techniques which you follow?


Ans :- They are used to organize the ABAP code in the proper way , make the program more
understandable and make use of the code reusable .
To divide the business processing logic into reusable block of statements.
 Following are the different types of Modularization techniques
 INCLUDES: These programs are part of another main/include programs.
We can’t execute an include program independently whereas the same include
program can be included in any no of executable programs. The ABAP statement
INCLUDE is used to call or define the INCLUDE programs.

 Subroutines:
These are statements local modularization techniques. These can be called from
the same/some other program. Calling should be 1st& Definition should be next.
The ABAP statement PERFORM is used to call the sub-routines & FORM…
ENDFORM is used to define the sub-routines.

Actual Parameters: The parameters which can be passed while calling the
subroutine.
Formal Parameters: The parameters which can be used while defining the
subroutine.
Internal Subroutine: Definition & Calling of the subroutine in the same program.
External Subroutine: Definition of the subroutine in one program & calling of the
subroutine in another program.
Pass by value: From calling to definition & definition to calling, the parameter
values only passing. The system allocates new memory. The allocated memory is
freed once the subroutine ends.
Pass by reference: From calling to definition & definition to calling, all parameter
values are passing along with the memory. The pointer uses the same memory
allocation for both actual & formal parameters.

 Macros:
These are used to perform arithmetical operations. Macros can take up to 9 place
holders (&1…. &9). In macros Definition should be 1st& Calling should be next. The
ABAP statement DEFINE…END-DEFINTION is used to define a macro.

 Function Modules:
These are reusable components defined in function library. Each function module
must be attached with one function group which contains 2 include programs by
default. a) Global declarations b) common subroutine.
The Tcode SE37 is used to work with the function modules & SE80 is used to
work with the function group. Function group is the collection of function
modules
 Message class:
This tool is used to maintain the Messages in the message pool.
The Messages from the message pool can be reused anywhere in the system.
The standard T-Code SE91 us used to work with the message pool.

 Text symbols & Constants:


The ABAP Statement TEXT followed by the symbol number (XXX) can used to
define or call the text symbol. Constants are used to avoid the hard coded text
and improve the reusability in the program.
44) What are the differences between Subroutines and Function Modules?
Subroutines Function modules
1. These are local. We can access the 1. These are global. We can access the
Subroutine within the server only. function module with in server as well as
Outside the server.
2. We can’t test the subroutine. 2. we can test function module independently
Without calling.
3. Subroutines can’t handle the errors. 3. Function module can handle the errors
Through exceptions.
4. Subroutines are defined in ABAP editor. 4. Function modules are defined in
Function builder –SE37

Q) What are the differences between Macro & subroutine?


Macro Subroutine
1. Definition & calling in the same program. 1. Definition & calling may/may not in the same
Program.
2. Definition should be the 1st& calling should be 2. Calling should be the 1st& Definition should
The next. Be the next.
3. Macros can take up to 9 inputs. 3. Subroutines can take any no of inputs.
4. Sub-routines can be debugged at run time. 4. Macros cannot be debugged.

45) What are the different parameters in Function Modules and Explain about them?
Ans: Following are the different types of Parameters in Function Modules
 Attributes:
Attributes specify the type of the function module whether it is a normal or
Remote Enabled Function module.If the function module is normal, we can
access the function module within the server only. If the function module is
Remote Enable, we can access the function module within the server as well as
outside the server also.
 Import parameters:
They are imported from the calling program to the function module.
 Export parameters:
They are exported from the function module to the calling program.
 Changing parameters:
They are imported from the calling program then they can be changed in the
function module & exported to the calling program.(Import -> Change -> Export)
 Tables:
These can be used to both import & export only for internal tables.
 Exceptions:
They are used to raise/handle the exceptions based on return code (SY-SUBRC).
 Source code:Source code contains the logic related to the function module.
46) Explain about different methods to pass the parameters to sub routines?
Metho
d Description Effect
It is the default method. The pointer used the same memory The Actual
BY location for both actual & formal parameters. From calling to parameters are
Refere definition & definition to calling, all parameter values are change with the
nce passing along with the memory. Formal parameters.
The Actual
The system allocates new memory. The allocated memory is parameters are not
By freed once the subroutine ends. From calling to definition & change with the
Value definition to calling, the parameter values only passing. Formal parameters.
By The Actual
Value parameters are
and It is almost similar to By value but only the difference is the change with the
Return Formal parameter values are returned to the main program. Formal parameters.

47) What are the differences between Normal Reports and ALV Reports?
Classical reports ALV Reports
1. Simple reports using the WRITE statements within 1. The system generated Functions start
the loops. with REUSE* are used to display the data .
2. It doesn’t provide any generic functions hence the 2. It provides the generic Functions in the
code changes are required to sort the data, change output to sort the data, change the layout
the layout and etc. etc.
3. Performance is not as good as ALV Reports since 3. Performance is good since the data is
the LOOP statement must be used to display the displayed using the function modules
data. outside of the loops.
4. It can be possible to edit the Fields in the
4. Not possible to edit the Fields in the Output. Output.
5. It is so EASY to display the LOGOS in
5. It is difficult to display the LOGOS in the output. the output.
6. Column Alignment is done by the
6. It is COMPLEX to Align the Columns. system.
7. It is not much user friendly and Look & feel is not 7. It is very user friendly and Look & feel is
as good as ALV Reports . good .

48) What are the events associated with ALV Reports?


Ans :- There are 17 events in ALV Reports .
 Following are some of the most useful events.
 TOP_OF_PAGE:It is an event which is triggered at the top of each page. It is used
to display the list headings & Logos.The type ‘SLIS_T_LIST_HEADER’ is used to
populate the list headings & images in the output list.
 PF_STATUS_SET:It is an event which is triggered at the time of attaching our own
GUI to the program. The type ‘SLIS_T_EXTAB’ is used to populate the functional
codes of the generic functions to be hidden in the output.

 USER_COMMAND:It is an event which is triggered at the time of user clicks on


any record of any list as well as clicks on any menu item. The type
‘SLIS_SELFIELD’ is contains the selected row values.

49) What are the Function Modules associated with ALV Reports?
Ans :-
 The standard ALV display Function module 'REUSE_ALV_LIST_DISPLAY' is used to
display the output inLIST Display.
 The standard ALV display Function module 'REUSE_ALV_GRID_DISPLAY' is used to
display the output in GRID format.
 The standard ALV display Function modules 'REUSE_ALV_BLOCK_LIST_INIT'is used to
initialize the blocked ALV&'REUSE_ALV_BLOCK_LIST_APPEND' is used to append the
data internal table to the blocked ALV&'REUSE_ALV_BLOCK_LIST_DISPLAY' is used to
display the output.
 The standard ALV display Function module 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' is
used to display the header & item details in HIERARICHALmanner.

50) Explain about the Message classes.


Ans :- This tool is used to maintain the Messages in the message pool.
 The Messages from the message pool can be reused anywhere in the system
(Programs-Codes....etc).
 The standard T-Code SE91 us used to work with the message pool.

51) What are the ways to populate FIELD CATALOG and which one do you prefer?
Ans :- There are two ways to populate the FILED CATALOG .
 1st way :- The standard ALV Function Module 'REUSE_ALV_FIELDCATALOG_MERGE' is
used to print the text at top or bottom events &populate the field catalog by passing the
data dictionary structures (or) tables (or) internal tables
 2nd way (Manual Population) :- The field catalog can be populate manually .
 Manual population is most preferable.

52) Is it possible to generate the ALV reports without populating or using any FIELD CATALOG?
Ans :-Yes, We can generate.

53) How to make the field editable in ALV Grid?


Ans :- By passing the EDIT field name to the SLIS_LAYOUT_ALV .

54) Explain the steps to provide headings and logo in ALV reports.
Ans :- The standard ALV Function module "REUSE_ALV_COMMENTARY_WRITE" is used to
display the populated list headings and LOGOS.

55) How to handle TOP-OF-PAGE in ALV List or Hierarchal ALV or Blocked ALV?
Ans :- Using the standard type SLIS_T_EVENT which contains 2 fields event name(name) & which
form handle the event(form)

56) How to provide custom Function (Push)Buttonalong with System generated Functions in ALV?
Ans :- Using the T-Code ‘SE41’ copy the standard status ‘standard’ and standard program ‘saplsalv’
into custom menu status and then change the custom menu status as perrequirement.
57) How to handle Interactive Functionality? (Double Click)
 Use the ALV Event USER_COMMAND.
 Define a work area of the type SLIS_SELFIELD and an user command variable with the
dynamic subroutine of an event USER_COMMAND.
 Provide the additional interactive functionality based on the function code of the double
click (&NC1).
 The function code for the double click in ALV reports is &IC1.
58) Explain about some of the useful types with which you have worked in SLIS Type Group.
Ans :-
Field
Name Description
Tab name Final Internal Name
Tab index Index no. of the selected record in the final internal table .
Value Selected field value
Field name Field name of a selected row

59) What are the types of Memories, explain about them?


Ans :- The Memory concept is used to access the data across the internal & External Sessions.
 $There are 2 types of memories.
 SAP Memory: - It is used to access the data from one session to another external
session. The ABAP statements SET PARAMETER ID and GET PARAMETER ID are
used to work with the SAP memory.
SET PARAMETER ID is used to pass the data from an application program to the
specifies memory ID.
GET PARAMETER ID is used to get the value from the specified memory id into an
application program.
 ABAP memory: - It is used to access the data from the internal sessions. The
ABAP statements IMPORT..... AndEXPORT..... Are used to work with the ABAP
Memory.
60) What is the basic Difference between internal tables and database tables? How can we
differentiate by looking at the tables? And how Handling of Internal Tables?

Ans :- The basic Difference is database tables are Sorted in DB Server. And the internal tables are
virtual tables these are created run time only.

61) What is the Size of the internal tables?

Ans :- Internal Tables have 2 gigabytes of memory space and the initialize size is of 8 kb which can
be extend further.

62) How to place the PUSH buttons (Function keys) on Selection Screens?

Ans:- By using SELECTION-SCREEN PUSHBUTTOON <(pos)(len)>

<Pushbutton name > USER-COMMAND < UCOM >.


63) Can we place More than one selection screen Element in one line, If Yes, How?

Ans :- YES.

SELECTION-SCREEN BEGIN OF LINE.

* List of PARAMETERS

SELECTION-SCREEN END OF LINE.

64) How many Times the Event INITIALIZATION Triggers while displaying the list of 20 pages and
also TOP-OF-PAGE?

Ans :- INITIALIZATION Triggers Only One time and TOP-OF-PAGE triggers 20 times.

65) Background Jobs Debugging?

Ans: The Background jobs can be debug using the command ‘JDBG’.

 Execute the T-code SM37


 Check all the Job statuses & Enter the data range if required
 Click on Execute button & Check the required job to be Debug
 Enter JDBG in the command field & Press Enter
 Keep on pressing F6 until we reach our program then check the program using
the Function keys F5 or F6

DATA MIGRATION

1) What are the common steps involved in Data Migration?


Ans :-
Common steps involved in Data Migration:-
 Upload the Flat file data from the Legacy System (Local PC /Al11) into an Internal Table.
 Validate the uploaded data if required.
 Record the Screen Flow using the T-Code ‘SHDB’.
 Convert the screen Flow recording into a program using 'SHDB' (Perform with
bdc_dynpro and bdc-field).
 Copy the system generated subroutines ( bdc_dynpro and bdc-field ) and paste them
within the loop of Flat file Internal table.
 Comment the default values which are passed while recording.
 Pass the flat file field’s data to the screen fields instead of the above commented default
values.

2) What is LSMW?
Ans :- Legacy System Migration Workbench .
 It is the system provided tool to migrate or convert the legacy system data.
 The T-Code 'LSMW' is used to work with this tool.

3) What are the differences between LSMW and BDC?


Ans :-
LSMW BDC
1. It is the system provided tool. 1. It is the Utility.
2. Doesn’t require any
programmingknowledge. 2. Requires.
3. The data is processed using the different
import methods such are Batch
InputRecording, BAPI and IDOC and Direct 3. The data is processed only Batch Input
Input Methods. Recording.
4. The Field mapping is done automatically by 4. Field mapping should be done manually by
the System. passing the Flat data.
5. The T-Code LSMW is used. 5. The T-Code SE38 is used.
6. Mostly used for Huge amount (Master) of 6. Can be used for both Small & large amount of
data. data.
7. LSMW is possible for only standard 7. BDC is possible for either standard or custom
Transaction codes. transaction.
8. The direct XL file can't be processed without 8. It is possible using the Functional module
converting. ALSM_EXCEL_TO_INTERNAL_TABLE.
9. In LSMW, the flat file must be .TXT file. 9. In BDC, the flat file is either Text/Excel sheet.

SHDB: It is the Tcode to collect the screen & field details of entire transaction to do the recording.

Conversion Routines: They are the function modules to convert the field values from internal format
into an external format & vice versa.

4) What are the Function Modules associated with BDC Session Method?
Ans :- The System provided Functional Modules are
'BDC_OPEN_GROUP ’: To create the session in SM35.
'BDC_INSERT’: To insert the flat file data through the specified transaction while processing the
created session
'BDC_CLOSE_GROUP’: To close the session/unlock the created session.
5) Is it possible to write an ABAP code in LSMW?
Ans :- Yes, by clicking on the change(pencil) icon which appears beside the recording screen field.

6) How to handle messages in Call Transaction Method?


Ans :-whenever we get the errors in call transaction, we simply pass those errors to session
method. ‘FORMAT_MESSAGE’ is the function module which is used to handle the errors in
call transaction method.Whenever we are handling the errors in call transaction method then
we must provide MODE is ‘N’.
 Get the Message information such are message number, message id, language, message
variables and etc. into an internal table of the type BDCMSGCOLL structures with the
CALL TRANSACTION statement.
 Display the corresponding meaningful message text using the function modules
'FORMAT_MESSAGE’ or 'WRITE_MESSAGE' with the loop of an internal table which
holds the messages information (Type MSGCOLL).

7) What is the syntax to make use of Call Transaction?


Ans :-
LOOP AT <gt_flat-file> INTO < wa_flat_file>
* Map the Fields
PERFORM bdc_filed .....
<wa_flat_file-field>.
CALL TRANSACTION '<T-Code>' USING <gt_bdcdata>
MODE <A/N/E> UPDATE <A/S>
MESSAGES INTO <GT_BDCMSGCOLL>.

8) How to handle Table Control in BDC?


Ans :- Table control is used to maintain multiple line items of the particular functional Tcode.
 Split the Flat file internal table into the Header and Item Internal tables by setting the loop
at flat file internal table.
 Record the Screen flow while maintaining (create/change) the Header and Items in the
functional T-Code using SHDB.
 Make the Item Number as Dynamic using the Concatenate statement and pass the
concatenated field name for the screen field with in the loop of item internal table or
while processing the items .
9) What are the differences between Session Method and Call Transaction Method?
Ans :-
Session Call Transaction
1. The standard Function modules 1. The ABAP statement CALL TRANSACTION ….is
'BDC_OPEN_GROUP’, 'BDC_INSERT' and used.
'BDC_CLOSE_GROUP' are used to work
with the session method.
2. The data updated Synchronously 2. The data is updated in both synchronous and
(Record by Record). Asynchronous.
3. An Error LOG File is generated by the 3. The messages/errors are manually handled
system to handle the errors. explicitly using the structure BDCMSGCOLL & the
function modules 'FORMAT_MESSAGE’ or
'WRITE_MESSAGE’ or the table T100.
4. Different process modes such are A/N/E 4. Different process modes are possible.
used in the program.
5. Session method can process any no of 5. Call Transaction can process only one transaction
transactions at a time. at a time.
6.After processing the session through 6. Immediate database updation.
SM35 only, the database is updated.
7. Session method is slower. 7. Call transaction method is faster.
8. Session method is suitable, if the flat file 8. Call transaction method is suitable, if the flat file
contains large amount of data. contains less amount of data.
9. We can schedule the session method in 9. We can’t schedule the call transaction in
background. background.
Synchronous: In this mode, the current record cannot be processed until the previous record has
been processed to update without any errors.
Asynchronous: It is used to update the data continuously by skipping the error records.

10)Which method do you prefer to migrate the data if the method is not mentioned?
Ans :- CALL TRANSACTION.
11) What are the differences between BAPI and normal BDC?
BAPI BDC
BAPI is faster than BDC. BDC is relatively slower than BAPI.

BAPI’s are used to upload the data from the flat file to BDC’s are used to upload the data from
SAP system directly. file to SAP system via scre3ens hence it
is slower.
No such processing options are available in BAPI. Background and Foreground processing
options are available for BDC.

BAPI would generally used for small data uploads. BDCs would be preferred for large
volumes of data upload since
background processing option is
available.
BAPI never cause to terminate the program. Whenever Errors can be processed in SM35 for
an error occurred in the BAPI, it returns those errors session method and in the batch input
through Return parameter. This parameter returns program for Call Transaction method.
exception messages or success messages to the
calling program.
In BAPI recording is not required In BDC, recording is required
12) What are the fields in BDCMSGCOLL structure?
Ans: BDCMSGCOLL is one structure in DDIC which contains the below fields
Field Description
TCODE BDC Transaction code
DYNAME Batch Input Screen program name
**DYNUMB Batch Input Screen name
**MSGTYP Batch Input message Type(E/W/I/S….)
**
MSGSPRA Message lang.
MSGID Message ID
MSGNR Message Number

13) What are the fields in BDC DATA structure?


Ans :- It is a structure in DDIC which contains 5 fields.
Field Description
PROGRA
M BDC Module pool
DYNPRO T-Code
DYNBEGI
N BDC Screen Start
FNAM field Name of the screen
FVAL BDC Field Value

14) What are the steps to check the Standard BAPI before it is used in the program? (need to
execute the BAPI Function Modules and BAPI_TRANSACTION COMMIT in sequence)
Ans:

1. Define a structures for the BAPI


2. Write Function Module
3. Create the API Method Using the BAPI WIZARD

4. When the Business object has been checked and the documentation created, the following
steps must be carried out:

 Release the BAPI function module (in the Function Builder).

 Release the business object type (in the BOR Object Type -> Change release status to
->Implemented).

 Release the BAPI as a method in the BOR (Release the methods you has created - Set the
cursor on the method then
Edit -> Change release status -> Object type component -> To released )

 For potential write BAPIs: Release the IDoc and its segment

15 ) How To run the Session in Background ?

Ans :- Schedule the RSBDCSUB to run periodically in one or more background jobs through

transaction SM36(OR)

We can also SUBMIT the program RSBDCSUB within the BDC session program itself.

16 ) While Uploading a flat file through BDC Call Transaction , The system(not SAP Server

i.e. the currently working Machine) suddenly get CRASHED . How do i Know how many records

have been updated ?

Ans:- Even though it is BULK Data Processing ,but updating the data base is always record by
record only. So After Calling the Transaction, Maintain the status of the calling transaction into one
custom table including the record details. So that we can the custom table for the latest details.
17) What Is BDCRECCX1?

Ans:- In a standard program, Generated from recording which contains all the re-usable
declarations and also the re-usable Subroutine Definitions for all the BDC Programs .

18) How can you PRINT a session log file?

Ans :- Execute RSBDCLOG .

19) How to Export the Session?

Ans :- From SM35 ---> Utilities ---> Export Session .

File Handling Techniques

1) What are the Function Modules associated with local PC?


Ans :- GUI_UPLOAD - To upload the flat file data into internal table.
GUI_DOWNLOAD - To download the data from the Internal Table.

2) How to handle the files in Application Server?


Ans: - Using AL11 T-Code.
In the application server each file is called one Dataset. We can’t create the file directly in the
application server. Through program only we can create the file in the application server
(download the data into application server).

3) What are the steps involved in handling Application server?


Ans :- The T-Code AL11 is used to work with the Application server.
 The below ABAP statements are used to Download/transfer the data from an internal
table into the specified file path of an application server.
1. OPEN DATASET FOR OUTPUT......
2. TRANSFER.......
3. CLOSE DATASET....
 The below ABAP statements are used to Upload/Read the data.
1. OPEN DATASET FOR INPUT......
2. READ DATA SET.......
3. CLOSE DATASET....

4) How to download the file from Application server?


Ans :- The below ABAP statements are used to Download the data from an internal table into
the specified file path of an application server.
1. OPEN DATASET FOR OUTPUT......
2. TRANSFER.......
3. CLOSE DATASET....

5) How to upload the file from presentation server (Front end)to Application server manually?
 The Code 'CG3Z' is used to upload the files from the Front end system into the specified
file path of an application server.
 Once the file is open in 'AL11'.
 Execute the T-Code 'CG3Z'.
 Select the required file type and file name on the front end system by pressing the
search help icon.
 Enter the Target file name on an application server.
 Click on Upload & click on cancel.

6) What are the Function Modules to provide Search Help on local PC and Application Server as
well?
Ans :- The Function modules 'F4_DXFILENAME_TOPRECURSION ' OR
'/SAPDMC/LSM_F4_SERVER_FILE' is used to provide the search help to choose the files
from the Application server.
NOTE: - The function module 'F4_DXFILENAME_TOPRECURSION ' can be used for both
presentation and application server.
7) How to convert logical file in to corresponding physical file path?
Ans :-File transaction code.

Note: ALSM_EXCEL_TO_INTERNAL_TABLE is the function module which is used to upload the


excel sheet information into internal table.

43) Standard reports associated with SAP scripts?


Ans: RSTXDBUG -> Activate/Deactivate form debugger
RSTXLDMC -> Graphic/Logo maintenance
RSTXSCRP -> Import/Export the Forms, Styles & Standard Text
RSTXPDFT4 -> To convert the OTF format of the SAP script into PDF format
RSTXFCPY -> Copy the SAP script from one client to other

 The Code 'CG3Z' is used to upload the files from the Presentation Server/Front end
system/Local PC into the specified file path of an Application server/Backend.

 The Code 'CG3Y' is used to download the files from the Application server/Backendinto
the specified file path of an the Presentation Server/Front end system/Local PC.

SCRIPTS
1) What are the Function Modules associated with Scripts?
Ans:-The below Function Modules are used in the Scripts.
OPEN_FORM:This function module is used to open the form to provide the link between
the print program & SAP script. The global data of the print program can
be accessed afterthis function module is used.
START_FORM: This function module is used to specify the starting page from where the
document to be print or displayed.
WRITE_FORM: This function module is used to pass the multiple entries of an internal
table into the SAP script form through the Text Elements.
END_FORM: It is an optional function module which is used to End the started Form.
CLOSE_FORM: This function module is used to close the Opened Form & send the
request back into the spool request to the device. It can also be used to
get the SAP script form data into OTF format.
Note: The standard function module ‘CONVERT_OTF_2_PDF’ is used to convert the OTF
data of SAP script form into the PDF format.
CONTROL_FORM: This function module is used to control the form by creating the
pages or windows dynamically.

2) What are the difference types of Windows?


Ans: Windows: - They are used to define the different types of windows.
 Following are the different types of windows.
 Main Window: It is used to display the continuous text on the pages. This window
is the default widow. Without main window we can’t designSAP scripts. Up to 99
main windows can be created in a form. The window type is ‘MAIN’.
 Constant Window:This window contains the static content which can be formatted
only once. The window type is ‘CONST’.
 Variable Window: It is used to print the data based on the window size. Without a
variable window also we can design the SAP script. We can place only one time
per page. The window type is ‘VAR’.
 Graphic Window: It is used to insert the logos on the page.
3) What are the different types of Symbols in Scripts?
Ans: - Symbols are of 3 Types.
 System Symbols: They are used to display the system data such as system date, type …
Ex: &DATE&, &DAY&, &MONTH&
The total no of pages & the current page no of the Total no of pages are displayed
Ex: &SAPSCRIPT-FORMPAGES& -> Total no of pages
&PAGE& OF &SAPSCIPT-FORMPAGES& -> 1 of 10, 2 of 10
 Standard Symbols: They are the predefined symbols maintained in standard table TTDTG
 Program Symbols: These are the variables in the program (&WA_T001-BUKRS&)
 Text Symbols:These are the variables which are declared in the page window.
4) How to avoid Page breaks in Scripts?
Ans: - The Command PROTECT...ENDPROTECT can be used to print the continuous text without
any page breaks/avoid the unwanted page breaks.

5) How to add additional functionality to script without modifying the print(driver) program?
Ans: - The Form Routines (PERFORM ......END PERFORM) are used to add the additional
functionality to the SAP Script forms without changing the print program.
6) How to generate windows or pages dynamically?
Ans: - The Function Module 'CONTROL_FORM' is used to control the Form by creating pages or
Windows Dynamically.

7) What are the different ways to debug the Script?


Ans: - There are two ways to Debug the Script Form.
 The path SE71 --->Utilities --->Activate debugger.
 Standard Program/ Report 'RSTXDBUG'.
8) How to copy the Standard Script and make the changes?
Ans :- The path SE71--->Utilities---> Copy From Client can be used and make the necessary
changes (OR) RSTXSCRP to import/export SAP Scripts .
RSTXSCRP is used to Import (Upload/Reload) or Export(Download) the SAP script.
9) Explain about NACE transaction code?
Ans: -NACE: - It is used to maintain the Output types and find the form name and print
program names. If you create the output type using NACE then it will be
automatically visible in table NAST and TNAPR.
The standard program TNAPR can also be used to find the form & print program name.
 First you run Nace T-code.
 Select which application you want add that smart forms that module you select it.
 Click output types on tool bar & Enter the required Output type: NEU & Click on Yes.
 Select the Output types that smart form(ex: fax,email,etc....)
 Double click processing routines.New window open.
 In that window which is your output medium there row you see the column name
pdf/Smartform
 There you assign your smartform& save it.

10) How to find print program and form if an ‘output type’ is given?
Ans :- Using the NACE T-Code or the standard table 'TNAPR' is used to find the FORM and
Print program names.
11) What are the tables associated with Scripts?
Ans :- TNAPR
12) How to convert the language from DE to our required language?
Ans: In SE71, Utilities ->Convert Original Language, Provide the To Language & press Enter
13) What are the system fields associated with Scripts?
Symbol Description
&DATE& System Date
&DAY& Day of the System
&MONTH& Month of the System
&YEAR& Year of the system
&TIME& System Time
&HOURS& System Hours (HH)
&ULINE& Horizontal Line

14) What are the Standard Texts?


Ans :- The Standard Long texts or maintained using the T-Code 'SO10'.
 By Default the System doesn't generate any transport request for standard texts.
 The standard Report 'RSTXTRAN' is used to generate the Transport Request for
Standard texts.
15) Tell some of the Standard Scripts and Print programs?
Ans :-Some of the useful Standard Script Forms and Print programs :-
Application Form Name Print Program
EF-Purchase
order MEDRUCK SAPFM06P
V3-Billing RVINVOICE 01 RVADIN01

16) How to transport the Standard Text?


Ans: The standard Report 'RSTXTRAN' is used to generate the Transport Request for Standard texts

17) How to import the Client dependent/Script changes into the Unit Test system?
Ans :- Using the SCC1.

18)How to display Address in Scripts?


Ans :- Using the Command ADDRESS .....END ADDRESS.

19) How to display Boxes in Scripts?


Ans: - You can Create Boxes in the SAP SCRIPT using the BOX Command specifying the

X,Y Co-Ordinates and the width and the height.

20) How to execute the program in back ground?


Ans: Execute SE38, provide the program name & Execute, provide the Input
In the Menu bar, click on program -> Execute in Back ground
Provide the output device LP01 & click on enter
Click on Immediate & save.
21) How to copy the SAP script from 800 client to 810 client?
Ans: In the Target client 810, Execute SE38 & Provide the program name: RSTXFCPY & Execute
Provide the Form name, In source client 800, Provide the Target Form name & Execute.
 All the standard script forms are available in the client 000.
22)Explain about some of the formatting options in Scripts?
Ans :-
23) How to format the date, time and country in Scripts?
Ans :- The commands SET DATE MASK, SET TIME MASK , SET COUNTRY can be used to
format the date ,time and country.
24) How do we display the Application Texts?
Ans :- Using the Function Module 'READ_TEXT' .
25) How to split the line into the next line in Scripts?
Ans :- Using the Fun. Module ' RKD_WORD_WRAP'.
26) Explain about Form Routines?
Ans :- The Form Routines (PERFORM ......END PERFORM) are used to add the additional
functionality to the SAP Script forms without changing the print program.

27) What are the fields in ITCSY Structure?


Ans :-
Field Description
NAME Symbol name
VALUE Symbol Value

28)What are the Transaction Codes associated with Scripts?

T-
Code Description
NACE O/P type Maintenance
SE71 Form painter
SE72 Form Style
SE73 Font Maintenance
SE78 Graphics or LOGO
SE63 Translations
SO10 Standard texts

29) How do we create/maintain different styles in Scripts?


Ans :- The T-Code SE72 is used to maintain the SAP Script Form Styles such are Paragraph
Formats, Character formats. Barcodes are maintained in the Character Format.

30)Is it possible to execute/test the Script without print/driver program?


Ans: - No.

31)What are the ways to upload the Logos and display?


Ans: - The T-Code SE78 (or) the standard report 'RSTXLDMC' is used to upload the LOGOS/IMAGES
 Whenever we are working with .BMP image then we must convert .BMP to graphics by
using SE78 T-code.
 Whenever we are working with .TIFF image then we must convert TIFF to text image by
using RSTXLDMC standard program.
32)What is the Function Module to be used to provide the link between the Script and Print
Program?
Ans :- OPEN_FORM.

33)How can you pass the data to the Script from the Print program without using WRITE_FORM?
Ans: - After Accessing the Fun. Module 'OPEN_FORM' we can declare the Global data.

34) How to develop the SAP Scripts in Diff. languages?


Ans: -InSE63, Click Translation --->Long Texts --->Sap scripts---> Forms.
35) How to convert sap script spools request to PDF?
Ans: - RSTXPDFT4.

Q) How to attach the PDF file & send it through an Email?


Ans: The standard function module SO_NEW_DOCUMENT_ATT_SEND_API1 is used to attach the
PDF file & send it through an Email (Microsoft outlook)

36) How to convert sap scripts to Smart Forms?


Ans: - Execute SMARTFORMS & Enter the New Smart Form name
The path SMARTFORMS --->Utilities --->Migration ---> Import SAP script Form
Enter the Existing SAP script Form name & click on Yes button.

37) How many times a MAIN Window can be placed on the same page in a layout?
Ans: -The MAIN WINDOW can be placed on the page up to 99 times. The name of the main window

starts from 00 to 98 i.e. MAIN00, MAIN01and MAIN02 ....etc.

NOTE: - The Text on MAIN window always starts printing from MAIN00.

38) How to set the output device LP01 by default in our own pc?
Ans:Execute SU01 & provide the user name as: SAPUSER, click on change mode
Click on Default tab & provide the output device LP01
Select the required decimal notation(1,234,576.89) & date format & click on save.
Text Element:
Text Element is the name give to the block of statements in the page window. If we pass the text
element name to the WRITE_FORM function module then the WRITE_FORM function module
transfers the data form driver program to all the statements which are available under Text Element.
Whenever we are working with main window, then we must provide Text Element name, otherwise
the 1st information printed twice.

39) How to identify the driver program based on the form name?
Ans: Execute SE11, open the Table TTXFP & Click on Display & Click on Contents
Provide the Form name & Execute, Identify the Driver program.

40) Some of the useful Control commands/Statements in SAP scripts?


Ans:
1. Include: It is used to include the standard text which is defined in SO10 Transaction.
2. Define: it is used to declare the variables in a page window. (/: Define&A&=’10’)
3. Address…Endaddress: It is used to display the address in the format of
4.Protect…End protect: It is used to print the continuous text without any page breaks.1st the
system checks each & every page which page is having the enough
place to print the continuous text. If no page is having enough space it
simply break the text & printing in different pages.
5. Top…End Top: It is used to print the Header information in the Main window.
6.Bottom…End bottom: It is used to print the Footer information in the Main window.
7.New-Window: This is used to call the next window.
8. New-Page: This is used to call the next page.
9.Set Date/Time mask: This is used to print the Date & Time format as per client requirement.
10.Box:It is used to draw the tables, vertical & horizontal lines.
11. Control Commands: IF…ENDIF & CASE…ENDCASE commands are used to control the
symbols data flow in SAP script.

41) Components of Layout (Form Painter)?


Ans:1. Header: It is used to maintain the administrative information like form name, page format etc.
2. Pages: It is the physical area where we can place the windows.
3. Windows: we can place the same window in any no of pages.
4. Page window: It is placing the window on the page with co-ordinates.
5. Paragraph format: They are used to print the entire paragraph with a required format & style.
6. Character format: They are used to print the particular text with the required font & style.
7. Documentation: This is used to maintain the documentation related to the form.
SMARTFORMS
1) What are the major differences between Scripts and Smart Forms?
Ans :-
SAP Script SMART FORMS
1. They are Client dependent. 1. They are Client Independent.
2. The back Ground Images are not 2.They are possible
possible.
3. It is not possible to create without Main 3. Can be created without Main Window also.
Windows.
4. Multiple page Formats are not possible. 4. Multiple page Formats are possible.
5. Not Possible to execute the SAP scripts 5. Possible to execute the SMART FORM without
without Print/Driver Program. Driver Program using the system provided Function
Modules.
6. Color formats are not possible. 6. Color formats are possible.
7. The data extract logic (ABAP CODE) 7. The data extract logic (ABAP CODE) can't be
can't be written. written in an INITIALIZATION and program lines node.
8. Tables& Templates are not possible but 8. It is easy to draw the tables & templates using the
BOXES can be drawn using the command nodes TABLES & TEMPLATES.
box.
9.Lables are possible 9. Lables are not possible.
10. whenever we activate the SAP script, it 10. whenever we activate the SMART FORM, it
won’t generate any function module generates afunction module
11. By using RSTXDBUG standard 11. By using BREAK-POINT keyword we can debug
program we can debug the SAP script. the smart form.

2) Why the Scripts are Client dependent and Smart Forms are Client independent?
Ans :-
 SAP scripts are client dependent that means if we design the SAP script in one client
that is not reflected to other clients in the same server.
The Scripts are client dependent because the contents or data displayed or printed using the
text elements. The text elements are client dependent hence the scripts are Client
dependent.
 SMART FORMS are client dependent that means if we design the SAP script in one client
that is automatically reflected to all other clients in the same server.
The Smart forms are client independent because one UNIQUE FUNCTION MODULE is
generated by the system while activating the smart forms. The generated function
module is client independent hence the smart forms are client independent.
3) What are the ways to Debug the Smart Form?
Ans :- The Tcode SMARTFORM_TRACE can also be used to debug the Smart form.
1St Way: - By setting the Session Break point in the Generated Function module.
 The SMARTFORMS can be debug by setting the Session Break points at the required
statement line in the system Generated Function module.
2nd Way :- By setting the Static Break points in the SMARTFORMS.
 The SMARTFORMS can be debug by setting the Static Break points in the required
program lines node of the SMARTFORM.The statement BREAK-POINT shouldn’t be used
4) What are the Smart Form events?
Ans :- 1. Only On First Page: To Print/Display the data on the 1st page.
2.Not on First Page: Not to Print/Display the data on the 1st page.
3.Only after end of Main Window: To Print/Display the corresponding contents after the
MAIN window is processing.
4. Only Before end of Main Window:To Print/Display the corresponding contents before the
MAIN window is ended.
5. Only On page: To print/Display the data on the particular selected page.
5) Explain about different kinds of Nodes in Smart Forms?
Ans :- 1. Window: Different types of windows can be created.
2.Graphic: To define Graphic window.
3. Address: To define Address window.
4. Text: To define the Text Elements through which the contents of the symbols can
be displayed/printed.
5. Table: It is used to define the Tables with the different Shades, Frame to display the
continuous text in fixed columns & dynamic rows.
6. Template: It is used to display the data in fixed columns & fixed rows.
7. Flow Logic: It is used to control the different nodes & the flow logic in the smart forms.
a) Program Lines: It is used to insert the ABAP Code whenever it is required.
b) Loop Flow logic node: It is used to process the corresponding nodes for multiple
lines based on the no of entries in an internal table.
c) Alternative: It is used to process the alternative either True/False process blocks
based on the SET conditions.
d) Command: This is used to Break the page based on the condition.

6) What are the differences between Template and Table?


Ans :- A Template has fixed number of Rows and Columns whereas a Table can have variable rows
&columns i.e. you can have a internal table with contents associated to a Table element but
not to a Template.
7) How to display Address window dynamically?
Ans :- The Path %PAGE ---> CREATE ---> ADDRESS ---> Type DETERMINE DYNAMICALLY

8) What are the Transaction Codes associated with Smart Forms?


Ans :- 1. SMARTFORMS - To maintain SMARTFORMS.
2. SMARTSTYLES - To maintain the SMARTSTYLES.
3. SMARTFORM_TRACE - To debug the SMARTFORMS and activate the databasetracer.

Q) What are the Control Break Statements/Events in Internal table?


Ans: These are work within the Loop of Internal table. Before using the control break statements we
must SORT the internal table based on AT New. Each control break statement is ends with End AT.
1. AT First: It is an event which is triggered at the 1st record of internal table. This is used
to display the Header information.
2. AT New: It is an event which is triggered at the 1st record of each block. This is usedto
display the individual headings.
3. AT End of: It is an event which is triggered at last record of each record. It is used to display
the sub totals.
4. AT Last: It is an event which is triggered at the last record of internal table. This is used to
display the grand totals.
Q) what are the components of Smart Form ?
Ans: 1.Smart Form Layout
2. Function Module
3. Print Program
9) What are the main components in Smart Form?
Ans: 1. Global Settings: It is collection of Form Attributes, Form Interface & Global Definition
Form Attributes: These are used to maintain the Administrative information such as
Form name, Language, Page format & Styles.
Form Interface: These are used to declare the variables, workareas & internal tables
which are needed to transfer the data from print program to layout. It
is a function module which is generated while activating the smartform.
Global Definition: These are used to declare the variables, work areas & internal tables
which are needed to implement the logic in the smart form such as
a) Global Data: To define the global data variables such as variables, work areas, ITABS.
b) Types: The global types which can be referred anywhere in the smart form aredefined
c) Field Symbols: To define the Global field symbols.
d) Initialization: It can be used to build the entire data extraction logic. This program
Lines section is compiled 1st. The input & output parameters must be
specified before they are used in the program lines.
e) Form routines: To define the subroutines.
f) Currency/Quantity Field: To maintain the Currency/Quantity Fields which can be used
across the smart forms.
2. Pages& Windows: These are used to design the different pages & windows.
Main Window: It is used to display the continuous text on the pages. This window is the
default widow. Without main window also we can design Smart forms.
a) Secondary window: It is the sub sequent window which can be formatted for each
page
b) Copies window: It is used to maintain the print the same document with multiple
copies with different headings.
c) Final window: This is used to print the total amount after all the lines or line items are
Printed.
10) How to print Standard texts and Application Texts in Smart Forms?
Ans :- The Standard Structure SFSY contains the fields which are related to SMARTFORMS.
11) How to print Logos in Smart Forms?
The Path %PAGE ---> CREATE ---> GRAPHIC --->LOGO

12) What are the System Fields associated with Smart Forms?
Ans :-
Field Description
PAGE Current page Number
FORMPAGE
S Total No. of pages
JOBPAGES Total No. of pages of print job
DATE Current date of Application Server
TIME Current Time of Application Server
SUBRC Return value
USERNAME user name
PAGENAME page name + variant
Note:
 Smart Styles are used to create the paragraph & character formats. The Tcode is
SMARTSTYLES.
 SSF_FUNCTION_MODULE_NAME is the function module which is used to generate the
smart form function module no based on the smart form name.
 SPELL_AMOUNT is the function module which is used to convert the amount in words.
 READ_TEXT is the function module which is used to read the standard text information.
 The button SWAP is used to change the Source language to Target Language.
 The T-code SOST is used to check the send mails & push them.

13) How to find the system generated function module of the smart form?
Ans:Execute T-code …> SMARTFORMS, Enter the Form name & click in Display button
Click on Environment …> Function module name

Module Pool Programming


1) What is the Screen Painter (Layout) and explain about different elements?
Ans: Screen painter: - It is a tool which contains both graphical & alpha numeric mode. It is used to
Maintain the Screen layouts.
 Different Elements :-
1. Attributes: It specify the type of the screen whether it is a normal or sub screen.
2. Element List: It contains the screen elements which are designed on the screen.
3. Flow Logic: It contains the logic related to the screen.
4. Layout: It is the collection of screen elements (check box, radio button, box etc)

2) What is the difference between Flow Logic and Module Pool program?
 Flow Logic is used to define the Flow Logic of the screen elements. The modules are used to
communicate with the Module Pool Program.
 Module Pool Program is used to define the Flow Logic modules which can be called in the
flow logic of the screen. The T-code SE38/SE80 is used to develop & create the M.P.P

3) What are the events associated with Screen Painter?


Ans :- The below events are used in the MPP.
PROCESS BEFORE OUTPUT (PBO): It is an event which is triggered before the screen
is displayed. This is used to provide the default values to the screen.
PROCESS AFTER INPUT (PAI): It is an event which is triggered after user provide the
Input to the screen. It is used to implement the logic & validate the Input field values.
PROCESS ON VALUE-REQUEST (POV): It is an event which is triggered at the time of
User clicks on F4 button. This is used to provide list of possible values to the input field.
PROCESS ON HELP-REQUEST (POH): It is an event which is triggered at the time of user
Clicks on F1 button. This is used to provide the help document to the input variable.

4) What are the steps to provide Search Help?


Ans:
I. Use an Event PROCESS ON VALUE-REQUEST.
II. Specify or define the Module on the required Screen Field.
III. Use the Standard Fn. Module F4IF_INT_TABLE_VALUE_REQUEST to display the
Populated data in the search help Window.

5) What are the steps to provide Help Documentation?


a) Use the Flow logic event ‘PROCESS ON HELP-REQUEST’.
b) Specify the module name on the particular screen field.
c) Use the standard function module HELP_OBJECT_SHOW (with technical description) or
DSYS_SHOW_FOR_F1HELP (without technical description) to display the maintained Help
Documentation.
6) How to validate/check the fields (screen) in Module Pool program?
Ans: -a) Use an event ProcessAfter Input is an eventto validate the Input//screen field values.
b) Once the Flow logic is in Change mode, define the module with the field statement between
CHAIN…ENDCHAIN screen statement.
C) Fetch the data from the database & give the proper message if data doesn’t exist.

7) How to validate the fields in Screen Painter?


Ans :-Chain and end chain are used for multiple field validation in Module pool programming .It is written inside the
screen flow logic.

8) How to handle the Tab Strip Control?


Ans :-
9) What are the steps to work with Tab Strip Control?
Ans :-

10) What are the steps to work with Table Control?


Ans :-

11) What are the systems generated Include programs in Module Pool program?
Ans :- There are 4 Include programs in module pool programs.
a) TOP Include: It is used for global data declarations of the screens.
b) O01 Include: It is used to define the PBO modules.
c) I01 Include: It is used to define the PAI modules.
d) F01 Include: It is used to define the FORMS(Subroutines).

12) What are the different ways to execute the Screens?


Ans :- There are 2 ways to execute the screens.
1. Using the T code: The screens can be executed through the T codes to which the
Module pool program & the screen no is assigned.
2. Using an Executable program: The screens can be called & defined using the
Statement ‘CALL SCREEN’.
CALL SCREEN is used to call the specified screen number.

13) How to make field mandatory in Screen painter?


Ans :-In screen painter doubleclick the screen field 
goto ATTRIBUTES->PROGRAM 
There select input as REQUIRED
Required: It is type of Input to make the input/output fields as mandatory.

14) If the validations are maintained on multiple fields, how the validations will be triggered in
Sequence?
Ans :-
15)How to make the Screen fields invisible based on certain conditions dynamically and which
Event should be used?
Ans :-
Enhancements
1) What is Enhancements and what are the different techniques and explain them?
Ans :- Enhancements are used to adding some additional functionality to the standard applications
a) User Exits: These are the subroutines which start with USEREXIT_*& these are
defined in the standard Include program. They are mostly used in SD functional area.
The Access keys are required to break the standard Include programs of the User
Exits.Access key is the unique key no which can be used to break the SAP standard
programs. If an application is broken using an Access key, the corresponding
program will become the Custom objects.
b) Customer Exits:These are the Function Modules which can be called using the
statement CALL CUSTOMER-FUNCTION. These are used to enhance the standard
programs without breaking an Access key. They are mostly used in SD,MM etc. The
Customer Exits don’t required any Access key because the SAP provided Include
programs are in the customer name space (starts with Z*) inside the Customer Exits.
 Field Exits: These are used to change the field labels of the standard data
elements without breaking them.
 Function Exits: These are used to provide the Additional functionality to the
standard programs.
 Menu Exits: These are used to attaching the additional menu items to the
standard GUI.
 Screen Exits: These are used to adding some additional sub screens to the
standard transaction.
c) BADI: It is used to adding some additional functionality to the standard programs
using the Object Oriented ABAP Concepts.
d) Enhancement Framework (points): It is used to source code plug-in (hooks) for adding
the additional custom functionality to the standard programs/application.
e) BTE (Business Transaction Events): These are the custom function modules which
are linked with the SAP provided standard interfaces of the standard applications. The
T-codes BERE & FIBF are used to work with BTE.

2) What are the differences between User_Exits and Function_Exits?


Ans :-
3) What are the different types of Customer_Exits?
Ans :-
a) Field Exits: They are used to change the field labels of the standard data elements
without breaking them.
b) Function Exits: They are used to provide the additional functionality to the standard
programs.
c) Menu Exits: They are used to add the additional custom menu items & provide the
additional required functionality.
d) Screen Exits: They are used to adding some additional sub screen areas to the standard
Applications/transaction.

4) What are the ways to find the Exits?


Ans :-
I. Using the T-code SMOD
II. Using the T-code SE84
III. Using the Find function
IV. Using the Table MODSAP

5) What are the Transaction Codes associated with Exits?


Ans :-
T-code SMOD: used to find the Exits of an Application
T-code CMOD: used to create a project & Assign the Exits to the project

6) What are the Transaction Codes associated with BADIs?


Ans :-
T-code SE18 & SE19: are used to work with the BADI’s
T-code SE18: used to Define the BADI’s
T-code SE19: used to Implement the BADI’

7) What are the differences between Exits and BADIs?


Ans :-
Exits BADIs
1. They are procedural ABAP based 1. They are Object Oriented based
2. They can’t be assigned more than oneproject 2. The multiple use BADI can be implemented
any no of times
3. The Filter values can’t be set in the Exits 3. The Filter values can be maintained using
the Filter Dependent BADI’s
4. The T-codes SMOD & CMOD are used 4. The T-codes SE18 & SE19 are used

8) What are the ways to find BADIs?


Ans :- There are 4 ways to find the BADI’s
I. Using the standard method GET_INSTANCE: The BADI’s can be found by setting the
Break Point inside the standard method GET_INSTANCE of a standard class
CL_EXITHANDLER
II. Using the T-code SE84
III. Using the T-code ST05 (SQL Tracer)
IV. Using SPRO
9) What are the types of BADIs and explain about them?
Ans :- It is used to adding some additional functionality to the standard programs using the Object
Oriented ABAP Concepts.
1. Classic/Old BADI: These are mostly used in the standard applications. The standard method
GET_INSTANCE of the standard class CL_EXIT_HANDLER is used to call the classic BADI’s.
2. Kernel/New BADI: The ABAP statements GET BADI & CALL BADI are used to work with New
BADI’s. It is faster than Classical BADI’s.
GET BADI: This statement is used to create the reference object of a New BADI & set the
corresponding attribute.
CALL BADI: This statement is used to call the different attributes such as Methods of a
New BADI.
10) What is Filter Dependent BADI?
Ans :- These are used to make use of the same BADI Implementation for the different SET filter
values. It means the same BADI Implementation can be controlled based on the set filter value.
The system generates an Import parameter ‘FLT_VAL’ in case of Filter Dependent BADI’s.

11) What is FALLBACK class in BADI?


Ans :- If a BADI doesn’t have any active implementations, the program will go run time error.
The Fall back classes are used to overcome such kind of errors(Non active Implementation)
The exceptions can also be used to avoid non active implementation errors.

12) What are the differences between Classic (Old) BADI and New(Kernel) BADI?
Ans :-
Classic or Old BADI New or Kernel BADI
1. The standard method GET_INSTANCE of the 1. The ABAP statements GET BADI & CALL
standard class CL_EXIT_HANDLER is used to call BADI are used to work with New BADI’s.
2. An interface of a BADI referred to create the 2. The definition of a BADI is referred to create
Reference object the Reference object
3.It is not faster as like the Kernel BADI 3. It is faster than the Classic BADI
4. It can be a multiple use BADI 4. It must be a single use BADI
5. The Fall back class can’t be defined 5. The Fall back class can be defined
6. It can be a Filter Dependent BADI 6. It is not possible to maintain the Filter values

13) What are the Enhancement Spots?


Ans :-
14) What are the steps to insert the Enhancement Spot and work?
Ans :-

15) Explain about the Enhancement with which you have worked recently?
Ans :-

16) What are the statements not be used in Exits and BADIs?
Ans :- The ABAP statements COMMIT work & ROLLBACK work should not be used in EXITS.
The ABAP statements STOP & EXIT are also not advisable.

17) Is it possible to create multiple projects for one Exit?


Ans :- No

Cross Applications

1) What is the Cross Application/Interfaces concept?


Ans :-This concept is used to distribute the data between SAP to SAP systems
(SAP R/3 <-> SAP CRM) &SAP to Non SAP systems (SAP <-> .NET, JAVA..)

2) What are the differences between RFC and BAPI?


Ans :-
RFC BAPI
1. RFC’s are used to connecting from SAP to 1. BAPI is used to connecting from SAP to SAP
SAP only as well as SAP to NON SAP
2. TheTcode SE37 can be used to find RFC’s 2. TheTcode BAPI &SE37 can be used to find the
BAPI
3. RFC doesn’t generate any methods 3. BAPI generates the unique method in BOR to
use in the external system directly
4. It doesn’t have standard RFC’s to migrate the 4. The standard BAPI which starts with BAPI can
data be used to migrate the data

3) What are the steps involved in creating Custom BAPI?


Ans :-
1. Create the BAPI structure (SE11) starts with ZBAPI*.
2. Create the BAPI function module (SE37) starts with ZBAPI* which is
a) Remote Enabled
b) All parameters are pass by value
c) must contain Return parameter
3. Create method & object for the BAPI function module in the BOR using the Tcode SW01.
4. Generate, implement & release the method & object.

4) How to find/check the Standard BAPIs?


Ans :-1. Execute the Tcode BAPI
2. Click on Alphabetical tab
3. Click on Filter option
4. Select a radio button A11 & Click on Yes button
5. Click on Find icon & Select the required Find by object
6. Enter the required Find string & click on Yes button & click on back

5) What are the Transaction Codes associated with BAPIs?


Ans :-

6) How to handle exceptions in RFCs and BAPIs?


Ans :-You can handle the exceptions by using a structure BAPIE1RET2 which returns the
messages captured in BAPI. In Tables parameter of your BAPI, you can create a structure as of
typeBAPIE1RET2 so that you can capture the return parameters from BAPI.
7) How to handle Range in the RFC or Function Module or BAPI?
Ans :-

8) What is ALE?
Ans :- ALE stands for Application Link Enabling. ALE is used to distribute the data between SAP to
SAP systems through IDOC.
9) What is an IDOC?
Ans :- IDOC stands for Intermediate Document. IDOC is the collection of segments & each segment
is the collection of fields. IDOC is the carrier to carry the data from one system to another
system. The data is distributed between the systems in electronic form without user
interaction.
10) What is an IDOC Structure?
Ans :-IDoc Structure Terms (Basic Type, Extension, IDoc Type, Segment Type and Segment
Definition, Customer Extensions, SAP and Customer Developments, Version Creation and Release
Procedure, Namespaces)

11) How to check the IDOCs?


Ans :-WE19 is the Tcode to check the IDOC’s.
1. Execute WE02/WE05
2. Provide the Message type: CREMAS (Logical Sys), Partner no: LS810 & Click on Execute
3. After we get the status code 03, if we want to know the IDOC is reached to destination or
not then we execute RBDMOIND standard program.
4. The status of an IDOC (3) use in Green color (turn 10 to12) means it is delivered
Successfully.Yellow trafficlight indicates/the status code remains same, IDOC is in
progress or in the Transaction RFC & Red traffic light/the status code turn 10 to 11
indicates the Error/the IDOC is damaged.
5. Expand the Data Records folder & click on each segment to see the data to be distributed.

12) What are the Transaction Codes associated with ALE, IDOCs?
Ans :- The Tcode WE30 is used to create & display the different types of IDOC’s such as Basic
IDOC & Extended IDOC.
The TCode WE05/WE02 is used to list out the IDOC.
The Tcode WE19 is used to check the IDOC.

13) What is the Transaction Code to grade the segments?


Ans :- The Tcode WE31 is used to create & display the segments.
14) What is the Transaction Code to create a Custom IDOC?
Ans :-Create Segment ( WE31)
Create Idoc Type ( WE30 )
Create Message Type ( WE81 )
Assign Idoc Type to Message Type ( WE82 )

15) What are the Transaction Codes to send/generate and receive the IDOCs?
Ans :-
 BD10 --- Send Material
 BD11 --- Get Material
 BD12 --- Send Customer
 BD13 --- Get Customer
 BD14 --- Send Vendor
 BD15 --- Get Vendor
 BD16 --- Send Cost center
 BD17 --- Get Cost center

16) What are the Partner profiles and its Transaction Codes?
Ans :- Partner profiles are maintained/created to specify the partner details (system) to which the
data to be transmitted. The Tcode WE20 is used to create the partner profile.

17) What are the Message Types and the Transaction Code?
Ans :-
 The message type is the data identifier of an application.
 The control record of an IDOC contains the Message Type.
 The Tcode WE81 is used to Create & WE82 is to Assign the Message Type to the IDOCS.
18) How to add Segments to an Existing IDOC?
Ans :-
 You can do that using WE30 and WE31.WE30 you can create extension to the existing Idoc
type and WE31 you can add the fields to the sub segment. So first develop the segment
using WE31.you need to create the extension first &then addit to the segment which ever you
want using WE30 with extension option.
 Here you have to create enhanced idoc type. In we31 create the segment type as per your
requirement and go to we30 and create enhanced Idoc type by coping the standard Idoc.After
that you will select the segment under which you want to add the new segmnt and press
create button on the application tool bar and give the details of your new segment and save
it.
19) What are the advantages of ALE, IDOCs and EDI?
Ans :-
 The data is distributed between the systems in electronic form without user interaction.
 It reduces the data errors, man power & paper work.
 It is used to distribute the data between SAP & NON SAP systems.

You might also like