Professional Documents
Culture Documents
Abap Interview Questions
Abap Interview Questions
HP
1. How to design selection-screen?
Ans. Selection-screen begin of block b with frame.
Parameters: p_all RADIOBUTTON GROUP G,
P_in RADIOBUTTON GROUP G,
P_de RADIOBUTTON GROUP G.
Selection-screen end of block b.
2. Call transaction syntax in bdc?
Ans. Call transaction <tcode> using BDCDATA UPDATE
Q. how to edit text in script? And how to migrate scripts into smart
forms?
First Go to smart forms T-Code
Goto utilities->Migrate form
There Give the name of the Script that has to be migrated
Ans 2.
Here are two way through which you can convert sapscript into smartforms.
1. This is basically a function module, called FB_MIGRATE_FORM.
You can start this function module by hand (via SE37), or create a small
ABAP which migrates all SAPscript forms automatically.
2. You can also do this one-by-one in transaction SMARTFORMS, under
Utilities -> Migrate SAPscript form.
You could also write a small batch program calling transaction SMARTFORMS
and running the migration tool.
Note: While converting sapscript into smartforms, only layout has passed.
But you have do all logic coding in your smartforms.
6. What are indexes?
Ans. The primary index contains the key fields of the table and a
pointer to the non-key fields of the table. The primary index is created
automatically
when
the
table
is
created
in
the
database.
You can also create further indexes on a table. These are called
secondary indexes. upto 9 secondary indexes can be created.This is
necessary if the table is frequently accessed in a way that does not take
advantage of the sorting of the primary index for the access.
7. What are pooled and cluster table?
Ans. pooled tables:
-- These r small tables having 100 records in each of them! But,
these tables were used for storing the system data!
-- In these tables there will be no keys! These tables r having many
- to - one relationship!
-- These tables r having different names which doesnt match with
database tables.
Cluster tables:
--These are very large tables so many records in each of them! But,
these tables were used for storing the system data!
--In these tables at least one primary key will be present to find the
record! These tables r having many - to - one relationship!
table l_t_lfa1..
6) Check the values of variable 'exit_name', it will give you the BADI name
called at that time.
7) This way you will find all the BADIs called on click of any button in any
transaction. .
performance tuning ?
Please find below the ABAP Code Performance tuning tips.
1. Run Extended syntax checks with character literals checkbox switched on
& Code Inspector to rectify all relevant errors and warning (e.g. Use the
results of the above checks to remove all variables/constants etc that are
declared but are not used)
2. Internal Table is defined with TYPE STANDARD TABLE OF & Work-Areas is
used instead of header lines
3. In SELECT statement, only the required fields are selected in the same
order as they reside on the database table/structure/view
4. "SELECT *" should not be used in any case.
5. Usage of JOIN is limited to a maximum of 2 i.e. not more than 3 database
tables are joined at one time
6. CHECK that the internal table used in FOR ALL ENTRIES is NOT empty as
this will retrieve all entries from the table
7. SORT inside LOOP is not advisable and should not be used.
8. Sort
internal table by fields in the correct order, which are used in a READ
TABLE statement using BINARY SEARCH. If the order of sorting is invalid the
BINARY SEARCH will never work.
9. Transaction SE30 (ABAP Runtime Analysis) must be checked to
measure/compare program performance/runtime if program has multiple
inefficient databases selects or complicated internal table operations
10. Use transaction ST05 (SQL Trace) to see what indices your database
accesses are using. Check these indices against your where clause to
assure they are significant. Check other indices for this table and where you
have to change your where clause to use it. Create new indices if
necessary, but do not forget to check the impact by consulting onsite
coordinator.
BAPIPAREX+30
= BAPI_TE_MARA.
When this BAPI works, it runs a piece of code like this to transfer the data
from extension structure to database table:
LOOP AT EXTENSIONIN.
CASE EXTENSIONIN-STRUCTURE.
WHEN 'BAPI_TE_MARA'.
MOVE EXTENSIONIN+30 TO BAPI_TE_MARA.
WHEN 'BAPI_TE_MVKE'.
MOVE EXTENSIONIN+30 TO BAPI_TE_MVKE.
WHEN ........
....................................
ENDCASE.
ENDLOOP.
LOOP AT EXTENSIONINX.
CASE EXTENSIONIN-STRUCTURE.
WHEN 'BAPI_TE_MARAX'.
MOVE EXTENSIONIN+30 TO BAPI_TE_MARAX.
WHEN 'BAPI_TE_MVKEX'.
MOVE EXTENSIONIN+30 TO BAPI_TE_MVKEX.
WHEN ........
....................................
ENDCASE.
ENDLOOP.
After check the field where the flag is setted and move the value to database
(i.e. MARA, MVKE ,.....)
Max.
12. Debug scripts?
Ans. One way to start the script debugger is:
Se71->utilities->activate debugger.
This may be a time-consuming process. Instead, open a session and execute
the program RSTXDBUG. Even if you follow the above menu path to activate
the script, it will internally execute the program RSTXDBUG. So you are
saving some time in going through all of the above processes.
Another advantage of using this program: when a developer works in the
support environment and the client requests to makes some changes to a
form, but doesn't know which form, he can just show the form output and
request for changes.
Example: Transaction Code HRBEN0001. This contains a confirmation form,
benefits form and others.
In this scenario, just open the other session and run the program RSTXDBUG
program, click a push button on the transaction code and if a form is
associated with that button it is automatically opened in debug mode. Once
the form is in debug mode you can find the form name then open one more
session and make the changes to the form while debugging it.
13. Different types of windows in SMARTFORMS?
Main window:
In a main window you display text and data, which can cover several
pages (flow text). As soon as a main window is completely filled with text and
data, the system continues displaying the text in the main window of the
next page. It automatically triggers the page break.
Secondary Window:
In a secondary window you display text and data in a
predetermined output area. There is no flow text display with page break.
If you position a secondary window with the same name on several pages,
the system displays the contents of this secondary window on each page.
Copy window:
You use the copies window to define an output area for the print output,
whose content you want to appear either only on the copy or only on the
original. This allows you to flag copies as copies when the form is printed.
Final window:
You may want to display or query values on the first page that are
determined only during processing. For example, you may want to name the
grand total in the letter text of
an invoice. However, this amount is determined only after listing all
individual items. Or you may want to query on the first page within a
condition the total number of pages, which the system calculates only after
processing all pages.
In such a case, you use the final window: Processing first skips all windows of
this type in the tree and works its way to the end of the tree. Only after the
actual processing is finished, the final windows are processed in the order in
which they appear in the tree (from top to
Bottom). Now any information is available that is known only at the end of
the form processing.
14. What is function module?
Ans. Function modules are procedures that are defined in function groups
(special ABAP programs with type F) and can be called from any ABAP
program. Function groups act as containers for function modules that
logically belong together. You create function groups and function modules in
the ABAP Workbench using the Function Builder.
The benefit of an RFC function with released status means that it also has a
fixed interface which will not change with new SAP releases.
Hope that helps.
16. MOVE and MOVE-CORRESPONDING stmts?
Ans. MOVE-CORRESPONDING
Syntax
MOVE-CORRESPONDING struc1 TO struc2.
Effect
Structures must be specified for struc1 and struc2. All components with the
same name are searched for in struc1 and struc2 and the content of
components in struc1 is assigned to the components with the same name in
struc2. All other components are not affected.
Nested structures are fully expanded. The names of the components are
compared to the lowest common level. For each comp component pair with
the same name, the
MOVE struc1-comp TO struc2-comp.
ACCENTURE
Ans 2. BDC table control is an area on the screen in which you can display data in
tabular form. You process it using a loop. Table controls are comparable to step loop
tables. While a table control consists of a single definition row, step loop blocks may
extend over more than one row. Table controls are more flexible than step loops,
and are intended to replace them.
When you need to handle a scenario like in sales order, it may contain more than
one material, if you have more than one material we have to use table control, it
will have number of columns and number of rows.
Table controls allow you to enter, display, and modify tabular data easily on the
screen
BDC_OKCODE: is used for storing commands during the recording. Like '/00'
is the command for 'ENTER' Key.
BDC_CURSOR: contains the cursor position. It contains the field in which
cursor will be.
Example code:
Perform bdc_field
Perform bdc_field
using 'BDC_CURSOR'
'PROJ-PSPID'.
using 'BDC_OKCODE'
'=BU'.
Accneture(client):
1. How can u show the difference in ur tech spec from others?
2. How can you take care of performance of a abap program?
3. pre-requisit for for all entries? what happened if above internal table was
not filled?
4. Which parameter in a function module will u prefer to export tables?
5. What is IN UPDATE TASK?
Ans. Update task mode in function module
We can call a function module in Update task mode by using IN
UPDATE TASK" statement. It allows you to call a function module but it will
not be executed/called until an update task is initiated by the
'COMMIT WORK' statement in the report.
This means that the program logic after calling the FM will
immediately continue with the next line of ABAP code and the function
module will wait for the commit work statement and after that it will be
executed/called.
Example:
CALL FUNCTION 'ZAU_FUNCTION' IN UPDATE TASK
EXPORTING
P_UNAME
= sy-uname.
Loop at it_mara to wa_mara.
"Program continues without executing the function.
endloop.
commit work. "Commits all work to database and also starts all FM's running
in update task
Why its used ?
Suppose you need to call / perform some actions only after database
updation and not before that.
6. How can u find out a Badi?
7. Process to find out a user exit?
8. Tell me the Badi name u had used?
9. Any one of the Bapi name u had used?
10. How can we transalate language of sf standard text?
11. How can we create update fm?
Ans. Creating Update Function Modules
To create a function module, you first need to start the Function Builder.
Choose Tools
ABAP Workbench, Function Builder. For more information about creating
function modules, refer to the ABAP Workbench Tools documentation.
To be able to call a function module in an update work process, you must flag
it in the Function Builder. When you create the function module, set the
Process Type attribute to one of the following values:
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
Wipro
1. Difference b/w scripts and Smartforms?
Ans.
1) Script is Client Dependent whereas SMARTFORM is client Independent.
2) We can't cave script without Main window but SMARTFORM we
can.
3) After executing SMARTFORM it generates a function module
Script
doesn't.
4) We can set background Image to SMARTFORM but not in Script
5) We can add color in SMARTFORM but not in Script.
6) In Script we can maintains up to 99 main windows but in SMARTFORM can
maintain only one Main window.
We cannot create sap script without main window.
But we can create smart form without main window.
2. Difference b/w classical and interactive reports?
3. Difference b/w user-exit and customer exit?
Ans. 1.USER EXITS are FORMS and are called by SAP standard programs
using PERFORMS (subroutines).
CUSTOMER EXITS are FUNCTIONS so they are called using CALLFUNCTION (function
modules)
2. Inside the form (user exit) you can read and change almost any global data
from host program.
Inside a function (customer exit) you can only access your
import/export/changing/tables parameters.
3. User exits are more flexible because you have more information to use in your
code but on the other hand, it is very easy to manipulate erroneously global data
and lead the standard program to a dump or even to make database inconsistent.
Customer exits are more restrictive but you are sure any change you can make to
any parameters will never lead to inconsistency.
4. User-exit doesnt have any classification.
In customer-exit we have function-module exit, screen exit, menu exit.
5. User exits are basically designed For SD module.
Customer exits are available for MM, SD, FI, HR..Basically designed for all modules.
4. You can also find the BADI call using ST05. Below are the steps:
Go to ST05, then choose table buffer trace and activate the trace.
Run the t-code from where you want to find the BADI.
This analyzing technique is based on the fact that all BAdIs are registrated in
SAP database tables. So for each BAdI call these database tables will be
accessed. The BAdI database tables are SXS_INTER, SXC_EXIT,
SXC_CLASS and SXC_ATTR. These tables are always accessed by the views
V_EXT_IMP and V_EXT_ACT. So these two ABAP views (T: SE11) will be the
basis for the trace.
Ans 3.
FIND A BADI
these steps should enable you to find any BADI related to any transaction in
a matter of minutes.
1)
2)
3)
4)
5)
6)
7)
8)
OR
GOTO SE24 - CLASS BUILDER
Go the class CL_EXITHANDLER
go to its method GET_INSTANCE
and put a breakpoint in this line calling the method
CALL METHOD CL_EXITHANDLER = > GET_CLASS_NAME_BY_INTERFACE
Ans.
A BAPI is a method of a SAP Business Object. BAPI enables SAP and third
party applications to interact and integrate
with each other at the Business Object / Process level.
Check this link to know more about BAPI.
http://www.sapgenie.com/abap/bapi/example.htm
http://sappoint.com/abap/
Batch Data Communication (BDC) is the oldest batch interfacing technique
that SAP provided since the early versions of R/3. BDC is not a
typical integration tool, in the sense that, it can be only be used for
uploading data into R/3 and so it is not bi-directional.
BDC works on the principle of simulating user input for transactional screen,
via an ABAP program. Typically the input comes in the form
of a flat file. The ABAP program reads this file and formats the input data
screen by screen into an internal table (BDCDATA). The
transaction is then started using this internal table as the input and executed
in the background.
In Call Transaction, the transactions are triggered at the time of processing
itself and so the ABAP program must do the error handling.
It can also be used for real-time interfaces and custom error handling &
logging features. .
To know more about BDC,
check the link.
http://sappoint.com/abap/
Main differences are...
In case of bdc data transfer takes place from flat file into sap system ie the
file existing in sap system to sap system.
Where as bapi's are remotely enabled function modules which are assigned
to some business objects n used to transfer the data between different
business partners who are using different systems other than sap.
not only that...
when you plan to upgrade your system version then bdc will not support
those upgradation where as bapi's will support.
7. Anything is stored in DB while creating VIEWS?
Ans. data of a view is derived from one or more tables, but not stored
physically.
is it possible to bring select option in module pool screens?
Ans. Create 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 SELECTIONSCREEN 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.
Honey Well
1. Use of driver program in smart forms?
Ans. This is used to process the data and to pass the data to form
(Layout).
2. Use of FM in driver program of SF?
4. what are the fields displayed in Purchase Order creation, where
you get those fields?
5. Which BAPI your used?
Ans. Both standard and user defined
6. COMMIT and ROLL BACK in bapi?
Ans. Commit is the thing which saves the changes you made to the
database .it is an interface technique it is a direct input method.
for example you have inserted some data into one table by using this BAPI
technique but you not done the Commit BAPI then what happens is the
changes u made to the database cannot been seen in the table these will get
effective once u have Done the Commit BAPI.
Rollback
see by taking the above example only we can know what is Rollback it is
nothing but UNDO option in ms office se until saving if we want one step
back we will do it by undo option am i right.
Similarly until commit in i.e. nothing until saving the changes made u can
delete the modified change.
Call function 'BAPI_PO_CREATE1'
'....................
After that
If u wants to do commit, just add this statement.
COMMIT WORK.
If u wants to do roll back, just add this statement
ROLLBACK WORK.
9. Names of Development, testing, quality servers?
10. What is LOCK OBJECT?
Ans. The SAP System synchronizes simultaneous access of several
users to the same data records with a lock mechanism. When interactive
transactions are programmed, locks are set and released by calling function
modules (see Function Modules for Lock Requests). These function modules
are automatically generated from the definition of lock objects in the ABAP
Dictionary.
There are 3 types
1. READ LOCK(Shared lock)
It allows read access for other transactions but not write access to locked
area of table data
2. WRITE LOCK
It allows write access for other transactions but not read access to locked
area of table data
3. Enhanced lock
This is advance write lock
Whenever lock object applies on a table, two function modules will work.
Those are 1) ENQUE: It is used to lock the table while a command is working
on table.
2) DEQUE: It is used to unlock the table after command working is
complete.
IGATE
1. Different types of internal tables?
Ans.
Internal tables are 2 types 1) INDEX
2) Hashed
Index internal tables are again two types: 1) Standard int table
2) Sorted int table
STANDARD int table:
It allows duplicate records
No need to maintain unique or non-unique key
Record will be added to int table with APPEND key word
Records will be searched using linear search
Internal table table will be sorted using SORT key word explicitly
Syntax: Data: <int_tab> like STANDARD table of <wa>.
SORTED int table
It doesnt allows the duplicate records
At least one field should be unique/non-unique key
Records will be added to int table using INSERT key word
Binary search is used to search the records from int table
No need to sort the int table because as a default int table will be sorted
Syntax:
Data: <int tab> like SORTED table of <wa> with UNIQUE/NON-UNIQUE KEY
<F1>.
2) HASHED int table
It also doesnt allows the duplicate records
Robert Bosch
1. ASAP methodology in sap abap?
Ans. ASAP Roadmap
Use
The ASAP Roadmap provides the methodology for implementing and
continuously optimizing your SAP System. It divides the implementation
process into five phases and offers detailed Project Plans to assist you (in
Microsoft Project format). The documentation stored at each level of the
Roadmap tree structure contains recommendations on implementing your
SAP System and links to helpful tools and accelerators.
Purpose
When you install the Implementation Assistant you can choose from several
Roadmap types and flavors.
Roadmap types
Roadmap flavors
Implementation
Global ASAP
R/3 System
Upgrade
R/3 System
2. Business Blueprint
In this phase you create a blueprint using the Question & Answer
database (Q&A db), which documents your enterprises requirements
and establishes how your business processes and organizational
structure are to be represented in the SAP System. You also refine the
original project goals and objectives and revise the overall project
schedule in this phase.
3. Realization
In this phase, you configure the requirements contained in the
Business Blueprint. Baseline configuration (major scope) is followed by
final configuration (remaining scope), which can consist of up to four
cycles. Other key focal areas of this phase are conducting integration
tests and drawing up end user documentation.
4. Final Preparation
In this phase you complete your preparations, including testing, end
user training, system management, and cutover activities. You also
need to resolve all open issues in this phase. At this stage you need to
ensure that all the prerequisites for your system to go live have been
fulfilled.
5. Go Live & Support
In this phase you move from a pre-production environment to the live
system. The most important elements include setting up production
support, monitoring system transactions, and optimizing overall
system performance.
After your system has gone live, you can use a separate
Roadmap with six work packages, in order to optimize your SAP
System continuously.
These phases are the main milestones for your SAP System implementation
project. Each phase has:
Work packages, which consist of activities, for which project teams are
responsible.
Activities, which consist of tasks, which are processed by one or more
team members.
Tasks, which are carried out by a project team member. You can also
access the How-to sections and accelerators at this level.
By an interactive event.
For each interactive event, the HIDE fields of the line on which the
cursor is positioned during the event are filled with the stored values.
By the READ LINE statement.
You can think of the HIDE area as a table, in which the system stores the
names and values of all HIDE fields for each list and line number. As soon as
they are needed, the system reads the values from the table.
4. Different types of alv reports?
Ans. There are 3 types of alv reports are there
1. Simple ALV reports
2. Blocked alv reports: In this case more than one independent block is
displayed in the output. This is generally used when we need to display data
from two internal tables in the same list where the
structure of the table
is different. The following FM r used.
REUSE_ALV_BLOCK_LIST_INIT
REUSE_ALV_BLOCK_LIST_APPEND
REUSE_ALV_BLOCK_LIST_DISPLAY
3. Hierarchical alv reports: Hierarchical ALV are used to display the
header and item data in a single layout. i.e., we are displaying data like
TREE.
>>>Header data at top level
>>> Item data at next level
>>> Sub item data at child level...
5. Events in smart forms?
Ans.
1. AT-FIRST: This is used when we want to execute the statements before
records are processed.
2. AT-NEW: This event is used when we want to execute the statement
before group of records are processed.
3. AT-END: This event is used when we want to execute the statements after
processing of group of records.
4. AT-LAST: This event is used when we want to execute the statements
after all records are processed.
6. Diff b/w table and structure in smart forms?
Ans. template
-- Template is fixed in size.
-- Template is Output of a table containing static data
-- These are the possible direct successors-All except window, page, table,
and template
nodes
-- Template is used for proper alignment of data which table is used for
displaying multiple data.
--We can say Template is for static data
Table
--Table - Output of a table containing application.
--Data and these are the possible direct successors-as with template node.
Ntt data:
1. Which syntax is used for BDC in application server?
Ans. u can use open dataset syntax
Date Sets are nothing but files on Application Server, they can even be called
as Sequential files.
Open Dataset is used to open required file on the application Server.
Read Dataset is used to read the contents required file on the application
Server.
open dataset, read dataset, close dataset are used to read and place the
data in the application server.
--OPEN DATASET IS USED TO OPEN THE DATASET.
Syntax: open dataset <dataset name>for input/output in text/binary mode
encoding/ascii default.
--CLOSE DATASET is used to close the dataset.
Syntax: close dataset <dataset name>.
2. Steps in ASAP methodology?
Ans. It would be helpful to go through the help document of ASAP
Methodology.
The following information may clarify some doubts/requirements you have.
IBM
1. How to give accessing of report to another person?
Ans. Using authorization objects
Creating authorization object
1.
To create the authorization object, choose the SU21 transaction.
2.
First double-click an object class to select it.
3.
Provide the name of the object and relevant text.
4.
Add the fields that should be included in the new authorization object.
5.
Hit Save.. Once you click on save it'll ask for package details (select the
relevant package
from the drop down list) and save again.
6.
New auth objected is created now.
7. Click on permitted activities to select the activities and save the
changes.
activity 03 on step 6.
12. Then assign this 2nd role to another user.
(Figure 2)
Now lets implement this authorization in our ABAP program. Let say we have
a dialog program (ZCOMM) wherein we have a button on the screen that
when clicked, the user will go to the Create/Edit screen(1000) if hes
authorized. On the other hand, he will go to display only screen (2000) if hes
not authorized. To do that, simply add the code below on your program.
AUTHORITY-CHECK OBJECT Z_TCODE authorization object that weve
created
ID ACTVT FIELD 01
Activity = 01, authorized to create
ID ZTCODE FIELD ZCOMM.
tcodes that we wants to check for
authorization
IF sy-subrc EQ 0.
CALL SCREEN 1000.
The user is authorized to create
ELSE.
CALL SCREEN 2000.
User is not authorized to create (Display only)
ENDIF.
FIELD chk_GHI.
FIELD CHK-JKL.
MODULE CHK_screenfields.
ENDCHAIN.
MODULE CHK_screenfields INPUT.
CLEAR okcode.
okcode = sy-ucomm.
CASE okcode.
WHEN 'ENTER' OR 'EXECUTE'.
IF chk_ABC IS INITIAL AND chk_DEF IS INITIAL AND CHK_GHI
IS INITIAL .
MESSAGE e000(zo_spa) WITH text-017. " Enter VALUES'
ELSE.
.....
ENDIF.
ENDIF.
ENDMODULE. " modify_screenfields INPUT
Features
The export parameter Return can be implemented as follows:
As a structure, whereby it must be defined in the function module as an
export parameter, as well as in the method in the BOR.
As a table, whereby it must be defined in the function module as a table
parameter, as well as in the method in the BOR as an export parameter.
Before filling the Return parameter you should either initialize the structure
with CLEAR or the table with REFRESH and CLEAR.
If the return parameter is not set or is set to an initial value this means that
no error has occurred.
The Return parameter may be based on the following reference structures:
BAPIRET2
You must use this reference structure when developing new BAPIS.
BAPIRET1, BAPIRETURN
These reference structures are still partly used in old BAPIs.
Both structures must be filled in the logon language.
7. Diff b/w sorted and hashed internal tables?
Ans. 1.Standard Internal Tables: These tables have a linear index and can be
accessed using the index or the key. The response time is in linear
relationship with number of table entries.
These tables are useful when user wants to address individual table entries
using the index.
2. Sorted Internal Tables: These tables also have an index and the key. But,
the response time is in logarithmic relationship with number of table entries,
since it uses binary search algorithm instead of linear search. These tables
are useful when user wants the table to be sorted
While additional entries have to be added.
3. Hashed Internal Tables: These tables have no index, but have the key. The
response time is constant irrespective of number of table entries, since it
uses a Hash algorithm. These tables are useful when user wants to access
the entries with key only.
8. How to use NACE transaction (configuration)?
Ans. NACE is the t. Code to configure the form and driver program.
Example: if we create a form and driver program related to BILLING (invoice) or if
we want to identify the Form and program name of an application (Purchase order,
sales order, billing, delivery note etc).
Goto NACE t.code
Select Billing (V3)
|
Click on Output types
|
Now scroll down and identify the required output type (Ex: invoice) and select it
|
Now double click on Processing routines
|
Now click on Change icon to include our form name and program name
Save
9. What are the methods to debug the scripts?
Ans. Two ways to debug sap script.
first way is go to SE 71 and from menu bar select Utilities>activate debugger .then go to SE38 execute the print program ,it
automatically goes to debugging mode.
The other way is, run the program RSTXDBUG in se38. Execute it.
A message will show that debugger is activated .now open the print program
in se38.u will notice that the print program is automatically diverted to
debugging mode.
10. Procedure of uploading data using bapi?
11. Difference b/w elementary search help and collective search
help?
Ans. 1) Elementary search helps describe a search path. The elementary search
help must define where the data of the hit list should be read from (selection
method), how the exchange of values between the screen template and selection
method is implemented (interface of the search help) and how the online input help
should
be
defined
(online
behavior
of
the
search
help).
2) Collective search helps combine several elementary search helps. Collective
search help thus can offer
Several alternative search paths.
3) An elementary search help defines the standard flow of an input help.
4) A collective search help combines several elementary search helps. The user can
thus choose one of several alternative search paths with collective search help.
5) A collective search help comprises several elementary search helps. It combines
all the search paths that are meaningful for a field.
6) Both elementary search helps and other search helps can be included in a
collective search help. If other collective search helps are contained in collective
search help, they are expanded to the level of the elementary search helps when
the input help is called.
Switch Framework
ACCENTURE
1.HOW TO EDIT THE DATABASE TABLE?
Ans.
How to edit entries of table in se11 ?
To update the data of any table, go to transaction SE16N, type
&SAP_EDIT. It will activate SAP editing function.
-- Go to table and press Ctrl+ shift + F10 where you will go to table
entries. Click on F8 (execute).
And then select the entries that you want to edit by selecting the
checkbox and goto menu Table entry - > select change. There you edit
and save the entries.
-- You cannot edit entries in SE11 unless it contains a Table maintenance
generator.
So just build a Table maintenance generator.
Do not delete any entries using &SAP_EDIT...it is not recommended.
-- You can edit through debugging.
KPMG
1. What are different types of DB tables?
2. Different types of FUNCTION MODULES? And use of function
modules in ABAP?
3 types of Function modules.
Normal
Remote-enabled (RFC)
Update
NORMAL FUNCTION MODULE:
Function modules are procedures that are defined in function groups (special
ABAP programs with type F) and can be called from any ABAP program.
Function groups act as containers for function modules that logically belong
together, Function modules allow you to encapsulate and reuse global
functions in the R/3 System. They are stored in a central library, unlike
subroutines, you do not define function modules in the source code of your
program.
REMOTE FUNCTION MODULE (RFC):
Questions asked in
Interviews
After Observing many interviews. Finally I come up with the following
questions which are mostly asked in all the big companies including SAP
Labs, Accenture, IBM, Deloitte, TCS, and Infosys etc
ii. Field group is old method of creating a array processing.. Like the internal
tables..From help..
A field group combines related fields together into a meaningful unit. It
provides you with a preselect ion, so that you do not have to search through
all fields of a data source just to produce a simple list.
This means that the end-user only has access to precisely those fields
assigned to a field group. Fields must be assigned to a field group before
they can be used in queries.
14. List the events in ABAP/4 Language?
Ans: The events in ABAP/4 are
Load of program,
Initialization,
AT Selection Screen,
AT Selection Screen On,
Start of Selection,
Top of page,
End of Selection,
End of page,
Line selection, User command, End, First.
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. (It is based on primary key).
Whereas 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).(it is based on all records).
Ans2: Select Single * will pick up only one matching record from the
database into the buffer, and returns the same to the internal table.
Select up to 1 row will pick up all the records matching the condition
into the buffer, but return the top record to the internal table.
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?
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.
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.
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.
23. Difference between user exit and BADIs?
Ans: User exit is for single implementation and it is procedural approach
while BADIs are for multiple implementations and object oriented approach.
Multiple implementations 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-NEW: This event is used when we want to execute the statement before
group of records are processed.
3. AT-END: This event is used when we want to execute the statements after
processing of group of records.
4. AT-LAST: This event is used when we want to execute the statements after
all records are processed.
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
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 retrieve 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.
Transparent
Pool
Cluster
Contain a single
table. Used to store
master data
It has a one-to-one
relationship with a
table in the
database
For each
transparent table
there is one
associated table in
the database
It is stored with
other pooled tables
in a single table
called table pool in
the database
There is only a
single table
Primary key of
each table does not
begin with same
fields or fields
Secondary indexes
can be created
Secondary indexes
cannot be created
Secondary indexes
cannot be created
They can be
accessed using
open and native
SQL
They can be
accessed using
open SQL only
They can be
accessed using
open SQL only
customers
simultaneously
cluster tables: these r very large tables so many records in each of them!
But, these tables were used for storing the system data! in these tables at
least one primary key will be present to find the record! these tables r having
many - to - one relationship!
these tables were used by basis people to calculate the system performance!
Delivery class and Data class?
Delivery class: it controls the transport of the data from one system (Ex:
Development) to another system (Ex: Testing).
Delivery class
Description
A: Application table
Master data& transactional data
C: customizing table
Table storing for temporary data
Data class: it identifies the location in data base server where the created
table will be saved. i.e. specifies the location whether Master data location
or Transactional data or Organizational data location.
APPL0: master data (frequently read, rarely updated. Ex:
vendor & customer details).
APPL1: transaction data (frequently read & frequently
updated. Ex: material prices, no.of.items).
APPL2: Organization data: (rarely updated. Ex: company
name, logo).
Data Element & Domain?
Data element: it is the combination of Domain and Field label
Domain: It maintains the Data type and length. Also value range for the
table can be maintained.
Search help?
it is used to display the list of all possible input values for a screen
field to give as an input to the table.
There are two types
1) Elementary Search help: In this, all possible input values will be extracted
from one table and displayed.
2) Collective Search help: it is the combination of different elementary search
helps. In this, all possible input values will be extracted from multiple
(Different) tables And displayed as an input
Lock Object?
it is used to provide the protection for the database table and also to
avoid the inconsistence at the time of data is being read or write to DB table
There are 3 types
1)
READ LOCK(Shared lock)
It allows read access for other transactions but not write access to locked
area of table data
2) WRITE LOCK
It allows write access for other transactions but not read access to locked
area of table data
3)
Enhanced lock
This is advance write lock
Whenever lock object applies on a table, two function modules will work.
Those are 1) ENQUE: It is used to lock the table while a command is working
on table
2) DEQUE: It is used to unlock the table after command working is
complete
Note: Lock object name should start with EY or EZ.
Syntax:
Data: <int tab> like SORTED table of <wa> with UNIQUE/NON-UNIQUE KEY
<F1>.
2) HASHED int table
It also doesnt allows the duplicate records
At least one field should be unique
Records will be added using INSERT key word
Mid- point algorithm is used to search the records from int table.
Syntax:
Data: <int tab> like HASHED table of <WA> WITH UNIQUE KEY <F1>.
INITIALIZATION TECHNIQUES:
These techniques are used to initial (empty) the WA and int table
1) CLEAR: it is used to clear the content of the work area.
Syntax: CLEAR <WA>.
2) REFRESH : it is used to clear the content of the internal table
Syntax: Refresh <int name>.
3) FREE: it is used to clear the content of the internal table and memory
allocated to int table.
Syntax: Free <int table>.
READING THE DATA FROM INTERNAL TABLE?
READ is the key word to get a single record from the internal table into WA
or variable with key combination.
Syntax:
READ TABLE <int table> INTO <wa> WITH KEY
<Condition> .
Or
READ TABLE <int table> INTO <wa> WITH KEY
<Condition> BINARY SEARCH.
Note: int table need to be sorted when BINARY SEARCH is used for standard
table or hashed table.
difference b/w subroutine and function module?
There is a difference between a Subroutine and Function Module.
1. Subroutines have no Exceptions Parameters.
FM have Exceptions parameters to catch the exceptions.
2. Subroutines can be accessed locally i.e. local Modularization Unit.
HIDE wa_kna1-kunnr.
Get cursor: when using the get cursor if we click on the particular
field it will display the secondary list.
GET CURSOR FIELD value.
Ans2.HIDE is used generally when you want to display secondary lists in
your output before using write statement. The field which is used in hide
statement is used to display the output in the secondary lists.
Get cursor is used for referring all the fields of an internal table.
39. What is TYPE-GROUP?
You use type groups to store user-defined data types or constants in the
ABAP Dictionary for cross-program use.
In your ABAP program, you declare type groups with the TYPE-POOLS
statement as follows:
Syntax
TYPE-POOLS <name>.
This statement allows you to use all the data types and constants defined in
the type group <name> in your program. You can use several type groups in
the same program.
You maintain type groups either by choosing Tools ABAP Workbench
Development ABAP Dictionary or directly from your ABAP program.
39. What is type-pools?
Ans. The TYPE-POOL statement must be the first statement of a type group
following the triggering of possible include programs, and introduces this
type group. You can only maintain type groups in the ABAP Dictionary tool of
the ABAP Workbench, whereby an ABAP program is automatically generated
including the TYPE-POOL statement.
Type groups can only contain the statements
INCLUDE,
TYPES,
TYPE-POOLS,
CONSTANTS,
--Type pool SLIS is used in ALV as all related data types are defined in type
pool
vi. It_fieldcat : internal table with the list of all fields and their attributes
which are to be printed (this table can be populated automatically by the
function module REUSE_ALV_FIELDCATALOG_MERGE
vii. It_events : internal table with a list of all possible events of ALV and their
corresponding form names.
II. Tables :
i. t_outtab : internal table with the data to be output
REUSE_ALV_GRID_DISPLAY: A new function in 4.6 version, to display the
results in grid rather than as a preview.
Parameters: same as reuse_alv_list_display
REUSE_ALV_FIELDCATALOG_MERGE: This function module is used to
populate a fieldcatalog which is essential to display the data in ALV. If the
output data is from a single dictionary table and all the columns are selected,
then we need not exclusively create the field catalog. Its enough to mention
the table name as a parameter (I_structure name) in the
REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
The Important Parameters are :
I. Export :
i. I_program_name : report id
ii. I_internal_tabname : the internal output table
iii. I_inclname : include or the report name where all the dynamic forms are
handled.
II Changing
ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
declared in the type pool SLIS.
REUSE_ALV_EVENTS_GET : Returns table of possible events for a list
type
Parameters :
I. Import :
Et_Events : The event table is returned with all possible CALLBACK events
for the specified list type (column 'NAME'). For events to be processed by
Callback, their 'FORM' field must be filled. If the field is initialized, the event
is ignored. The entry can be read from the event table, the field 'FORM' filled
and the entry modified using constants from the type pool SALV.
II. Export :
I_List_type :
0 = simple list REUSE_ALV_LIST_DISPLAY
1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = hierarchical-sequential block list
REUSE_ALV_BLOCK_LIST_HS_APPEND
REUSE_ALV_HIERSEQ_LIST_DISPLAY
Parameters:
I. Export:
i. I_CALLBACK_PROGRAM
ii. I_CALLBACK_PF_STATUS_SET
iii. I_CALLBACK_USER_COMMAND
iv. IS_LAYOUT
v. IT_FIELDCAT
vi. IT_EVENTS
vii. i_tabname_header : Name of the internal table in the program containing
the
output data of the highest hierarchy level.
viii. i_tabname_item : Name of the internal table in the program containing
the
output data of the lowest hierarchy level.
ix. is_keyinfo : This structure contains the header and item table field
names which link the two tables (shared key).
II. Tables
i. t_outtab_header : Header table with data to be output
ii. t_outtab_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
slis_t_fieldcat_alv : This internal table contains the field attributes. This
internal
table
can
be
populated
automatically
by
using
REUSE_ALV_FIELDCATALOG_MERGE.
Important Attributes :
A. col_pos : position of the column
B. fieldname : internal fieldname
USER_COMMAND
TOP_OF_PAGE
PF_STATUS_SET
TOP_OF_LIST
END_OF_PAGE
6. END_OF_LIST
7. SUBTOTAL_TEXT
what is slis_t_fieldcat_alv?
slis_t_fieldcat_alv : This internal table contains the field attributes. This
internal
table
can
be
populated
automatically
by
using
REUSE_ALV_FIELDCATALOG_MERGE.
LSMW:
What is the LSM Workbench?
The LSM Workbench is an R/3-based tool that supports single or periodic data
transfer from your non-SAP system to R/3
What are the core functions of the LSM Workbench?
Importing legacy data from PC spreadsheet tables or sequential files
Converting data from its original (legacy system) format to the target (R/3)
format
Importing the data using the standard interfaces of R/3 (IDoc inbound
processing, batch input, direct input)
Which data can be migrated using the LSM Workbench?
By means of standard transfer programs: a wide range of master data (e.g.
G/L accounts, customer master, vendor master, material master, bills of
material) and transaction data (e.g. financial documents, sales orders)
By means of recording of transactions: further data objects (if the transaction
can be run in batch input mode)
Can I be certain that the imported data is consistent?
Yes. The data is loaded via the standard interfaces of the applications. This
will include all checks that are run for online transactions. Invalid data will be
rejected.
Can I be certain that conversions are carried out identically across the
applications?
Yes. The LSM Workbench works on the principle of central (reusable) rules.
This approach guarantees that, for example, the material number is
converted in the same way wherever the reusable rule is used for
conversion.
Do I need an extensive knowledge of ABAP to use the LSM Workbench?
No. The LSM workbench provides the main conversion techniques at the
push of a button. For complex conversions, individual ABAP coding can be
added.
Do I have to migrate table by table?
No. Business objects such as material master, customer master or FI
document are migrated
Can I transfer data that is on my PC?
Yes. The LSM workbench can read the data directly from your PC. Only when
using the periodic interface, the data has to be on a server accessible by R/3
Is the LSM Workbench part of the standard R/3 system?
No. The LSM Workbench can be downloaded for free from SAPNET:
http://service.sap.com/LSMW
Is there an extra charge for the LSM Workbench?
No. The LSM Workbench is available free of charge to SAPs customers and
partners
Is there an LSM training course?
There is no specific training course for LSMW
LSMW is part of the 5-day standard training BC420
Workshops at customer site are done at customers charge
Examples in the media center can be used for self-study
Can I migrate from R/3 to R/3 via LSMW?
Yes, but:
Export has to be programmed
Source structures have to be defined
Fields of the source structures can be loaded from the dictionary
Mapping has to be done manually a lot of fields!! Automatic fieldmapping
might be used
Import of large data amounts can take a lot of time (most of the time data
BDC(scn)
1)What is BDC ?
2)What is call transaction method ? what is the syntax/procedure?
3)What is session method and what is the syntax/procedure?
4)Difference between call transaction & session method?
5)which of these methods can be best used in background process?
6)What is direct input method?
7)How LSMW is advantageous than normal BDC?
8)what are the steps in lsmw?
9)IN LSMW can you use BAPI, ?
10)Can you call a bdc from a report program?
11)what is the difference between synchronus & asynchronus methods?
12)call transaction uses synchronus or synchronus method?
13)session method uses synchronus or synchronus method?
14)What is bapi?
15)how bapi is different from call transaction/session?
16)what r the advantages of bapi?
Call transaction.
4.1) asynchronous processing
4.2) can transfer small amount of data
4.3) processing is faster.
4.4) errors need to be handled explicitly
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 generic 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.
Process before Output is the part of the dynpro code that is processed before
the user can do anything with the data in the screen
Process after Input is the part of the dynpro code that is processed after the
interaction with the user.
Module pool programs are executed using Tcodes .
Format and consistency checks for the data entered by the user.
Easy correction of input errors.
Access to data by storing it in the data bases.
Synchronous Processing
We can update the database both
synchronously and asynchronously.
We can specify the mode in the
program.
method
TYPE
CHAR(8)
DESCRIPTION
Program name of
Screen number of
new screen
Name of database field
Value to submit to field
DESCRIPTION
Program name of
CHAR(4)
Screen number of
CHAR(1)
CHAR(35)
CHAR(80)
DATASET statement
To open a file at a specific position, use the AT POSITION option of the OPEN
DATASET statement
When you work with the operating systems UNIX or WINDOWS NT, you can
send an operating system command with the statement OPEN DATASET. To
do so, use the option FILTER
To receive the operating system message after trying to open a file, use the
MESSAGE option of the OPEN DATASET statement
To close a file on the application server, use the CLOSE DATASET statement
To delete a file on the application server, use the DELETE DATASET statement
To write data to a file on the application server, use the TRANSFER statement
To read data from a file on the application server, use the READ DATASET
statement
What is BDC_OKCODE ?
The command field is identified by a special name in batch input called
BDC_OKCODE. This name is constant and always identifies the command
field.
How do you save data in BDC tables ?
The data in BDC tables is saved by using the field name BDC_OKCODE and
field value of /11
40. Difference b/w synchronous update and asynchronous update?
Synchronous update: is used to no transaction is stored until the previous
transaction has been written into the sap database.
Asynchronous: is used to the program is need not wait for the previous
transaction. Any kind of transaction is stored into the database.
How you trap errors in call Transaction?
Errors while updating the database using call transaction technique are
trapped using a structure bdcmsgcall, whose field msgtyp become e when
an error record is encountered. Those records are formatted using
format_message function call in the desired format and stored in an internal
table for listing of all error records in one shot.
38. Difference between BDC and Bapi?
BDC stands for Batch Data Communication, Through BDC you are
going to update screens.
BAPI stands for Business Application Programming Interface. Through
bapi you are going to update Data Base Tables directly.
Whenever screen of a particular transaction changes, you need to redo the
work in case of BDC.
Whereas in case of BAPI SAP will take care as it will update the Database
Tables Directly.
BAPI is directly updated the database instead BDC run through the screen
flow.
So BAPI can't handle all the flow logic checking and enhancement put by
programmer to facilitate the user requirement.
BAPI is a higher end usage for transferring the data from SAP to non-SAP
and vice-versa. for ex: if we are using VB application, where in that we want
to connect to SAP and retrieve the data, and then change and update the
data in SAP for that purpose we can use that.
There is one more advantage using BAPI instead of BDC. When we go for
up gradation, there might be possibility to change the screen elements for
transactions depending on the requirement.
In that case, our BDC program may or may not work (depending on the
screen changes they have made).
BAPI is used only when it is available for the particular transaction like
Delivery Sales order. but BDC can be used for any transaction which have
screen and fields.
The call of a BAPI must not trigger further LUWs that are independent of the
BAPI. For this reason BAPIs must not contain the following commands:
CALL TRANSACTION
SUBMIT REPORT
SUBMIT REPORT AND RETURN
What is BOR (Business Object Repository) ?
The Business Object Repository (BOR) is the central access point for the SAP
business object types and their BAPIs. The BOR contains all the relevant
information on the SAP business object types, their key fields, and their BAPI
methods that are needed to integrate the correct object type definitions and
BAPI calls in an application program. This makes the integration of
middleware (such as the DCOM Connector, ActiveX Controls, CORBA
Gateway, and so on) possible.
Creates instances of SAP business objects. The runtime environment of the
BOR receives requests to create runtime objects from client applications and
creates the appropriate object instances.
What is SAP Business Objects ?
A business object type, which represents of a business entity in the SAP R/3
System, encompasses both the functionality (in the form of methods) and
the data (in the form of attributes) of this entity. The implementation details
of the business object type are hidden from the user. The business object
type is accessed through defined functions (methods). This is referred to as
encapsulation.
Business object types form the point of entry to the data and the
functionality of the SAP R/3 System. At the business object type level, both
non-SAP systems and the various SAP business components can
communicate with each other.
The business object type SalesOrder represents a customers request to
the company to supply a particular quantity of material at a certain point in
time or to perform services at a certain point in time. A specific sales order is
identified by a sales document number. The business object type contains all
the necessary information for a sales order: sold-to party, sales organization,
document date, net value of the order, and currency of the sales and
distribution document.
41. Tell any 2 standard Bapi function modules used for uploading
sales order data?
1. BAPI_SALESORDER_CREATEFROMDAT2
2. Bapi_salesorder_getstatus
3. BAPI_CUSTOMER_CREATEFROMDATA
4. BAPI_PROJECT_MAINTAIN
5. BAPI_COMPANYCODE_GETLIST
6. BAPI_COMPANYCODE_GETDETAIL
7. BAPI_CUSTOMER_GETDETAIL2
8. BAPI_PO_CREATE
9 BAPI_PO_getdetail
10. BAPI_MATERIAL_GET_DETAIL
42. Difference b/w bapi and fm?
BAPI is a remote enabled function module i.e. it can be accessed
from
anywhere and from any system, where as a normal function module can't.
* BAPI perform accurate validation checks,
Each BapiObject has Interface, Key Fields, Attributes, Methods and Events.
Bapi Function Modules can be attached to these Bapi objects.
Function module has a single bound functionality
While a BAPI object can contain many functionalities.
BADI?
Object: To create a BADI implementation for CS01 transaction, that does not
allow user to create alternative BOMs for already created BOM.
Approach: If an alternative BOM is created, the field STLAL from MAST
table will be increased by 1. We can control future creation of BOM using this
field by writing the condition. i.e before updating to MAST table we need to
write the condition to stop duplicate BOM
So need to identify the correct badi (Location) in which we write the condition
Identify all the badi of this application CS01 using CL_EXITHANDLER
class using SE24 t.code.
Inside the form (user exit) you can read and change almost any global
data from host program.
Inside a function (customer exit) you
import/export/changing/tables parameters.
can
only
access
your
4.
User exits are more flexible because you have more information to use in
your code but on the other hand, it is very easy to manipulate erroneously
global data and lead the standard program to a dump or even to make
database inconsistent.
Customer exits are more restrictive but you are sure any change you can
make to any parameters will never lead to inconsistency.
5.
6.
7.
8.
9.
Ans2.
1.USER EXITS are FORMS and are called by SAP standard programs using
PERFORM(subroutines).
CUSTOMER EXITS are FUNCTIONS so they are called using CALLFUNCTION
(function modules)
2.Inside the form (user exit) you can read and change almost any global
data from host program.
Inside a function (customer exit) you can only acces your
import/export/changing/tables parameters.
3.User exits are more flexible because you have more information to use in
your code but on the other hand , it is very easy to manipulate erroneously
global data and lead the standard program to a dump or even to
make
database inconsistent.
Customer exits are more restrictive but you are sure any change you can
make to any
parameters will never lead to inconsistency
4.User-exit doesnt have any classification.
In customer-exit we have function-module exit, screen exit, menu exit.
5. User exits are basically designed For SD module.
Objects.
Badis allow for a multilevel system landscape
(SAP, partner, and
customer solutions, as
well as country versions,
industry solutions, and
the like). Business Add-Ins
can be created at each
level within such a system
infrastructure
Some BADI can have
multiple independent
implementations, which is
much better for software
deployment as several
developers can
implement the same BADI
independently.
In the transaction SE71, enter the Form name and choose the menu, Utilities>Copy from client to copy SAPScripts from one client to another.
Use RSTXSCRP to import/export SAPScripts.
7. How to debug sap scripts?
Ans. Two ways to debug sap script.
The data of a view is derived from one or more tables, but not stored
physically. The simplest form of deriving data is to mask out one or more
fields from a base table (projection) or to include only certain entries of a
base table in the view (selection). More complicated views can comprise
several base tables, the individual tables being linked with a relational join
operation. See also Join, Projection and Selection.
The base tables of the view must be selected in the first step of a view
definition. In the second step, these tables must be linked by defining the
join conditions. It is also possible to use the join condition from a foreign key
defined between the tables (see Foreign Key Relationship and Join
Condition). In the third step, you must select the fields of the base tables to
be used in the view. Selection conditions that restrict the records in the view
can be formulated in the fourth step.
Four different view types are supported. These differ in the way in which the
view is implemented and in the methods permitted for accessing the view
data.
Database views are implemented with an equivalent view on the
database.
Projection views are used to hide fields of a table (only projection).
Help views can be used as selection method in search helps.
ALE/IDOCS:
Call the inbound function module directly. The system bypasses the checks
for partner profile and hands the IDoc data to your inbound function module
directly. This method is useful for testing an inbound process without having
to maintain any inbound configuration. You can also start the function
module in debug mode and select the processing option for your posting
module.
Save the IDoc in a file, and start the inbound process. This method is similar
to the first method except that you also create an IDoc file at the operating
system level. This method is used mainly for EDI processes.
Differences between IDOC and BAPI?
IDOC
IDocs are text encoded documents with a rigid
structure that are used to exchange data
between R/3 and a foreign system
BAPI
BAPIs are a subset of the RFC-enabled function
modules, especially designed as Application
Programming Interface (API) to the SAP
business object, or in other words: are function
modules officially released by SAP to be called
from external programs.
BAPIs are called synchronously and (usually)
return information
whereas for BAPIs the client code needs to do
the appropriate error handling.
FMs in idocs?
Master_idoc_distribute is the FM to create idoc.
DEQUEUE_ALL IS THE FM to post idoc which are located in custom
idocs.
Idoc filtering ?
Filtering techniques are 2 types
i. idoc filtering
ii. Segment filtering
ALE IDocs in SAP is a lot about configuration and a lot about Tcodes . So if
you have worked on at least one end to end scenario in ALE IDocs in
SAP , you probably already have answers to a lot of questions.
Cheers!!
But if you haven't , make sure you do this exercise. There are plenty of step
by step guides to ALE IDocs available on the internet . Make sure you read
one understand it all the way . Sending IDoc from client 800 to say client 810
on the same server is easy . If possible ,Try an exercise in which you send an
IDoc from one system to another system.
Question 4: What are the types of records in SAP ALE Idocs and where is
this information stored?
There are three types of records in SAP ALE Idocs:
Control Records: Control record information for an IDoc is stored in
standard table EDIDC.
Control records contain sender,reciver,partner and what time it is created.
Data Records:
data records information for an IDoc is stored in standard
table EDIDD.
These are contains customer data
Status Records: status record information for an IDoc is stored in standard
table EDIDS.
These are shows status codes of idoc
The IDoc status indicates the stage that the Idoc in currently in.
A Message type and an IDoc type are closely related . In fact, you
will find that a Message type is always associated with an IDoc type.
Whereas an IDoc type is a detailed version with all the segments and fields ,
a Message type is used just to specify the kind of information that a system
can send or receive to or from another system.
So If system SAP1 has a Partner Profile where it specifies MATMAS as an
outbound message type , it just means that SAP1 can send material master
data to say system SAP2.
If system SAP1 has a Partner Profile where it specifies MATMAS as an
inbound message type , it just means that SAP1 can receive material master
data from say system SAP2.
What all fields can be sent and received will be specified in the IDoc type.
Some other message types: DEBMAS ( Customers), CREMAS (Vendors)
belong to the Master data.
The link between a message Type and an IDoc type is maintained in Tcode
WE82.
Question 8: What is a partner profile? What are the types of partner
profiles?
To be able to communicate with a partner via an IDoc interface, each
system needs to maintain a partner profile. A partner profile is a mechanism
by which the system can specify what kind of messages (message types) it
can send or receive.
Partner profiles can be maintained in WE20.
Question 9: What is a distribution model (BD64) in ALE IDocs?
The distribution model describes how ALE messages flow between
different logical systems.
You can mention the sender and receiver logical systems, the message type
to be distributed and also distribute data (IDocs) based on certain conditions
by using the distribution model.
The ALE layer uses the distribution model to control which systems will
receive the information (IDocs) and also filter the data based on certain
conditions.
Distribution Models can be created and maintained in transaction BD64.
3.what will happen if i use projection view and maintainence view together?
4. I created ZEMP table now i want to add more data but prev. data should
not disturb how can i do this?
==============================================
=======
REPORTS
1.How will u print footers in alv report?
2.How will u edit fields from output list of alv?
==============================================
======
BDC
1.what r the fields u took during recording for mmo1,me21n?
2.If u want to do bdc for xd01 explain me how will be the flow?
==============================================
===
user exits
1.what r enhancement points?
2.How to write customer exits?
3.what is routine? how it is different from user exits?
==============================================
=======================
Multiple clients within an SAP system are often used in development, testing
and training systems - so that individuals can work in the same system (on
the same codeset) but in isolation of each other.
Very rarely will a production system have multiples clients (ignoring the
internal SAP clients like 000 and 066).
3. Are programs client dependent?
programs are not client dependent
all programs r client indipendent but the data is client dependent
ii. no, the programs are client independent because, as this software is
platform independent so any client can use any program from anywhere.
Sap scripts are client dependent and smart forms client independent.
4. Name a few system global variables you can use in ABAP
programs?
SY-SUBRC, SY-DBCNT, SY-LILLI, SY-DATUM, SY-UZEIT, SY-UCOMM,SYTABIX.....
5. What are internal tables? How do you get the number of lines in
an internal table? How to use a specific number occurs statement?
6. How do you take care of performance issues in your ABAP
programs?
7. What are datasets?
8. How to find the return code of a stmt in ABAP programs?
9. What are interface/conversion programs in SAP?
10. Have you used SAP supplied programs to load master data?
11. What are the techniques involved in using SAP supplied
programs? Do you prefer to write your own programs to load master
data? Why?
12. What are logical databases? What are the
advantages/disadvantages of logical databases?
13. What specific statements do you using when writing a drill down
report?
14. What are different tools to report data in SAP? What all have
you used?
15. What are the advantages and disadvantages of ABAP query
tool?
16. What are the functional areas? User groups? And how does ABAP
query work in relation to these?
17. Is a logical database a requirement/must to write an ABAP
query?
18. What is the structure of a BDC sessions.
19. What are Change header/detail tables? Have you used them?
20. What do you do when the system crashes in the middle of a BDC
batch session?
21. What do you do with errors in BDC batch sessions?
22. How do you set up background jobs in SAP? What are the steps?
What are the events driven batch jobs?
23. Is it possible to run host command from SAP environment? How
do you run?
24. What kind of financial periods exist in SAP? What is the relevant
table for that?
25. Does SAP handle multiple currencies? Multiple languages?
26. What is a currency factoring technique?
27. How do you document ABAP programs? Do you use program
documentation menu option?
28. What is SAPScripts and layout set?
29. What are the ABAP commands that link to a layout set?
30. What is output determination?
31. What are Idocs?
32. What is screen painter? Menu painter? Gui status?
33. What is screen flow logic? What are the sections in it? Explain
PAI and PBO.
34. Overall how do you write transaction programs in SAP?
35. Does SAP have a GUI screen painter or not? If yes what
operating systems is it available on? What is the other type of
screen painter called?
36. What are step loops? How do you program page down page up in
step loops?
37. Is ABAP a GUI language?
38. Normally how many and what files get created when a
transaction program is written?
What is the XXXXXTOP program?
39. What are the include programs?
40. Can you call a subroutine of one program from another
program?
41. What are user exits? What is involved in writing them? What
precautions are needed?
42. What are RFCs? How do you write RFCs on SAP side?
43. What are the general naming conventions of ABAP programs?
44. How do you find if a logical database exists for your program
requirements?
45. How do you find the tables to report from when the user just
tells you the transaction he uses? And all the underlying data is
from SAP structures?
46. How do you find the menu path for a given transaction in SAP?
47. What are the different modules of SAP?
48. What is IMG in SAP?
49. How do you get help in ABAP?
50. What are different ABAP editors? What are the differences?
51. What are the different elements in layout sets?
52. Can you use if then else, perform etc statements in sap script?
53. What type of variables normally used in sap script to output
data?
54. How do you number pages in SAPScripts layout outputs?
55. What takes most time in SAP script programming?
56. How do you use tab sets in layout sets?
57. How do you backup SAPScripts layout sets? Can you download
and upload? How?
58. What are presentation and application servers in SAP?
59. In an ABAP program how do you access data that exists on a
presentation server v/s on an application server?
60. What are different data types in ABAP?
61. What is difference between BDC and Call Transaction?
ALV
1. How Calculate TOTALS,SUBTOTALS in ALV Reporting?
data: wa_fieldcat type slis_fieldcat_alv,
it_fieldcat type slis_t_fieldcat_alv.
data: wa_sort type slis_sortinfo_alv,
it_sort type slis_t_sortinfo_alv.
wa_fieldcat-do_sum = 'X'.
append wa_fieldcat to it_fieldcat.
wa_sort-fieldname = 'KUNNR'.
wa_sort-tabname = 'IT_FINAL'.
wa_sort-subtot = 'X'.
append wa_sort to it_sort.