SAP Faq's
SAP Faq's
IMP IQ'S
Shiva Kumar
9290508065
DATA DICTIONARY
DDIC Objects
1) What are the technical properties of a table and explain about them?
Ans:- There are 7 types of technical properties .They are
a) Delivery Class: - It is used to control the Transport of the table data.
It is used to specify the type of the table.
We mostly use the delivery class 'C' (Customizing Table).
In case of delivery class 'A' (Application Table) the table can maintain in any system
(Development, Quality, Production systems) using SM30.
b) Data Browser/table view maintenance: - This property is used to specify whether the
table can be maintained or not.
We mostly use “Display/maintenance allowed” option.
In case of the option Display/maintenance allowed with restrictions & Display or
maintenance not allowed, the custom table or Maintenance view can’t be maintained.
c) Data Class: - It is used to specify the type of the data to be maintained in the table.
We mostly use APPL0 or APPL1.
APPL0 – Master data – Access frequently & updated (changed) rarely. Ex: D.O.B
APPL1 – Transaction data – Access frequently & updated frequently. Ex: Sal
APPL2 - Organization & Customizing data – Updated rarely. Ex: Company Codes
d) Size Category: - It is used to specify the initial space required for the table in the data base.
We mostly use '0' category. (0 – 7) -> [0 – 7100]
If the user tries to enter a record over that the selected range, the system will increase
the size category into a next category (0 to 1).
e) Buffering: - It is used to control (reduce) the traffic in the data base when the table accessed
by the multiple users.
We mostly use the mode “Buffering not allowed” – Table Can’t be buffered
Buffering allowed but Switched Off – Buffering allowed but not activated
Buffering Switched on – The table can be buffered. In case of this option any one of the
buffering types should be selected.
Single record buffering: In case of this buffering type, record by record is buffered
from the database tables.
Generic Area buffer: It is used to buffer the table data based on the specified key
fields. In case of this buffering type, the no. of key fields must be specified.
Fully buffer: The entire table is buffered to application server.
f) Enhancement category: - It is used to enhance the particular fields of the table.
We mostly use “Can be enhanced (DEEP)”
g) Table Maintenance generator: - It is used to maintain (Create, Change, Modify) multiple
entries & validate the custom table data using the T-code SM30.
a Memory area. Table is buffered means that the table information is available on application
server. When you call the data from database table, it will come from application server.
Transparent tables & Pool tables are buffered while cluster tables cannot be buffered.
The frequently retrieved data from the database can be stored in application server as buffer data,
so it will not hit the database to get the data. So, the execution of the program will be fast. These
data can be defined as buffered data of table while creating a table.
6) What are the differences between Check table and Value table?
Table Structure
1.Table contains the data 1. Structure does not contain the data. It is filled
with single record at Run time.
2. It must contain at least 1 field as Primary field 2. It does not contain primary fields.
3.Database must contain Delivery class & 3.It does not contain Delivery class &
Technical settings. Technical settings.
8) Differences between the tables created using Data elements & Pre-defined types?
9) What are the types of data base tables and differences between them?
Ans: - There are 3 types of data base tables.
We mostly use transparent tables.
7. Foreign keys can be created Foreign keys can’t be created Foreign keys can be created
since key field names are since key field names are
different in DDIC & Table pool same in DDIC & cluster pool
8. Can be joined with other Can’t be used with Joins, Since Can’t be used with Joins
Transparent tables they are already set of tables
Open SQL: It is a set of statements which can interact with any kind of database (Select, Insert,
Update, Modify, Delete).
Native SQL: It is specific to the particular database & it hits the database directly (EXEC -
ENDEXEC)
10) When you create new entries in the table, the field values are always in Uppercase. How do you
The checkbox Lower case is checked to make character fields as a case sensitive to accept
both Upper & Lower-case letters. Since the system takes the ‘Character’ data type as Upper-
case letters by default.
It is used to define the Global types, Internal tables and constants which can be referred
anywhere in the system.
The ABAP statement TYPE-POOLS is used to call/define the type group.
To restrict the values for material by material type search help name is: MAT1T_E
used for better performance while extracting the data from the tables. There are 2 types of
Indexes.
1) Primary index: It is generated by the system using the key field of the tables. Key fields
holds the unique data (Implicit Indexes).
2) Secondary Index: These are created and maintained by the Technical Consultants/ABAP’er.
We can create 9 secondary indexes per table. We can create the secondary indexes for both
custom & standard tables. It can be defined by both key & non key filed combination.
16) How to make SELECT statement to make use of any particular secondary index?
Ans:TABLES: spfli.
DATA : t_spfli LIKE spfli OCCURS 0 WITH HEADER LINE.
SELECT * FROM spfli
INTO TABLE t_spfli
%_HINTS ORACLE 'INDEX("SPFLI" "SPFLI~001")'.
LOOP AT t_spfli.
WRITE :/ t_spfli.
ENDLOOP.
17) What are the types of Views and explain about them?
Ans: - Views are the virtual/imaginary tables. It does not contain the data permanently.
View contains the data at Run time only.
1) Database View: - It is used to combine the multiple tables data by joining them. It can be
used to extract the data in the programs.
2) Maintenance View: - It is used to maintain multiple tables data using the T-code SM30 (TMG).
3) Help View: - It is used in the selection method in an Elementary Search Help to provide the
list of possible entries from the multiple tables.
4) Projection View: - It is used to HIDE the unwanted fields of the table. It can be defined using
one table only.
18) What are the Lock objects and explain about the different lock modes?
Ans:- They are used to control the parallel access for the same data accessed by the multiple users.
The custom lock object name should start with 'E' followed by the table name.
Ex: - E < ZB16_Student >.
Whenever we create a Lock Object, it will generate 2 function modules (ENQUEQE &
DEQUEQE). We have to call those function modules before and after open SQL
statements.
ENQUEQE - Request for Lock
DEQUEQE -To Release the Lock
Types of Locks:
1) Write/Exclusive: The locked data can be accessed by the single user only who locked it. All other
Lock requests are rejected.
2) Read/Shared: The multiple users can access the locked data at the same time in display
mode. A request for another Shared Lock is accepted, even if it comes from another user and
Exclusive Lock is rejected.
3) Exclusive but not Cumulative: Exclusive locks can be requested several times from the same
transaction Codes & are processed successfully but an Exclusive but not Cumulative locks can
be called only once from the same transaction. All other Lock requests are rejected.
SM12: This T-code is used to list out the locked objects & to delete the locked objects.
19) Explain about Currency or Quantity fields in DDIC?
In SAP the Currency & Quantity fields are required Currency Key & Quantity Unit. Hence, the
reference table & the reference field must be specified for currency & quantity fields.
The data type for the currency field is ‘CURR’ & the data type for the currency key is ‘CUKY’.
The data type for the quantity field is ‘QUAN’ & the data type for the quantity key is ‘UNIT’.
The reference table could be any table which has the currency key & quantity unit fields.
The same table can also be used as a reference table if it has the currency key or quantity
unit fields.
20) How to identify the standard tables? (Indications)
Ans: 1) The tables which doesn't start with Z or Y.
2) The tables which can't be seen in the CHANGE mode.
24) Is it possible to create a table/structure without creating any data element and domains?
The T-code SQVI(QuickViewer) is used to check the relationships between the tables.
30) If I have 6 fields in our Z table, but when I would like to display the contents, then only 4 fields
would be come up, how it will Handle?
Ans: In SE11, Display the table -> Select contents -> Select settings-> Select Format list -> choose
fields -> choose which fields you want to display (select check boxes)
By this, we can display which fields we want to display & the remaining fields will hide.
31) What is the Maximum No. of structures that can be included in a table or Structure?
Ans:- 9 ( Nine )
anywhere in the system & the data definitions are maintained in the DDIC.
34) In which table are the programs, Tables, Development classes (packages) are stored in?
Ans:- The Programs details are stored in the table TRDIR, Data base tables in DD02L and DD02T and
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 T-code.
TSTC – It is the standard table which contains all the Transaction Codes in the system.
TFDIR – Function Modules
40) 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 Stored in DB Server and the internal tables are
virtual tables these are created run time only.
2. Application Layer: It receives requests from the presentation layer to get them processed.
It also sends back the services to the presentation layer. There are 4
types of components in application layer.
a. Dispatcher: It is a link between the presentation layer & the work process. It receives
the request from the presentation layer & sends them to an appropriate work process
to get them processed.
b. Gateway/Layer: It is a communication protocol of the cross application components
such are RFC, BAPI etc. It provides link between two SAP systems.
c. Shared Memory: It is a common memory which can be shared by all the work process.
d. Work Process: It is a component to execute the applications.
3. Database Layer: It is central repository of the data. It provides data base services to group of
clients.
1st time.
47) What are different types of Data Dictionary Objects?
1. Database Tables
2. Domains
3. Data types
a. Data element
b. Structure
c. Table type
4. Search helps
a. Elementary search help
b. Collective search help
5. Views
a. Database view
b. Maintenance view
c. Help view
d. Projection view
6. Lock objects
a. Write/Exclusive Lock
b. Read/Shared Lock
c. Exclusive But not Cumulative
7. Type groups
The Objects Views, Lock objects and Match Code are called Aggregate Objects because they
are formed from several related table.
48) 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.
Client: It is a software/hardware combination which can send the requests for services from
the central system.
Server: It is a software/hardware combination which can provide the services to a group of
clients.
This is used to select the elementary search help from the collective search help.
To enter the restrictions in the dialog box for restricting values directly from the entry field.
Advantage: If the user often searches for values using the same search help, this procedure can
save time.
Fundamentals
Fundamentals
8) What are the differences between Normal Search (SELECT…ENDSELECT) and Pointer Search
(INTO TABLE)?
PARAMETERS SELECT-OPTIONS
1. It is used to define Check boxes, List boxes, 1. It is used to define Single & Range input
Radio buttons & Single I/P fields. Fields.
2.The ABAP statements TYPE/LIKE is used to
refer the Data types 2. The ABAP statement FOR is used.
3. The Operator 'EQ' or '=' is used in the WHERE 3. The operator 'IN' is used in the WHERE
condition. condition.
4. It is use as a single input data variable 4. It is system generated internal table with the
fields SIGN, OPTION, LOW & HIGH
5. It behaves as p_input = ‘= space’. 5. It behaves as s_input = ‘*’.
11) 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 DATA is used to declare the 2. The ABAP statement FIELD-SYMBOLS
work areas, ITABs, Variables etc in application program is used to declare Field symbols.
3. The ABAP statement INTO is used to process 3. The ABAP statement ASSIGNING is
record by record through work area. used to assign the FIELD-SYMBOLS.
4. The ABAP statement MODIFY must be used to 4. No need to use MODIFY, since it is a
modify the internal table . Pointer.
5. It must be specify within the Angular
5. No need to specify within the Angular brackets (< >). brackets (< >).
12) Field symbol work as a pointer, but it stores address of value. My question is, it got address
from sap memory or ABAP memory or in database server? I mean that address indicate to which
memory?
Ans: It allocate ABAP Memory
14) What is difference between Internal Table without Header Line and Internal Table with Header
Line?
Ans: Internal Table without Header Line creates an internal table and work area separately. When
we use Internal Table with header line, table is created then the work area is created
automatically with the same name that of the internal table.
15) What is the main difference between header line and work area?
Header line is created by default when we create the Internal table using "begin of" or
explicitly “with header line". Using header line, we can pass the value into the internal table.
Work area should have the same structure as that of internal table. It should be created by
us, whereas the header line is created automatically. Work area it holds the single data
during the execution of the program.
Function of work area and header line is same. Both are used to processed the data from
internal table.
TYPES: - It is used to club the multiple fields from the multiple tables as a single unit. It is used as a
reference to declare the Data variables, Work areas, Internal tables etc.
DATA: It is used to declare the data variables such as variables, work areas, internal tables etc. in
an application programs.
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>.
DATA: <gs-dbtab1_dbtab2> TYPE <typ-dbtab1_dbtab2>. //declare the work area
18) 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.
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.
The Tables statement can be avoided by declaring the required data variable.
20) 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 Table Sorted Internal Table Hashed Internal Table
1. These are default internal 1. These are a special type of 1. These are used with logical
tables. internal tables, where data is databases i:e with all fields & all
already(automatically) sorted records. These are Non-Indexed
as you insert the record Tables
2. To read a record we use 2. To read a record we use 2. Here the index operation is not
either key or index either key or index operation. allowed, we only use key
operation. When you define the table, operation.
You cannot specify a we must specify either When you define the table, you
unique key. It has always UNIQUE or NON-UNIQUE Key must specify the key as UNIQUE
non-unique key. in the table definition.
3. To search for a record, we 3. To search for a record, we 3. To search for a record, we use
can use either linear Use binary search as data is hashed algorithm.
search or binary search. already sorted.
4. We can use sort 4. We do not use sort as data is -
operation. already sorted.
5. We can use insert and 5. We only use insert, not 5. These are mainly used in ABAP
append to add records. append. with BI projects
6. It accepts the duplicate 6. It does not accept the -
records duplicate records.
21) Can we sort internal table without using SORT statement. Explain?
Ans: We can Sort internal table without using SORT statement by declaring sorted internal table.
Ex: DATA: IT_MARA TYPE SORTED TABLE OF MARA.
Default: It is the keyword to pass the default values to the input fields.
Radio button group: It is the keyword to define the radio buttons in the selection screen
As list box: It is used to define the dropdown list in the selection screen
MATCHCODE OBJECT: It is used to specify DDIC search help to the input fields
MODIFID: It is used to assign all the screen elements to the modification group to format the
Selection fields dynamically.
LOWER CASE: It is used to make the input fields as case sensitive to accept both upper &
Lower case letters.
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…TO: This addition is used to pass the default values to lower & upper limits.
25) What are the differences between Classical Reports and ABAP Queries?
ABAP Queries Classical reports
1. It is the system provided tool to generate the reports. 1. It is a 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 3. It can be change since it is in Custom
program without having Access key. name space (Z or Y).
4. Column Alignment is done by the system. 4.It is COMPLEX to Align the Columns
Append: It is the keyword used to append record by record from work area to at last record of
the internal table. APPEND creates always a new row in the internal table. It Allows
duplicates. Here it will not check whether the record is existed with the same field values
or not.
Syntax: APPEND <gs_dbtab> TO <gt_dbtab>.
INSERT: This statement is used to insert/add a new record from work area into internal table at the
specified location. INDEX keyword is used to specify the table index position where the
new row to be inserted.
Syntax: INSERT <WA> INTO <ITAB> INDEX <index_no>
UPDATE: This statement updates an existing record to the table. If the entry is not found it throws
an error.
MODIFY: If the key exists, modifies the record. If the key does not exist, adds the new record to the
table. An additional statement TRANSPORTING is used to modify an internal table data.
Syntax1: MODIFY <ITAB> FROM <WA> INDEX <INDEX NO> TRANSPORTING <FIELD1> <FIELD2>
Syntax2: MODIFY <ITAB> FROM <WA> TRANSPORTING <FIELD1> <FIELD2> WHERE <CONDITION>
DELETE: This statement is used to delete single or multiple records from an internal table from
work area based on some condition.
Syntax1: DELETE <ITAB> INDEX <INDEX NO>.
Syntax2: DELETE <ITAB> WHERE <FIELD1> = <FIELD1 VALUE>
<FIELD2> = <FIELD2 VALUE>.
Collect: It also used like an APPEND statement. Collect statement will remove the duplication
while adding the records. This statement is used to compare character/string fields data &
summarizes the numeric field data. It is used to display sub-totals.
Syntax: COLLECT <gs_source> INTO <gs_collect>.
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
2 GB.
Clear: It clears the contents of the work area & internal table with header line ITAB [ ] & variables.
Refresh: It clears the contents of the internal table only.
Free: It clears the contents of internal table along with allocated memory.
SELECTION-SCREEN: - This statement is used to format the selection screen. The default
screen number for the selection screen is 1000.
Some of the useful Additions: -
......BEGIN OF BLOCK....WITH FRAME: - It is used to define the selection screen blocks
with frames.
.... WITH FRAME TITLE: - An addition TITLE with the selection screen FRAMES is used
to define the TITLES for the selection screen Frames.
.... SKIP: - It is used to keep the blank lines in the selection screen.
.... ULINE: - To display horizontal lines in the selection screen.
.... BEGIN OF LINE: - It is used to define the input fields, radio buttons, push buttons,
check boxes etc. in the same line.
…PUSH BUTTON: It is used to define the push buttons in the selection screen.
…LINE: It is used to define the Input fields, Radio buttons, Check boxes, Push buttons
etc. in the same line.
28) Explain Some Additions to Report statement?
Ans: 1. No standard page heading: This addition is used to hide the page heading in the output.
2. Line size: This addition is used to specify the width of a list in the output. The default width
of basic list is 255 characters.
3. Line count: This addition is used to specify the length of the output list in a page.
4. Message ID: This addition is used to specify the message class(SE91).
Operator
Contains Any (CA)
Contains Not Any (NA)
Contains Only (CO)
Contains Not Only (CN)
Contains Pattern(CP)
Contains No Pattern(NP)
Contains String (CS)
Contains No String(NS)
CA: This condition becomes true when the source string contains any one of the character in
the target string.
NA: This condition becomes true in case of string comparison operator CA is false.
CO: This condition becomes true, when the source string contains only the similar string in the
Operator Description
STRLEN Returns the no of chars/length of the string
CONCATENATE To combine the multiple strings into single target string
REPLACE To replace with one string to another target string
FIND Find the string in the source String
SPLIT Separate the source string into diff strings
CONDENSE It compresses the string without any gaps
33) Explain about the System Fields with which you have worked?
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 of
the selection screen. The T-code SE63 is used to translate the text elements.
Variants: - They are used to save the input data for further execution in the selection screen. They
can also be used to avoid the data entry errors & schedule a program in the background.
SY-INDEX: SY-INDEX is a system variable which acts as a loop iteration counter, it stores
loop iteration number. When you use DO ENDDO / WHILE for looping, there is no table
involved. So, you use SY-INDEX.
Ex: DO 10 times. **SY-INDEX stores number of iterations of loop ENDDO.
SY-TABIX: SY-TABIX is a system variable which stores the index current processing record
of an internal table. So, when you are looping over an internal table, you use SY-TABIX.
LOOP AT ITAB INTO WA. **SY-TABIX stores index number of internal table record
ENDLOOP.
Ans: After some research, I found a way of getting back the program.
1) Create a program with the same name as earlier (which is deleted) and save it (you will be
prompted to create a new transport)
2) In the ABAP Editor, Click on "Utilities" --> "Versions" --> "Version Management"
3) Select the most recent version (obviously not today’s) and Click on the ‘Retrieve’ button.
4) Press the ‘Back’ button – you will see now that all your code has been restored
5) Press ‘Save’ and Activate.
37) One of my users has access to SE38 transaction, and so he can run the program developed by
you. You have attached this report/transactional program to a particular Z* transaction. To restrict
the users to execute this program, what you do it from programming side?
Ans: Check for Authorization Object S_TCODE with value “Z—-” in initialization event.
(Code: Authority-check object ‘S_TCODE’ id ‘TCD’ field ‘ZBC_REQ’.)
2.External Subroutine: These are defined in one program & called in another program
Actual Parameters: The parameters which can be called while calling the
subroutines (with PERFORM statement).
Formal Parameters: The parameters which can be passed while defining the
subroutine (with FORM statement).
The no of actual parameters should be similar to the no of formal parameters.
The sub-routines definitions should not be nested (form within the form) but the
sub-routine can be called within the sub-routine.
The statements between 2 sub-routines definitions cannot be accessed
o Macros: These are used for the complex write statements & for long calculations.
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. The macro definitions cannot be debugged at run time. The standard
table TRMAC pooled table is used to maintain macros.
o Function Modules: These are global modularization objects. The function modules
can be called anywhere in the same system & in another system also. The function
modules are defined in function builder.
The T-code SE37 is used to work with the function modules & SE80 is used to work
with the function group. The function modules should be assigned to a function group
& Function group is the collection of function modules.
The standard table ‘TFDIR’ is used to find FMs since it contains the entire
Function module in the system.
Normal Function Module: These are defined & called in the same system to
reuse the central source code.
Remote Function Module: These are defined in one system & can be called
another system.
Update Function Module: This is used for SAP LUW (Logic Unit of Work).
These function modules are triggered in case of implicit or explicit COMMIT
work is encountered. Commit Work is used to make changes in data base
permanently.
o Message class: This tool is used to maintain the Messages in the message pool.
They are used to give messages for instructing the users.
The standard T-Code SE91 is used to work with the message pool.
Different types of messages are Error, Success, Warning, Information, Abort, Exit.
Syntax: MESSAGE ‘<MSG Text>’ type ‘E/I/W/S’.
o 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 reuse them in the program.
The T-code SE63 is used to translate the different types of text elements.
4) What are the different parameters in Function Modules and Explain about them?
Ans: Following are the different types of Parameters in Function Modules
Attributes:
It contains technical properties of a function module such are type of function module,
function group.
Import parameters:
They are imported from the calling program to the function module.
Export parameters:
These are used to export the data from the function module to the calling programs.
Changing parameters:
These are imported from the calling program, changed them in the function modules &
exported/returned to the calling program. (Import -> Change -> Export)
Tables:
These can be used to import & export only for internal tables.
Exceptions:
They are used to raise/handle the messages in the function module based on return code
(SY-SUBRC).
Source code: It is used to write central ABAP source code.
Ans: In FM attribute, select the Remote Enabled Radio Button, to convert FM to RFC.
Debugger
Debugger
Break Points: - These are Statement based. They are used to stop the program in the
debugger tool for checking line by line or block by block.
Break points are of 4 types. We can place up to 30 break points in the program.
1. Session Break Point: An icon set/delete breakpoint icon or click on statement line at
gray color vertical selection in the source code.
2. Static Break Point: The ABAP statement BREAK-POINT/BREAK <user_name> is used
to set the Static break point. The ABAP statement BREAK-POINT should not be used
since all the users are stopped.
3. Dynamic Break Point: They are used to check the program in case of not possible to
find a location. The command /H is used to set dynamic break points. The program is
stopped at the first statement line of the performed action.
4. External Break Point: They are used to check the cross-application components such
as RFC, BAPI from one system to another. An icon set or delete external breakpoints
is used to set or delete external breakpoints.
Watch Points: - These are Condition based. They are used to stop the program once the set
condition is reached. The Watch points can be set inside the debugger tool. We can place up
to 9 watch points in the program. We can reduce debugging time using watch points.
Single Step F5: The function key F5 is used to check Line by Line of the program.
Execute F6: The function key F6 is used to check Block by Block of the program.
Return F7: The function key F7 is used to Return from the source code of the process blocks such
as sub-routines, function modules, methods etc.
Continue F8: The function key F8 is used to jump from one break point into the next break point
then execute once the last break point is reached.
Ans: The Background jobs can be debugging using the command ‘JDBG’.
Create a text file with the required statements & save it on Local PC/Desktop.
[FUNCTION]
COMMAND = ‘/H’
Title = ‘Debugger’
Type = ‘System Command’
Minimize the SAP Pop-up window screen to appear both Text file & Pop-up window screen.
Drag & drop the saved text file into Pop-up window screen.
Note: The system gives the success message as Debugging Switched ON.
Perform the required action to stop the corresponding program (Yes button).
Ans: There are 2 types of execution mode to execute a program or the transaction codes.
1. Foreground: It is used to execute the programs or the transaction codes directly by pressing
execute icon or F8 function key. It requires user interaction.
2. Background: This execution mode is used to execute the programs or the transaction codes
periodically such as Hourly, Daily, Weekly, Monthly etc. in background. It doesn’t
require any user interaction. The variants must be created before the programs are
scheduled in background.
6) We go in debugging but Am in 5th line of debugging and I want to go again in 4th line of it then
how to do that?
Ans: Once you enter in the debugging screen put the cursor on particular line from menu
debugging selects go to statement.
Reports Events
EVENTS
1) What are the Selection-Screen events, explain?
AT SELECTION-SCREEN -> This event is triggered after providing Input to the selection
screen.
AT SELECTION-SCREEN OUTPUT ->This event is triggered while performing any action in
the selection screen. It is used to modify (format) the selection screen.
AT SELECTION-SCREEN ON -> This event is triggered after input values provided in the
selection screen based. It is used to validate/check the input data of the selection screen.
AT SELECTION-SCREEN ON VALUE REQUEST FOR -> This event is triggered when the user
clicks on F4 button. The standard function module F4IF_INT_TABLE_VALUE_REQUEST can
be used to display the possible entries as search help.
The function module DYNP_VALUES _READ is used to capture the selection field values
in the same selection screen for Dynamic search help
AT SELECTION-SCREEN ON HELP-REQUEST FOR -> This event is triggered when the user
clicks on F1 button. The standard function module ‘HELP_OBJECT_SHOW’ can be used to
provide the Help document to the input variable. The T-code SE61/SO72 is used to maintain
the Help documentation as per the specification.
2) 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.
2, 3, 7, 56, 133
A: STOP
Ans :- The following statements are used to come out of the loops and continue with the next
loop statements.
EXIT: - This statement is used to come out of the loop statement and continue with the
next statement line outside of the loop statements in the program. If this statement is
used outside of the Loop statement; the program will be stopped & display the output.
STOP: - This statement is used to stop the Loop process along with the next part of the
loop statement. It doesn’t make any difference inside & outside of the Loops.
CONTINUE: - This statement is used to stop the current loop process and continue with
the next loop process.
CHECK: - This statement is used to check the specified conditions and continue with the
next loop process.
CHECK = CONDITION + CONTINUE.
8) Standard structure SCREEN?
-> This structure is filled with all the properties of all Input fields in the selection screen.
-> It behaves like an ITAB since it holds each selection filed properties at a time.
Field Description
NAME Name of the selection field
GROUP Modification group names which are specified as addition ‘MODIFID’
REQUIRED Make Input/output fields mandatory
1 -> Mandatory, 0 -> Optional
INPUT Make Input fields as Editable/Non-editable mode
1 -> Input for editable mode
2 -> Display mode
ACTIVE To make selection screen fields Appear/Hide
1 -> Appear, 2 -> Hide
OUTPUT
LOOP AT SCREEN.
IF SCREEN-NAME = ‘<S_FIELD-HIGH>’.
SCREEN-ACTIVE = ‘<1/0>’.
MODIFY SCREEN.
ENDIF.
ENDFORM.
LOAD-OF-PROGRAM: This event triggers at the time of loading the program into a memory
for execution and this is the first event in execution sequence. We didn’t write in program
level.
INITIALIZATION: This event is triggered before the selection screen is displayed. It is used to
clear & refresh the data variables and used to pass the default values to the selection fields.
AT SELECTION-SCREEN: This event is triggered after providing the input in the selection
screen.
START-OF-SELECTION: It is the default event & mandatory to execute any executable
program. It is used to fetch the data from the DB. If no event is used in the executable
program, the entire program will be triggered under Start-Of-Selection. Whenever you are
going to use any one of the event before select statement we must use start_of_selection
event.
END-OF-SELECTION: This event is triggered after Start-Of-Selection event is processed. It is
used to specify the data process statements.
TOP-OF-PAGE: This event is triggered with the first ULINE/WRITE/SKIP/NEW PAGE
statement in START_OF-SELECTION event in the program. It is used to display the column
headings.
END-OF-PAGE: This event is triggered at the end of each page. It is used to display the
footer details of a page such as totals etc. The report addition
LINE-COUNT must be specified to trigger this event.
10) Which is the default event?
Ans:-The default event is START-OF-SELECTION .If no event is used in the executable program, the
entire program will be triggered Start-Of-Selection. The main program begins with this event.
11). Is it possible to display previous drill down list from current one?
Ex: If suppose am in 10th drill down list. Is it possible to display 5th drill down list from current list?
I have 1 basic list and 15 secondary lists in interactive report. If i am in 9th list, how can i
come directly to the basic list?
System variable SY-LSIND stores the list number, by using this we can go to basic list.
12) In interactive report if user 19 times double clicked, again he wants to main screen. How can do
this?
13) If I double click on any sales order no it should take me to the transaction how?
CASE SY-UCOMM.
WHEN 'SONo'.
Ans :- Following are the EVENTS associated with the Interactive Reports .
AT LINE-SELECTION: This event is triggered whenever the user clicks on any record of any
list line. It is used to provide the detailed list based on the current list. The system field SY-
LSIND holds the Index of the next drill down list.
AT USER-COMMAND: This event is triggered whenever user clicks on any custom buttons of
the GUI. This event is used to provide the additional functionality based on the selected push
button.
TOP-OF-PAGE DURING LINE-SELECTION: This event is triggered with the first
WRITE/ULINE/SKIP of the drill down list. It is used to provide the column headings for the
drill down lists/secondary lists.
AT PF: This event is triggered whenever the user clicks on any function key. This event is
used to provide the additional functionality based on the selected menu item.
SET PF-STATUS: This event is triggered at the time of attaching our own GUI to the list. It is
used to call the menu status.
Up to 35 Push buttons can be created on the Application tool bar.
15) What are differences between Classical & Interactive reports?
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 &
the total no of lists are 21 (first list is called basic list with list number 0 and remaining
lists are called as secondary lists with list numbers 1,2,3,4...to...20).
16) Which techniques used to identify the record which was clicked by the user in the previous list?
Ans: HIDE & GET-CURSOR
HIDE: This statement is used to hide the selected field value which can be passed to the
corresponding drill down list to filter the unwanted records. It is used to capture the selected
field values to the next drill down list. Hide statement provides Single drill down list.
GET-CURSOR: This statement is used to capture the selected field values & field names based
on the cursor position. This statement provides drill multiple down lists.
17) What are the System Fields associated with Interactive Reports?
18) 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 ends 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).
19) What is the difference between ATNEW and ONCHANGE OF?
AT NEW ON CHANGE OF
1. They must be used within the loop 1. It can be used within the loop statement &
statements. outside of the loop statements also
2. It considers preceding fields also 2. It doesn't consider preceding fields
3. It can’t be used on more than one field 3. It can be used on the multiple fields using
using the SET operator ‘OR’ the SET operator ‘OR’
4. The work area is impacted by replacing
with Asterisk (*******) marks 4. It doesn’t impact the Work Area
The conversion routines are the function modules used to convert the data from internal
format to an external format & external format to internal format.
The conversion routines are maintained at the Domain level of a field.
21) What is the difference between AT New and On Change of inside a loop? I want inside a loop
difference not basic difference??
If any changes in MATNR occurs at new event triggers. at this case right side fields of MATNR
appears like this. Right side character fields appear like **** & numeric field become null in work
area.
Here any change in any field on change of event triggers. Here we can see all fields in work area.
22) What are the differences between SELECT SINGLE and UPTO 1 ROWS?
SELECT SINGLE UPTO 1 ROWS
1. It extracts single record from the data base 1. It extracts all the records into a buffer and
table based on the condition you specified moves the first record in to an application
in the where clause. program
2. It doesn’t require END SELECT statement 2. It requires END SELECT
3. Use this one, in case of all key fields can be
3. Use this one, in case of not possible to use all
considered. To read exact record from the key fields. We can read appropriate record
database table we need to provide all key from database table; we may not need to
fields. provide all key fields.
4. It is slower because it is a construct to read 4. It is faster because you are not using all the
database records with primary key. In the primary key fields.
23) What are the differences between Normal Reports and ALV Reports?
Ans :- By passing the field name EDIT = ‘X’ to the SLIS_T_FIELDCAT_ALV (with Header Line).
WA_FIELDCAT- EDIT = ‘X’.
25) What is Field Catalog?
Ans: Field catalog is an internal table which is used to pass a list of fields to display in ALV report.
We can set different properties to fields which are going to display in ALV.
TOP_OF_PAGE: It is an event which is triggered at the top of each page. This event is used
to display the list headings & Logos.
PF_STATUS_SET: This event is triggered at the time of attaching our own GUI to the
program. This event is used to call the menu status for adding menu items & push buttons.
USER_COMMAND: This event is triggered whenever user clicks on any record of any list as
well as clicks on any menu item. This event is used to provide an interactive functionality
based on the selected record/push button/ menu item in ALV reports.
END_OF_LIST: It is used to display the Footer details in ALV reports.
27) What are the Function Modules associated with ALV Reports?
28) What are the ways to populate Field Catalog and which one do you prefer?
Ans:- There are two ways to populate the FILED CATALOG .
Populate Field Catalog Internal table with the required field values.
Pass the populated Field Catalog Internal table to an export parameter of ALV
display function module.
29) What are the different ways to populate events in ALV report?
1. Manual Population:
Populate an internal table of the type ‘slis_t_event’ with the required events & corresponding
dynamic sub-routine.
Define the dynamic sub-routine of an event with the required functionality.
Pass the populated events internal table to Export, Import parameters of an ALV display
function module ‘it_event’.
It is not advisable since it extracts all the events & loop is required.
The dynamic sub-routine for each event can be populated with in the loop of event internal
table.
Pass the populate event internal table to an export parameter.
3. The call back export parameter can also be used to specify the dynamic sub-routine name of ALV
events in ALV display function module.
30) Is it possible to develop the ALV reports without populating or using any FIELD CATALOG?
Ans :- Yes, We can develop.
Use an ALV event ‘TOP_OF_PAGE’ with the corresponding dynamic subroutine name
into an internal table
Populate the required header data into an internal table of the type (slis_t_list_header)
in between the definition of dynamic subroutine.
Use the ALV Function module ‘REUSE_ALV_COMMENTARY_WRITE’ to display the
Populated header and Logos.
32) How to provide custom Function (Push) Button along with System generated Functions in ALV?
(Or) How to add push buttons to ALV?
(Or) Steps to work with PF STATUS SET in ALV?
Copy the system provided generic functions/push buttons from the standard program
‘SAPLSALV’ & the status: STANDARD into custom program & menu status using SE41.
Add additional customer specific ‘push buttons’ to the copied menu status.
Use an ALV event ‘PF_STATUS_SET’ & call the copied menu status with in the dynamic sub
routine of PF_STATUS_SET.
Call the copied menu status using the ABAP statement ‘SET_PF_STATUS’.
An interactive functionality can be provided with in the dynamic sub-routine of an ALV Event
USER_COMMAND.
Provide the interactive functionality such as to display another ALV drill down report/call
another program when the push buttons are selected.
The function code for the double click in ALV reports is ‘&IC1’ and in Interactive classical
report in ‘PICK’.
34) How to provide search help on Layout Variants?
36) What are steps to display each row in different colors in ALV report?
Add 4 Character field to the final internal table from which the data should be displayed.
Populate color code dynamically.
Pass color code field name to the field ‘info_fieldname’ of the layout.
ENDIF.
ENDLOOP.
38) Explain about some of the useful types with which you have worked in SLIS Type Group.
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
Ans :- Yes.
* List of PARAMETERS
Provide program name and variant name, execute, it will ask for a TR.
You cannot transport variants of a local ($tmp) program (program saved in local object).
Go to SE38, provide your program name, and select variant and display.
Go to utilities -> transport request, provide variant name and execute, it will ask for TR.
Module Pool Programming/Screen Painter
Ans: They are used to maintain different attributes/settings of a screen elements such are function
3) 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 modules of the Flow Logic in screens. The T-code
SE38/SE80 is used to develop & create the M.P.P.
It can have 4 Include programs such are *TOP, *F01, *I01, *O01.
4) 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 to declare global data declarations which can be accessed
across the screens.
b) F01 Include: It is used to define the FORMS (Subroutines) which can be used in
module definitions.
c) O01 Include: It is used to define the PBO (Process Before Output) modules.
d) I01 Include: It is used to define the PAI (Process After Input) modules.
The module pool name & screen program name must be similar.
5) What are the events associated with Screen Painter?
This event is triggered after the Input values are provided to the screen.
This event is used to validate the input data on the screens.
It can also be used to process the screen data based on the performed action
(pressed push button menu item etc.)
3. PROCESS ON HELP-REQUEST (POH):
This the function event is triggered when key F1 or help icon (?) is pressed.
This event is used to provide the help documentation on the screen fields.
The T-code: SE61/SO72 is used to maintain help documentation.
The standard function module ‘HELP_OBJECT_SHOW’ is used to display the maintain
help documentation.
This event is triggered in case of in case of function key F4 or search help icon is
pressed.
This event is used to populate & display the custom search help on screen input
fields.
The standard function module “F4IF_INT_TABLE_VALUE_REQUEST” is used to
display the populated internal table data as search help.
Ans: - a) Use an event Process After Input to 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.
The statement CHAIN…. ENDCHAIN is sued to make all the screen input fields enables to
enter input data.
The screen validations without CHAIN…. ENDCHAIN statements make the screen input fields
grayed out (display mode).
10) How to make screen field as mandatory in Screen painter?
Ans: - In screen painter double click the screen field
Go to ATTRIBUTES -> PROGRAM
There Select input as REQUIRED
Required: To make the screen input fields as mandatory.
11) How to make the Screen fields invisible based on certain conditions dynamically and which
Event should be used?
Ans: The event AT SELECTION SCREEN OUTPUT is used to format the selection screen
dynamically by setting a loop to screen table (field Active can be used to Hide/Appear the
screens).
12) What are the steps to work with Table Control?
It is used to maintain multiple entries in tabular format. Multiple rows are processed using
Loop with control.
Define or declare tab strip control in Module Pool program.
Define or create Table control on screen by filling all necessary fields.
Make necessary code changes in flow logic & write process logic in MPP.
13) What are the steps to work with Tab Strip Control?
It is a set of pages & used to place different sub screens of application on single screen.
Each tab page contains title & its page area.
Create tab strip control with title on Main screen.
Assign sub screen area to the corresponding tab.
Make the necessary code changes in flow logic.
Write processing logic in Module Pool Program.
14) Module screen flow statements?
Ans: This statement is used in flow logic to call the define process module pool programs.
Syntax: [FIELD<screen-field>] MODULE<module-name>.
Additions:
I. ….AT EXIT-COMMAND: This command is used to trigger the dialogue module in case of
push button or menu item with the function type ‘E’ exit is pressed.
II. …AT CURSOR-SELECTION: This addition is used to trigger the corresponding module when
the cursor is placed on the input field of a screen. It can also be used to trigger
corresponding module in case of a push button or menu item with f-type ‘S’ (system) or CS
(cursor selection) is pressed.
III. CHAIN…ENDCHAIN: This statement is used in flow logic to define the process chains. It can
be used to make all the screen input fields enables to enter input data.
SAP SCRIPTS
1) What are the Components of SAP Script (Form Painter/Layout set)?
Ans: SAP Script form contains 2 parts.
1. Form painter (Layout Set) 2. Print Program
1. Header: It is used to maintain the Administrative & basic settings data.
a. Administrative data:
It contains the technical details such are Package name, Changed by, Created by etc.
b. Basic data:
It is used to maintain the default settings which can be applied across the forms.
The Basic settings are page format, orientation, font size etc.
The first page & the default paragraph names must be specified once they are created.
2. Pages:
They are the rectangular format of the documents.
This element is used to maintain the next page, print mode, page counter mode etc.
3. Windows:
They are the small components on the pages.
We can place the same window in any no of pages.
The windows are not positioned on the pages unless they are assigned to the pages.
4. Page window:
They are used to position the window on the pages.
Different position attributes Left margin, upper margin, Window width, Height are
maintained. It is used to place the window on the page with co-ordinates.
5. Paragraph format:
They are used to print/format the entire paragraph with a required format & style.
a. Standard Attributes: It is used to maintain the standard attributes such are alignment,
line spacing, left margin, right margin etc.
b. Font Attributes: They are used to maintain the font setting such are font family, font
size, bold, italic etc.
6. Character format:
They are used to print/format the particular text/string with the required font & style.
They can also be used to select the Bar codes.
a. Standard Attributes: It is used to select barcode, super script, sub scripts etc.
b. Font Attributes: They are used to maintain the font type, font size, bold, italic etc.
The Driver program is used to extract the data from the database tables or views,
process the extracted data & pass the processed data to SAP Script form to
display/print on the document.
Ans: Windows: - They are used to define the different types of windows.
Main Window: It is the default widow. It is used to display the continuous text on the pages.
Without main window we can’t design SAP scripts. The system generates the pages
dynamically for main window. 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 to print/display the same contents on all the pages.
Variable Window: It is used to print the data based on the window size. It can be formatted
for each page to print/display the different contents. Without a variable window also, we can
design the SAP script.
Graphic Window: It is used to print/display the graphics/logos on the page.
3) What are the different types of Symbols in Scripts?
Ans: - The Symbols are the constants which can be inserted in the page windows to display/print
the corresponding contents/data. Symbols are of 3 Types.
1. System Symbols: They are used to display the system data such as date, time etc …
Ex: &DATE&, &DAY&, &MONTH&
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
The system provided standard structure SAPSCRIPT contains some of the SAP Script
system fields.
Note: Number of pages like “1 of 10” can be displayed using the system symbols PAGE &
FORM PAGE as below.
2. Standard Symbols: They are the predefined symbols. The pooled table TTDTG is used to
maintain the standard symbols.
3. Application Symbols: These are used to display/print the processed data from the print
program or database. Ex: &WA_T001-BUKRS&
Tag Meaning
* Default paragraph format
= Extended Line
/: Command Line
/* Comment Line
/E Text Element -> Display multiple entries of an internal table
P Paragraph format
/= Line feed & Extended line
1. OPEN_FORM: (*)
This function module is used to provide the link between the print program &
SAP script form.
The global data variables of the print program can be accessed in SAP Script form
after this function module is called to open a form/used.
2. START_FORM:
This function module is used to specify the starting page from where the document to be
printed or displayed.
3. WRITE_FORM: (*)
This function module is used to pass the multiple entries of an internal table into the SAP
Script form to print/display the multiple entries or line items through the Text Elements.
4. END_FORM:
This function module is used to close the Opened Form & send the Spool Request/Print to
the device.
It can also be used to get the SAP Script form data into OTF (Other Text) format.
Note: The standard function module ‘CONVERT_OTF’ or ‘CONVERT_OTF_2_PDF’ can be used to
convert the SAP Script OTF Data into PDF format.
The standard function module SO_NEW_DOCUMENT_ATT_SEND_API1 is used to
send an Email with the required attachments in different formats.
6. CONTROL_FORM:
This function module is used to control the form by creating the pages or
windows dynamically.
Note: An icon Transport (Lorry icon) or in the menu path, Graphic -> Transport is used to generate
transport request to release LOGO’s form one system to another system.
to print the continuous text. If no page is having enough space it simply breaks the text &
printing in different pages.
Syntax: /: PROTECT
/E ELE
/: ENDPROTECT
5. Define: This command is used to define/declare the symbols in SAP Script.
Syntax: /: Define &GV_SYMBOL&
6. Box: This command is used to draw the Boxes/Frames on the page windows.
Syntax: /: BOX XPOS <**> cm/mm YPOS <yy> cm/mm
/: WIDTH <ww> cm/mm HEIGHT <yy> cm/mm
/: FRAME <FF> TW INTENSITY <yy> TW
Note: An addition INTENSITY is used to gray out the boxes.
The command position & size can also be used to define the box position & sizes.
7. Top…End Top: This command is used to display/print the contents at the Top portion/Header
of the specified window.
Syntax: /: TOP
/* Display/Print at Top of page window.
/: ENDTOP
8. Bottom…End bottom: This command is used to display/print the contents at the Bottom or
Footer portion of specified window.
Syntax: /: BOTTOM
/* Display/Print at Bottom of page window.
/: ENDBOTTOM
9. New-Page: This command is used to generate the next pages.
Syntax: /: NEW-PAGE.
10. New-Window: This command is used to generate the new windows.
Syntax: /: NEW-WINDOW.
The path SE71 ---> from menu bar select Utilities --->Activate debugger, then go to SE38
execute the print program, it automatically goes to debugging mode.
By executing Standard Program/ Report 'RSTXDBUG' in SE38. A message will show that
debugger is activated. Now open the print program in SE38 and execute, you will notice
that the print program is automatically diverted to debugging mode.
8) Differentiate between Page1 & Page2 format in sap script?
Ans: Page1 format: In this all pages have the same format.
Page2 format: In this there is variation in page format i.e. first page has different format than
second page.
9) 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 form without making any changes in the print program.
T-
Code Description
NACE To maintain Output types
SE71 Form painter
SE72 Form Style
SE73 To Maintain different types of forms & Barcodes
SE78 Graphics or LOGO
Translations to translate the text symbols & text elements
SE63 in different languages
SO10 Standard texts
Bar codes can
The T-code SLXT is used to generate Transport Request for Translations
33) Standard reports associated with SAP scripts?
RSTXDBUG Activate/Deactivate form debugger
RSTXLDMC To upload Graphics/Logo
RSTXSCRP Download/Upload the Forms, Styles & Standard Text
RSTXPDFT4 To convert the spool job of the SAP script into PDF format
RSTXFCPY Copy the SAP script from one client to other
RSTXTRAN To create Transport Request for standard text
RSTRANSP to transport a variant of an ABAP report to production in SAP
36) In scripts we have standard layouts like MEDRUK, in SMARTFORM do we have any? If I copy the
37) Whenever you copied standard script you have to change the configuration in NACE then it will
work?
SELECT with BYPASSING BUFFER in SAP ABAP programming language, bypassing buffer in SAP
Select statements.
Whenever we use open SQL statements to get fetch data in SAP, it will get data from buffer area
(depends on table buffer settings) for better performance, but in real world scenarios some tables
may updated very frequently(milliseconds), we may need to bypass buffer to get real-time data, in
that case we will bypass buffer using 'BYPASSING BUFFER' keyword.
The below example is used to fetch data from MARA (Material Master) table bypassing buffer.
START-OF-SELECTION.
SELECT matnr
mtart FROM mara
INTO TABLE it_mara
BYPASSING BUFFER.
SMARTFORMS
1) What are the major differences between Scripts and Smart Forms?
SAP Script SMART FORMS
1. They are Client dependent. 1. They are Client Independent.
2. The Background Images are not 2. Background Images are possible
possible.
3. It is not possible to create SAP Script 3. It Can be created without Main Window also.
without Main Window.
4. Multiple page Formats are not possible. 4. Multiple page Formats are possible.
5. It cannot be executed without 5. It can be executed without Driver Program by
Print/Driver Program. executing the system generated Function Modules
6. Color fonts cannot be displayed. 6. Color fonts can be maintained.
7. The data extract logic (ABAP CODE) 7. The data extract logic (ABAP CODE) can be written
can't be written. under INITIALIZATION and program lines node.
8. The Tables & Templates are not possible 8. The Tables & Templates can be drawn to display
but the Command box is used to draw static or dynamic data.
the boxes.
9. By using RSTXDBUG standard program 9. By using BREAK-POINT keyword we can debug
we can debug the SAP script. the smart form.
2) Why the Scripts are Client dependent and Smart Forms are Client independent?
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 using
the text elements. The text elements are client dependent hence the scripts are Client
dependent.
SMART FORMS are client independent that means if we design the Smart forms 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 Transaction Codes associated with Smart Forms?
Ans :- 1. SMARTFORMS - To maintain SMARTFORMS.
2. SMARTSTYLES - To maintain the styles for smart forms.
3. SMARTFORM_TRACE - To debug the SMARTFORMS and activate the database tracer.
Text module is used to maintain the long texts.
4) How to display Address window dynamically?
Ans :- The Path %PAGE ---> CREATE ---> ADDRESS ---> Type DETERMINE DYNAMICALLY
1. Global Settings: It is used to maintain the global settings, definitions which can be applied
across the mart forms. It is collection of Form Attributes, Form Interface & Global Definition
I. Form Attributes: These are used to maintain the smart form attributes & output such
are page format, style name etc. The default style for smart form is ‘SYSTEM’.
II. Form Interface: These are used to declare the variables, work areas & internal tables
which are needed to transfer the data from print program to layout. It is the system
generated function module with all the parameters except changing parameters.
III. Global Definitions: It is used to maintain the global definitions which can be used across
the different Global definitions.
a) Global Data: It is used to maintain the global data definitions such are variables, work
areas, Internal Tables etc.
b) Types: It is used to define the types which can be referred to declare internal tables &
work areas.
c) Field Symbols: It is used to define the field symbols.
d) Initialization: It is processed before the smart form pages & windows are processed. It
is used to extract all the required data from the database table &
process the extracted data. Import & Export parameters must be
specified before they are used.
e) Form routines: It is used to define the subroutines which can be called across the
smart form. It is used to define the currency/quantity fields as like the
DDIC tables/structures.
f) Currency/Quantity Field: It is used to define the Currency/Quantity Fields as like the
DDIC tables/structures.
2. Pages & Windows: It is used to design the different page formats & windows. Following
are the different nodes in smart forms.
a) Windows: They are positioned on the pages. Following are different type of 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.
Secondary window: It is used to print the different contents on each page (similar to
variable window in SAP Scripts).
Copies window: It is used to the print the same document with multiple copies with
different headings.
Final window: This is used to print the total amount after all the lines or line items
are printed.
b) Graphics: It is used to create a graphic node (window) to display the graphics/logos.
c) Address: It is used to define the address node/window to display/print the
organization address/personal address/work place address.
The address can be determined dynamically also using an option Determine
Dynamically.
d) Text: It is used to display/print the contents of the different symbols/fields.
e) Table: A table is used to print the multiple entries/dynamic data of an internal table.
The Table node can be used as template to display static record by un-checking the
checkbox internal table. Line types can be created under Table node.
f) Template: A Template is used to display the static data (single record). This node
does not have the separate header, main area & footer whereas, the table node
contains the different sessions such are header, main area & footer. The template
node can be used as table by defining it under loop node to display the dynamic data
as like the table node.
g) Flow logic: The flow logic nodes are used to control the nodes & define the program
lines in smart forms. Following are the different flow logic nodes.
I. Loop: It is used to process the corresponding nodes based on the number of
entries of an internal table.
II. Program lines: It is used to write ABAP source code. Input & Output
parameters must be filled with the data variables before they are used.
III. Alternative: It is used to control the corresponding nodes based on the
specified condition. It is used to process the alternative either True/False
process blocks based on the SET conditions.
IV. Command: This node is used to go to a new page based on the specified
conditions. This is used to break the page based on the condition.
8) What are the differences between Template and Table?
A Table is used to print the multiple entries/dynamic data of an internal table. The Table
node can be used as template to display static record by un-checking the checkbox
internal table. Line types can be created under Table node.
A Template is used to display the static data (single record). This node does not have the
separate header, main area & footer whereas, the table node contains the different
sessions such are header, main area & footer. The template node can be used as table
by defining it under loop node to display the dynamic data as like the table node.
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.
The system generated internal table %TEXT contains the following fields which are filled
with the text node contents at Run time to debug text elements.
Field name Description
TDFORMAT Tag column of the text elements
TDLINE Contents of the text element/text node
12) 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.
14) Can you move a Smart form from one SAP system to another without using transports?
Ans: Yes, this can be achieved using the Upload/Download feature for Smart forms.
One can download the Smart form from one system and save it as an XML file.
Once that is done, the XML file can be used to upload the Smart form in another system.
16) What are the System Fields associated with Smart Forms?
Ans :- SFSY is the system provided structure which contains a smart form system fields.
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 T-code 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.
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.
17) What is the role of TNAPR table in SAP?
Ans: It Stores all the forms and driver programs and as well as all NACE settings.
19) How to find print program and form if an ‘output type’ is given?
Ans :- The T-code NACE/ NACO or the standard table TNAPR is used to find the form details or
output type details in the system.
The standard program TNAPR can also be used to find the form & print program name.
Execute the T-code NACE.
Select an appropriate required application (EF -> Purchase Order).
Click on Output Types button on tool bar.
Click on position button.
Enter the required Output type: NEU & Press Enter button.
Select the found Output type (NEU).
Double click ON processing routines folder.
Click on display/change icon.
Change processing routine details such are print program, form routine, form name etc.
Click on save & click on create request icon.
Enter short description as per the project standards.
Click on save icon & click on Yes button.
21) What are the steps to send a FORM/REPORT as PDF/XLS/.TXT attachment through an E-Mail?
Ans:
Pass flag ‘X’ to field ‘GETOTF’ of export parameter control_parameters.
Get the form data in OTF format using the system generated function module of the SMART
FORM.
Note: Use the standard function module ‘CLOSE_FORM’ to get SAP Script form data in OTF
format.
Convert the OTF data of the forms into a PDF format using the function module
CONVERT_OTF.
Populate the mail subject, mail body, receivers list etc.
Use the standard function module ‘SO_NEW_DOCUMENT_ATT_SEND_API1’ to send an
email with an attachment such as PDF or Excel etc.
5) What are the Function Modules to provide Search Help on Presentation server/local PC and
Application Server as well?
Ans:-
The Function module ‘F4_FILENAME’ is used to provide the search help to select the
required file path of the presentation server/Local PC.
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.
DATA MIGRATION/CONVERSION
1) What are the tools available for data migration in SAP?
Ans: BDC, LSMW, CATT (Computer Aided Test Tool), IDOC (IDOC generally used to migrate data
from the sap system.
->LSMW is basically for standard SAP application while BDC basically for customized application.
3) 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.
An icon export is used to download the recording into Local PC.
An option read from file is used to generate a program using the given recording file.
ABAP source code can be written by pressing Edit icon that appears beside field name.
4) What are the steps for LSMW?
Ans: There are totally 14 steps in LSMW.
LSMW BDC
1. It is the system provided tool. 1. It is the Utility to develop a program.
2. Doesn’t require any programming
knowledge. 2. It requires programming knowledge.
3. The data can be imported in different import
methods such are Batch Input Recording, 3. The data is processed or migrated in Batch
BAPI and IDOC. Input Method only
4. The Field mapping is done automatically by 4. The Field mapping should be done manually by
the System. passing the Flat data.
5. The T-Code SM35 is used to develop BDC
5. The T-Code LSMW is used. program
6. Mostly used for both Huge & small amount
(Master) of data. 6. BDC can be used for Small amount of data only.
7. LSMW is possible only for Standard 7. BDC is possible for either standard/custom
T-Codes T-Codes
SHDB: It is the T-code used to record the screen flow as the T-codes.
Session is intermediate step between internal table & database table. Unless session is processed,
the data is not transferred to the database table.
Data along with the action is stored in session i.e. data for screen fields, to which screen it is
passed, program name behind it, and how next screen is processed.
Wherever there is an issue, system will ask you to correct that error and only after you input the
correct data, system will proceed to next data.
If you run in background all errors will be stored and it keeps on continuing till end of the last
record. Once it is completed, you can check how many records are incorrect by selecting the
Analysis tab. You have to correct your records accordingly.
12) What are the Function Modules associated with BDC Session Method?
Ans :- The System provided Functional Modules are
13) What are the problems in processing batch input sessions? How is batch input process
different
from processing online?
Ans: 1) If the user forgets to opt for keep session then the session will be automatically removed
from the session queue (log remains). However, if session is processed we may delete it
manually.
2) If session processing fails, data will not be transferred to SAP database table.
By setting breakpoints in the Display Read Program/ Display Conversion Program which are
automatically generated by SAP.
1. In order to set the breakpoints, first we have to enable the check boxes of Display Read Program/
Display Conversion Program in the ‘User Menu’ of LSMW Screen where we execute the steps (Initial
Screen).
3. A Report will be displayed, set the break points at the required places.
5. As soon as you execute the Read Data Step you will enter the debugging mode.
If you are facing the problem in Converted Data then you can set the Breakpoints in ‘Display
Conversion Program’ after that execute the ‘Convert Data’ Step, you will enter the debugger.
Select the objects you intend to transport. You can select which recordings; sub-projects you want
to transport by clicking on node area or by selecting "select/deselect" option.
Save.
Field Description
TCODE BDC Transaction code
DYNAME Screen program name
**DYNUMB Screen number
**MSGTYP Message Type (E/W/I/S….)
**
MSGSPRA Message language.
MSGID Message ID
MSGNR Message Number
Field Description
PROGRAM BDC Module pool
DYNPRO BDC Screen number
DYNBEGIN BDC Screen Start
FNAM field Name of the screen
FVAL BDC Field Value(flat file)
18) If BDC is developed in Development system with no data, where do we do the recording?
Ans: We can do the recording in QA system that has data and export the recording from QA system
19) Which method do you prefer to migrate the data if the method is not mentioned?
Ans: - CALL TRANSACTION. Since it has less error handling facility & fast compared to session.
20) You are given functional specs for a BDC program and you need to decide whether to write a
Ex: If data is less than 10,000 records, I will use call transaction.
If data is more than 5000 records I prefer session method.
21) Can we use call transaction and session method in the same program? Explain?
Ans: Yes, we can call, call transaction and session method in same program, generally we use call
transaction for updating and session method for logging errors in the same program.
RSBDCSUB.
28) After running a BDC program in background, next day morning when you see the results, few
records are not updated (error records). What will you do then?
Ans: We will look into incorrect session, analyze the error screen, and reprocess the session after
29) While running BDC call transaction method for user defined table, all the records are saved
except the last record. What’s the problem? Can anybody clarify me?
Ans: First analyze the transaction by using SM35 and find the error and reprocess the same from
where the error has occurred.
Using SM35 you can proceed batch session, if updating is successfully done then status showing
green tick. if any error over there then it’s showing red tick.
Here <T-CODE> is the required transaction code through which the flat file data to be
migrated.
<gt_bdcdata> is an internal table of type “BDCDATA” structure
<A/N/E> are different data process modes
A = All screens (Foreground)
N = No screens (Background)
E = Error screens (Only error screens will be displayed)
<S/A> are the different update modes
Synchronous: In this mode, the data is not continuously updated in case of error records, Once the
update is finished, then it continues to process the next record.
Asynchronous: It is used to update the data continuously by skipping the error records.
32) What are the differences between Session Method and Call Transaction Method?
Read the 2nd internal table (Item table) within the loop of the Base/Main 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 SET
INDEX (lv_index).
Use an ‘EXIT’ statement to come out of this 2nd loop for the unmatched records.
SORT: zemployee_basic, zemployee_salary.
LOOP AT zemployee_basic INTO wa_employee_basic.
*Process Header Data
READ TABLE zemployee_salary INTO wa_temp WITH KEY
employee_id = wa_employee_basic-employee_id BINARY SEARCH.
IF SY-SUBRC = 0.
lv_index = SY-TABIX.
LOOP AT zemployee_salary INTO wa_employee_salary FROM lv_index.
IF wa_employee_basic-employee_id <> wa_employee_salary-employee_id.
EXIT. “Comes out of Loop
ENDIF.
*Process Item Data
Write: wa_employee_basic-employee_id, wa_employee_salary-month, wa_employee-salary-amount.
ENDLOOP.
ENDIF.
ENDLOOP.
Get the message details such are message type, message number into an internal table
(gt_bdcmsgcoll) of the type BDCMSGCOLL using an addition “…. MESSAGES INTO” with
CALL TRANSACTION statement.
Set a loop into an internal table (gt_bdcmsgcoll) of the type “BDCMSGCOLL.
Use any of the function modules “FORMAT_MESSAGE to get the corresponding message
text, since the structure “BDCMSGCOLL” does not have any message text field.
Display the populated messages with message text either list or ALV.
Note: The standard table ‘T100’ can also be used to populate the message text.
Press Page Down in the table control to record the function code for page down.
The next item no is the 1st item no when the Page Down is pressed.
Record the Screen flow with line items using the T-Code “SHDB”.
Convert the recording into a program using the button program.
Make the changes in the original main program like,
Upload the flat file data which contains both Header & Item data.
Split the uploaded Flat file data into the Header and Item tables, using
the Control Break Statements.
Set a loop to Header internal table then process the Header related data by copy & paste
the system generated header related sub-routines from the temporary recording program
Set a loop to Item table data to process the multiple line items.
Make the Item number as dynamic by concatenating the screen field name with the
screen number.'
Use the function code “P+” to handle page down in table control.
Use any one of methods with BDC_INSERT(Session) or CALL TRANSACTION to migrate
the data from internal table GT_BDCDATA.
Note: The Header & Item data can be processed separately using the control break statements
without splitting the flat file data.
The control break statements can also be used to process Header & Item data separately by
avoiding nested loops.
ENHANCEMENTS
Enhancements
1) What are Enhancements and what are the different techniques and explain them?
Ans: Enhancements are used to add some additional customer specific functionality to the
standard applications/programs.
Customer Exits: These are the Function Modules available in most of the functional areas
such as SD, MM, FICO etc. They are used to add the additional functionalities in the standard
applications/programs without using access key to break them. The access key is the unique
key provided by the BASIS consultant to break the standard applications. The application
will become custom development once they are broken.
Field Exits: These are used to change the field labels of the standard data elements.
Function Exits: These are used to add the additional functionality to the standard programs
without breaking them. Each Function Exit contain a custom include program which starts
with Z* to implement the customer specific additional business logic. The Function Exit is
the 3-digit no which is called using the ABAP statement CALL CUSTOMER_FUNCTION.
Menu Exits: These are used to add the custom specific menu items & corresponding
additional functionality based on the selected menu item.
Screen Exits: These are used to add the additional screen elements & the corresponding
additional functionality to the standard screens/transaction.
T-Code SMOD: It is used to find the customer exits of the standard package.
T-code CMOD: It is used to assign an enhancement/exit to project.
User Exits: These are the Sub-routines which start with USEREXIT_* & these are defined in
the standard Include programs. They are mostly used in SD functional area. The Access key
is required to break the standard Include programs of the User Exits for the first time. The T-
code SPRO is used to find the User Exits.
BTE (Business Transaction Events): These are the Source code plug-ins to add an additional
functionality in the standard program.
T-code BERE: It is used to find the BTE’s.
T-code FIBF: It is used to work with BTE’s.
Enhancement Framework: The enhancement framework is advanced to user exits for adding
an additional functionality without breaking the standard programs. It is used to attach/hook
the source code plug-ins such as enhancement section or enhancement points in the
standard programs.
In User-exits we write code only in the form routines (i.e. in Form...End Form). and
When we go for upgrade the versions, we again need to change the code in the user-exit
which we written in previous versions but with Enhancement Framework there is not much
code change is required when we go for upgrades.
BADI: These are new enhancement technique to add the additional customer specific
business logic to the standard programs.
4) What are the differences between Customer Exits and User Exits?
5) What are the types & sub types of BADIs and explain about them?
Ans: It is used to add the additional customer specific business logic to the standard programs.
1. Classic/Old BADI: These are mostly used in the functional areas like SD, MM, FI/CO. The
standard method “GET_INSTANCE” of the standard class “CL_EXIT_HANDLER” is used to
work with 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 generate a New BADI object & sets the BADI
reference to the objects in the BADI reference variables.
CALL BADI: This statement is used to call the Methods of the New BADI’s.
Subtypes:
a. Single use BADI: The single use BADI can’t be implemented for multiple times. This BADI
can have only one implementation.
b. Multiple use BADI: The multiple use BADI’s can be implemented for the multiple times.
c. Filter Dependent BADI: It is used to control the BADI implementation based on the
specified filter value. The system generates an Import parameter ‘FLT_VAL’ to pass the
filter values for controlling the business logic of the BADI implementation.
Interface: It is a separate structure which can be used to extend the scope of a
class.
Exits BADIs
1. They are procedural ABAP based, so it takes 1. They are Object Oriented ABAP based, so it
some extra time to enhance the program. takes very less time to enhance the existing
functionality.
2. It is not possible to assign an Exit to more 2. The multiple use BADI can be implemented
than one project for multiple times
3. The Filter values can’t be set to the Exits 3. The Filter values can be set for Filter
Dependent BADI’s
4. The T-codes SMOD & CMOD are used 4. The T-codes SE18 & SE19 are used
COMMIT Work: This statement is used to make changes in database permanently & complete
current SAP LUW.
ROLLBACK WORK: This statement is used to terminate current SAP LUW without making
changes in databases.
10) What are the differences between Classic (Old) BADI and Kernel (New) BADI?
Ans :-
Classic or Old BADI Kernel or New 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 because by using 3. It is faster because by using GET_BADI key
cl_exithandler~get_instance we will instantiate word we will instantiate the object for the BADI
Ans: If a BADI doesn’t have any active implementations, the program goes to run time error.
The Fall back classes are used to call the default methods in case of a BADI doesn’t have
any active Implementations.
The exceptions can also be raised to avoid such kind of errors.
12) What are the Enhancement Spots?
The enhancement spots are used to manage explicit enhancement options that means you
can add your code in standard ABAP code without need of access key, which implies that
the standard code is not disturbed.
Enhancement spots specify the places where we can add our code in standard SAP.
Each enhancement spot element definition must be assigned to at least one enhancement
spot.
Enhancement spots carry information about the positions at which enhancement options
were created. One enhancement spot can manage several enhancement options of a
Repository object. Conversely, several enhancement spots can be assigned to one
enhancement option.
13) What are the steps to insert the Enhancement Spot and work?
Implicit enhancement Spots are available in every program on some predefined spots as a
begin of FM, end of FM, begin of some event and so on. It means that you can easily modify
any program, FM, subroutine with some limitations.
1. Synchronous RFC: In case of this RFC both the Sender/Source and Receiver/Target
systems should be available while distributing the data. The next part of calling program isn’t
continued until call function is completed. The calling program continues the execution only
2. Asynchronous RFC: In case of this RFC both the Sender/Source and Receiver/Target
systems should not be available while distributing the data. The next part of calling program
is continued without completing call function. The calling program continues the execution
without waiting for return from the called function.
3. Transactional RFC (TRFC): It is almost similar to Asynchronous RFC. The Transactional
RFC is executed only once in an RFC server & save the corresponding data under unique
transaction ID in the Database.
4. Queued RFC: In case of this RFC the multiple transactional RFC’s are serialized in the
sequence using the Function module ‘TRFC_SET_QUEUE_NAME’.
An additional statement ‘Destination’ is used while calling Remote Enabled Functions.
Ans:
SE38 -> Utilities -> Settings -> ABAP Editor -> Debugging activate the external debugging
and choose the New Debugger option in ABAP debugger.
Go to the particular place in the code and put break point, pop will appear then choose the
HTTP break point.
If you are triggering the RFC from SAP portal make sure that both the user ID should be
same If the users are different then provide the XI/Portal User ID in the user’s field.
4) How do you connect to the remote server if you are working from the office for the client in
remote place?
Ans: WAS web application server or ITS (Internet Transaction Server) are generally used for this
purpose. If you are sitting at your office with a server which is in the system and the other server is
at the clients place you can generate IDOC, intermediate documents which carry the data you want
to transfer or the documents you want to transfer, these IDOC are interpreted by the system at the
receiving end with the message class with which it is bound with. If you want to logon a system
which is very distant, then remote login can be used this depends on the internet speed.
5) What are the steps to work with Remote Enabled Function/maintain RFC connection?
Ans: An additional statement ‘Destination’ is used while calling remote enabled functions.
Note: The check box Current user can be checked to make use of the same User name & password
for the target system
<gv_dest> = ‘R3D’.
<gv_dest> = ‘R3Q’.
<gv_dest> = ‘R3P’.
*Call RFC
RFC BAPI
1. The T-code SE37 can be used to find RFC’s. 1. The T-code BAPI &SE37 can be used to find the
BAPI.
2. There are no standard Remote Enabled 2. Some of the standard BAPI’s can be used to
Functions to migrate the data. migrate the data from Legacy system.
3. RFC doesn’t generate any methods. They 3. BAPI generates the unique method in BOR to
can’t be used in all 3rd party systems such as use in the external system directly. You create
VB, JAVA etc. business objects and those are then registered
in your BOR which can be accessed outside
the SAP system by using some other
applications (Non-SAP) such as VB or JAVA
4. RFC is used to transfer data from one SAP 4. BAPI is used to transfer data from SAP to SAP
system to another SAP system. and SAP to Non-SAP.
5. RFC doesn’t not have any return parameter 5. BAPI have return parameter, it contains
to handle the Errors. Success and Error messages
Standard BAPI’s are GetList (), GetDetail(), GetStatus() , ExistenceCheck() used for Reading Data.
Note: Both RFC & BAPI are Remote Enabled Functions & the T-Code SWO1 – Object Repository is
used to place the BAPI-RFC in BOR (Business Object Repository)
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 type BAPIE1RET2 so that you can capture the ‘RETURN’ parameters from BAPI.
Note:
The Pattern functions can’t be used to call Remote Enabled Functions/BAPI’s in the
Destination/Target system.
The Remote Enabled Functions can be used as Normal Function Module, but Normal
Function Module can’t be used as Remote Enabled Function.
The External break points can be used to debug cross application components such as
RFC, BAPI across the system.
Exceptions are not raised in the 3rd party system. Hence, we have to maintain RETURN
parameters to hold.
13) How to handle error messages in standard BAPI’s?
Ans:
1. Get all the message details into a written table of the type BAPIRET such as Message ID,
Message type, Message variable etc.
2. Use the standard function modules,
MESSAGE_INITIALIZE (Initialize messages),
MESSAGE_STORE (To store messages) &
MESSAGES_SHOW (To display messages in the Dialog box/Model dialog)
5. Errors can be processed in SM35 for 5. BAPI never cause to terminate the program.
session method and in the batch input Whenever an error occurred in the BAPI, it
program for Call Transaction method. returns those errors through Return
parameter. This parameter returns exception
messages or success messages to the
calling program.
6. Background and Foreground processing 6. No such processing options are available in
options are available for BDC. BAPI.
Ans:
These are used to protect/prevent user access to the data & T-codes/Tables.
The authorization objects are maintained by BASIS consultants.
The T-code: SU24 is used to find authorization objects in the system.
The ABAP statement ‘AUTHORITY_CHECK’ or the standard Function Modules
‘AUTHORITY_CHECK*…’ are used to check the authorizations.
ALE stands for Application Link Enabling. It is used to distribute the data between two
different SAP systems/Servers.
EDI stands for Electronic Data Interchange. It is used to distribute the data between SAP &
non-SAP systems/servers.
18) What is an IDOC?
Note:
Custom Segments:
The custom segments are starts with Z*/Y* & they are maintained by technical & functional
consultants
Standard Segment:
Message Types:
These are identifiers of the application data to be distributed between the systems
The T-code WE81 is used to create & WE82 is to assign the message types to the IDOC (Data
carrier)
The standard table EDIDC contains all available message type
Partner Profiles:
These are used to maintain the partner system details with which data to be distributed such
as partner number, Partner type & Message type of outbound parameters.
The T-code WE20 is used to maintain partner profiles
Ports:
These are used to specify the way in which data to be distributed through an IDOC
The system generates one unique port number
The T-code WE21 is used to maintain ports for IDOC process
It is used to define data distribution model to exchange the messages between two logical
systems (SAP – SAP/SAP – Non-SAP)
The T-code BD64 is used to define/maintain customer distribution model
Process codes;
20) What are the Transaction Codes/Reports to send/generate and receive the data to IDOCs?
T-code Description
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
BD87 Reprocess IDOC
32) What are the steps need to setup before creating an IDoc?
Ans: Communication Settings:
34) Requirement: All the student’s data will be created in 800 client and same will be send to 810
client using IDOCS.
Just click enter if you find any information message and add fields as below.
3. Create IDOC type. Go to WE30, provide name as ZSTUDENT and click on create
Provide a segment name (which we have created in step2), maximum and minimum numbers & enter.
5. Assign message type to IDOC type. Go to t-code WE82, click on change and click on new
entries.
Provide message type, IDOC type and release as below.
In a blind way logical system assigned in target system client (in our example 810 client)
Should be in logical system definition in source client.
Step2: Go to SALE.
Expand basic settings -> define logical system.
Check for logical system existence (which we get from 810 client) if it is there, no need to add, if it is
not there add it.
Click on logon and security tab, provide client, user name, password and save.
Click on remote logon to logon to remote client (you will go to 810 client).
Save.
10. Check partner profiles in WE20.
Go to WE20, expand partner type logical system and search for logical system (Get logical
system from t-code SALE ->Basic Settings ->Logical Systems -> assign logical system to client ->
810 (double click and copy logical system)).
If logical system is already available in partner profiles in WE20, we don`t need to create partner
profile again instead we will add message type at out bound parameters level. In my case, logical
system is already available in partner profiles so I will add ZSTUDENT message type to it. To add
message type, select logical system, click on add icon (see below image).
Provide message type, receiver port (which we have created in step9), select transfer IDOC
immediately, basic type and save.
If logical system is not available in partner profile in WE20, select partner type logical system and
click on create.
Provide partner no as T90CLNT810 (Get logical system from t-code SALE ->Basic Settings ->
Logical Systems -> assign logical system to client -> 810 (double click and copy logical system).
Save and add message type at out bound partner level.
Steps to be done in 810 (Target System) clients.
Continue 1 to 7 steps as same as 800 client.
Every inbound IDOC will have process code, every process code is associated with a inbound process
Ex: Function Module or Work Flow Task.
Step1: Go to SE80, select function group, provide a name ZSTUDENT_IDOC, and enter.
Step2: Go to SE37, provide function module name as IDOC_INPUT_MATMAS01, click on copy, provide
function module name as function group and enter.
Step3: Add your own code in function module. Go to Se37, provide name as
ZSAPN_IDOC_INPUT_STUDENT, and click on change. Remove all code and add below code.
FUNCTION ZSAPN_IDOC_INPUT_STUDENT.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(INPUT_METHOD) LIKE BDWFAP_PAR-INPUTMETHD
*" VALUE(MASS_PROCESSING) LIKE BDWFAP_PAR-MASS_PROC
*" VALUE(NO_APPLICATION_LOG) LIKE SY-DATAR OPTIONAL
*" VALUE(MASSSAVEINFOS) LIKE MASSSAVINF STRUCTURE MASSSAVINF
*" OPTIONAL
*" VALUE(KZ_TEST) LIKE MDAT1-KZ_TEST DEFAULT SPACE
*" VALUE(ONLY_MAPPING) LIKE MDAT1-KZ_TEST DEFAULT SPACE
*" EXPORTING
*" VALUE(WORKFLOW_RESULT) LIKE BDWF_PARAM-RESULT
*" VALUE(APPLICATION_VARIABLE) LIKE BDWF_PARAM-APPL_VAR
*" VALUE(IN_UPDATE_TASK) LIKE BDWFAP_PAR-UPDATETASK
*" VALUE(CALL_TRANSACTION_DONE) LIKE BDWFAP_PAR-CALLTRANS
*" TABLES
*" IDOC_CONTRL STRUCTURE EDIDC
*" IDOC_DATA STRUCTURE EDIDD
*" IDOC_STATUS STRUCTURE BDIDOCSTAT
*" RETURN_VARIABLES STRUCTURE BDWFRETVAR
*" SERIALIZATION_INFO STRUCTURE BDI_SER
*" EXCEPTIONS
*" WRONG_FUNCTION_CALLED
*"----------------------------------------------------------------------
SORT IDOC_DATA BY DOCNUM.
SORT IDOC_CONTRL BY DOCNUM.
DATA : T_EDIDD TYPE STANDARD TABLE OF EDIDD, "Data Record
T_EDIDC TYPE STANDARD TABLE OF EDIDC, "Control Record
T_EDIDS TYPE STANDARD TABLE OF BDIDOCSTAT. "Status Record
*----------*Global Work Area Declarations *------------------------*
DATA : W_EDIDC LIKE EDIDC,
W_EDIDD TYPE EDIDD,
W_EDIDS TYPE BDIDOCSTAT.
DATA: W_IDOC_DATA TYPE EDIDD.
DATA : L_INDX TYPE SYTABIX.
DATA: IT_STUDENT TYPE TABLE OF ZSTUDENT.
DATA : WA_STUDENT TYPE ZSTUDENT.
DATA : ERROR_MESSAGE TYPE STRING.
DATA : T_STUDENTS TYPE TABLE OF ZSTUDENTS.
DATA : W_STUDENTS TYPE ZSTUDENTS.
DATA : ERROR_FLG TYPE CHAR1.
* Go through all IDocs
LOOP AT IDOC_CONTRL.
CLEAR W_EDIDC.
W_EDIDC = IDOC_CONTRL.
READ TABLE IDOC_DATA INTO W_IDOC_DATA WITH KEY DOCNUM = IDOC_CONTRL-DOCNUM BINARY SEARCH.
IF SY-SUBRC = 0.
L_INDX = SY-TABIX.
LOOP AT IDOC_DATA FROM L_INDX.
IF IDOC_DATA-DOCNUM = IDOC_CONTRL-DOCNUM.
APPEND IDOC_DATA TO T_EDIDD.
CLEAR IDOC_DATA.
ELSE.
RETURN.
ENDIF.
ENDLOOP.
ELSE.
CONTINUE.
ENDIF.
SORT T_EDIDD.
CLEAR W_EDIDD.
LOOP AT T_EDIDD INTO W_EDIDD.
IF W_EDIDD-SEGNAM = 'ZSTUDENT'.
CLEAR WA_STUDENT.
WA_STUDENT = W_EDIDD-SDATA.
IF WA_STUDENT IS NOT INITIAL.
APPEND WA_STUDENT TO IT_STUDENT.
ENDIF.
CONTINUE.
ENDIF.
ENDLOOP.
IF IT_STUDENT IS NOT INITIAL. "if data is there in segement
LOOP AT IT_STUDENT INTO WA_STUDENT.
MOVE-CORRESPONDING WA_STUDENT TO W_STUDENTS.
MODIFY ZSTUDENTS FROM W_STUDENTS. "update data base table
IF SY-SUBRC <> 0.
ERROR_FLG = 'X'.
ERROR_MESSAGE = 'Error occured in updating ZSTUDENT table'.
ENDIF.
ENDLOOP.
ENDIF.
IF ERROR_FLG = 'X'. "add error status to IDOC
IDOC_STATUS-STATUS = '51'.
IDOC_STATUS-DOCNUM = W_EDIDC-DOCNUM.
IDOC_STATUS-MSGTY = 'E'.
IDOC_STATUS-MSGID = '00'.
IDOC_STATUS-MSGNO = '398'.
IDOC_STATUS-MSGV1 = ERROR_MESSAGE+0(25). "t_return_ecm-message
IDOC_STATUS-MSGV2 = ERROR_MESSAGE+25(25).
IDOC_STATUS-MSGV3 = ERROR_MESSAGE+50(25).
IDOC_STATUS-MSGV4 = ERROR_MESSAGE+75(25).
CLEAR ERROR_MESSAGE.
APPEND IDOC_STATUS TO IDOC_STATUS .
CLEAR IDOC_STATUS .
else. "add success status to IDOC
IDOC_STATUS-STATUS = '53'.
IDOC_STATUS-DOCNUM = W_EDIDC-DOCNUM.
APPEND IDOC_STATUS TO IDOC_STATUS .
CLEAR IDOC_STATUS .
ENDIF.
ENDLOOP.
ENDFUNCTION.
Save.
REPORT ZSEND_STUDENTS.
Go to 810 client and check table ZSTUDENTS for entries (entries should be created).
PROJECT
PROJECT
1) What is System Landscape?
Sandbox system: It is an environment to develop the objects, make the changes & maintain
configurations at initial stages of the projects. All the consultants are authorized for any
transaction code in this system. This system is an optional system.
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. This system contains a single client.
It is also used to release the Transport Request (TR) from one system to another system
(Dev --->Quality ---->Production).
When the change request is created either manually or automatically the system assigns a
number to it automatically and this number is known as change request number. The change
request records all modifications made to development object. When the changes have been
made and the change tasks have been released, the change request can be released
The T-Codes SE01/SE09/SE10 is used to work with this tool (CTS).
Note: The T-code SE03 is used to find TR of objects
This documentation provides you with an overview of how to manage changes with the CTS
and essential information on setting up your system and client landscape and deciding on a
transport strategy. Read and follow this documentation when planning your development
project.
4) What are the differences between SE01, SE09 and SE10?
Ans: SE01 - Correction & Transport Organizer
SE09 - Workbench Organizer
SE10 - Customizing Organizer
5) How to import the Client dependent/Script changes/Table entries into the Unit Test system?
Execute the transaction code SCC1 in the test client (120)
Enter the TR no from which the client dependent changes to be imported.
The source client no (100) is appeared by default
Check the check box Including Request Sub Tasks
Click on Start Immediately button & press Enter button.
6) What are types of Transport Requests (TR) and Explain about them?
Ans: Transport request: - It is a unique request number generated by the system while saving the
object under the package name. The TR’s are generated in development client only & release
them from development client. The TR no is starts with development system id followed by
K- series. Ex: <R3d>k9<****>
The Transport requests of 4 types.
Customizing Requests: These are used to record & release the configuration changes in
the system.
Work bench requests: They are used to record the changes/workbench objects such as
DDIC objects (Tables, Structures, Transaction codes), Programs, Function modules etc &
release them from one system to other.
Transport of Copies: They are created to transport the configurations, developments &
changes from one system into another system.
Relocations: They are used to change the objects from one package to another package.
7) How to generate Transport Request (TR)?
Enter the package name at the time of saving with objects Ex: ZDEV/ZSD/ZMM…
Click on save icon
Click on create request icon
Enter short description as per the project standards Ex: <CR547895 – Sales Report>
Click on save icon & click on yes button
Note:
The objects under the TR must be activated before the transport requests are released.
The tick marks are appeared beside the task numbers once they are released.
Place a cursor on the TR number after all the corresponding tasks are releases.
Note: Follow the similar steps to remove any number of objects from the task/TR.
Place the cursor on the task number after all the corresponding objects are deleted.
Click on delete & click on yes button
Place the cursor on TR after all the corresponding tasks are deleted
Click on delete icon -> click on yes button.
Note:
1. The transport request is moved from the previous owner into new owner list.
2. Change the previous owner in initial screen of transport organizer (SE09) into new username
then release the tasks & transport requests.
3. The system proposes new task number in case of the TR is already created by another user on
same subject.
4. The system proposes new TR to make the changes in the objects in case of the existing TR is
released to Quality system.
5. Multiple TR can be merged using the function Ctrl+F12 by right clicking on corresponding TR.
14) How do you get functional specs when you are assigned some object?
Ans: Generally Functional Specifications will be sending through emails (In support process, they
may come in a specific tool like: Remedy, Radix).
Requirement
Design Summary
Desired Functionality
Finished Product
Test Cases
Functional Specification format/contents may differ from company to company, every company
follow their own formatting style.
16) Who prepares Functional Specifications?
Ans: As per standard Organizational structure, functional consultants will prepare functional
specifications, in some cases Techno-Functional consultants will prepare them (In some
companies Senior-Technical Consultants may prepare).
head or project manager, once approved, it will send to technical lead. The technical lead will
distribute the Functional Specification to any developer.
18) What are the useful Tools in projects?
Ans: The below 3rd party security gateway tools are used to connect into client desktop/SAP system
VPN/Cisco VPN – Virtual Private Network is used to connect into client SAP systems.
Citrix – It is used to connect into client system desktop
19) What are the useful Tools for Ticket Handling?
Remedy
SAP IMS (Incident management System)
Lotus – IBM
SMS - Accenture
Note: The data migration toll ‘Panaya’ is used for migration/up gradation projects
The task/work is assigned through mails (M.S Outlook) by Team Lead/Functional Consultant.
Q) what are the tools used to maintain Documentation?
Ans: SharePoint, Document Explorer, TFS - .Net
20) Roles & responsibilities for Implementation & Support project?
Ans: Implementation Process:
Getting the business Requirement document from functional consultant / functional analyst.
Analyze the functional specification.
Give proper estimations to complete the objects/developments.
Interact with a functional consultant/onsite coordinator for clarifications to get the
requirement finalized.
Prepare Technical Specifications/Technical Designs.
Develop the objects as per the project programming standards.
Perform self-test & prepare UTD (Unit Test Documents).
Perform code reviews/peer check & performance tuning.
Releasing the object to testing environment.
Support Process:
22) 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 * while extracting data since it extracts all fields including unwanted fields &
Use Select followed by the required fields in the similar order of the database tables.
2) Don't use Select - End select loop (Normal search) since it hits the database for each record &
Use INTO table statement (Pointer search) to extract all the required data into an internal table in
single step.
3) The internal Table must be must sorted before using control break statements.
4) The internal Table must be sorted before using binary search addition with READ table statement
23) Client concept: If there are two clients in development server. Ex: Client 200 for development and
Client 300 for configurations, what does it actually mean?
Ans: Even if there are two clients 200 and 300, 200 for development and 300 is for configuration,
you
cannot access 200 client data in 300 client.
Actually, functional people need accurate data to test business configuration (SD/MM/FI etc.), when
it comes to technical people, they may create junk data to test their application (Creating material,
junk master data, junk transaction data etc.), so they maintain one separate client (200) for
development activities and separate client for configurations.
Note: Transport path will be same for two clients (200 - QA) and (300 - QA) i.e.; same QA client.
24) 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.
Customer enquiries about the Products services that were sold by a company.
Company Gives a Quotation for the products and Services to a Customer.
Customer gives a Purchase Order to the company against which a Sales Order will be raised
to customer in SAP.
Delivery -> Picking, Packing, Post Goods & Shipment.
Company sends the material after picking it from Go down & packing it in a Handling unit
(Box) & issue the Goods.
Every bill has invoice...next provide invoice. Company bills to the customer for those
deliverables.
Invoice end of sales flow.
Purchase Requisition: First The customer prepares the purchase requisition with required
goods.
Request for Quotation: As a customer we need to send RFQ to different vendors.
Price Comparison: Once we receive the quotations from different vendors as a customer, we
analysis all the quotations and finally we select one vendor.
Purchase Order: After vendor evaluation as a customer we need to raise the purchase order.
Goods Receipt: Here we receive the goods with goods receipt as a customer we need to
analysis the goods receipt.
Invoice Verification: Once we receive the goods and bills from the vendor as a customer, we
need to verify all the goods. if there is any problem in the goods then the customer informs
to vendor.
Finance: Once we receive the goods with billing customer finance guy will interact with the
vendor finance guy for finance settlements.
27) What are the Phases in SDLC (Software Development Life Cycle)?
1. Waterfall Methodology:
It is also called sequential methodology.
In this methodology phase by phase is performed.
It is not possible to go back previous phase unless the testing is done.
Process starts with the below phases in the same order.
Requirement
Analysis
Design
Implementation
Testing
Installation
Maintenance
2. Agile Methodology:
In case of this methodology the customers can change their requirements without impacting
timelines.
It is more flexible to prioritize requirements.
It is better interactive methodology.
CONCEPTION
INITIATION
ANALYSIS
DESIGN
CONSTRUCTION
29) What are the different methodologies in SAP streamlined projects?
TESTING
Ans: The below methodologies used for SAP streamlined projects such as Implementation & Up
gradation.
DEPLOYMENT
1. ASAP Methodology:
ASAP stands for “Accelerated SAP Methodology”. It is the SAP provided standard methodology to
implement or upgrade SAP projects.
Different phases in SAP methodology are,
i) Project Preparation
ii) Business Blueprints
iii) Realization
iv) Final Preparation
v) Go live & Support
vi) Run
i) Project Preparation: In this phase, the below actives are performed.
Documentation of the current business process.
System landscape
Identify & Recruit resources
ii) Business Blueprints: In this phase, the below actives are performed.
All the Configurations, Customizations, Developments, Enhancements are identified.
The business process documents with the proposed solutions are prepared.
Fit gap analysis is done.
iii) Realization: In this phase, the below actives are performed.
Prepared functional specifications for configurations & developments are separately.
Technical specifications are prepared.
All the configuration & customization work is done.
All developments & enhancements are done.
The different types of testing such as self-testing(UTP), User Acceptance Testing(UAT).
Note: The technical consultants are mostly involved in this phase.
iv) Final Preparation: In this phase, the below actives are performed.
All the final documentation work & test scripts are prepared.
User training on different applications is provided.
Note: Functional consultants will provide the application training to customers & end users.
v) Go live & Support: In this phase, the below actives are performed.
Hand over the implemented business process in SAP.
Release all the configurations, customizations, developments & enhancements.
Provide the limited post-production support.
Run: The implemented business process is shown by running it in the live system.
2. Scrum Agile:
In this methodology the customers or end users are also part of each phase of the project.
The customers may change the requirement while implementing also.
The phases are involved in scrum agile are,
i) Sprint Planning: In this phase the task or work is assigned for 2 weeks or one month based on the
resources availability.
Note: Resources availability will be considered 65% to 70% during sprint planning.
Ex: 9 * 6.5 = 58.5 Hours.
The actual productive hours for team lead & above are considered 50% to 55% of their total
availability.
ii) Daily standup calls:
The standup calls are conducted daily to know the progress on the configurations,
customizations, changes & developments and to know the problems or issues.
The daily standup calls are conducted by “Scrum Master” at onsite or offsite.
iii) Sprint Retrospective: In this phase each resource is asked for their comments.
What went wrong or god?
What are the improvements?
Note: This methodology can be used for both Implementation & Support or Maintenance projects.