Vous êtes sur la page 1sur 147

SAP ABAP interview questions:

DDIC Objects
1. What are the technical properties of a table and explain about them?
Ans:- By specifying technical settings we can control how database tables
are created in the database. The technical settings allows us to - optimize
storage space requirements
There are 7 types of technical properties. They are:
a). Delivery Class: - It is used to control the transport of table data when
installing or upgrading, in a client copy and when transporting between
customer systems.
CLASS A: Application table (Master and Transaction data)
Master data: is data which is frequently read, but rarely updated. Eg.
Customer master, Material master.
Transaction data is data which is frequently updated. Eg. Sales order,
Purchase order.
Logically tables of delivery class A are not transported hence no
CTS is
assigned.
CLASS C: Customizing table.
Customizing data is data which is defined when the system is
initialized and
then rarely changed. E.g. company codes, document types.
In real time we mostly use the delivery class C.

b). Data Browser/ Table view Maintenance


Through this option we can insert data in to the table. There are 3 options:
DISPLAY/MAINTENANCE ALLOWED WITH RESTRICTION: Through this option
we can insert, delete and update data in to the table through TMG.
DISPLAY/ MAINTENANCE ALLOWED: Through this option we can directly
insert the data into the table through Utilities table contents create
entries.
DISPLAY/MAINTENACE NOT ALLOWED: Through this option we can neither
insert the data directly not through TMG. The only way to insert data is
through programs using update, delete etc.
In real time we mostly use Display/Maintenance Allowed option

c). Data class:


The data class defines the physical area of the database (for ORACLE the
TABLESPACE) in which the table is logically stored.
In real time we mostly use APPL0 or APPL1.
APPL0 Master data
APPL1 Transaction data
APPL2 Organizational and customizing data
d). Size Category:- It is used to specify the initial space required for the
table in the database.
In real time we mostly use 0 category. ( 0 7) [0 7100].

e). Buffering:-
What is Buffering?
Buffering a table improves the performance when accessing the data
records contained in the table. The table buffers reside locally on each
application server in the system. This avoids the time consuming process
of accessing the database.

Buffering permission - The buffering permission defines whether the


table may be buffered or not. There are three different types of buffering
permission. They are - 'Buffering not permitted', 'Buffering permitted but
not activated', and 'Buffering activated'.

Buffering type - The buffering type is used to define how we want to


buffer the table and which table records should be loaded into the
application server buffer when a record from the table is retrieved. If the
table may be buffered, you must define a buffering type (full, single-
record, generic). The buffering type defines how many table records are
loaded into the buffer when a table entry is accessed.

Full buffering:- All records of the table are loaded into the buffer when
one record of the table is accessed.
Generic buffering When a record of a table is accessed, all the records
having this record in the generic key fields (part of the table key that is
left-justified, identified by specifying a number of key fields) are loaded
into the buffer.
Single-record buffering:- Only the records of the table that are really
accessed are loaded in to the buffer.

In real time we mostly use the mode Buffering not allowed Table
cant be buffered.

Which tables should be buffered?


Transparent and pooled tables can be buffered. Cluster tables cannot be
buffered.

When tables shouldnt be buffered?


The data read by the application must always be up-to-date. Delays
caused by synchronization mechanism cannot be accepted.
If the table data is frequently modified then it doesnt make sense to
buffer a table.

F). Enhancement Category:- It is used to enhance the particular fields of


the table.
In real time we mostly use Can be enhanced (DEEP).
g). Table Maintenance generator:-
What is table maintenance generator?
The table maintenance generator is used to create table maintenance
program to add, modify or delete records in the database table.

5. Logging - This parameter defines whether changes to the table entries


should be logged. If logging is switched on, each change to a table record
is recorded in a log table.

SAP Table Maintenance Generator (TMG) is a tool, used to create


a table maintenance program, which can be customized, to be used by
the end users to maintain the table for example, user can create a new
entry in the table, can change the existing data, and can delete the data.
To create Table Maintenance Generator (TMG) you can go to SE11 t-code
and then enter the table name and then click on change button. Go to
Utilities -> Table Maintenance Generator.
Alternatively, you can access directly by using transaction code - SE54.
Why we need to use Table Maintenance Generator?
In production systems, the end-users generally won't be having access to
SE11 or SE16 transaction code. So, if they need to maintain this table they
need an alternate way to do so.
The benefit of Table Maintenance Generator is that the restriction can be
put on each field column and also gives end-users to change or modify
mulitple entries at the same time. The table maintenance events allows to
change the generated table maintenance at specified position.

You can go to menu "Environment->Modification" where there is an option


for Screen Maintenance, User Interface, Events, and Source Code. Uisng
an events for example - you an put additional restrictions and warnings, or
you can display message before SAVE, DELETE or CHANGE. There are
several pre-define standard events available by SAP which you can use to
enhance the functionality of your generated table maintenance program.
Available Events

What are the different Maintenance type?


There are two different Maintenance type - One Step and Two Step
method.
one step and two step specifies the screens to be created in the Table
Maintenance Program.
1. One Step Method - Only overview screen is created i.e., the Table
Maintenance Program will have only one screen where you can add,
delete or edit records.
2. Two Step Method - Two screens namely the overview screen and
Single screen are created. The user can see the key fields in the first
screen and can further go on to edit further details.

Important Points to Note

- Table maintenance is required to maintain table Via Transaction code -


SM30 and SM31. It is not used for transaction code SE16 and SE16n.

- Transaction code SE16 and SE16n can be used directly if you have set
"Display/Maintenance Allowed" within 'Delivery and Maintenance' Tab in t-
code SE11.

- If you have set "Display/Maintenance Allowed with Restrictions" or


"Display/Maintenance Not Allowed" then you won't be able to insert or
maintain data through SE16 or SE16n. Nor you will be able to access
through SM30 or SM31. You will get error message in SE16 as "Table
maintenace not allowed for table 'XXXX' ". In SM30 or SM31 you will get
the error message as "View/table 'XXXX' can only be displayed and
maintained with restrictions".

- If you make changes in the table then you will have to re-adjust or to re-
create the Table maintenance Generator.

2. What are the events in TMG?


Validations can be done by table events using SM30. Totally 38 events are
there in TMG.
Before saving the data in the database.
After saving the data in the database.
Before deleting the data display.
After deleting the data display.
Creating a new entry.

3. Comparison of Transparent, Pool and Cluster tables


Transparent Pool Cluster
Contains a single They are used to They are used to
table. Used to hold large hold data from a
store master number of very few of large
data. small tables tables (stores
(stores system data).
customizing data
or system data).
It has 1to 1 It has Many--to It has Many--to1
relationship with 1 relationship relationship with
a table in a with a table in a a table in a
database. database. database.
Has primary key. Primary key of Primary key of all
each table is tables are same.
different.
For each It is stored with Many cluster
transparent table other pooled tables are stored
there is one tables in a single in a single table
associated table table called table known as table
in the database. pool in the cluster in the
database. database.

Secondary Secondary Secondary


indexes can be indexes cannot indexes cannot be
created. be created. created.

USE: They are USE: They reduce USE: They would


used to hold the amount of be used when the
master data e.g. database tables have
Table vendors or resources needed primary key in
table of when many small common and data
customers. tables have to be in these tables
Example of opened at the are all accesses
transaction data same time simultaneously
is orders placed
by customers

In real time we mostly use transparent tables.

4. What is the difference between Open SQL and Native SQL?


Open SQL:- It is a set of statements which can interact with any kind of
database.
INSERT, CLEAR, UPDATE, MODIFY

Native SQL:- It is specific to particular database & it hits the database


directly.
EXEC SQL PERFORMING <form>.
<Native SQL statement>
ENDEXEC.

5. Is it possible to create custom t.code to maintain the table? If yes, how to


create it?
Yes, we can create by using the custom t.code using SE93.

6. What are two methods of modifying SAP standard tables?


Customizing Includes and Appending structures.
Append structures can only be assigned to a single table.
Append structures are created in the customer namespace ( ZZ or YY)
In case of new versions of the standard table during upgrade, the append
structures are automatically appended to the new version of the standard
table.
It can be inserted only at the end of the table.
Append structures are created in transaction SE11. Display the standard
table fields and press the Append structure button.
When you press the button, SAP suggests a name for the new append
structure. After you has accepted the name, a screen will be shown where
you can enter the new fields.
Remember to activate.

2. Customizing Includes
some of the SAP standard tables contains special include statements
called Customizing includes. In contrast to Append structures,
Note that customizing includes are created by SAP, but the customer
supply the fields for the include.
Customizing includes begin with CI_ and is part of the customer
namespace
One Customizing include can be inserted into more than one table.
It can be inserted at any position in the table.
You can find Customizing includes in SE11 under structures.
Try to take a look at table RKPF which uses the Customizing include
CI_COBL (In an IDES system). Next try to add a field to CI_COBL, and
activate it. If you go back to table RKPF you will see that your new field
has been added.
7. How to identify the standard tables? (indications)
1. The table which does not start with Z or Y.
2. The tables which cant be seen in change mode.

8. How to see the relationship between the tables?


1. Using SQVI t.code
2. With foreign key relationship

9. How do I create index on a database table?


Goto SE11, open your database table. Choose the menu goto indexes to
create index. Give the index name and choose the fields of the table.

10. How many types of indexes are there and explain about them?
Indexes are used to avoid the duplicate data while accessing the table.
Indexes can also be used for better performance while extracting the data
from the tables.
There are two types of indexes:-
Primary Index:- it is generated by the system using the key fields of the
table. Key fields hold the unique data. Automatically created when table is
created.

Secondary index:- we create secondary index for a database table


when we access the database records using fields that are not in
the primary key. it contains non-key fields of the table. Maximum 9
indexes are created on a table. It can be created on both custom and
standard tables.

11. What is where-used list?


It is used to list out all the dependent objects & know the usage of the
particular object.

12. Can we add/Enhance additional customer specific fixed values to


standard domain?
Yes, the standard domains can be enhanced to add, additional customer
specific fixed values & intervals using the menu path: Goto Fixed value
append at domain level.

13. Difference between VALUE table and Check table?


The check table is a dependent table to which the relationship is
maintained using foreign keys. The contents of check table are shown in
the input help for the referenced field.

The value table is a table attached to the field at domain level, where the
entry to the field can be only from the value table. They are not used in
input help.

For eg:- go to domain of SHKZG Debit/Credit indicator. Here allowed


values are H or S. This is a kind of master check. To be maintained as a
customization object. This means if we want to enter to this table we need
to create development request and transport it.
If we try to enter some other value for this field the system forces us to
enter either H or S.

14. What is the difference between Database tables and views?


The table has physical storage of data whereas views do not have physical
storage of data.

The view is derived from one or more tables which is created only with the
required fields from the database table(s). View contains the data at
runtime only.

15. Different types of view?


Database view:- this is inner join view of one or more tables.
Maintenance view:- Helps in creating maintaining data of the application
object. The data can be distributed among several tables.
Help view:- this is used for search help
Projection view:- Just retrieves some fields from a single table.

16. Can I use all views in ABAP program?


No. We can use only projection view and database view in our programs.

17. What is search help, types and explain about them?


It is used to provide all the possible entries to the input variables as
search help.

1. Elementary search help:- it is created by using one base table.


2. Collective search help:- it is the collection of elementary search helps.

Search help exit:- it is a function module to filter possible entries of a


search help. It is used to modify the F4 values at run time.

18. Difference between F4/F1 help?


F4 Possible values for field
F1 Help about the field

19. Is it possible to create table / structure without creating any data


element and domains?
Yes, we can create.

What are the lock objects and explain about different lock modes?
They are used to control the parallel access for the same data by multiple
users. It avoids the concurrency access of multiple users on the same
data.
The custom lock object name should start with E followed by table name.
It generates two function module ENQUEUE and DEQUEUE.

ENQUEUE:- Request for lock


DEQUEUE:- To release the lock
Types of Locks:
1. Write/Exclusive: The locked data can be accessed by single user only.
All other lock requests are rejected.
2. Read/Shared: If no user tries to edit the data, multiple users can access
the data.
3. Exclusive but not cumulative.

SM12 is used to list out the locked objects and to delete the locked
objects.

20. What is the difference between table and structure?


Table Structure
Table contains data Structure does not contain the
data. It is filled with single record
at runtime.
Has primary key No primary key

21. Explain about Data element and Domain.


Data Element:- Data Element give the description of the field when
displaying on the screen or parameter ID.
Parameter IDs are maintained at Data element level under further
characteristics tab.
Domain specifies the technical attributes of the field such as the data
type, length and the value range.
It can be used to maintain Value table to provide search help on field.
Conversion Routines are maintained at Domain level.

22. What is a conversion exit?

Conversion exit is a function module, which is used to convert a value


from external format to SAP internal format and from internal format to
external format.

If a screen field refers to a domain with a conversion routine, or is directly


assigned a conversion routine in its attributes, the system automatically
executes the function module ..._INPUT for every input in the relevant
screen field and the function module ..._OUTPUT when the values are
displayed in this screen field and uses the converted content in each case.

Conversion routines are identified by a five-place name and are stored as


a group of two function modules. The function modules have a fixed
naming convention. The following function modules are assigned to
conversion routine xxxxx:

CONVERSION_EXIT_xxxxx_INPUT
CONVERSION_EXIT_xxxxx_OUTPUT
The INPUT module converts from display format to internal format, and
the OUTPUT module converts from internal format to display format.
23. How to find conversion exit?

Go to a table, field for which you want to find the conversion exit.

Double click on data element and double click on 'Domain'.

You can see the conversion exit at domain level ex: MATN1 for MARA-
MATNR field.

Double click on conversion exit, you will find two function modules.

CONVERSION_EXIT_MATN1_INPUT
CONVERSION_EXIT_MATN1_OUTPUT

CONVERSION_EXIT_MATN1_INPUT is used to convert the external value


into internal value.

CONVERSION_EXIT_MATN1_OUTPUT is used to convert the internal


value into external value.

24. How to adjust table/view?


Using SE14.

25. What is Database utility (SE14)?


The database utility is a tool to provide the interface between the ABAP
Dictionary and the underlying database management system (DBMS).

Uses:
a) Convert Data (I.e. change field lengths and data types etc)
b) Activate Objects
c) Create/Delete/Change of tables and indexes
Approach:
Go to Transaction SE14
The Initial screen of database utility is displayed. Enter Name of either
table/view/Match code/Pool/Cluster tables
I given table name as ZDATA_UTL
Choose Edit button or Enter Key.
Next screen will be displayed as below.

26. I have a Z-table, I want to add one or more fields to the table
without disturbing the previous data, what should I do?
While adjusting database table in SE14, select Save Data Radiobutoon.
Important

Question 1: What is the difference between User Exit and


Function Exit?

User Exit Customer Exit


User exit is implemented in the form of A customer exit can be
a Subroutine i.e. PERFORM xxx. implemented as:
Example: INCLUDE MVF5AFZZ Function exit
PERFORM Screen Exit
userexit_save_document_prepare. Menu Exit
Field Exit
Example: CALL Customer function
xxx
INCLUDE xxx.
You modify this include.
In case of a PERFORM, you have You have access only to the
access to almost all the data. So you importing, exporting, changing and
have better control, but more risk of tables parameter of the Function
making the system unstable. Module. So you have limited access
to data.
User exit is considered a modification A customer exit is considered an
and not an enhancement. enhancement.
You need Access Key for User Exit. You do not need access key.
Changes are lost in case of an Changes are upgrade compatible.
upgrade.
User exit is the earliest form of change Customer exits came later and they
option offered by SAP. overcome the shortcomings of User
Exit.
No such thing is required here. To activate a function exit, you need
to create a project in SMOD and
activate the project.

What is the difference between RFC and BAPI?


BAPI RFC
Just as Google offers RFC is nothing but a remote enabled
Image/Chart/Map APIs OR Facebook function module. So if there is a
offers APIs for Comment/Like, SAP Function Module in SAP system 1 on
offers APIs in the form of BAPIs. BAPI server X , it can be called from a SAP
is a library of function modules system 2 residing on server Y.
released by SAP to the public so that
they can interface with SAP.
There is a Business Object Associated No Business Object is associated with
with a BAPI. So a BAPI has an a RFC.
Interface, Key Field, Attributes,
Methods, and Events.
Outside world (JAVA, VB, .Net or any NonSAP world cannot connect to
Non SAP system) can connect to SAP SAP using RFC.
using a BAPI.
Error or Success messages are RFC does not have a return table.
returned in a RETURN table.

Question 3:What is the difference between SAPSCRIPT and


SMARTFORM?
SAPSCRIPT SMARTFORM
SAPSCRIPT is client dependent. SMARTFORM is client independent.
SAPSCRIPT does not generate any SMARTFORM generates a Function
Function module. Module when activated.
Main Window is must. You can create a SMARTFORM without
a Main Window.
SAPSCRIPT can be converted to SMARTFORMS cannot be converted to
SMARTFORMS. Use Program SCRIPT.
SF_MIGRATE.
Only one Page format is possible Multiple page formats are possible.
Such thing is not possible in SCRIPT. You can create multiple copies of a
SMARTFORM using the Copies
Window.
PROTECT ENDPROTECT command The Protect Checkbox can be ticked
is used for Page protection. for Page Protection.

The way SMARTFORM is developed and the way in which SCRIPT is


developed is entirely different. Not listing down those here. That would be
too much.

Question 4:What is the difference between Call Transaction


Method and the Session method ?
Session Method Call Transaction
Session method id generally used Call transaction method is when the
when the data volume is huge. data volume is low
Session method is slow as Call Transaction method is relatively
compared to Call transaction. faster than Session method.
SAP Database is updated when you SAP Database is updated during the
process the sessions. You need to execution of the batch input
process the sessions separately via program.
SM35.
Errors are automatically handled Errors should be handled in the
during the processing of the batch batch input program.
input session.
Question 5: What is the difference between BDC and BAPI?

BAPI BDC
BAPI is faster than BDC. BDC is relatively slower than BAPI.
BAPI directly updates database. BDC goes through all the screens as
a normal user would do and hence it
is slower.
No such processing options are Background and Foreground
available in BAPI. processing options are available for
BDC.
BAPI would generally used for small BDCs would be preferred for large
data uploads. volumes of data upload since
background processing option is
available.
For processing errors, the Return Errors can be processed in SM35 for
Parameters for BAPI should be session method and in the batch
used.This parameter returns input program for Call Transaction
exception messages or success method.
messages to the calling program.

Question 6: What is the difference between macro and


subroutine?

Macro Subroutine
Macro can be called only in the Subroutine can be called from other
program it is defined. programs also.
Macro can have maximum 9 Can have any number of parameters.
parameters.
Macro can be called only after its This is not true for Subroutine.
definition.
A macro is defined inside: Subroutine is defined inside:
DEFINE FORM ..
. ..
END-OF-DEFINITION. ENDFORM.
Macro is used when same thing is to Subroutine is used for modularization.
be done in a program a number of
times.

Question 7: What is the difference between SAP memory and


ABAP memory?

SAP Memory ABAP Memory


When you are using the SET/GET When you are using the EXPORT
Parameter ID command, you are IMPORT Statements, you are using
using the SAP Memory. the ABAP Memory.
SAP Memory is User Specific. ABAP Memory is User and
What does this mean?The data Transaction Specific.What does this
stored in SAP memory can be mean? The data stored in ABAP
accesses via any session from a memory can be accessed only in one
terminal. session. If you are creating another
session, you cannot use ABAP
memory.

Important
Question 8: What is the difference between AT SELECTION-
SCREEN and AT SELECTION-SCREEN OUTPUT?
AT SELECTION-SCREEN is the PAI of the selection screen whereas
AT SELECTION-SCREEN OUTPUT is the PBO of the selection screen.

Question 9: What is the difference between SY-INDEX and SY-


TABIX?
Remember it this way TABIX = Table.
So when you are looping over an internal table, you use SY-TABIX.
When you use DO ENDDO / WHILE for looping, there is no table
involved.
So you use SY-INDEX.

For READ statement, SY-INDEX is used.

Question 10: What is the difference between VIEW and a TABLE?A


table physically stores data.
A view does not store any data on its own. It can contain data from
multiple tables and it just accesses/reads data from those tables.

Question 11: What is the difference between Customizing and


Workbench request?A workbench request is client independent whereas
a Customizing request is client dependent.
Changes to development objects such as Reports, Function Modules, Data
Dictionary objects etc. fall under Workbench requests.

Changes in SPRO / IMG that define system behavior fall under customizing
requests.
An example would be defining number ranges in SPRO.

In short, generally a developer would end up creating a Workbench


request and a Functional Consultant would create a Customizing request.
Question 12: What is the difference between PASS BY VALUE and
PASS BY REFERENCE?These concepts are generally used for Function
modules or Subroutines etc. and their meaning can be taken literally.

Say we are passing a variable lv_var:


CALL FUNCTION 'DEMO_FM'
EXPORTING
VAR = lv_var.

When we PASS lv_var by VALUE , the actual value of lv_var is copied into
VAR.
When we PASS lv_var by REFERENCE , the reference or the memory
address of lv_var is passed to the Function module. So VAR and lv_var will
refer to the same memory address and have the same value.

Question 13: What is the difference between Master data and


Transaction data?Master data is data that doesnt change often and is
always needed in the same way by business.
Ex: One time activities like creating Company Codes, Materials, Vendors,
Customers etc.

Transaction data keeps on changing and deals with day to day activities
carried out in business.
Transactions done by or with Customers, Vendors, and Materials etc.
generate Transaction Data. So data related to Sales, Purchases, Deliveries,
Invoices etc. represent transaction data

Some important transactions here for Master Data:


Material: MM01 MM02 MM03
Vendor: XK01 , XK02 , XK03
Customer: Xd01 , XD02 , XD03

Some Important transactions for Transaction data:


Purchase Order: ME21n , ME22n , ME23n
Sales Order: VA01 , VA02 , VA03
Goods Receipt: MIGO
Invoices: MIRO
Important
Question 14: What will you use SELECT SINGLE or SELECT UPTO 1
ROWS ?
What will you use SELECT SINGLE or SELECT UPTO 1 ROWS ?
There is great confusion over this in the SAP arena.
If you Google, you will see lots of results that will say SELECT SINGLE is
faster and efficient than SELECT UPTO 1 ROWS.
But that is 100% incorrect.

SELECT UPTO 1 ROWS is faster than SELECT SINGLE.


If for a WHERE condition, only one record is present in DB, then both are
more or less same.
However, If for a WHERE condition multiple records are present in DB,
SELECT UPTO 1 ROWS will perform better than SELECT SINGLE.
Question 15: What is the difference between .Include Structure and
.Append structure?
I have seen ridiculous answers for this at many places on the Web.
The true answer is this:

Lets say you want to use the Structure X in your table Y.


With .Include X, you can include this structure in multiple tables.
With .Append X, you specify that structure X has been used in table Y
and that this cannot be used in any other table now. So you restrict
structure X only to Table Y.
Important
Question 16: Can you describe the events in ABAP?

LOAD-OF-PROGRAM:
INITIALIZATION: If you want to initialize some values before selection
screen is called
AT SELECTION SCREEN OUTPUT: PBO for Selection Screen
AT SELECTION SCREEN: PAI for Selection Screen
START-OF-SELECTION
END-OF-SELECTION
TOP-OF-PAGE
END-OF-PAGE

AT USER-COMMAND: When user click on say buttons in application


toolbar. SY-UCOMM
AT LINE SELECTION: Double click by user on basic list. SY-LISEL
AT PF##: When User Presses any of the Function Keys
TOP-OF-PAGE DURING LINE SELECTION
Question 17:
What events do you know in Module Pool Programming?
PBO: you know this . If not you should know this . That's basic.
PAI: You know this. If not you should know this . That's basic.
POV: Process on Value request i.e. when you press F4.
POH: Process on help request i.e. when you press F1.
Question 18: Can you show multiple ALVs on a Single Screen?
Yes, there are multiple ways of doing this:
If you are using OOALV, you can create multiple custom containers
(cl_gui_custom_container) & put an ALV control (cl_gui_alv_grid) in
each of those.
You can even use a Splitter container control and place multiple ALVs in
each of
the split container.
If you are using Normal ALV, You can use the following FMS:
1. REUSE_ALV_BLOCK_LIST_INIT
2. REUSE_ALV_BLOCK_LIST_APPEND
3. REUSE_ALV_BLOCK_LIST_DISPLAY
Question 19: A system has two clients 100 and 500 on the same
application server. If you make changes to a SAPSCRIPT on client 100, will
the changes be available in client 500?

No. SAPSCRIPT is client dependent. You will have to transport changes


from client 100 to client 500. However, for SMARTFORMS, Changes will be
made both for client 100 and client 500.
Question 20: There are 1000s of IDOCs in your system and say you no
longer need some of them? How will you get rid of those IDOCs?

One way is to archive the IDOCs using transaction SARA.


But what the interviewer was expecting was How do you change IDoc
Status?
There are different ways of doing this:
A) Use FM IDOC_STATUS_WRITE_TO_DATABASE
B) USE FMs:
EDI_DOCUMENT_OPEN_FOR_PROCESS and
EDI_DOCUMENT_CLOSE_PROCESS

Question 21: What is the difference between CHAIN ENDCHAIN and


FIELD commands in Module Pool?

If you want to validate a single field in Module Pool, you use the FIELD
Command.
On error, this single filed is kept open for input.

If you however want to validate multiple fields, you can use the CHAIN
ENDCHAIN command. You specify multiple fields between CHAIN and
ENDCHAIN.
On error, all fields between CHAIN ENDCHAIN are kept open for input.

Question 22: What are the types of Function Modules? What is an


UPDATE function module?There are three types of Function
Modules: Normal , RFC , UPDATE.
The aim of the Update function module is either to COMMIT all changes to
database at once or to ROLLBACK all the changes. By definition, an update
function module is used to bundle all the updates in your system in one
LUW (logical unit of work).

This FM is called whenever COMMIT WORK statement is encountered in


the calling program and the way you call it is CALL FUNCTION XXX IN
UPDATE TASK.

Have a look at FM EDI_DOCUMENT_CLOSE_PROCESS_UPD and do a where


used.
This FM is used as Update FM in case you make changes to IDoc
contents/status via your program.

Question 23: How is the table sorted when you do not specify field name
and Ascending or Descending? On what criteria will the table be sorted?
Do internal table have keys?

Yes, internal table have keys.


The default key is made up of the non-numeric fields of the table line in
the order in which they occur.

Question 24: Explain what is a foreign key relationship?Explain this


with the help of an example.
Lets discuss about tables EKKO (PO header) and EKPO (PO line item).
Can you have an entry in table EKPO without having an entry in table
EKKO?
In other words can you have PO line items without the PO header?

How does this happen? The answer is foreign key relationship.


So foreign keys come into picture when you define relationship
between two tables.
Foreign keys are defined at field level.
Check the foreign key relation for field EBELN of table EKPO.
The check table is EKKO. This just means that whenever an entry is made
in EKPO, it is checked whether the entered value for EBELN already exists
in EKKO. If not, entry cannot be made to EKPO table.

Question 25 : What is the difference between a value table and a


check table?Check table is maintained when you define foreign key
relationships.
For Check table, read question above.
.
Value table is defined and maintained at a domain level.
At a domain level, you can mention allowed values in the form of:
1) Single values
2) Ranges
3) Value tableFor example, have a look at domain SHKZG. Only allowed
values are S and H for Debit/Credit indicator. Whenever and wherever you
use this domain, the system will force you to use only these two values: S
and H.

Another example is domain MATNR. For this domain the value table is
MARA.
So whenever and wherever, you use this domain the system will force you
to use values for MATNR in table MARA.
Question 26: How do you find BAPI?Approach1:
You can go to Transaction BAPI and then search for your desired object.
Say you want to find a BAPI for creating users in the system, in such case
you can search for the User and find the relevant BAPIs.

Approach2:
Another way is to find a Business Object. Say you want to find a BAPI for
creating Material in SAP and you know the BO for Material is BUS1001006.
You can go to Transaction SWO1 and enter the BO BUS1001006 in the
BOR. Then have a look at the methods for this BO.
Important
Question 27: How do you find BADI?
Approach1:
Go to Class CL_EXITHANDLER in SE24 ---> Put a breakpoint in
methodGET_INSTANCE.Now go and execute your transaction code for
which you want to find BADI.
You will find the BADI in the changing parameter exit_name:
Approach 2:
Go to Tcode SE84 Enhancements BADIs Definitions.
Find the package for the Tcode for which you are finding the BADI.
Enter it as shown and hit execute:

SAP Script
ABAP Scripts Interview Questions

What is sap script and layout set?


Ans - SAPscript is the integrated text management system of the SAP R/3
System. SAPscript is tightly integrated into the SAP System. It is used for
many different word-processing tasks all over the SAP System.

What is layout set?


A layout set in SAPscript is used for page layout. The layout set contains
various elements, which are used for layout control of the individual pages
and also contain layout information for texts which are to be output on the
individual pages.

The layot of a document is defined in a layot set.


A layout set specified the appearance and structure of a document.

Layout sets contain predefined text modules with space reserved for
variable data. You can use these text modules for different application.

Every SAPscript document uses a layout set.

To make changes to your documents, such as moving a piece of text, or


changing fonts, paragraph formats, and tabs, you only need to change the
layout set.

There are two ways of formatting texts using layout sets:


The text is entered and output in standard text maintenance. You can
assign any layout set. Text can also be entered via the layout set a letter
header, for example.
The text is formatted via an ABAP/4 program using a layout set. The
program can either dynamically output individual predefined text
modules, text elements or transfer entire texts, which are to be output in
the layout set.

You can use Styles to define the formatting of the text in your
documents. A style
determines text formatting by setting the paragraph and
character formats used in a
document. You can, for example, use a style to highlight
character strings or whole
paragraphs. You can assign a style to any text. Typically,
however, youll use styles
primarily in the main windows of layout sets, where users type or
enter text directly
in documents.
Header data is found in both style and layout set maintenance.
In style maintenance, it is used primarily to present important information
- designed to make it easier for the end user to select a style. The header
data in layout set maintenance, on the other hand, is used for information
and control purposes.

Windows are defined in layout set maintenance. They represent areas


which are positioned on pages as page windows and in which text is
later output. At least one window must be defined for each layout set. If
not, a text cannot be formatted by SAP script.

The following window types can be used:


MAIN Main window in which continuous text is output. This is the
window used by dialog users of a print program and layout set. For
example the body text of a letter would be entered in MAIN.

VAR Window with variable contents. The text can vary on each page in
which the window is positioned. Variable windows are formatted for each
page.

CONST Window with constant contents which is only formatted once.

A layout set has the following elements:


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

Paragraph formats - Paragraph formats are required in layout sets - as


in styles - in order to format texts. However, they are also used for word
processing in layout sets, for example, to format text elements.

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

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

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

Page windows - Page windows are the combination of windows and


pages, where the dimensions of a window and its position on a page are
specified.

The purpose of SAP script control commands is to allow control of the


output formatting. These commands are not interpreted by the SAPscript
editor, but are passed through to the SAPscript Composer for processing.
The
composer is the program that converts text from the form displayed in the
editor to
the form used for printing.

What is SAPscript and explain its purpose?


SAP Script is the SAP systems own text-proessing system. Youll find that
it looks and feels a lot like other leading text-processing system that you
may use on your personal computer.

Every company needs to output documents with a uniformly defined


layout (eg. Invoices, delivery notes, etc..) all the time.

The basic layout of the document is pre-defined , but in many cases, other
data has to be merged with it, such as address data or purchase order
items. This data might be entered manually by a employee, or retrieved
from a database table.

Large quantities of these documents have to be produced. From printing


is usually a mattter of large print runs of documents such as payslips,
checks, order confirmation, reminders etc.

SAPscript has been developed to meet the above requirements. IT is an


integrated tool for text entry and form printing in R/3 applications.

These documents are normally provided by SAP but every organization


have their unique waqys of these documents so to customize these and
for creating newer ones if required; SAP script is used.

What are components of SAPscript?


Layout set, SAPscript Text, ABAP Print program , symbols, function
modules like open_form, close_From, Read_text etc,.

What are the ABAP/4 Commands that link to a layout set?


Call function OPEN-form.
Call function WRITE-from.
Call function CLOSE-from

Importing Graphics (Logos) into SAPScript


The program RSTXLDMC can be used to upload graphics (file extension .tif
on PC files) into individual standard text.

Other useful programs for SAPScript


RSTXFCON - Converts page format
RSTXSCRP - Upload/Download layout sets
RSTXDBUG - SAPScript debugger

Debug SAPScript
You can debug a SAPScript: Use Tools - Word Processing - Layout Set.
Enter name of layout set and then Utilities - Activate Debugger.
It is of no consequence which layout set you enter when selecting the
SAPscript debugger. (Menu path: Tools-Word-processing - Forms, Utilities -
Activate Debugger) The next layoutset called will invoke the debugger.
This is quite handy when verifying which layoutset is being called
(Verifying customizing settings).
Another way to set the SAPScript debugger is to run program RSTXDBUG.

When a Form is copied from one client to another .And If U try to display
or change the form in the copied client .The possible error message cud
be :
1.Form not found
Try coping again specifing the language .

2.IF IT dispalys an error message saying That the text file is inconsistent .
Then go to SE38 and Run RSTXCHKO .
It will ask for the form name ,then check all the checkboxes and then run
the program.
Note : all Script related problems can be solved using Program RSTX*.

How to take a back up of script layout into Ur hard disk and load
it later
Use Program RSTXSCRP.
Use EXPORT mode, when downloading and IMPORT when uploading a
script. Dont forget to give the form name in the object field. This will
create a script with the same name as that of the original script . If a
script with the same name exists in the same client ,then it will give an
error Object cannot be overwritten .

I want to copy table across clients


Use Program RSCLTCOP

To transfer script files across systems (Not Clients) - RSTXSCRP

To compare the contents of a table across clients: RSTBSERV

To change the development class of any object - RSWBO052

What type of variables normally used in sap script to output data?


&Tables name- fields&.

How do you number pages in sap script layout outputs?


& page &
&next Page &

What takes most time in SAP script programming?


Defining layout set up / sets.
How do you use tab sets in layout sets?
Define paragraph with defined tabs.

How do you backup sap script layout sets? Can you download and
upload? How?
SAP script backup :- In transaction SE71 goto Utilities -> Copy from client
-> Give source form name, source client (000 default), Target form name.
Download :- SE71, type form name -> Display -> Utilities -> form info ->
List -> Save to PC file.
Upload :- Create form with page, window, pagewindow with the help of
downloaded PC file. Text elements for Page windows to be copied from PC
file.

What is Compare Tool in SAP Script ?


SAP Script offers tools for comparing objects across clients. We can
compare or copy the following kinds of objects.
Styles
Layout sets
Documents
With the Compare tool we can do the following :
Check whether an object exists in both clients
Display the differences between the versions of an object
Layout Sets are used to control page layout and text formatting in
documents .
SAP Standard styles and layout sets are always held in Client 000.

In what format does SAP Script store text ?


SAPscript texts are stored in Interchange Text Format (ITF). SAPscript
offers conversion programs for the text file formats Rich Text Format (RTF)
and ASCII as an interface to other word processors.

The various window types in SAP Script are


Main, Variable and Constant.

The New-Page command is used to force a Page break in the text at


any point.

Protect ... Endprotect command pairs can be nested (True / False).


False.

Delimiter & must be used immediately before and after the symbol.

What does the composer do?


The final appearance of your documednt depends on interaction between
the print program and the layout set.

The SAPscript print program initializes the printing process. Every


command entered using the SAPscript programming interfaces is
transferred to the composer.

The composer received layout information from the layout set specified by
the print program. The documents are formatted according to this layout
information.

If the documents contain variables, the compoer replaces these variables


with data from the R/3 system, such as the current date, or with the
userdata selected by the print program.

The print program controls the completion of thelayout set. Once this is
done, the composer places the completed document in the spool.

Where do we define Tab space for data in SAPScript?


When defining the paragraph for the text element we can define the TABS
then. There is parameter called TABS to be defined in paragraph
definition.

what is difference between Window & a Page Window?


Window: An area that is predefined in the layout set. Windows are text
modules, which are positioned on a document page.

We define the window type, Default Paragraph, specify the text elements
or a SAPscript text to be included etc in the Windcow Component.

PageWindow: we define the parameters of the earlier defined Window,


appearance on the document like left or right margins, Width & Height.

What are symboles & state their different types with E.g.
A Symbol is a constant, which can be inserted in a document. It saves the
user unnecessary work when replacing sections of text, phrases, etc.
Each symbol has a name which is encloses by &.

Eg. &variable name &


System symbols eg &Date&, &time& etc.

Standard symbols :Standard symbols are user-defined. They are


maintained centrally in table TTDTG. Eg. &SGDH& for the opening
salutation : dear sir/madam.
&MFG& for the closing salutation :yours Faithfully.

Program Symbols : Program symbols display data from the ABAP/4


program which has called the word processing function Eg. Itab-connid.

Text symbols: You can define a text symbol for any text module. This
symbol is valid only in the text module for which you have defined it. Eg.
Define &Symbol& = value.

How do we define Text symbols?


Using the control command DEFINE &x1& = 56.

State few control commands?.


Protect .. endprotect, define, new-page, include.. if endif.

what is the purpose of Protect and EndProtect?.


You can specify either in the style or in the layout set that a particular
paragraph should not be slit in two by a page beak. If the page protect
attribute is set then the complete paragraph is always output ona single
page. This property applies only to that particular paragraph. SAPScript
provides the PROTECT ENDPROTECT command pair to allow you to
define the areas to be protected against a page beak on an individual
basis. Thus the PROTECT/ENDPROTECT commands may be regarded as a
kind of conditional NEW-PAGE command, the condition being whether or
not the lines enclosed between the two commands fit in the space
remaining in the current main window.

How do we set the date, time format?


SET TIME MASK : CONROLS THE TIME FIELD FORMAT.
SET DATE MASK : CONTRLS THE DATE FIELD FORMAT.

EG. Set Time Mask = HH:MM:SS.

what is the role of an ABAP progrm in SAPScript?


Retrieves R/3 application data from the database.
Defines the layout set processing logic ( The order and repetition of text
elements).
Chooses a layout set for printing.
Selects the output device, such as printer,monitor, or fax.
Sets print attributes such as immediate output, number of copies ,and
pages to beprinted.

How to reuse some components of the script layout to other


program?
Is this script layout is standard for all the printer? If not then y we are
going for script layout?

Give me couple of methods that I will take standard script layout printout
for different printer.

How u will analysis script program? ( which goes to main and how many
windows etc.)

Can V inserted logo on your program?. Give me the program


name which uploads my logo and syntax for logo inserting in sap
script.
Yes u can insert a logo on your script layout.
Use this Report RSTXLDMC which will uploads the logo.
Use the following statement which includes the logo on your script prog.
/: INCLUDE 'ZHEX-MACRO-XXX' OBJECT TEXT ID ST LANGUAGE 'E'.

XXX object name, u will gives @ runtime in rstxldmc program.

Give me syntax for box command.


BOX XPOS 2 MM WIDTH 0 CM HEIGHT '9.5' CM FRAME 10 TW -

1. Can we write the code both call transaction and session


method in single program?
Ans. Yes it is possible to write call transaction and session in one program.
2. Which BDC you prefer?
Ans. If we want to transfer large amount of data and when we need to use
more than one transaction code we prefer session method. For small or
less amount of data and for single transaction use call transaction.
(This is more genric answer but you can add more on to this if you have
worked on BDC)
3. When u prefer LSMW?
Ans. When we need to update medium amount of data we use LSMW.
LSMW is also used when the person like functional consultant has less
programming language.
5. Difference between .include and .append?
Ans.
Include structure allows to add one or more structure into structure or
table.Also placed positioning anywhere. Upto 6 include structure can be
used in a table.
Append structure can be placed only at the end of a structure or table
which also stops further insertion of fields.Only one append structure can
be used
6. Preformance techniques
Ans.
1. The sequence of fields must be same as per database table
2. During writing select query write all fields in sequence as
per database table.
3. Never write select statements inside loop.endloop.
4. Use st05 SQL trace, se30 run time analysis, code inspector, slin,etc.
5. Use select single * statement instead of select *
6. Always use primary key
7. Use binary search but before using binary search sort that table.
7. How to debug sapscripts ?
Ans.
Two ways to debug sapscript . first way is goto SE 71 and from menu bar
select Utilities->activate debugger .then goto SE38 execute the print
program ,it automatically goes to debugging mode ..the other way is ,
run the program RSTXDBUG in se 38 . execute it . a message will show
that debugger is activated .now open the print program in se 38 u vll
notice that the print prgm is automatically diverted to debugging mode.
8. What is partner selection?
Ans. This concept is mainly used in IDOC where u select the partner profile
using Tcode We20 .with Tcode SM59 you create RFC(remote function call)
to create communication link to a remote system.
10. What is occurs in internal table?
Ans. Occurs addition to the Declaration will give initial size to that
table.occur statement allocates 8kb of memory to the internal table.
11. What is page window?
Ans : page window is nothing but a container of a page ,which uniquely
identifies a set of data for example while creating invoice we create
logo window , billing document header window , customer window , terms
and condition window etc
12. What is the difference between scrolling a table horizontally
and vertically..??
Ans: In table control when you scroll a table vertically presentation server
needs to call application server to fetch the next record and display in the
table while in case of horizontal scroll there is no need to call application
server.
13. What are Field Groups?
Ans: A group that combines several fields fewer than one name, at
runtime, the INSERT command is used to define which data fields are
assigned to which field group are called Field Groups. It should always be
a HEADER field group that defines how the extracted data will be sorted;
the fields grouped under the HEADER field group sort the data.
14. List the events in ABAP/4 Language?
Ans: The events in ABAP/4 are load of program ,Initialization, Selection
Screen, Start of Selection, End of Selection, Top of page, Line selection,
User command, End, First.
15.How the values will be passed to RFC Function module
PassbyValue or Passbyreference?
Ans: always Pass by Value.
RFC is Remote Function call so it cant access the values with Pass by
reference.
16. Buffering concept usage?
Ans: There are three type of buffer
1 single record
2 generic buffer
3 full buffer
Buffering is use for improve performance. it improves performance 10 to
100 times more
17. Select up to 1 row and select single difference ?
Ans: Select single fetches first matching record. If more than one
matching records are there then only the first matching record will be
considered other records will not be taken into account. Where as select
up to 1 rows will fetch all the matching records from the database.(Again
it will assign only One Record to the internal table/Work area)
18. What are the different buffering methods?
There are two different buffering methods
The system ensures that data transfer between the R/3 System and the
database system is as efficient as possible. To do this, it uses the following
techniques:
Table buffering: The program accesses data from the buffer of the
application server.
Database request buffering: Individual database entries are not read or
passed to the database until required by an OPEN SQL statement.
19. Different types of locks?
v Read lock (shared lock)
Protects read access to an object. The read lock allows other transactions
read access but not write access to the locked area of the table.
v o Write lock (exclusive lock)
Protects write access to an object. The write lock allows other transactions
neither read nor write access to the locked area of the table.
v o Enhanced write lock (exclusive lock without cumulation)
Works like a write lock except that the enhanced write lock also protects
from further accesses from the same transaction.
20. CHAIN END CHAIN?
Ans: Chain and end chain are used for multiple field validation in Module
pool programming .It is written inside the screen flow logic.
21.How to Debug RFC Function module?
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 users
field.
22.Why sapscripts are client dependent and smartforms are client
independent.?
Ans-: Smartforms create its own function module so it doesnt need to
transport the request through SCC1.As all the Development Object are
stored in client independent tables. Whereas Script doesnt generate any
function module while executing so we need to transport the request
number through SCC1.Sap script is stroed in side the client depended
table as a TEXT.so sapscripts are client dependent and smartforms are
client independent.
23. Difference between user exit and BADIs?
Ans: User exit is for single implementation and it is procedural approach
while BADIs are for multiple implementation and object oriented approach.
Multiple implementation means Reusability because we use OOps
Concepts for BADI.
24. Control break events in ABAP:-
1. AT-FIRST: This is used when we want to execute the statements before
records are processed.
2. AT-LAST: This event is used when we want to execute the statements
after all records are processed.
3. AT-NEW: This event is used when we want to execute the statement
before group of records are processed.
4. AT-END: This event is used when we want to execute the statements
after processing of group of records.
25.I am uploading 100 records out of which say 59th record has
error so what will happen if i am using synchronous or
asynchronous method of BDC? Can we update the database using
local update mode how?
26. Suppose i am writing following code then what will be output?
LOAD-OF-PROGRAM.
WRITE:/HELLO.
Ans: HELLO
(Explain the importance of LOAD-OF-PROGRAM Event.If you dont know Tell
the interviewer as this event is used in such cases when you want to clear
sum buffers or something Before calling that Program)
27. What is TMG?
Ans. TMG stands for Table Maintenance generator. It is a tool available in
abap by which we can add or delete multiple records at a time and it is
executed or triggered by the transaction code SM30.
28. Difference between select option and ranges ?
Ans. The main difference between select option and ranges is that ranges
implicitly or automatically creates internal table with fields like
OPTION,LOW,HIGH,SIGN,etc . Where as in case of select option we have to
explicitly create internal table.
When u declares a select options it will implicitly declare an internal table
(ranges) for you.
While using RANGES syntax u can declare internal table explicitly.
The only need of declaring ranges is when you r not taking input from the
user but you want make limit based selection at that time it will be use full
e.g. SELECT ** from ** where MATNR in val_range.
here u can use select-option or ranges : val_range.

29. is it possible to bring select option in module pool screens?


Ans.Create a SELECT-OPTIONS in module pool screen using two methods
as shown.
Method 1:-
a) Create a subscreen area in your screen layout where you want to create
the select options.
b) In the top include of your module pool program declare a selection
screen as a subscreen e.g.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
select-options s_matnr for mara-matnr.
SELECTION-SCREEN END OF SCREEN.
c) In the PBO and PAI of the main screen where the select options needs to
be created do a call subscreen of the above screen (100).
CALL SUBCREEN sub_area INCLUDING <program> <screen>
This CALL SUBSCREEN statement is necessary for transport of values
between screen and program.
Note: All validations of the selection screen fields e.g. the s_matnr field
created above should be done in selection screen events like AT
SELECTION-SCREEN etc and not in PAI. These selection screen validations
etc should be done in the top include only.
Method 2:-
a) Create 2 separate fields in your screen layout one for the low value
and one for the high value. Insert an icon beside the high value which will
call the multiple selections popup screen on user command. Use function
module COMPLEX_SELECTIONS_DIALOG to achieve this.
continued
struc_tab_and_field-fieldname = con_cust. KUNNR
struc_tab_and_field-tablename = con_kna1. KNA1.
CALL FUNCTION COMPLEX_SELECTIONS_DIALOG EXPORTING*
TITLE =
text = g_titl1 Customers
tab_and_field = struc_tab_and_field
TABLES RANGE = rng_kunnr
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
INVALID_FIELDNAME = 4
OTHERS = 5.
IF NOT rng_kunnr[] IS INITIAL.
* Read the very first entry of the range table and pass it to
* dynpro screen field
*READ TABLE rng_kunnr INDEX 1.
IF sy-subrc = 0.
g_cust = rng_kunnr-low.
ENDIF.
ENDIF.
You can use the return table rng_kunnr to populate your own internal
range table with the values entered by the user. Basically here you are
just simulating the work of a select-options parameter by module pool
screen elements.
30.how we can retrive data using secondary index.explain with
simple example
Ans: First create secondary indexes on required fields of a particular
database table.
We can create one primary index and 15 secondary indexes.Once the
respective secondary indexes are created write select queries and within
select queries specify secondary indexes field name with where clause.
31.How can we handle table control in BDC?
Ans.We can handle table control using line index
Line index indicates which line of Table control is to be use for BDC
transaction
Ex -
perform bdc_field using RC29K-AUSKZ(01)
Indicates 1st line of table control is going to be used for transaction which
is Line index of Table Control
32. If i want to execute a BDC program only in background not in
foreground is there any option for this?
Ans.The sm37 transaction can be used for running a program in the
background. Also in the session method while processing the session you
can specify the processing type as background or foreground.
33.How Can We upload a text file having Delimiters in to Legacy
System
Ans.For up loading text file we use the pre-defined FM gui_upload. in that
FM we have the parameter has_field_seperator for that we assign the
default delimiter x.
HAS_FIELD_SEPERATOR X
X can provide the Whatever delimiter we used in flat file for separation.
34. What is the land scape in sap.
Ans. In every organisation sap landscape involves three servers viz,
Development server, Quality server and Production server. Whatever new
development we do as per clients requirement is done in development
server. Later to test the developed object we move it to quality server for
testing and finally once everything goes clear then the object is moved to
production server ,production server data is ready for final business use.
35. Workbench request are client dependent or client
independent
Ans. Workbench request are client independent.
(Common Man Workbench request holds the Program , FM etc. How it
can be Client Dependent!!!!)
36. Tell me about workbench request and customization requests.
Ans.Workbench (ABAP Dev) request is client independent when you import
it into one system it reflact it in all client in same system, but customized
request has to import in that client perticular client where it is created,
actually it is client dependent.

Reports and Transactions:

1. What is LDB. Disadvantages of LDB and also advantages.


Logical Database is special ABAP program. Its nested select statements.
Advantages: If you use LDB, it retrieves data as per foreign key relations
from different tables. You need not know the relations among tables.
Disadvantages: Runtime will be increased if you use LDB.

2. What are the events associated with LDB and their purpose.
GET and GET LAST. GET will be triggered for each record and retrieves a
record. GET LAST will be triggered at end of each record.

3. In which order they will be triggered.


First Get and then Get last of same table.

4. How will you change the selection screen of a LDB.


Selection screen can be changed through you add selection screen option
in the program, these will be automatically added to LDB selection screen
for this program.

5. Where you attach the LDB to a report.


One is Attributes, two at report header.

6. How many LDBs you can use in a Report.


Only one.

7. Order of events triggered during execution of report program.


Initialization, selection-screen, at selection-screen, start-of-selection etc

8. How to get help and/or possible values for selection screen


fields
Events AT SELECTION-SCREEN ON HELP REQUEST and AT SELECTION-
SCREEN ON VALUE REQUEST.

9. How many secondary lists you can have in a report.


20 secondary list and 1 basic list.

10. What are events, which triggers secondary lists.


At line-selection, At PFnn, At User-command.

11. What is the purpose of HIDE statement.


Any other methods other than HIDE for same purpose.Hide will help in
transferring data from basic list to secondary list or one list to other list.
Other methods are GET CURSOR and SY-LISEL.

12. What are the different techniques for Data processing/refining


in ABAP reports.
1. Internal Tables. 2. Extracts (Field Groups)

13. Can you put a SQL Join statement in ABAP? If yes, How
Through alias (only in 4.0 and above versions)

14. What is the system variable, which tells about number


database records handled.
SY-DBCNT

15. What are different techniques available for modularization.


Internal Subroutines, External Subroutines, Macros, Function modules and
Include programs.

16. What are different types of internal tables and their usage.
17. 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?
Check for Authorization object S_TCODE with value Z---- in initialization
event.
(Code:
Authority-check object 'S_TCODE'
id 'TCD' field 'ZBC_REQ'.)

18. We need to download an internal table to the Presentation


Server (local workstation).
Whenever we run the program, the same file has to be saved as a
separate file in sequential order. Ex: 0001.txt, 0002.txt etc. Where
can we store the last file number?

SAP has a table TVARV for storing the variants.


A record may be created in TVARV for all the programs that require these
kind of incremental records.
For Ex: the record could be 010ZBC_TEST MM sequence rec where first
part consists of client code and the program being run. Client code is
required because TVARV does not have a field for client code. The second
part is the description indicating the purpose what the record is created.
This entire string may be posted in the Name field (char - 30).
The Type field (char- 1) may be populated with P or S (Parameter or
Selection)
Low field (char- 45) may be populated with '0001' when run first time and
increment it by one in your program for downloading of the internal table.

19. When we create a customer the information is updated in


structure RF02D and the
Some tables like KNA1 are updated. How can we find the tables
for master data transactions?
Go to ABAP Workbench -> Overview -> application hierarchy - SAP -> (or
SE81 transaction code) follow the customizing based tree for your
application. Double click on a lowest level to get for the correct marked
development class. Then, here you can find all the tables, views, logical
databases etc..,

What is a report?
Report is a program used to fetch data from the database tables and
display it on the screen. It has 2 screens selection screen(optional) and list
or output screen.
When the TOP-OF-PAGE event does get triggered?
TOP-OF-PAGE event will be triggered when the first ULINE, WRITE or SKIP
statement occurs in a program.
What is the difference between SKIP and RESERVE?
SKIP provides empty space between lines, while RESERVE executes a page
break on the current page if the number of lines between current line and
the page footer is less than the number specified in RESERVE statement.
What is the difference between SKIP and NEW-LINE?
SKIP generates a blank line, while the NEW-LINE causes the control to
move to next line.
What is hotspot?
Hotspot is an area on the list where the mouse pointer turns into an
upright hand symbol. A single click on the hotspot does the same thing as
a double-click.
What does HIDE statement do?
The HIDE statement hides the contents of the line along with the line
numbers in a system defined HIDE area. This is used in interactive
reporting.
What are the events in classical reports?

INITIALIZATION
AT SELECTION-SCREEN
START-OF-SELECTION
END-OF-SELECTION
TOP-OF-PAGE
END-OF-PAGE
How many detail lists can be created in interactive reporting?
20
What is the name of the system variable that holds the contents
of the selected line in interactive reporting?
SY-LISEL
Can we set page headers to details lists?
Yes. Use TOP-OF-PAGE DURING LINE-SELECTION event..

1. What is client in sap?


Highest level of organization structure is client. From business standpoint,
a client can be interpreted as a logical group of companies. All
customization, configuration and development work is done in a client.
2. How do we differentiate data in client-dependant and client-independent?
Client-dependant data is the data that is specific to an individual client
whereas client-independent can be defined as the data contained across
all clients in the system.

If a table has MANDT field in its key fields then that table is Client-
dependant.
If it doesnt has MANDT field then it is client-independent.

Examples:
Client Dependent: SAPscript and STD texts data
Client Independent: Smart forms, all dictionary objects data and repository
objects data like programs, function modules, tables etc.

Change and Transport system


3. What is change and transport system (CTS)?
The change and Transport system (CTS) is a tool that helps you to
organize development objects in the ABAP workbench and customizing,
and then transport these changes between the SAP Systems and clients in
your landscape.

TRANSPORT ORGANIZER SE09/SE10


EXTENDED TRANSPORT ORGANIZER SE01

What is Transport Organizer/Transport Request?


Developer Access Key

Transport Requests (TRs) is a kind of 'Container / Collection' of


changes that are made in the development system. It also records the
information regarding the type of change, the purpose of transport,
request category and the target system. It is also known as Change
Requests.
Each TR contains one or more change jobs, also known as
change Tasks (minimum unit of transportable change). Tasks are stored
inside a TR, just like multiple files are stored in some folder. TR can be
released only once all the tasks inside a TR are completed, released or
deleted.
Change Task is actually a list of objects that are modified by a
particular user. Each task can be assigned to (and released by) only one
user. However multiple users can be assigned to each Transport Request
(as it can contain multiple tasks). Tasks are not transportable by
themselves, but only as a part of TR.

Change requests are named in a standard format


as: <SID>K<Number> [Not modifiable by system administrators]
SID System ID
K Is fixed keyword/alphabet
Number can be anything from a range starting with 900001

Example: DEVK900030

Tasks also use the same naming convention, with 'numbers' consecutive
to the number used in TR containing them.

For Example, Tasks in the above mentioned TR Example can be named


as: DEVK900031, DEVK900032
The project manager or designated lead is responsible to create a
TR and assign the project members to the TR by creating task/s for each
project member.
Hence, she/he is the owner with control of all the changes that are
recorded in that TR and therefore, she/he can only release that TR.
However, assigned project members can release their respective
change tasks, once completed.
Workbench Request contains repository objects and also 'cross-client'
customizing objects. These requests are responsible for making changes
in the ABAP workbench objects.

Customizing Request contains objects that belong to 'client-specific'


customizing. As per client settings, these requests are automatically
recorded as per when users perform customizing settings and a target
system is automatically assigned as per the transport layer (if defined).

SE01 Transport Organizer Extended View


Create a Change Request

Change Request can be created in two ways:


o Automatic Whenever creating or modifying an object, or
when performing customizing settings, the system itself displays the
'Dialog box' for creating a change request or mention name of an already
created request, if available.
o Manually Create the change request from the Transport
Organizer, and then enter required attributes and insert objects.
>
Release the Transport Request (Export Process)
Position the cursor on the TR name or a Task name & choose the
Release icon (Truck), a record of the TR is automatically added to the
appropriate import queues of the systems defined in the TMS.
Releasing and importing a request generates export & import logs.

The Import Process


Importing TRs into the target system
After the request owner releases the Transport Requests from
Source system, changes should appear in quality and production
system; however, this is not an automatic process.
As soon as the export process completes (releasing of TRs), relevant
files (Cofiles and Data files) are created in the common transport directory
at OS level and the entry is made in the Import Buffer (OS
View) / Import Queue (SAP App. View) of the QAS and PRD.
Now to perform the import, we need to access the import queue and
for that, we need to execute transaction code STMS -> Import
Button OR select Overview -> Imports
It will show the list of systems in the current domain, description,
and a number of requests available in Import Queue and the status.

Import Queue -> is the list of TRs available in the common directory and
are ready to be imported into the target system, this is the SAP
Application View, at the OS level it is also known as Import Buffer.

The Import Status


Import Queue shows some standard 'status icons' in the last column,
here are the icons with their meanings, as defined by SAP:
In case, a request is not added automatically in the import queue/buffer,
even though the OS level files are present, then we can add such requests
by the following method, however, we should know the name of intended
TR:

Import History

We can also check the previous imports that happened in the system as
follows:
Transport logs and return codes
After the transport has been performed, the system administrator
must check whether it was performed properly or not, for that SAP has
provided us with the following type of logs (SE01 -> GOTO -> Transport
Logs):
o Action Log which displays actions that have taken place:
exports, test import, import and so forth.
o Transport Logs which keep a record of the transport log
files.
One of the important information provided by logs are the return
codes:
o 0: The export was successful.
o 4: Warning was issued but all objects were transported
successfully.
o 8: A warning was issued and at least one object could not be
transported successfully.
o 12 or higher: A critical error had occurred, generally not
caused by the objects in the request.

DEVELOPER KEY AND OBJECT ACCESS KEY


developer access key is given for a developers... which allows to do any
customised programs in SAP server
Access Key is needed if you need to make any changes in the SAP
standard code.. or sap standard objects
PACKAGE/DEVELOPMENT CLASS:-
A Package is a group of logically related development objects. A Package
contains all the development objects which must be developed,
maintained, and sometimes transported together. The objects that make
up a transaction usually belong to one Package. Before 4.7 Package was
called Development Class.
When creating a new object in the R/3 system, the developer will be
prompted to supply a Package. By selecting a valid Package and then a
CTS, changes to the object will be recorded in the Transport Organizer.
If the Local Object button is selected, the object is classified as a local
private object, and changes are not recorded by the Workbench Organizer.
Local private objects may not be transported.

IDOC Types

An I DOC Type, (Basic) defines the structure and format of the business
document that is to be exchanged. An IDOC is an instance of an IDOC
Type , just like the concept of variables and variables types in
programming languages. You can define IDOC types using WE30
Basic IDoc Type Basic IDoc type denes the structure and format of the
business document that is to be exchanged between two systems. Lets
look at an example below for Basic IDoc Type ZOIPRO01.

A basic IDoc type has the following attributes (You can display a Basic
IDoc Type in transaction WE30).
Segments A segment denes the format and structure of a data record.
Segments are reusable components, which means they can be used in
more than one IDoc type. A segment consists of various elds that
represent data in a data record.
Segment Creation WE31

What is Extension IDOC type?

An IDOC is of 2 types:-

1. Basic
2. Extension
SAP provides many a pre-defined Basic IDOC Types which can not be
modified. In case you want to add more data to these restricted basic
type you may use an extension type. Most of the times you will NOT use
extension.
Why do We Need an Extended IDoc?
Standard SAP sends out or receives in data through IDocs using standard
delivered Segments, Message Types and elds. But sometimes, these elds
are not sucient for a specic end-to-end business scenario as far as data
transfer is concerned. So in such scenarios, we can add new segments
with completely new structures to the standard IDoc as an extension. We
create a brand new structure and insert it into existing delivered IDoc
structure creating a whole new IDoc satisfying the requirement. This new
IDoc is called an Extended IDoc.
Message Type
A message represents a specific type of document that is transmitted
between two partners Ex. Orders, orders responses, invoices etc

An idoc type can be associated with many message types

Also, a message type can be associated with different idoc types.


Transaction WE81SAP Object IDoc Message Type
CUSTOMER DEBMAS
VENDOR CREMAS
MATERIAL MATMAS
SALES ORDER ORDRSP
PURCHASE ORDER ORDERS
INVOICE INVOIC
Message Type Creation WE81
Assign Message Type To Basic IDOC Type WE82
You can view an I-DOC using transaction WE02 or WE05
Partner Profiles
A partner is defined as a business partner with whom you conduct
business and exchange documents

In the partner profile of a partner that we exchange Idocs with, we


maintain the parameters that are necessary for exchanging the data. The
transaction used is WE20.

Port

The port defines the technical characteristics of the connection between


your SAP system and the other system you want to transfer data with
(subsystem). The port defines the medium in which data is exchanged
between the 2 systems.

There are different types of ports. The 2 most commonly used are
the TRFC ports used in ALE and File ports which EDI uses.

For TRFC ports we have to give the name of the logical destination created
using SM59.

The Outbound Process


Steps Involved -
1. Create segments(WE31)
2. Create an idoc type(WE30)
3. Create a message type (WE81)
4. Associate a message type to idoc type(WE82)
5. Create a port(WE21)
6. If you are going to use the message control method to trigger idocs
then create the function module for creating the idoc and associate the
function module to an outbound process code
7. Otherwise, create the function module or stand-alone program
which will create the idoc
8. Create a partner profile(WE20) with the necessary information in the
outbound parameters for the partner you want to exchange the idoc
with.Trigger the idoc.
The Inbound Process
Steps Involved-
1. Creation of basic Idoc type (Transaction WE30)
2. Creating message type (Transaction WE81)
3. Associating the Message type to basic Idoc type (Transaction WE82)
4. Create the function module for processing the idoc
5. Define the function module characteristics (BD51)
6. Allocate the inbound function module to the message type(WE57)
7. Defining process code (Transaction WE42)
8. Creation of partner profile (Transaction WE20)

WE05 Gives IDOC list


BD64 To create model view (has SENDER, RECIEVER and Message type)
SM59 RFC Destination, here we give target system userid and pwd

Using WE19 t-code to reprocess IDOC, debugging an IDOC using


WE19 t-code, test IDOC using WE19

A ABAP programmer, who is working with ALE-IDOC`s must know about


WE19 T-code, WE19 T-code is used to test inbound IDOCS (test ground).By
using WE19, we can able to change existing IDOC data and test (new
IDOC will be generated), we can create new IDOC using message type, we
can debug IDOC.

Follow the below steps to process/debug IDOC using WE19


In below example we are using MATMAS message type to create a
material.

Step1: Go to WE19, if you have IDOC no select 'Existing Idoc' radio button
and provide IDOC number, execute.
If you don`t have IDOC number, select 'Basic Type' radio button and
provide 'Basic type' as MATMAS04, execute.

Step2: Now you can see the segments related to MATMAS, double click on
required segments, add data.

Similarly add data to all segements for mandatory fields.

Step3: Click on inbound function module button (on toolbar), a popup will
come, provide inbound function module name as 'IDOC_INPUT_MATMAS01'
for MATMAS message type.If you wants to debug IDOC, select 'Call in
debugging mode' check box and enter

see how to find inbound function module for a message type


Here 'IDOC_INPUT_MATMAS01' is a inbound function module which is
linked to MATMAS message type check in WE42.
Step4: A new IDOC will be created.

Step5:Go to T-code WE09, provide IDOC no, execute, you will find the
status.

Debugging Outbound IDoc Output Control scenarios


ow do I debug the outbound IDoc generation programs involved in
message control (most of the time there is a need to test the custom logic
within the user-exits of outbound program)? Example scenario: I have
configured message control for Delivery IDoc (DELVRY03) generation
(message type DESADV). Whenever the outbound delivery is saved the
output type is proposed and outbound IDocs are triggered. Generally
while defining the condition record we set the Date/Time field to 4 (Send
immediately (when saving the
application)).

Due to this whenever we save the delivery document (which satisfies the
message control configuration) the output type is proposed and the IDocs
are triggered. Even if we have set a breakpoint in the outbound
application IDoc generation program, we do not stop to that break-point.
When we do an F4 on the Date/Time field we find the other 4

options. Our interest is


in option 1 = Send with periodically scheduled job. With this option the
output type is proposed but not processed immediately by output type
processing program (RSNAST00). The output type entry remains
unprocessed in NAST
table.
With this setting when I create an outbound delivery and check in the
delivery output we find the output type in yellow traffic

light.
Now when we run the program RSNAST00 for the output application
and output type (other parameters can also be specified if we want to be
specific) the program will stop at the break-point in the outbound function
module (IDOC_OUTPUT_DELVRY in this case). We can debug from hereon.
This is how I debug on a regular basis.
Before saving the delivery, enter /h and then save the delivery. As soon
as you enter debug, click Settings in the title bar and then update
debugging. You can then press F8 to go. It will then stop on the
breakpoints that you set in idoc_output_delvry or whatever userexit you
put your breakpoint.
If you dont turn on update debugging, then it is true that you will not hit
your breakpoint.
Question 1: What is the difference between User Exit and
Function Exit?

User Exit Customer Exit


User exit is implemented in the form of A customer exit can be
a Subroutine i.e. PERFORM xxx. implemented as:
Example: INCLUDE MVF5AFZZ Function exit
PERFORM Screen Exit
userexit_save_document_prepare. Menu Exit
Field Exit
Example: CALL Customer function
xxx
INCLUDE xxx.
You modify this include.
In case of a PERFORM, you have You have access only to the
access to almost all the data. So you importing, exporting, changing and
have better control, but more risk of tables parameter of the Function
making the system unstable. Module. So you have limited access
to data.
User exit is considered a modification A customer exit is considered an
and not an enhancement. enhancement.
You need Access Key for User Exit. You do not need access key.
Changes are lost in case of an Changes are upgrade compatible.
upgrade.
User exit is the earliest form of change Customer exits came later and they
option offered by SAP. overcome the shortcomings of User
Exit.
No such thing is required here. To activate a function exit, you need
to create a project in SMOD and
activate the project.

What is the difference between RFC and BAPI?


BAPI RFC
Just as Google offers RFC is nothing but a remote enabled
Image/Chart/Map APIs OR Facebook function module. So if there is a
offers APIs for Comment/Like, SAP Function Module in SAP system 1 on
offers APIs in the form of BAPIs. BAPI server X , it can be called from a SAP
is a library of function modules system 2 residing on server Y.
released by SAP to the public so that
they can interface with SAP.
There is a Business Object Associated No Business Object is associated with
with a BAPI. So a BAPI has an a RFC.
Interface, Key Field, Attributes,
Methods, and Events.
Outside world (JAVA, VB, .Net or any NonSAP world cannot connect to
Non SAP system) can connect to SAP SAP using RFC.
using a BAPI.
Error or Success messages are RFC does not have a return table.
returned in a RETURN table.

Question 3:What is the difference between SAPSCRIPT and


SMARTFORM?
SAPSCRIPT SMARTFORM
SAPSCRIPT is client dependent. SMARTFORM is client independent.
SAPSCRIPT does not generate any SMARTFORM generates a Function
Function module. Module when activated.
Main Window is must. You can create a SMARTFORM without
a Main Window.
SAPSCRIPT can be converted to SMARTFORMS cannot be converted to
SMARTFORMS. Use Program SCRIPT.
SF_MIGRATE.
Only one Page format is possible Multiple page formats are possible.
Such thing is not possible in SCRIPT. You can create multiple copies of a
SMARTFORM using the Copies
Window.
PROTECT ENDPROTECT command The Protect Checkbox can be ticked
is used for Page protection. for Page Protection.

The way SMARTFORM is developed and the way in which SCRIPT is


developed is entirely different. Not listing down those here. That would be
too much.

Question 4:What is the difference between Call Transaction


Method and the Session method ?

Session Method Call Transaction


Session method id generally used Call transaction method is when the
when the data volume is huge. data volume is low
Session method is slow as Call Transaction method is relatively
compared to Call transaction. faster than Session method.
SAP Database is updated when you SAP Database is updated during the
process the sessions. You need to execution of the batch input
process the sessions separately via program.
SM35.
Errors are automatically handled Errors should be handled in the
during the processing of the batch batch input program.
input session.

Question 5: What is the difference between BDC and BAPI?

BAPI BDC
BAPI is faster than BDC. BDC is relatively slower than BAPI.
BAPI directly updates database. BDC goes through all the screens as
a normal user would do and hence it
is slower.
No such processing options are Background and Foreground
available in BAPI. processing options are available for
BDC.
BAPI would generally used for small BDCs would be preferred for large
data uploads. volumes of data upload since
background processing option is
available.
For processing errors, the Return Errors can be processed in SM35 for
Parameters for BAPI should be session method and in the batch
used.This parameter returns input program for Call Transaction
exception messages or success method.
messages to the calling program.
Question 6: What is the difference between macro and
subroutine?

Macro Subroutine
Macro can be called only in the Subroutine can be called from other
program it is defined. programs also.
Macro can have maximum 9 Can have any number of parameters.
parameters.
Macro can be called only after its This is not true for Subroutine.
definition.
A macro is defined inside: Subroutine is defined inside:
DEFINE FORM ..
. ..
END-OF-DEFINITION. ENDFORM.
Macro is used when same thing is to Subroutine is used for modularization.
be done in a program a number of
times.

Question 7: What is the difference between SAP memory and


ABAP memory?

SAP Memory ABAP Memory


When you are using the SET/GET When you are using the EXPORT
Parameter ID command, you are IMPORT Statements, you are using
using the SAP Memory. the ABAP Memory.
SAP Memory is User Specific. ABAP Memory is User and
What does this mean?The data Transaction Specific.What does this
stored in SAP memory can be mean? The data stored in ABAP
accesses via any session from a memory can be accessed only in one
terminal. session. If you are creating another
session, you cannot use ABAP
memory.

Important
Question 8: What is the difference between AT SELECTION-
SCREEN and AT SELECTION-SCREEN OUTPUT?
AT SELECTION-SCREEN is the PAI of the selection screen whereas
AT SELECTION-SCREEN OUTPUT is the PBO of the selection screen.

Question 9: What is the difference between SY-INDEX and SY-


TABIX?
Remember it this way TABIX = Table.
So when you are looping over an internal table, you use SY-TABIX.
When you use DO ENDDO / WHILE for looping, there is no table
involved.
So you use SY-INDEX.

For READ statement, SY-INDEX is used.

Question 10: What is the difference between VIEW and a TABLE?A


table physically stores data.
A view does not store any data on its own. It can contain data from
multiple tables and it just accesses/reads data from those tables.

Question 11: What is the difference between Customizing and


Workbench request?A workbench request is client independent whereas
a Customizing request is client dependent.
Changes to development objects such as Reports, Function Modules, Data
Dictionary objects etc. fall under Workbench requests.

Changes in SPRO / IMG that define system behavior fall under customizing
requests.
An example would be defining number ranges in SPRO.

In short, generally a developer would end up creating a Workbench


request and a Functional Consultant would create a Customizing request.

Question 12: What is the difference between PASS BY VALUE and


PASS BY REFERENCE?These concepts are generally used for Function
modules or Subroutines etc. and their meaning can be taken literally.

Say we are passing a variable lv_var:


CALL FUNCTION 'DEMO_FM'
EXPORTING
VAR = lv_var.

When we PASS lv_var by VALUE , the actual value of lv_var is copied into
VAR.
When we PASS lv_var by REFERENCE , the reference or the memory
address of lv_var is passed to the Function module. So VAR and lv_var will
refer to the same memory address and have the same value.

Question 13: What is the difference between Master data and


Transaction data?Master data is data that doesnt change often and is
always needed in the same way by business.
Ex: One time activities like creating Company Codes, Materials, Vendors,
Customers etc.

Transaction data keeps on changing and deals with day to day activities
carried out in business.
Transactions done by or with Customers, Vendors, and Materials etc.
generate Transaction Data. So data related to Sales, Purchases, Deliveries,
Invoices etc. represent transaction data

Some important transactions here for Master Data:


Material: MM01 MM02 MM03
Vendor: XK01 , XK02 , XK03
Customer: Xd01 , XD02 , XD03

Some Important transactions for Transaction data:


Purchase Order: ME21n , ME22n , ME23n
Sales Order: VA01 , VA02 , VA03
Goods Receipt: MIGO
Invoices: MIRO

Important
Question 14: What will you use SELECT SINGLE or SELECT UPTO 1
ROWS ?
What will you use SELECT SINGLE or SELECT UPTO 1 ROWS ?
There is great confusion over this in the SAP arena.
If you Google, you will see lots of results that will say SELECT SINGLE is
faster and efficient than SELECT UPTO 1 ROWS.
But that is 100% incorrect.

SELECT UPTO 1 ROWS is faster than SELECT SINGLE.


If for a WHERE condition, only one record is present in DB, then both are
more or less same.
However, If for a WHERE condition multiple records are present in DB,
SELECT UPTO 1 ROWS will perform better than SELECT SINGLE.

Question 15: What is the difference between .Include Structure and


.Append structure?
I have seen ridiculous answers for this at many places on the Web.
The true answer is this:

Lets say you want to use the Structure X in your table Y.


With .Include X, you can include this structure in multiple tables.
With .Append X, you specify that structure X has been used in table Y
and that this cannot be used in any other table now. So you restrict
structure X only to Table Y.
Important
Question 16: Can you describe the events in ABAP?

LOAD-OF-PROGRAM:
INITIALIZATION: If you want to initialize some values before selection
screen is called
AT SELECTION SCREEN OUTPUT: PBO for Selection Screen
AT SELECTION SCREEN: PAI for Selection Screen
START-OF-SELECTION
END-OF-SELECTION
TOP-OF-PAGE
END-OF-PAGE

AT USER-COMMAND: When user click on say buttons in application


toolbar. SY-UCOMM
AT LINE SELECTION: Double click by user on basic list. SY-LISEL
AT PF##: When User Presses any of the Function Keys
TOP-OF-PAGE DURING LINE SELECTION

Question 17:

What events do you know in Module Pool Programming?


PBO: you know this . If not you should know this . That's basic.
PAI: You know this. If not you should know this . That's basic.
POV: Process on Value request i.e. when you press F4.
POH: Process on help request i.e. when you press F1.
Question 18: Can you show multiple ALVs on a Single Screen?
Yes, there are multiple ways of doing this:
If you are using OOALV, you can create multiple custom containers
(cl_gui_custom_container) & put an ALV control (cl_gui_alv_grid) in
each of those.
You can even use a Splitter container control and place multiple ALVs in
each of
the split container.
If you are using Normal ALV, You can use the following FMS:
1. REUSE_ALV_BLOCK_LIST_INIT
2. REUSE_ALV_BLOCK_LIST_APPEND
3. REUSE_ALV_BLOCK_LIST_DISPLAY

Question 19: A system has two clients 100 and 500 on the same
application server. If you make changes to a SAPSCRIPT on client 100, will
the changes be available in client 500?

No. SAPSCRIPT is client dependent. You will have to transport changes


from client 100 to client 500. However, for SMARTFORMS, Changes will be
made both for client 100 and client 500.
Question 20: There are 1000s of IDOCs in your system and say you no
longer need some of them? How will you get rid of those IDOCs?

One way is to archive the IDOCs using transaction SARA.


But what the interviewer was expecting was How do you change IDoc
Status?
There are different ways of doing this:
A) Use FM IDOC_STATUS_WRITE_TO_DATABASE
B) USE FMs:
EDI_DOCUMENT_OPEN_FOR_PROCESS and
EDI_DOCUMENT_CLOSE_PROCESS

Question 21: What is the difference between CHAIN ENDCHAIN and


FIELD commands in Module Pool?

If you want to validate a single field in Module Pool, you use the FIELD
Command.
On error, this single filed is kept open for input.

If you however want to validate multiple fields, you can use the CHAIN
ENDCHAIN command. You specify multiple fields between CHAIN and
ENDCHAIN.
On error, all fields between CHAIN ENDCHAIN are kept open for input.

Question 22: What are the types of Function Modules? What is an


UPDATE function module?There are three types of Function
Modules: Normal , RFC , UPDATE.

The aim of the Update function module is either to COMMIT all changes to
database at once or to ROLLBACK all the changes. By definition, an update
function module is used to bundle all the updates in your system in one
LUW (logical unit of work).

This FM is called whenever COMMIT WORK statement is encountered in


the calling program and the way you call it isCALL FUNCTION XXX IN
UPDATE TASK.

Have a look at FM EDI_DOCUMENT_CLOSE_PROCESS_UPD and do a where


used.
This FM is used as Update FM in case you make changes to IDoc
contents/status via your program.

Question 23: How is the table sorted when you do not specify field name
and Ascending or Descending? On what criteria will the table be sorted?
Do internal table have keys?

Yes, internal table have keys.


The default key is made up of the non-numeric fields of the table line in
the order in which they occur.

Question 24: Explain what is a foreign key relationship?Explain this


with the help of an example.
Lets discuss about tables EKKO (PO header) and EKPO (PO line item).
Can you have an entry in table EKPO without having an entry in table
EKKO?
In other words can you have PO line items without the PO header?

How does this happen? The answer is foreign key relationship.


So foreign keys come into picture when you define relationship
between two tables.

Foreign keys are defined at field level.


Check the foreign key relation for field EBELN of table EKPO.
The check table is EKKO. This just means that whenever an entry is made
in EKPO, it is checked whether the entered value for EBELN already exists
in EKKO. If not, entry cannot be made to EKPO table.

Question 25 : What is the difference between a value table and a


check table?Check table is maintained when you define foreign key
relationships.
For Check table, read question above.
.
Value table is defined and maintained at a domain level.
At a domain level, you can mention allowed values in the form of:
1) Single values
2) Ranges
3) Value tableFor example, have a look at domain SHKZG. Only allowed
values are S and H for Debit/Credit indicator. Whenever and wherever you
use this domain, the system will force you to use only these two values: S
and H.

Another example is domain MATNR. For this domain the value table is
MARA.
So whenever and wherever, you use this domain the system will force you
to use values for MATNR in table MARA.

Question 26: How do you find BAPI?Approach1:


You can go to Transaction BAPI and then search for your desired object.
Say you want to find a BAPI for creating users in the system, in such case
you can search for the User and find the relevant BAPIs.

Approach2:
Another way is to find a Business Object. Say you want to find a BAPI for
creating Material in SAP and you know the BO for Material is BUS1001006.
You can go to Transaction SWO1 and enter the BO BUS1001006 in the
BOR. Then have a look at the methods for this BO.

Important
Question 27: How do you find BADI?
Approach1:
Go to Class CL_EXITHANDLER in SE24 ---> Put a breakpoint in
method GET_INSTANCE.Now go and execute your transaction code for
which you want to find BADI.
You will find the BADI in the changing parameter exit_name:

Approach 2:
Go to Tcode SE84 Enhancements BADIs Definitions.
Find the package for the Tcode for which you are finding the BADI.
Enter it as shown and hit execute:
Are we done yet ? Definitely not !
Let the questions come and lets keep on updating this blog.

I will update the blog with the following questions soon:


Question: Synchronous and asynchronous methods in BDC ?
Question: What is the difference between inner joins and outer joins?
Question: What is the difference between INSTANCE methods and STATIC
methods?
Question: What is the difference between Implicit Enhancements and
Explicit Enhancements?
Question: What is the difference between Enhancement point and
Enhancement Section?
Question: How do you find Function Exit?
Question: How do you activate a Function Exit?

BADI and types of BADI in SAP


BADI (Business Add-in)
BADI is another way of implementing enhancements to the standard
programs with out modifying the original code.
BADI's are implemented using oo programming technique
Technically a BADI is nothing but an interface.
Each BADI consists of the method with out implementation called as
BADI definition.
We need to create classes to write the abap code by implementing
the methods called as BADI implementation.
SE18 is the T-code for BADI definition, SE19 is the T-code for BADI
implementation.
Advantages of BADI
The main advantage of using BADI's is , we can create multiple
implementations for a single BADI definition.
Where as with the exits, we can create a single implementation.i.e a
single project for a enhancement.
We cannot create another project (implementation) for
enhancement which is already used. That is why we go for BADI's.
Types of BADI
Single implementation BADI.
Multiple implementation BADI.
Filter BADI.
Custom BADI (Not used/Rarely used)
Single implementation BADI:- A BADI which has only one
implementation (single class) is called single implementation BADI.
Multiple implementation BADI:- A BADI which has multiple
implementations is called multiple implementation BADI. By default all the
implementations will be executed.
We cannot control the sequence of execution of multiple implementations.
Filter BADI It is type of BADI which has a filter value so that only those
implementations which satisfy the filter value are executed. The
remaining implementations are not executed this type of BADI is called a
filter BADI.
Properties of BADI

If WITH IN SAP checkbox is selected then this BADI is only used by


sap.
If multiple use checkbox is selected then it is a multiple
implementation BADI.
If multiple use checkbox is not selected then it is a single
implementation BADI.
If filter dependent checkbox is selected then it is filter dependent
BADI. We need to specify the filter type such as
land1,bukrs,werks.for the filter BADI.
Introduction to SAP enhancements
SAP is a ERP software in which all standard business applications are
delivered, sometimes customer may need to alter existing functionality or
add additional functionality to the existing applications based on customer
business requirements.
Enhancements concept

The enhancement is a concept of adding your own functionality to SAP's


standard business applications without having to modify the original
applications. To modify the standard SAP behavior as per customer
requirements, we can use enhancement framework.

Types of enhancements in SAP

User Exits

Initially SAP implemented enhancements in the form of User Exits and


these are only available in SD module, user exits are implemented in the
form of subroutines and hence are also called as FORM EXITS, User exits
are empty subroutines that SAP developers have provided for you, you
can add your own source code in the empty subroutines.

All user exits starts with the word USEREXIT.

Customer Exits

These are one type of enhancements that are available in some specific
programs, screens and menus within standard SAP Applications. These are
Function Modules with a custom empty include program, you can add your
own functionality in these include programs.

Customer Exits are available in all SAP modules, whereas user exits are
only available in SD module.

All customer exits ( Function Modules) starts with CALL CUSTOMER word.

What are the difference between user exit and customer exit in SAP, user
exit v/s customer exit
+-
User Exit Customer Exit

User exit is implemented in the form of a A customer exit can be


Subroutine i.e. PERFORM xxx. implemented as:
PERFORM Function exit
userexit_save_document_prepare. Screen Exit
Menu Exit
Field Exit
User Exit Customer Exit

Example: CALL Customer


function "XXX"
INCLUDE ZXXX. ."create and
add logic

In case of a PERFORM, you have access to You have access only to the
almost all the data. So you have better importing, exporting, changing
control, but more risk of making the and tables parameter of the
system unstable. Function Module. So you have
limited access to data.
User exit is considered a modification and A customer exit is considered
not an enhancement because we are an enhancement because we
changing the existing code. are adding additional
functionality to the existing
one..not changing any thing.
You need Access Key for User Exit. You do not need access key.
Changes are lost in case of an upgrade. Customer exits came later and
they overcome the
shortcomings of User Exit.
User Exit will be activated automatically To activate a function exit, you
when ever you activate the need to create a project in
application(program). CMOD and activate the project.

1. What are the different ways in which you can make changes to
SAP standard software ?
Customizing
Enhancements to the SAP Standard
Modifications to the SAP Standard
Customer Development

2. What is customizing?
Customizing is the setting of system parameters via SAP's own interface.

3. Why do you need enhancements?


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

4. What are the different types of enhancements?


Enhancements using customer exits
Customers' potential requirements which are not included in the standard
software are incorporated in the standard as empty modification 'shells'.
Customers can then fill these with their own coding. Enhancements can
relate to programs, menus and screens. Upward compatibility is assured.
In other words, SAP guarantees that the jump from the standard software
to the exit and the interface which call the exit will remain valid in future
releases.

Enhancements to ABAP/4 Dictionary elements

These are ABAP/4 Dictionary enhancements (creation of table appends),


text enhancements (customer-specific key words and documentation for
data elements) and field exits (creation of additional coding for data
elements).

5. What is customer development?


Creating customer-specific objects within the customer name range.

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

7. What is the difference between modifications and


enhancements?
Modifications mean making changes to the SAP standard functionality.
Enhancements mean adding some functionality to SAP standard
functionality.

8. What are the disadvantages of modification?


Modifying standard code can lead to errors
Modifications mean more work during software upgrades

9. What are the advantages of enhancements?


Do not affect standard SAP source code
Do not affect software upgrades

10. When do you opt for modification?


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

11. What are the various types of customer exits?


Menu exits
Screen exits
Function module exits
Keyword exits

12. What is a menu exit?


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

14. What is a function module exit?


Adding functionality to R/3 applications. Function module exits play a role
in both menu and screen exits.

15. What is a keyword exit?


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

16. How does SAP organize its exits?


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

17. What is an add-on project?


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

Q1: What is the reason for using ENHANCEMENTS?


Ans: Normal programs dont give us all the functionalities we may need,
so to fix this we can use the R/3 enhancements that will permit us to
insert our particular functionality to any normal SAP program.

Q2: What is the meaning of customer development?


A2: Customer development generates objects particular to the customers
in their name range.

Q3: What weaknesses do we find when using MODIFICATION?


A3: One of the weaknesses is that we could have errors when standard
code is modified. This automatically leads to a higher amount of work
when software upgrades are made.

Q4: Why should we choose to make MODIFICATIONS?


A4: Customer exits dont exist in every screen and program from R/3, and
because they can be used just if they are already existing in SAP R/3,
sometimes we must choose to make modifications.

Q5: What is the meaning of a SCREEN EXIT?


A5: Screen exits means to add fields to R/3 screens, SAP generates screen
exits by deploying particular subscreen areas in a normal R/3 screen and
then invoking customer subscreens from the normal flow logic of dynpro.

Q6: What is the way in which exit organizing is made by SAP?


A6: Organizing exit packages of SAP is also found under the name of SAP
enhancements and every SAP enhancement can have several particular
exits.

Q7: What is the meaning of USER EXITS, how are they written and
which measures do we have to take for prevention?
A7: In the default standards of SAP we can find the user defined
functionalities, we can find a Sap program in which a customer personal
program may be invoked. Unlike customer exits. user exits can permit the
developers to enter and change the parts of the program and also the
objects. When upgrade is made , every user exit has to be verified for
conformation to the standard system. The user exits can use INCLUDES,
case in which Customizing makes the management. We have to search for
those customer enhancements from a specific development class.

Q8: Can we classify the ENHANCEMENTS by type?


A8: Yes they can be classified in:
a) enhancements that use customer exits and
b)enhancements of the elements in the ABAP/4 Dictionary.

a) The standard software doesnt incorporate all the requirements of


the customer, but they can be contained as empty shells that can be
changed by the customers by inserting their personal codes. The
enhancements can refer to menus, screens or programs, the compatibility
being assured. This means that in SAP guarantees that the compatibility
will be maintained even when passing from standard software to exit and
the interface invoking the exit (they will be kept for future versions too).

b) These are enhancements like table appends or text enhancements


or field exits (supplementary coding for data elements).

Q9: What is the meaning of SSCR?


A9: The SAP Software Change Registration or SSCR is the operational that
makes possible the registration of every manual change of the SAP source
coding and objects of SAP Dictionary.

Q10: What are the strong features of Enhancements?


A10: They dont have an impact on the standard source code of SAP, they
dont have an impact on software upgrades.

Q11: Which are the main types of CUSTOMER EXITS?


A11: The main types of customer exits are: the screen exits, the menu
exits, the function module exits and the keyword exits.
Q12: What is the meaning of FUNCTION MODULE EXIT?
A12: The function module exit is meting supplementary functionality in
R/3 programs having a big role in the menu exits and the screen exits.

Q13: What is the meaning of an add-on project?


A13: For using in the best way the exits we find in the standard R/3
programs we have to make an add-on project, that makes possible
organizing the enhancement packs and the exits we desire to use. An add-
on project makes possible to met add-on functionality on the texts from
the SAP enhancements.

Q14: What is the meaning of a keyword exit?


A14: With a keyword exit we can give to the data elements of the
keywords from the ABAP/4 dictionary some documentation. This
documentation will be shown by the system every time users hit the F1
key for obtaining help online regarding a screen field.

Q15: What is the meaning of a MENU EXIT?


A15: Menu exits mean when we add item on the pull-down menus.

Q16: How can we separate ENHANCEMENTS from


MODIFICATIONS?
A16: When we create modifications on the functionality of the SAP
standard we say modifications. When we put supplementary functionality
on the standard functionality of SAP we say enhancements.

Q17: What is the meaning of CUSTOMIZING?


A17: When we configure the system parameters through the SAP
interface we mean customizing.

A18: How can we classify the methods in which we generate


modifications in the standard software of SAP?
A18: We can make: enhancements to the standard of SAP, modifications
to the standard of SAP, customizing and customer development.

Implicit Enhancement:
In implicit they are available at the beginning of subroutines defined in the
standard reports.
Edit-> Enhancement operations->show implicit enhancement options.
This will highlight all the implicit enhancements in the report.

In Explicit enhancement we have two different types of enhancements -


Enhancement point and Enhancement section.

Enhancement point - SAP has some standard functionality defined for a


report , but it may be required that you'll need to add your own code. In
this case the code that you'll add will be executed along with the standard
code.
Enhancement section - SAP has its standard functionality defines but it
may not suit your requirement, in that case you may need to add your
code and you'll need that code to be executed only. By this method the
existing code is automatically commented and a copy of the same code is
available to edit.
After executing the report only your code will be executed and the
standard code will be bypassed.

Enhancement Spot:
The enhancement spots are used to manage explicit enhancement
options. 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.
For example, when editing an ABAP program with the ABAP Editor, you
can define explicit enhancement options in the form of
the ENHANCEMENT-POINT statement
A simple enhancement spot is always assigned to exactly one
enhancement technology (ABAP source code enhancement or BAdI).
Composite enhancement spots are used for the semantic grouping of
simple enhancement spots. A composite enhancement spot contains
either one or more simple enhancement spots and/or one or more
composite enhancement spots of the relevant type. You can use
composite enhancement spots to combine simple enhancement spots into
meaningful units

IMPLICIT ENHANCEMENT:
Implicit enhancement points are basically points within ABAP code where
an enhancement point is implied, and in which case can be created.
Examples of implicit enhancement points are at the beginning and end of
FORMs, at the end of a program, include or function module etc. Below is
a step by step demonstration of how to create and implicit enhancement
point.

Step 1 - Activate the enhancement functionality


Within SE80 open up the program/include you want to enhance and click
on the enhancement button (show below)
Step 2 - Enhancement functionality activated
The SE80 screen will now look something like below!
Step 3 - Show implict enhancement points
Goto menu 'edit->Enhamcement Operations->Show Implicit Enhancement
Options' to display implicit enhancement points within the ABAP code
Step 4 - Enhancement points with the code
Once you have done this you will be able to see all the implicit
enhancement points available within you code, these are denoted by the
line of quotation marks and the black arrow at the start. In this example
there are enhancement points at the start and end of each form and one
at the very end of the include.
Step 5 - Create an implicit enhamcement point
Inorder to implement an implicit enhancement point simply right click on
the required enhamcement point and select 'Enhancement
Implementation->create'.

Step 6 - Enhamcement point type


Next click on the code button to create a code implementation
Step 7 - Name and description
Next give the enhancement point a name and description. Click the green
tick

Step 8 - Change request


Assign change to a change request in the usual way

Step 9 - Enhancement point created


The enhamcement point will now have been created in the appropriate
place. Denoted by the ENHANCEMENT...ENDENHANCEMENT tags
Step 10 - Enter code into enhancement
You can now enter your own code into the enhancement point!

Step 11 - Activate the enhancement point


Click the 'Activate Enhancements' button to activate it.
Step 12 - Turn enhancement mode off
Now click the 'Active <-> inactive' button to turn enhancement mode off
and return to standard SE80

SAP OOPS ABAP INTERVIEW QUESTIONS AND ANSWERS


What is OOPS ABAP ?
Object orientation (OO), or to be more precise, object-oriented
programming, is a problem-solving method in which the software solution
reflects objects in the real world.
A comprehensive introduction to object orientation as a whole would
go far beyond the limits of this introduction to ABAP Objects. This
documentation introduces a selection of terms that are used universally in
object orientation and also occur in ABAP Objects. In subsequent sections,
it goes on to discuss in more detail how these terms are used in ABAP
Objects. The end of this section contains a list of further reading, with a
selection of titles about object orientation.
What is the Difference between Class and Object ?
A Class is actually a blueprint or a template to create an Object. Whereas
an Object is a an actual instance of a Class. For example Employee ia a
class, while John is a real employee which is an Object of Employee Class.
How polymorphism can be implemented ?
Some examples to implement polymorphism:
1. Method Overriding
2. Method Overloading
3. Operator Overloading
What is Inheritance ?
In OOPs terminology, inheritance is a way to form new classes using
classes that have already been defined. Inheritance is intended to help
reuse existing code with little or no modification. The new classes, known
as derived classes, inherit attributes and behavior of the pre-existing
classes, which are referred to as base classes.
What is Method Overriding ?
Method overriding allows a subclass to override a specific
implementation of a method that is already provided by one of its super
classes.
A subclass can give its own definition of methods but need to have
the same signature as the method in its super class. This means that
when overriding a method the subclass's method has to have the same
name and parameter list as the super class's overridden method.
What is Method Overloading ?
Method overloading is in a class have many methods having same name
but different parameter called overloading or static polymorphism
What is Aggregation ?
Aggregation is a special form of association. Aggregation is the
composition of an object out of a set of parts. For example, a car is an
aggregation of engine, tyres, brakes, etc.
Aggregation represents a "Has" relationship like a car has a engine.
What is object oriented programming language ?
Object oriented programming language allows concepts such as
abstraction, modularity, encapsulation, polymorphism and inheritance.
Simula is the first object oriented language. Objects are said to be the
most important part of object oriented language. Concept revolves around
making simulation programs around an object.
What are the core ABAP oops concepts ?
Inheritance: Inheritance is the ability of an object to inherit the
properties and methods of another object. This characteristic leads to the
creation of families of objects (just like families exist for humans) with
parent objects and child objects.
Polymorphism: Polymorphism is about an objects ability to provide
context when methods or operators are called on the object.
Definition: Polymorphism
In object-oriented programming, polymorphism (from the Greek meaning
"having multiple forms") is the characteristic of being able to assign a
different meaning to a particular symbol or "operator" in different
contexts. The simple example is two classes that inherit from a common
parent and implement the same virtual method.
Definition: Encapsulation
Encapsulation: Encapsulation is the ability that an object has to
contain and restrict the access to its members. Encapsulation is a key
concept of object programming that ensures the autonomy and integrity
of the objects.
Abstraction: Another OOPS concept related to encapsulation that is
less widely used but gaining ground is abstraction.
Definition: Abstraction
Through the process of abstraction, a programmer hides all but the
relevant data about an object in order to reduce complexity and increase
efficiency. In the same way that abstraction sometimes works in art, the
object that remains is a representation of the original, with unwanted
detail omitted. The resulting object itself can be referred to as an
abstraction, meaning a named entity made up of selected attributes and
behavior specific to a particular usage of the originating entity.
What is UML ?
UML (Unified Modeling Language) is a standardized modeling
language. It is used for the specification, construction, visualization and
documentation of models for software systems and enables uniform
communication between various users.
UML does not describe the steps in the object-oriented development
process.
SAP uses UML as the company-wide standard for object-oriented
modeling.
UML describes a number of different diagram types in order to
represent different views of a system.
What are the types of Objects and Classes ?
In general there are two types of Objects: Instance Object and Static
Object and as such there are two types of Classes: Instance class and
Static Class. Specifically when it comes to visibility, Private class,
Protected class and Public classes are the types of classes one can have.
What are the types of classes which can be created ?
We can create four types of classes under final and only modeled
category(optional) with the private, protected, public and abstract
instantiation.
Usual Abap Class.
Exception Class(With/Without messages).
Persistent Class.
Test Class(ABAP Unit).
What are the types of classes which can be created ?
We can create four types of classes under final and only modeled
category(optional) with the private, protected, public and abstract
instantiation.
Usual Abap Class.
Exception Class(With/Without messages).
Persistent Class.
Test Class(ABAP Unit).
What is a reference variable ?
Objects can only be created and addressed using reference variables.
Reference variables allow you to create and address objects. Reference
variables can be defined in classes, allowing you to access objects from
within a class.
What is a reference variable ?
Objects can only be created and addressed using reference variables.
Reference variables allow you to create and address objects. Reference
variables can be defined in classes, allowing you to access objects from
within a class.
What is the difference between Abstract method and a Final method ?
Abstract method
Abstract instance methods are used to specify particular interfaces
for subclasses, without having to immediately provide implementation for
them. Abstract methods need to be redefined and thereby implemented in
the subclass (here you also need to include the corresponding redefinition
statement in the DEFINITION part of the subclass). Classes with at least
one abstract method are themselves abstract. Static methods and
constructors cannot be abstract (they cannot be redefined).
Abstract (instance) methods are defined in the class, but not
implemented
They must be redefined in subclasses.
What is a super class ? How can it be implemented ?
A super class is a generalization of its subclasses. The subclass in turn is a
specialization of its super classes.
What is a Narrowing Cast ? How can you implement it ?
The assignment of a subclass instance to a reference variable of the type
"reference to superclass" is described as a narrowing cast, because you
are switching from a more detailed view to a one with less detail.
What is a Widening Cast ?
The widening cast is, as with inheritance, the opposite of the narrowing
cast: Here it is used to retrieve a class reference from an interface
reference.
What is a singleton ?
If it is to be impossible to instantiate a class more than once (for example,
because it serves as a data administrator or data container), you can use
the singleton concept. The class is defined with the addition CREATE
PRIVATE and FINAL and instantiated using its static constructor. A public
static component could then make the reference to the class available to
an external user.
What are the limitations of redefining a method ?
Inherited methods can be redefined in subclasses Redefined methods
must be re-implemented in subclasses. The signature of redefined
methods cannot be changed Static methods cannot be redefined. In
inheritance, static components are "shared": A class shares its non-private
static attributes with all its subclasses. In ABAP Objects, you can not only
add new components, but also provide inherited methods with new
implementations. This is known as redefinition. You can only redefine
(public and protected) instance methods, other components (static
methods, attributes and so on) cannot be redefined. Changes to method
parameters (signature changes) are not possible.
What are static components? What is a component selector ?
In inheritance, static components are "shared": A class shares its non-
private static attributes with all its subclasses. => and -> are the
component selectors used to refer.
What are component instance ?
A component instance is a running component that can be run in parallel
with other instances of the same component.
How is Encapsulation implemented in OOPs ?
Encapsulation means that the implementation of an object is hidden from
other components in the system, so that they cannot make assumptions
about the internal status of the object and therefore dependencies on
specific implementations do not arise.
What are BADIs? What are BADI filters ?
BADI - Business Add Ins are enhancements to the standard version of the
code of SAP.
Filter Badi- Business Add-Ins may be implemented on the basis of a filter
value. If an enhancement for country-specific versions is provided for in
the standard version, it is likely that different partners will want to
implement this enhancement. The individual countries can create and
activate their own implementation.
What are the types of Exception classes ?
a. Global
b. Local Exceptions Class.
Where can a protected method be accessed ?
Protected components Only visible within the class and its sub classes.
What is a signature of a method ?
Methods have a parameter interface (called signature ) that enables
them to receive values when they are called and pass values back to the
calling program.
In ABAP Objects, methods can have IMPORTING, EXPORTING,
CHANGING, and RETURNING parameters as well as exception parameters.
CLASS DEFINITION. ... METHODS: [ IMPORTING TYPE EXPORTING
TYPE CHANGING TYPE RETURNING VALUE() TYPE EXCEPTIONS RAISING ].
ENDCLASS.(signature of a method). CLASS IMPLEMENTATION. METHOD . ...
ENDMETHOD. ENDCLASS.
What is a functional Method ?
Methods that have a RETURNING parameter are described as functional
methods. These methods cannot have EXPORTING or CHANGING
parameters, but has many (or as few) IMPORTING parameters and
exceptions as required.
What is a de-referenced variable ? What is a garbage collector ?
To go to an address before performing the operation a dereference
variable is a pointer to the variable, not the variable itself. A pointer can
be re-assigned any number of times while a reference cannot be
reassigned after initialization. Field symbols are similar to dereference
pointers. Thus, you can only access the content of the data object to
which the field symbol points. (That is, field symbols use value semantics).
If you want to access the content of the data object, you need to
dereference the data reference first.
Can a class be defined without a constructor ?
Yes, class can be created without any constructor. Default constructor will
be created when we define a class without constructor.

Workflow Interview Questions

On ABAP: Did you set up a workflow ? Are you familiar with all steps for
setting up a workflow ?

Yes.
Execute the Txn SWDD (Creating a new Workflow).
In the header of the Workflow, define the Business Object and Event
you refer to for triggering the Wf.
Create the Steps required for your workflow(Activity).
Inside the Activity, Create the task and assign the Business Object
and the related method for that business object.
Activate the Workflow.
Sub-Workflow :

1. When we complete a workflow and on the basis of that we hit another


transaction. Lets say we created a sales order and on basis of that we
created delivery.
2. As soon as delivery created we have to put another condition.
3. So till sales order creation we would use one workflow.
4. To check delivery, when it was created we use another workflow.
5. Now these are two different workflows basically, but we can use them in
a single workflow.
6. We finish one workflow and insert the business object of that workflow
in the other workflow and capture the event of workflow. So basically we
use a single workflow instead of two different workflows like this. So
basically in the activity of second workflow , instead of task workflow we
enter workflow number of first workflow.
Have you used performance tuning? What major steps will you use for
these ?
The Main Transaction Code Involved in Performance Tuning is SE30-Run
Time Analysis and ST05-SQL Tracer.
In the 'select' statement what is "group by"?
Group by clause is used to fetch the data from the table by the
specified field
ex.select count (*) from emp table group by deptno where deptno =
1.
It is used to find the number of employees present in the specified
department no.
SAP R/3 screens how will you develop a table control having 3 columns
with only one editable ?
we can develop it by giving the code in PBO (process before output)
giving table control line = 3. it will give only 3 lines and we can make 2
lines disable in screen painter options available in table control
Elementary search helps, Collective search help.
Elementary search helps defines a search path where we will define
the table from which the data has to be read and the selection criteria.
Through import and export parameters. Used when we gets the data rom
a single table.
Collective search helps: Combination of elementary search helps.
When we need to fetch data based on multiple selection criteria's. More
than one tables are Selection from multiple tables
Difference between Search Helps and Match Codes
search help: adding f4 functionality is search help(adding help for
any topic)
match code: adding search help for the input field is called as math
code object
Have you created database tables ?
YES , IF WE HAVE CUSTOMISED DATA TO STORE IN TABLE , WE CREATE A
TABLE.
Difference between client dependent and client independent tables ?
tables which can be access by all user are client independent (no
mandt field in table)
tables which can be access by some specific user are client
dependent (use mandt field in table)
How to create client independent tables ?
the table in which the first field is not mandt is the client
independent tables
mandt is the field with mandt as the data element
automatically client which we login is populated to mandt
Have you created Maintenance dialog or Table Maintenance ?
At the time of creating table through, there is a check box for table
maintenance allowed.So if you want to activate the table maintenance,
just mark this box. Once table gets activated, u can change its contents
through SM30 ot Through Table Maintenance.
List the various advantages of SAP Business Workflow
Workflow provides numerous advantages to SAP users and
consultants:
It allows consultants to create new business processes without
modifying the standard SAP code.
Workflow ensures that the tasks are executed in the correct
sequential order, involving the relevant personnel.
SAP Business Workflow may be run through the internet or intranet
web applications via the Webflow Engine.
Deadline Monitoring functionality is also incorporated within SAP
Workflow.
The timely execution of activities is guaranteed even when a
number of parties (users) are involved.
Workflow reduces both time and expense involved in managing
business activities.
What is a work item ? How does it differ from a simple SAP office mail
item ?
A work item is a runtime object generated by a step within a
workflow. Whenever user interaction is required, the respective users are
informed via work items. These work items will be received by the user in
their Business Workplace inbox, or other email application such as
Microsoft Outlook&rights;
The work item may be a user decision or a dialog form that allow
you to enter data for starting a process within SAP, or a confirmation of
whether a particular task may be performed. The user then chooses an
appropriate option which determines the subsequent behavior of the
workflow in question. There are a variety of applicable work items. Each
work item has a status reflecting the stage of processing at any given
point in time.
A work item comprises of text explaining what action needs to be
taken, whom to refer to and any information pertinent to the business
object involved.
Unlike simple SAP office mails, work items are active entities, as
they determine the subsequent direction of the workflow. SAP office mails
can also be deleted from the inbox without viewing them whereas a work
item has to be executed to have it removed from your inbox.
What is a background work item ? Are they displayed in the Business
Workplace ?
A background work item (code B) represents tasks that do not require any
user interaction. They are controlled and executed automatically by the
workflow system, and do not appear in the Business Workplace. However,
you may view them using the Work Item Selection Report.
Which method is executed if space is passed for the method parameter
of macro SWC_CALL_METHOD ?
The Default method of the object type is executed if a space is passed as
the method parameter value. You can find the default method by viewing
the applicable object using transaction SWO1 and going to menu option
"Goto -> Basic Data" and clicking on the Defaults tab. The default method
is located in the field "Method"
Name the tables used for storing the event linkages ?
SWETYPECOU - Type Linkage Table
SWEINSTCOU - Instance Linkage Table

SAP Workflow Interview Questions & Answers

What are the different types of WF Agents?


1.Possible Agents
Users who are authorized to execute the task
Configured during Task definition (Org Unit, Position, User, Work Center,
Role, Rule)
If a Task is configured as General Task, then all users become possible
users.

2.Responsible Agents
The users to whom the work item needs to be sent.
This is set during Step definition. Note that Possible agents are defined
during Task definition. (Org Unit, Position, User, Work Center, Role, Rule,
Container Element)
Note: The work item recipients is determined by intersection of Possible
Agents and Responsible Agents.

3.Actual Agents
Actual user who executed the dialog task

4.Excluded Agents
Users who are not supposed to execute the dialog task (even if they are in
possible agents)

What are the agent determination techniques?


Rule Resolution with responsibility: Helpful when a set of static positions
are responsible for action.
Rule resolution with Function (FM): Helpful when agents are determined
dynamically from business logic.
Rule resolution with OM: Usually used in CRM. Have not used
Rule resolution with Function, but asynchronously: This is through a
class and a method. Initially WI is created in status ready without agent.
Later agent is assigned. This is suitable for agent determination having
complex logic.
Users: Rarely used.
Role: Ex: ABAP_DEVELOPER
OM objects (Position, Org Unit, work center)
Expression: A container element containing the agents.

Containers
Workflow Container:
Task Container:

SWC_GET_CONTAINER
SWC_GET_TABLE
SWC_SET_CONTAINER
SWC_SET_TABLE

Event Container:
Method Container:
Rule Container: For resolving rules

Business Objects
Key Fields:
Attributes:
Database: Automatically gets populated by system code
Virtual: You determine the content and use SWC_SET_CONTAINER to
populate
Methods: Can be created using FM, Transaction, Report, Dialog Module,
Other
Synchronous: Finish execution before handling the control back to the
task.
Asynchronous: Return the control back immediately. Cannot have
export parameters. They depend on events to return results back to the
calling program.

Dialog: Something to user


Background: Cannot have messages or exceptions

What are the options to implement method of a BO?


FM
BAPI
Tcode
Dialog Module
Report
Other (BO program)

How to extend a BO?


Got SWO1 and enter a BO that you want to extend. Click on New Subtype
Give all the details.
Go back to SW01, enter the BO, and goto Settings Delegate.
Example:
BUS7051: Notification,
BUS1001: Material,
BUS2012: Purchase Order,
BUS1065: Employee

Various status of BO
Modeled: Not accessible at runtime
Implemented: Not ready to be used, Internal use only
Released: For customer to use
Obsolete: Dont use anymore

To change attribute values from methods of a BO


SWC_GET_CONTAINER
SWC_SET_CONTAINER

Events:
How to create Events?
HR Tables: SWEHR2/3
ABAP Code user Exit: SWE_EVENT_CREATE
Change Document: SWEC
Status management:
Message Control:
Event Linkage: SWE2

Subtype:
Key field cannot be created. Methods and attributes can be created.

Delegate:
If you want to change the functionality of a method, define a sub type,
redefine the method, delegate the parent business object to child object.

Interface
Interface is a combination of Attributes, Methods and Events, to reduce
the redundancy in definition.
IFSAP: Common interface for all BOs. It has following methods
Method: Display
Method: Existence Check
Attribute; ObjectType

Different Workflow Steps activities


Condition:
Multiple Conditions:
Until Loop:
Fork:
Send Mail:
Container Operations:
Event Creator:
Wait Event:
Process Control
Different deadline conditions
Requested Start: When this date is met, only then the work item will
start execution, or available for taking action (dialog).
Latest Start: When a date mentioned here is met, it can send an email,
or can be modeled to do something action.
Requested End: Same as Latest Start
Latest End: Same as Latest Start

Important Tcodes
Workflow Toolbox: SWUS
Simulate Event: SWU0
Business Object Repository: SW01
Event Trace: SWEL (S)
Workitems per task: SWI2_FREQ
SWUE: Event simulate
SWEL: Event log
SWELS: Set event log ON
SWE2: Linkage between Event and Workflow
SWEHR2: Event linkage in HR
SWU3: Workflow customizing
SWU_OBUF: Synchronize buffers
SWI5: Look into other users SBWP

What are the Important background Jobs for workflow?:


SWWDHEX For deadline monitoring
SWWERRE For error Monitoring
SWEQSRV For Event Queue Delivery

Workflow experience:
What are the workflows created by you? Worked upon by you?

Function Module that creates workflow


SAP_WAPI_START_WORKFLOW:
SAP_WAPI_CREATE_EVENT
SAP_WAPI_WORKITEM_RECIPIENTS
SAP_WAPI_GET_WORKITEM_DETAIL

When a infotype action is performed, an event should trigger, and


a workflow subsequently. How can I configure it?
Answer: Tcode SWEHR2

When a infotype action is performed, an FM should trigger, and a


workflow subsequently. How can I configure it?
Answer: Tcode SWEHR2

Workflow is not triggering... what can be the reason?


What are the different ways of triggering a workflow?
Triggering Events, which are set up in SWE2 (generic), SWEHR2 (HR)
SAP_WAPI_START_WORKFLOW
Workflow triggered, but it did not come to the user, why?

What are the difference between a Business Object and a Class?

How to achieve dynamic parallel processing?


There are three ways a parallel processing can be implemented
Dynamic parallel processing using a multi-line container element
Fork (3 out of 5) Work queue
In dynamic processing the type of each entry in the table have to be of
same type.
Same task will be processed for each line of the multi-line container. It
can be a dialog or background task. Deadline monitoring, binding, agent
determination will be same for each work item generated To achieve, go
to Miscellaneous in the activity, and enter the multi line container
element.

How to notify a user immediately in R/3 that he has got an email?


Mark the priority as 1 Express

How can we debug a workflow?


If it is a dialog task, you can set breakpoint in the method called by
the task
If it is a method that you want to debug, use SWO1, and create a
instance of the object and debug the methods
If it is a background task, and you are in development client, you can
do the following. Create an infinite loop in the method you want to debug.
Go to SM50 (processes overview) and select the relevant item, and select
debug from option.

Huge number of events is getting created in a short duration of


time, and thus creating a huge load on the system and making it
very slow. Solution?
Enable event queue. It will ensure that triggered events are received
in a phased manner. This needs to be done while providing event linkages.

Why Process Control is used? What are its features?


Process Control is used to manipulate another work item of the
workflow during runtime.
Process Control is usually used to model the workflow when deadlines
are reached. SAP offers 4 standard behaviors as part of process control.

Cancel Work item: Target WI is logically deleted. Subsequent tasks are not
executed. Precondition is that Process control and the target WI have to be
in different branches of the same fork.
Set Work item to obsolete: The target WI is set to complete, and
processing continues in the branch processing obsolete.
Cancel Workflow: Current workflow is set to Complete. If this is the sub
workflow, then the control goes to super-ordinate workflow.
Complete (terminate) Workflow: Same as above, but the branch of super-
ordinate workflow which contains the current sub-workflow will not be
continued.
Cancel Workflow including all callers: Same as above, but all callers also
will be COMPLETEd.

What is the integration point with ESS Portal?


Tcode SWFVISU
Portal config file for UWL

What are the types of work items?


Dialog Work item - W
Background work item
Workflow work item
Work queue work item
Missed deadline work item: When a deadline is missed a missed
deadline workitem with the message appears in inbox

What are the different statuses of a work item?


Waiting
Ready
Reserved
Inprocess
Executed (confirm end of processing in task definition)
Completed
Logically deleted
Error

Difference between Asynchronous and Synchronous methods in a


task
A work item created as part of synchronous in locked until end of the
method execution. But in asynchronous, work item is locked only until
start of method execution.
At least one terminating event is required for a task using Asynchronous
task

What is the use of secondary methods in an Activity?


A modal call
Before work item executing
After work item execution

What is the BO method called for the task which calls UWL WD
screens? Why?
EXTSRV --> PROCESS

What are Programmer exits? And why are they used?

What is the use of Advance with dialog?


If this indicator is set for an activity, workflow system checks if the
processer of current task is also a recipient for next task. If yes, then the
next task will be executed immediately.

Why is my workflow not starting?


Some possible reasons/solutions:
If started by an event:
run SWU_OBUF and check transaction SWU3 for problems
check that the linkage between the event and the workflow exists in
transaction SWE2 and is activated
check transaction SWEL to see if event was created / gets created
(may need transaction SWELS to turn SWEL on)
test if creating the event manually in SWUE triggers the workflow
check if there is a start condition that isnt being satisfied
check if the event is in a queue (if event queueing is turned on, see
transaction SWEQADM)
check WF-BATCH in transaction SU01, see if all is well (e.g. password
not expired)
If started directly (e.g. with function module
SAP_WAPI_START_WORKFLOW; not recommended if it can be avoided):
run SWU_OBUF and check SWU3 for problems
check if workflow has been set to General Task
Why is my workitem going to all users? This normally happens when
A task has been set to General Task and
the agent assignment fails to return an agent (or hasnt been set)
and
the Terminate if rule resolution has no result box has not been
checked
This is usually fixed by checking the Terminate if rule resolution has no
result box Why is this user receiving this workitem, when he
shouldnt?
Some possibile reasons/solutions:
run SWU_OBUF and check transaction SWU3 for problems
the task has been set to General Task, no agent was determined and
the Terminate if rule resolution has no result box was not checked so the
workitem is going to every user
the agent determination is faulty
the user has been set up as a workflow substitute for another user
in table HRUS_D2
the user is actually receiving an email, not a workitem, and the user
has been setup as an email substitute in table SOSU
Why is this user NOT receiving this workitem, when he
should? Some possible reasons/solutions:
run SWU_OBUF and check transaction SWU3 for problems
the task has not been set to General Task
the agent determination is faulty
The user has a worflow substitute set up for him in table HRUS_D2
the user is actually expecting an email, not a workitem, and the user
has an email substitute set up for him in table SOSU
the user has been listed as an Excluded Agent for that task
Why is my workflow stuck / hanging? Some possible
reasons/solutions:
run SWU_OBUF and check SWU3 for problems (e.g. SWWDHEX or
SWWERRE not running)
check for any shortdumps in transaction ST22
if a method is hanging in the background, check in transaction
SWO1 that it isnt mistakenly marked as Dialog
if the method is a Dialog method then check the agent hasnt been
set as WF-BATCH
check that WF-BATCH has SAP_ALL
check if there is an error handling problem, especially if a method
calls a function
How come my workflow works fine in DEV but not in QA? (or
PROD) Some possible reasons:
run SWU_OBUF and check SWU3 for problems
user WF-BATCH may have problems, e.g. expired password, no email
address supplied
custom tables used for agent determination not filled in the same
way
a different version of the workflow is being used
How do I get a background step to be run as a certain user,
instead of WF-BATCH? Try having that user run a dialogue step
beforehand, with advance with dialogue.
How can I find out which users are holding up the workflows?
Look in the workflow logs. For a large number of workflows or workflow
instances, create a report which calls function module
SAP_WAPI_WORKITEM_RECIPIENTS.
If you combine it with function module SAP_WAPI_GET_WORKITEM_DETAIL
you could make a report which shows all users that various workflows are
waiting for.
How can I look inside another users SBWP workflow inbox?
Transaction SWI5 (assuming you have sufficient privileges)
Where is this workflow started?
Use transaction PFTC_DIS to see if the workflow has a starting event.
If not, then the answer is beyond the scope of this brief FAQ, but you could
try a where-used on function module SAP_WAPI_START_WORKFLOW.
If there is a starting event, check in transaction SWE2 that the event is
actually linked to the workflow and, if so, try doing where-used on function
modules SAP_WAPI_CREATE_EVENT and SWE_EVENT_CREATE (look for Z
programs).

Rules in Workflow
Definition:
Workflow rules allow us to define and enforce an issue handling process.
Rules allow us to specify data at runtime according to a template defined
at definition time.
Together with e-mail notifications, workflow rules help us automate the
tracking and management of Issues.
What is the difference between Rules and Roles?

Web Dynpro Questions and Answers

Create Simple WebDynpro Application

1.Go to Se80 and select web dynpro from dropdown and enter
name of webdynpro component and description, select type as
web dynpro component
2. Create a view and assign the view to window
3. Open view editor and switch to tab 'Context'. Create a context
node in view controller by opening corresponding context menu.
4. Add attributes from structure and give the name of desired
table
5. Than we create User Interface element for context node under
ROOTUIELEMENTCONTAINER
6. Than we create binding for our table with relevant node and
enable binding for all context attributes by activating all
checkboxes
7. Than again right click on the webdynpro component we created
initially and create the web dynpro application by entering our
desired name and give its description
8. Than we activate all objects and test our application
Every Web Dynpro application is structured according to the Model View
Controller programming model

Model:
The model forms the interface to back end system and it enables the Web
Dynpro application access to data. Its kind of act as a proxy that detaches
the Web Dynpro application from the data and functionality found in the
remote system. In other words, the Web Dynpro application doesnt need
to concern with the specific communication technology required to
interact with the back end system.

View:
The view is responsible for the representation of the data in the browser.
View is used to define a client neutral visualization of the business data

Controller:
The controller lies between the view and the model. The controller
formats the model data to be displayed in the view, processes the user
entries made by the user, and returns them to the model.

Controllers in Web Dynpro:

Question 1: What are the types of Controllers in Web Dynpro ABAP?


The types of controllers are listed in the screenshot below:

Types of Controllers in webdynpro ABAP

Question 2: What is Component Controller?


Component Controller is the King of all Controllers. It is the
backbone of your Web Dypro Component . It is like a Global or Top Include
for you program . It controls the entire activity of your Web Dynpro
Component.

Question 3: What is an Interface Controller?


Whenever we want views , nodes or methods of a particular web dynpro
component to be available to other the outside world ( i.e. other
webdynpro components) , we make use of Interface controller . Interface
Controller is created by default when a webdynpro component is created.
Interface Controller would generally come into picture when you are doing
component usage of some sort in web dynpro i.e. re-using
views/methods/nodes of one WD component in another.

Question 4: What is a Custom Controller?


When your Component Controller grows big in size ( say more than 10-15
views and corresponding context nodes , methods , events , event
handlers etc) , it might become tough to handle everything in the
Component Controller . In such a scenario , you can create one or more
custom controllers and modularize or segregate the logic into separate
parts using Custom Controller.

Question: What is View Controller?

However , If the node is absolutely specific to only one view , it can be


defined in the View Controller

Question 10: At design time how do you decide whether to declare a


node in the Component Controller or in the View Controller?
This again depends on the requirement: If the node is going to be
accessed in multiple views , it should be declared at the Component
Controller level . However , If the node is absolutely specific to only one
view , it can be defined in the View Controller. As the size of
Webdynpro development grows , it starts becoming complex and the need
to define attributes,nodes,methods etc. at the Component Controller
increases.
Question 5: Would you prefer creating multiple Custom Controllers OR
would you go for separate Web Dynpro components and then do
Component usage.
This would actually depend on the requirement , but ideally separate Web
dynpro components should be created and reused.One can also use the
assistance class for segregating business logic.
Question 6: How many component controllers can a Web Dynpro
Component have ?
Component Controller is only one . You can create multiple controllers ,
but those are called Custom Controllers.

Note: If you are asked about the Web Dynpro architecture , you should
talk about both the MVC framework and the controllers.

Question 7: Suppose your Web Dynpro has 10 nodes in the Component


Context . Will all 10 the nodes be available in the Interface controller?
Nodes from the Component context are available to the interface
controller only when the nodes are declared as interface nodes.To create
an interface node , set the interface property to yes as shown in the
screenshot below:
Interface Node in Webdynpro ABAP
To create an interface node , set the interface property to yes as shown in
the screenshot to the right :

Once created , the interface node is indicated by a special symbol as


shown in the figure below and the property Interface Node is set to yes:

Interface Node in Webdynpro ABAP

Question 8: When do views become available in the interface


Controller ?
Whenever we embed any view in a window , at the moment that view
becomes automatically available to the Interface Controller and shows up
as an interface view in the Interface Controller. You do not have to declare
a view as an interface view as is the case with interface nodes.

Question 9: Is it true that each controller has its own Context node ?
Yes , Each controller has it's own context , methods , and Events.

Question 10: At design time how do you decide whether to declare a


node in the Component Controller or in the View Controller?
This again depends on the requirement: If the node is going to be
accessed in multiple views , it should be declared at the Component
Controller level . However , If the node is absolutely specific to only one
view , it can be defined in the View Controller. As the size of
Webdynpro development grows , it starts becoming complex and the need
to define attributes,nodes,methods etc. at the Component Controller
increases.

Hook Methods in Web Dynpro:

Question 11:What are Hook Methods in Web Dynpro ABAP ?


Hook methods in webdynpro are standard web dynpro methods that are
called at different time in the web dynpro lifecycle.These methods are
listed in the screenshot below: These methods start with WD*.

Hook Methods in Webdynpro ABAP

Question 12:Are all the hook methods available to all the Controllers?
No . They are specific to controllers. See the details in the image above:

Question 13:Sequence in which web dynpro hook methods are called:


If you want to understand the sequence , put breakpoints in all these
methods.Execute the web dynpro application , then do some action on the
view , then close the application window:

Have a look at how the control passes from component to window and
then to view:

1.WDDOINIT ( Component Controller )


2.WDDOINIT ( Window Controller ) --> Handle
default method of the window is called.
3.WDDOBEFORENAVIGATION ( Component Controller )
4.WDDOINIT ( View Controller )
5.WDDOMODIFYVIEW ( View Controller )
6.WDDOPOSTPROCESSING ( Component Controller )

Now view is displayed . Suppose user does some action on the view:

7. WDDOAFTERACTION ( View Controller )


8. WDDOBEFOREACTION ( View Controller )
9. WDDOBEFORENAVIGATION ( Component Controller )
WDDOINIT ( View Controller ) is not called
this time.
10.WDDOMODIFYVIEW ( View Controller )
11.WDPOSTPROCESSING ( Component Controller )
View is displayed again.Now close button is clicked on the browser.

12.WDDOEXIT ( View Controller )


13.WDDOEXIT ( Component Controller )

Application is closed.

So now if you are being asked "What is called first : WDDOINIT or


WDDOMODIFY?" OR
"What is called first WDDOINIT for Window controller or WDDOINIT for
View Controller" ?
You should be able to answer the such questions.

Question 14: If one view is called 10 times in the lifespan of a


webdynpro component , how many times will the method WDDOINIT be
called and how may times will WDDOMODIFYVIEW be called ?
WDDOINIT will be called only once.
WDDOMODIFYVIEW will be called 10 times.
WDDOMODIFYVIEW has a parameter FIRST_TIME . If this is 'X' , then the
view is getting called first_time.

Question 15: What are PRE POST and OVERWRITE exit methods in web
dynpro?
Whenever a web dynpro component is enhanced , these 3 methods
become available for all methods in Webdynpro. Lets take an example of
these methods for WDDOINIT.

PRE exit: This method is called before WDDOINIT is called.


POST exit: This method is called after WDDOINIT is called.
OVERWRITE exit: In this case , WDDOINIT is not called . Instead ,
OVERWRITE exit method is called.

Question 16:What is an Assistance class in webdynpro ABAP? Where do


you define an assistance class? How many assistance classes can a
webdynpro component have?
Assistance class helps you achieve two things:
1) Segregation of business specific logic (one of the purpose of MVC).
2) Performance benefit.
We can write the business logic in the methods of the View, Window or
even the Component controller. But it is not a good practice to load all the
business logic in the views or windows. So SAP has provided an option of
assistance class where you can write all your business logic. By this way,
you are still in the framework of your webdynpro and also avoid loading
too much logic in the components of webdynpro itself. Assistance class
methods are much better from a performance point of view than calls of
Web Dynpro controller methods.

A web dynpro component will have only one assistance class and it is
defined at the component level as per the screenshot below. The
assistance class is automatically instantiated when a component is called.
You can access the instance of this class with the attribute wd_assist,
which is created when you create the assistance class in web dynpro.

Assistance class in web dynpro ABAP

Imp*
Question 17: What is Singleton Property of a Context Node?
Understanding Singleton property of a context node and how it works in
conjunction with the lead selection event can be a bit complicated. If you
do not already know what a Singleton set is , I recommend you going
through an example of Cars(Parent node with cardinality 0..n ) and
Customers ( Nested child node with cardinality
0...n ) on Singleton Node by clicking on the link. This is not that tough ,
just spend some time with it and you should be okay.

The best way to answer this question is by taking an example.


Say there are two ALV's on a View:
ALV1 ---> NODE_SO_HEADER----> Displays all the Sales Orders.
ALV2 ---> NODE_SO_ITEMS ------> Displays all the line items for the Sales
Order selected in ALV1.
NODE_SO_ITEMS is the child node for NODE_SO_HEADER and is declared
as Singleton node.
Since this node is declared as singleton , at runtime , it holds the line item
data only for the Lead Selected Sales Order from NODE_SO_HEADER and
not for all the Sales Orders from the parent node.
Whenever the lead selection changes for the parent node, line item data
for that lead selected order is fetched from database and populated in the
child node.

As a result great performance optimization is achieved.

I hope you get this one :).

Question 18: What is a supply function? When is it called?


You can assign a supply function to a context node when you create a
node. In simple terms, supply function is used to populate data records in
the context node. A supply function is called when one or more elements
of the node are accessed for the first time.

Supply function in web dynpro


To give you an analogy, we all know that a constructor method of a class
is called whenever an object of that class is instantiated. In the same way,
a supply function for a context node is called when the node is accessed
for the first time.

The supply function is generally used in combination with singleton


nodes.So whenever the lead selection of the parent node changes , the
supply function of the singleton node recalculates and repopulates the
child node..

Question 19: What is lead selection? Is it an event?


Yes , the lead selection is an event in web dynpro.
At run time a context node may contain many records , but only one of
those is selected .
The user can select any record from the Table/ALV and this selection is
called lead selection.

Lead Selection in Web Dynpro


Question 20: What is Cardinality of a context node?
Cardinality simply indicates the minimum and the maximum no. of entries
the node can have.
The 4 cardinalities are 0:1, 0:n, 1:1, and 1:n .

Question 21: Is there any relation between Cardinality and Lead


selection?
Yes , If the cardinality is set to 0:1 or 1:1 , the user cannot select multiple
records on the view.
So if you want the user to be able to select multiple records on the
screen , the cardinality of that particular node must be set to 0:n or 1:n.

Question 22: Some important Web Dynpro attributes that you should
know:
Some attribute in webdynpro that are used very frequently and some of
those that you must know are :

Wd_this
Wd_context

Each controller has the above two mentioned attributes.


To elaborate, if you are using the above two attributes say in a method of
a View Controller, then WD_CONTEXT is the reference to the Context node
of the View and WD_THIS is the reference to the View Controller itself.

Wd_comp_controller is the reference to the Component Controller. View


and Window controller have this attribute defined by default and
methods/attributes of the Component Controller can be accessed by using
this attribute.
For example:

Wd_assist: This attribute is created when the assistance class is saved


and activated for a web dynpro component. All the methods of the
assistance class can be accesses by using this attribute.
Question 23: What are layouts in Web Dynpro ABAP?
Flow layout, Row Layout, Grid Layout, Matrix layout and the form layout.
The layout can be set at a Container level.

Question 24: Can you use multiple layouts in one view?


Layouts can be assigned at the container level. For example, you define
the layout for your view at the ROOTUIELEMENT container level.
So if at all you want to use multiple layouts in one view, you can create
multiple transparent containers and assign different layouts to them.

Question 25: How do you introduce line break for a UI element in any
layout?
Say if you are using matrix layout, you will say Matrix Head data for the UI
element for which you need a line break.

Question 26:Can you call/launch one web dynpro application from


another webdynpro application?
Yes, you can launch one webdynpro application from another webdynpro
application.
First, you should get the URL of the web dynpro component that you want
to launch and second, call that URL in an external window.
To get the URL of any web Dynpro component, you use the FM
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = 'ZDEMO
IMPORTING
out_absolute_url = str.
Once you get the URL in str, you can call this web dynpro using 'str' and
fm: create_external_window.

Question 27: Can you create a Tcode for Webdynpro Application?


Creating Transaction code for Web dynpro ABAP

Yes, you can create a Tcode for webdynpro application. Go to SE93 , create
Tcode, choose the last option and maintain default values as shown in the
screenshot:

Question 28: Can you pass parameters in a webdynpro URL?


Yes, you can pass parameters in webdynpro URL and read them too in
your web dynpro component.
Example:http://domainname.com:8000/sap/bc/webdynpro/sap/zdemo_we
bdynpro?sap-language=EN&var1=4500000001&var2=00010

Question 29: How do you read parameters passed in the Web Dynpro
URL?
First lets understand how a typical webdynpro application looks like:
When you create a web dynpro application , you can see the link URL
generated by web dynpro.
It will be something
like:http://domainname.com:8000/sap/bc/webdynpro/sap/zdemo_webdynp
ro?sap-language=EN&sap-client=100.

Whatever comes after the ? and is followed by & is an URL parameter.


You can see sap-language and sap-client as default parameters whenever
you launch your web dynpro in browser. The cool thing is you can add
some custom variables
too. http://domainname.com:8000/sap/bc/webdynpro/sap/zdemo_webdynp
ro?sap-language=EN&sap-
client=100&var1=4500000001&var2=00010.

So var1 and var2 are custom webdynpro URL parameters and you can
read them in the HANDLEDEFAULT method of your main window:
Question 30: Can you run a Webdynpro Application in background?
This is a tricky question. It doesnt make sense to run a webdynpro
application in background because in that case you are beating the
purpose of the MVC controller architecture for webdynpro. However, you
can build logic to create background jobs from a Web Dynpro Application.

So we have by now put a bunch of questions here . Let me know how do


you find these questions.
We haven't yet covered Web Dynpro component usage , ALV, Select
Options , OVS , the coding part in web dynpro, Web dynpro enhancements
etc.

Question 1: What is Web Dynpro Component Usage?


Real world business scenarios are quite complex and may involve multiple
Web Dynpro Components.
While dealing with multiple WD components, you may come across a
situation where you need to reuse already developed parts of an existing
Web dynpro component.

The Web Dynpro framework provides you with a technique called


Component Usage, with the help of which you can reuse the events,
methods, and context of one WD component into another WD component.
Standard examples of Component Usage: Select Options , ALV , OVS.
You declare component usage both at the Component and at the view
levels:

@Component Level:
@View Level:

Question 2: Briefly explain how will you use implement Select


Options in Web Dynpro?
1) Declare Component Usage for Standard WD
componentWDR_SELECT_OPTIONS both at component and view level.

2) Place a VIEWCONTAINER on your main view and embed the view


WND_SELECTION_SCREEN of component WDR_SELECT_OPTIONS in it.

3) Use the
methods CREATE_RANGE_TABLE and ADD_SELECTION_FIELD for your
fields on Selection screen.

4) Use method GET_RANGE_TABLE_OF_SEL_FIELD to read user input


before you do a SELECT.
Question 3: What is the Web Dynpro Phase model?
Whenever a roundtrip occurs from the client (browser) to the server, a
sequence of processing steps is executed. This sequence of processing
steps in web Dynpro is called the Phase Model.
Executing all the tasks in the phase model is the responsibility of the Web
Dynpro framework.
Each step is executed only once and errors if any are captured.

If you want to get into the details , have a look at the webinar from Chris
Whealy: Understanding the Web Dynpro Phase model.

Important
Question 4: What is OVS? Can you explain the different phases
used in OVS?
First we should understand the difference between Value help and OVS i.e.
object Value Selector.
We use generic Value Help only for the field to which it is bound.
OVS is used when we want to populate multiple fields based on one field
on the screen.

So as per the screenshot , If I select Userid from OVS help, First name and
Last name will be populated automatically. The standard
component WDR_OVS is used for implementing OVS.

OVS works on the PHASE MODEL and different tasks are performed during
different phases.
The current phase is indicated by the parameter PHASE_INDICATOR.

Phase 1:
In this phase you have the possibility to define the texts, if you do not
want to use the defaults: So You can play around with the highlighted
texts in the screenshot below in this phase.
Here we call the method ovs_callback_object->Set_Configuration
Phase 2:
If you do not want the filter fields, you can do that in this phase and the
table will be displayed directly. Refer screenshot below. The table is
displayed directly. I have blurred some results.Here you can call the
method ovs_callback_object->Set_Input_Structure

Phase 3:
In this Phase, You write the select queries that should run as per user
input when the user hits Start Search button and finally set the output
table.You can call the method ovs_callback_object-
>Set_Output_Table for that purpose.

Phase 4:
In this phase , you pass the selected record to the Web dynpro Fields.
i.e. set the attributes using ovs_callback_object->context_element-
>Set_Attribute
Question 5: Briefly explain how will you implement ALV in Web Dynpro?
To implement ALV in Web Dynpro, you need to use the Standard WD
componentSALV_WD_TABLE.
We need to use:
a) the view TABLE of component SALV_WD_TABLE
b) the node DATA of component SALV_WD_TABLE.
Here is the brief process:

1) Declare component Usage for SALV_WD_TABLE at the WD component


level and the view level.
@ Component Level:

@ View Level:

2) Put a VIEWCONTAINER UI element on the MAIN view and ember the


viewTABLE of
SALV_WD_TABLE into it.
3) Lets say the ALV data is to be populated in NODE_FLIGHT.
Write the logic to select the ALV Data and bind it to NODE_FLIGHT:
node_flight_alv->BIND_TABLE( lt_node_flight_alv ).

4) Do a Context mapping between NODE_ALV and the node DATA of


SALV_WD_TABLE.

Question 6: How to make columns in a table editable?


While doing the Binding for the Table, just choose 'Input field' instead of
'Textview'.
Refer the Screenshot below:
Question 7: How will you delete selected rows in a Table / ALV?
Get the Table / ALV data in an internal table.
Delete the row selected by the user from the internal table.
Re-bind the internal table to the node bound to the Table/ALV.

Question 8: How do you generate POP UP in WD?


This can be easily done using the Wizard:
The CREATE_WINDOW method is used in this case.

Question 9: How do you close a window in Web Dynpro?

There is a special outbound plug called Exit Plug that can be used for this
purpose.
wd_this->fire_to_exit_plg( url = url close_window = close_window ).

Also explore other Plug Types:


I am going to add some more questions to part 3 :
Let me know if you need answers to the below questions by putting your
comments below:

Question: What is the difference between Drop down by key and


drop down by index ?

Question: How do you display error / success / warning messages


in Web Dynpro ?

Question: How do you access methods of component controller in


a view ?

Question: Have you worked on roadmap UI element ? Elaborate .

Question: What is dynamic ALV in web dynpro ?

Question: Can you have Totals and Subtotals in Web dynpro ALV ?
How ?
Hint: First get the reference of the ALV. Then get the columns.
By looping at lt_columns , get to the required column.
Once you achieve this, check methods create_aggr_rule and
create_sort_rule of the class
cl_salv_wd_field.

Question: Can you have TOP OF PAGE and END OF PAGE ? How ?
Hint: Check TOP_OF_LIST and END_OF_LIST events.

Question: Have you worked on events in ALV in web dynpro?


Which events do you know?
Question: Can you add custom buttons on Web Dynpro
ALV toolbar ? How?

Question: Can you add custom buttons in Web Dynpro ALV cells ?
How?

Question: Can you add Image / Icons in Web Dynpro ALV cells ?
How?
How do you define and implement action handlers for
them?

Question: Can you add links in Web Dynpro ALV cells ?

How?

Sales and Distribution:


Sales and distribution module is a part of logistics and it handles all the
process of order to delivery, it is fully integrated with the other modules of
the SAP System such as MM and PP.
SD contains many phases such as Inquiry, Quotation, Sales Order, Sales
Returns, Credit Management, pricing, tax determination, and Goods
Delivery modules.
SD Flow:
SD Process Flow:
The sales documents you create are individual documents but they can
also form part of a chain of inter-related documents. For example, you
may record a customers telephone inquiry in the system. The customer
next requests a quotation, which you then create by referring to the
inquiry. The customer later places an order on the basis of the quotation
and you create a sales order with reference to the quotation. You ship the
goods and bill the customer. After delivery of the goods, the customer
claims credit for some damaged goods and you create a free-of-charge
delivery with reference to the sales order. The entire chain of documents
the inquiry, the quotation, the sales order, the delivery, the invoice, and
the subsequent delivery free of charge creates a document flow or
history. The flow of data from one document into another reduces manual
activity and makes problem resolution easier. Inquiry and quotation
management in the Sales Information System help you to plan and control
your sales.

Inquiry: Once we receive the quotation


from the customer then as a vendor we need to check whether we can
deliver the goods with customer conditions or not.
Quotation: Once we finish the inquiry then as a vendor we need to send
quotation to the particular customer.
Sales Order: Once we receive the purchase order from customer then as a
vendor we need to raise the sales order, while raising sales order we
should know the partner functions.
Sold-To-Party who as raised the purchase order.
Ship-To-Party where we need to deliver the goods.
Bill-to-party to whom we have to give the bill.
Payer who is going to pay the money?
Goods Delivery: After raising the sales order as a vendor we need to
deliver the goods.
Billing: While delivering the goods we need to send the billing document.
Finance: Once we deliver the goods with billing vendor finance guy will
interact with the customer finance guy for finance settlements.
Transaction Codes:
Inquiry VA11
Quotation VA21
Sales Order VA01
Goods Delivery VL01N
Billing VF01
Commonly used SAP SD tables:
Sales Documents:
VBAK Sales Document: Header Data
VBAP -Sales Document: Item Data
VBUP Item Status
VBUK Header Status and Administrative Data
VBFA Sales Document Flow
Delivery Tables:
LIKP SD Document: Delivery Header Data
LIPS SD document: Delivery: Item data
Customer Tables:
KNA1 General Data in Customer Master
KNB1 Customer Master (Company Code)
KNB5 Customer master (dunning data)
KNBK Customer Master (Bank Details)
KNVV Sales area data
Pricing Tables:
KONV Conditions (Transaction Data)
KONH Conditions (Header)
KONP Conditions (Item)
Billing Tables:
VBRK Billing Document: Header Data
VBRP Billing Document: Item Data
Shipping Tables:
VEKP -Handling Unit Header Table
VEPO Packing: Handling Unit Item (Contents)
Vendor Tables:
LFA1-Vendor Master (General Section)
LFB1-Vendor Master (Company Code)
LFB5-Vendor master (dunning data)
LFBK -Vendor Master (Bank Details)
MM Flow

1) Purchasing Requsition -> sent by inventory dept to purcharsing dept


2) Request for Quotation(RFQ)-> Purchasing Dept shall ask the vendors to
give the quotation for the requested materials by inventory.
3) Quotation -> Quotation is sent by vendors to the company
Vendor evaluation Based on all paramers of a quotation sent by
vendors. Vendors are selected from whom the material has to be
obtained.
4) Purchase order-> The company gives purchase order to the vendor.
5) Good's receipt -> vendors sends the goods to the company with goods
receipt
6) Invoice verification -> this done based on good's receipt. this means
that the ordered goods have reached or not.
7) Payment -> payment is done based on invoice verification. this is
(FI/CO)

SD flow
inquiry : va11 vbak ,vbap
quotation: va21: vbak, vbap: Quotation is sent by vendors to the company
sales order: va01:vbak vbap
delivery vl01 : likp lips, packing ( After sales order is created the items are
delivered to
customer)
shipping VT01, VT02:vtkk, vtpp
billinfg vf01,vf02: vbrk vbrp

MM Flow
Purchase Requisition: sent by inventory dept to purcharsing dept
RFQ: Purchasing Dept shall ask the vendors to give the quotation for the
requested materials by inventory
PO : me21
Order confirmation
Goods recipt: migo: mkpf , mseg
Invoice : miro : bseg, bkpf RBKP---HeaderRSEG--Item
Vendor Payment: account payable fb60

FICO

1. GL Accounting -
related tables are SKA1, SKB1 Master data
BSIS and BSAS are the Transaction Data
2. Account Receivables- related to Customer
All the SD related data when transfered to FI these are created.
Related Tables BSID and BSAD
3. Account Payables - related Vendor
All the MM related documents data when transfered to FI these are
created
Related Tables BSIK and BSAK
All the above six tables data is present in BKPF and BSEG tables
You can link these tables with the hlp of BELNR and GJAHR and with Dates
also.
4. Special Purpose Ledger.. which is rarely used.
5. Asset Managment

In CO there are
1. Profit center Accounting
2. Cost center Accounting

SAP Financial Accounting (FI)

SAP FI module as the term suggests deals in managing financial


transactions within enterprises. This financial accounting module helps
employees to manage data involved in any financial and business
transactions in a unified system. This module functions very well for
reporting requirements. The SAP FI module is very flexible and functions
well in any type of economic situation. Be it a smaller organization or a
larger organization, SAP implementation helps in consolidating data for
diverse business transactions and legal requirements. Financial
Accounting module helps one to get real-time financial position of an
enterprise in the market. SAP FI incorporates with other SAP modules such
as SAP SD, SAP MM, SAP PP, Payroll and more for better work results.

SAP Controlling (CO)

SAP CO module is another important SAP modules offered to enterprises.


The controlling module supports in the process works of planning,
reporting and monitoring operations of businesses. It involves methods to
view and organize costs that are required for financial reporting.
Controlling module enables one to plan, track, perform and report about
costs. Controlling includes managing and configuring master data that
covers cost elements, cost centers, profit centers, internal orders, and
functional area and so on.

SAP Sales and Distribution (SD)

SAP SD modules deal in managing all transactions ranging from enquiries,


proposals, quotations, pricing and more. The sales and distribution module
helps greatly in inventory control and management. SAP SD module
consists of master data, system configuration and transactions. Some of
the sub-components of SAP SD module are: master data, sales support,
sales, shipping and transportation, billing, credit management, sales
information system and so on.

SAP Production Planning (PP)

SAP PP module is another important module that includes software


designed specifically for production planning and management. This
module also consists of master data, system configuration and
transactions in order to accomplish plan procedure for production. SAP PP
module collaborate with master data, sales and operations planning,
distribution resource planning, material requirements planning, Kanban,
product cost planning and so on while working towards production
management in enterprises.

SAP Materials Management (MM)


SAP MM module as the term suggests manages materials required,
processed and produced in enterprises. Different types of procurement
processes are managed with this system. Some of the popular sub-
components in SAP MM module are vendor master data, consumption
based planning, purchasing, inventory management, invoice verification
and so on.

SAP Quality Management (QM)

SAP QM module helps in management of quality in productions across


processes in an organization. This quality management module helps an
organization to accelerate their business by adopting a structured and
functional way of managing quality in different processes. SAP QM module
collaborates in procurement and sales, production, planning, inspection,
notification, control, audit management and so on.

SAP Human Capital Management (HCM)

SAP HCM module enhances the work process and data management
within HR department of enterprises. Right from hiring a person to
evaluating ones performance, managing promotions, compensations,
handling payroll and other related activities of an HR is processed using
this module. The task of managing the details and task flow of the most
important resource i.e. human resource is managed using this SAP ERP
HCM module.

SAP solutions include a number of functional modules, which support


transactions to execute key business processes, such as

Financial Accounting (FI)


Financial Supply Chain Management (FSCM)
Controlling (CO)
Materials Management (MM)
Sales and Distribution (SD)
Logistics Execution (LE)
Production Planning (PP)
Quality Management (QM)
Plant Maintenance (PM)
Project System (PS)
Human Resources (HR)
Finance and Controlling (FICO)

SAP FICO is a combination of two ERP modules, i.e., Finance Accounting


(FI) and Controlling (CO). Under Finance in SAP and at an enterprise level,
the following modules take part

FI Finance
CO Controlling
IM Investment Management
TR Treasury
EC Enterprise Controlling

SAP FI (Financial Accounting) is accountable for tracking the flow of


financial data across the organization in a controlled manner and
integrating all the information for effective strategic decision-making.

Activities Involved in SAP FI

Creation of Organizational Structure (Defining Company, Company


Codes, business Areas, Functional Areas, Credit Control,
Assignment of Company Codes to Credit Controls)

Financial Accounting Global Settings (Maintenance of Fiscal Year,


Posting Periods, defining Document types, posting keys, Number
ranges for documents)

General Ledger Accounting (Creation of Chart of Accounts, Account


groups, defining data transfer rules, creation of General Ledger
Account)
Tax Configuration & Creation and Maintenance of House of Banks

Account Payables (Creation of Vendor Master data and vendor-


related finance attributes like account groups and payment terms)

Account Receivables (Creation of Customer Master data and


customer-related finance attributes like account groups and
payment terms

Asset Accounting

Integration with SD and MM

SAP CO (Controlling) module facilitates coordinating, monitoring, and


optimizing all the processes in an organization. It controls the business
flow in an organization. This module helps in analyzing the actual figures
with the planned data and in planning business strategies.

Two kinds of elements are managed in CO

Cost elements
Revenue elements

These elements are stored in the FI module.

Activities Involved in SAP CO

Cost Element Accounting (Overview of the costs and revenues that


occur in an organization)

Cost Center Accounting

Activity-Based-Accounting (Analyzes cross-departmental business


processes)

Internal Orders

Product Cost Controlling (Calculates the costs that occur during the
manufacture of a product or provision of a service)

Profitability Analysis (Analyzes the profit or loss of an organization


by individual market segments)

Profit Center Accounting (Evaluates the profit or loss of individual,


independent areas within an organization)
Sales & Distribution Management (SD)

SAP SD is one of the most important modules in SAP. It has a high level of
integration complexity. SAP SD is used by organizations to support sales
and distribution activities of products and services, starting from enquiry
to order and then ending with delivery.

SAP SD can monitor a plethora of activities that take place in an


organization such as products enquires, quotation (pre-sales activities),
placing order, pricing, scheduling deliveries (sales activity), picking,
packing, goods issue, shipment of products to customers, delivery of
products and billings.

In all these processes, multiple modules are involved such as FI (Finance


Accounting), CO (Controlling), MM (Material Management), PP (Production
Planning), LE (Logistics Execution), etc., which shows the complexity of
the integration involved.

Activities Involved in SAP SD

Setting up Organization Structure (creation of new company,


company codes, sales organization, distribution channels, divisions,
business area, plants, sales area, maintaining sales offices, storage
location)

Assigning Organizational Units (Assignment of individual


components created in the above activities with each other
according to design like company code to company, sales
organization to company code, distribution channel to sales
organization, etc.)
Defining Pricing Components (Defining condition tables, condition
types, condition sequences)

Setting up sales document types, billing types, and tax-related


components

Setting up Customer master data records and configuration

Material Management (MM)

Material Management deals with movement of materials via other


modules like logistics, supply chain management, sales and delivery,
warehouse management, production and planning.

Logistic Execution (LE)

Logistic Execution can be divided into two sub-modules, i.e., shipment of


goods (purchase to procurement process) and warehouse management
(storage of goods). These two modules are integrated with sale and
distribution, material management, and production and planning.
Supplier Relationship Management (SRM)

As the name SRM suggests, this module deals with the effective and
efficient transition of products and services between an organization and
its suppliers. The main process covered in this section is procurement of
products like direct materials, indirect materials, and services. This
module can effectively integrate with planning, accounting, and inventory
system.

End-to-End Procurement Cycle

Procurement process with SAP Enterprise Buyer comprises of the


following major steps

Shopping Carts
Approval of Shopping Cart
Sourcing of Requirements
Purchase Orders
Purchase Order Approval
Confirm Goods/Services
Confirmation Approval
Process Invoice
Invoice Approval
Customer Relationship Management (CRM)

CRM deals with end-to-end customer related processes. CRM is designed


to centralize the data related to all the customers associated with an
organization. It helps an organization

Maintain its sales, services, and build marketing strategies


according the market demand and customer data analysis.

Remain focused on its customers and via information analysis, help


the business to know more about its customers.

Improve sales and services and building better relationships with


customers.

Human Resource (HR)

The most important objective of master data administration in Human


Resources is to enter employee-related data for administrative, time-
recording, and payroll purposes.
A new employee can be hired without using Recruitment. Instead you can
hire someone by running a personnel action in Personnel Administration,
thereby creating the necessary data for the employee to be hired.

Employee data must be kept current. After an employee is hired,


circumstances can always arise which necessitate either the entry of new
data or the correction of current data. For instance

An employee moves to his or her new address must be stored in the


system.

An employee gets a pay hike at the start of the year. The new salary
must be stored for the relevant date.

An employee changes jobs within the organization. His or her


organizational assignment, working time, and salary also change.

Data can be stored for the past, present, or future.

Note Entering payroll-relevant data in the past triggers retroactive


accounting.

The HR module is comprised of major areas of functionality known as


sub-modules. The HR module is a true demonstration of the strength of
the SAP product in Enterprise Resource Planning.

The HR system has very strong integration points (where data is passed
back and forth without human intervention) with just about all of the
other SAP modules. In addition, there is very tight integration amongst
the HR sub-modules.

The above illustration highlights some of the basic SAP HR terms as listed
below.

Business trip management


Recruitment
Payroll
Personal development
Organizational Management
Time Management
Workforce Planning
ESS
MSS
Training and event management
CATS
Benefits
Compensation management
Personal Administration

Vous aimerez peut-être aussi