Powered By

Free XML Skins for Blogger

Powered by Blogger

Showing posts with label FAQs. Show all posts
Showing posts with label FAQs. Show all posts

Wednesday, February 4, 2009

Questions and Answers about ABAP/4 and Developments

What is the difference between external & internal subroutine?

2. Why do we use ALV?

3. Why do we use GET CURSOR and what is it?

4. Both the events AT SELECTION-SCREEN and AT USER-COMMAND are processed after user input.
Then what is the difference between these and when we should use what?

Sudeshna

Answer 1:
1) Internal subroutines in the sense ..subroutines which are defined and used in a same program...external in the sense if you create a sub routine in one program and you're calling this subroutine in another program ..then this is external subroutine.

2) ALV gives many advantages than a list like sorting summing getting graphics like that stuff

3) While generating a interactive report we will use get cursor..use is to get the value of the fiel under the cursor..

4) At selection screen is used to validate the fields in a selection screen...and at user command is used to modify the screen in a selection screen and in genarating secondary lists..

Sunday, January 18, 2009

ABAP Self Test FAQs

1) Authorization Objects
( this question has more than 1 answer )
a) Stored in User Master
b) Defines fields for a complex authority check
c) Grouped together in profiles
d) Covers up to 10 fields
e) Consists of up to 10 authorization objects

2) Authorization Checking
( this question has more than 1 answer )
a) performed with SELECT statement
b) performed with AUTHORITY-CHECK
c) determines if user has authority in master record
d) always refers to authorization profile
e) system admin defines which authorization checks are executed

3) Authorization
( this question has more than 1 answer )
a) contains value for field of an authorization object
b) defines fields for a complex authorization object
c) can be grouped together in profiles
d) always refer to a particular authorization
e) authorizations and profiles are stored in user master record

4) Using SM35 – in which case does the system check authorization:
( this question has more than 1 answer )
a) always
b) process / foreground
c) display errors only
d) process / background
e) system decides based on profile

5) Search Helps:
( this question has more than 1 answer )
a) called at POV
b) controls how fixed values are displayed when F4 is pressed
c) allow different views of info when help is required
d) object stored in data dictionary
e) field names starting with H_

6) Append Structures
( this question has more than 1 answer )
a) append to table without modifying table itself
b) can be assigned to several tables
c) same as substructure
d) use like any other structure
e) you must convert table once append is added

7) Check table
( this question has more than 1 answer )
a) value table assigned to a domain
b) internal table whose contents are used to check input values
c) table assigned to 1 or more fields if a FK (foreign key) table for checking input values
d) table for which a FK is defined
e) table to which a FK refers

8) Modify SAP objects:
( this question has more than 1 answer )
a) R/3 prevents modifications be user id DDIC and SAP*
b) Objects can be changed with registration
c) Register objects in OSS
d) Carry out modification without registration
e) Adjust modified object in upgrade

9) Activities required at upgrade when applying hot pack:
( this question has more than 1 answer )
a) adjust modified object
b) everything is automatic
c) release correction before update
d) abap dictionary tables, data elements and domains are adjusted during upgrade
e) abap dictionary objects not handled seperately

10) SELECT-OPTIONS COUNTRY FOR LFA1-LAND1:
What will internal table be?
a) LAND1
b) LFA1
c) COUNTRY
d) LFA1-LAND1

11) In program A function module F is called from function group G for the first time. Which one is correct:
a) coding of entire function group G is loaded in the roll area
b) global data from A can be accessed in F
c) A and F have common work areas for dictionary table
d) Function module F is called in a separate internal session
e) Function module F can not call any sessions

12) from transaction A you call transaction B with LEAVE TO TRANSACTION B:
a) internal system session opened for B
b) LEAVE can be used to return from B to A
c) Data from A can be accessed in B
d) A can pass data to B with export
e) A can pass data using SET

13) What is a SAP LUW:
a) a modularised unit in ABAP programs
b) all the updates for 1 SAP transaction
c) a logical grouping of database updates that should all be performed at the same time
d) the section of program code from setting a lock until it is released
e) all actions between first and last database update in transaction

14) Why do update functions have attributes of either START NOW (v1) or START DELAYED(V2):
a) define whether update task triggered immediately
b) combine synchronous and asynchronous updates
c) assign different priorities
d) take different speed of servers into account
e) enable reaction to termination n V1

15) Relationship between SAP transactions and database transactions:
a) each SAP corresponds to one database
b) update requests of one SAP transaction are distributed amongst several database transactions
c) one database group change request of several SAP
d) database transaction is an internal system representation of SAP transactions

Answers:
1) b, c, d
2) b, d
3) a, c
4) b, c, d
5) a, c, d
6) a, d
7) a, c, e
8) b, c, e
9) a, c, d
10) c
11) a
12) a, d, e
13) c
14) c
15) b

Saturday, October 18, 2008

SAP ABAP Commonly Asked Questions I

What is the difference betwen abap and sap memories?

Data sending between internal sessions is called abap memory using import and export parameters.
Data sending between main sessions using spa/gpa ie (set /get) parameters called sap memory.

2) What is nast?
nast is a message status database table.

3) How to upload logo in sapscripts?
1... create a logo using paint shop and save it as tifffile then using RSTXLDMC (is a program name) used to upload logo
2.....create a logo using paint shop and save it as bmpfile then using SE78 you can do this.

4) What are symbols explain?
Symbols are constants used to save un nessessary work used in documentation
1. system symbols : example: &date& &time& etc
2. text symbols: they are defined using control statements
protect...endprotect, if endif, etc
3. standard symbols : all the messages are stored in TTDTG table
4. program symbols : used in abap program example: &i_mara-matnr& &i_mara-ernam&

5) Difference b/w call transaction and session.
Call transaction Ssession
1. synchronous updation only synchronous updation
optional
2. errors can handled error log is created
explicitely
3. faster slower
4. less amount of data more can transfer
5. updation takes place updation takes place
during program execution once the session being created

6. Difference b/w smartforms and scripts.
Script Smartforms
client dependant independant
not possible multiple page formats are possible
compulsory without main window it can
labels are used labels cannot
not generated once session created function module

7. Errors hanling in call transaction
Two ways
1)... int table decalred having structure BDCMSGCOLL it is having certain variables not texts. ie msgtyp,megid, msgnr,
msgvar1, msgvar2, msgvar3, msgvar4 etc all the text messages are stored using T100 database table.
2)....int table decalred having structure BDCMSGCOLL it is having certain variables . ie msgtyp,megid, msgnr,
msgvar1, msgvar2, msgvar3, msgvar4 etc by declaring function modules format_message or write_message you can handle.

8. Errors handling in session
In SM35 error log is created, there you can handle.

9. Difference b/w select-options, valueranges, parameters.
par----- singlevalue
select-options----range and itself implicitly creates internal table
value-ranges---- just for ranges

10. How to remove duplicate entries?
using COLLECT
or
DELECT DUPLICATE ENTRIES FROM TABLENAME>

11. What are standard texts?
These are predefined texts used for create change and display tcode SO10
Starting with INCLUDE
These are for TERMS AND CONDITIONS .

12. What is the use of select....for all entries?
Avoid nested select or inner joins
uses
fast processing
sorting
delete duplicate entries

13. What is the difference b/w exit and continue?
exit----if it is in the loop comes out of the loop.
----if it is in the subroutine comes out of the routine.
----if it is in the program comes out of the preogram.
continue-----unconditional jumping out of the loop.

14. What is the diffenrence b/w collect and append.
collect----- checks whether it is there or not. if there adds integer, packed, float otherwise remove
append-----just adding

15) What are barcodes?
For security purpose

Tips by : Ramana

What is meant by "Matchcode"?

Matchcodes are defined in two stages in Abap/4 Dictionary:

1) The revelant table and fields are stipulated in matchcode object. A matchcode object describes the set of all possible search paths for a search item.
2) One or more matchcode ID can be defined for a matchcode object. A matchcode ID describes a special search path for a search term.The fields or combination of fields via which the search is to take place is defined in the matchcode ID.

Monday, October 13, 2008

faqs SAP ABAP Interview Tips, Questions and Answers

SAP TERMINOLOGY

Master data is a collection of information about a person or an object, e.g. a cost object, vendor, or G/L account. For example, a vendor master record contains not only general information such as the vendor's name and address, but also specific information, such as payment terms and delivery instructions. Generally for end users, master data is reference data that you will look up and use, but not create or change.

Transactional data is data related to a single business event such as a purchase requisition or a request for payment. When you create a requisition, for example, SAP creates an electronic document for that particular transaction. SAP gives the transaction a document number and adds the document to the transaction data that is already in the system. Whenever you complete a transaction in SAP, that is, when you create, change, or print a document in SAP, this document number appears at the bottom of the screen.

Workflow A routing tool in SAP that forwards documents for review or approval. For example, a requisition that needs to be approved is sent to the appropriate approver's inbox.Workflow is also used to route journal vouchers, credit card charges, and other documents in SAP.

Cost Object: A Cost Object collects expenses and revenues for a particular purpose, such as a research project. In SAP there are three types of cost objects: Cost Center, Internal Order, and WBS (Work Breakdown Structure) Element (see below for definition).

Cost Center: General or operating Cost Objects are known in SAP as Cost Centers. Cost Centers are budgeted on the fiscal year.

Internal Order: A non-sponsored Cost Object (for example, funding from the MIT Provost) used to track costs over periods other than fiscal years. Internal Orders are often created to track gifts or endowments at MIT.

WBS Element: WBS Elements are funded by outside sponsors and are used to track costs of a particular research project over the entire span of its activity. They may also be created to track other sponsored activities, such as gifts.

G/L Account: G/L accounts are also called Cost Elements in SAP. They are a classification by expense or revenue type. In the CO (Controlling) module of SAP, the term Cost Element is used. In the FI (Financial) module, the term G/L Account is used. These terms are used interchangeably for reporting, requisitions, and journal vouchers.

Database tables and open SQL Add a single record to a database table insert into values Inserting all lines from an internal table into a database table: insert from table Delete all records Select * from zmellemtab. delete zmellemtab. endselect. Deleting records using records from an internal table delete employees from table itab.


Q & A BASIS LAYER


What are the central interfaces of the R/3 system ?
- Presentation interface
Database interface
Operating system interface

Which interface controls what is shown on the p.c. ?
- Presentation interface

Which interface converts SQL requirements in the SAP development system to those of the database ?- Database interface

What is SAP dispatcher ?
- SAP dispatcher is the control agent which manages the resources for the R/3 applications.

What are the functions of dispatcher ?
- Equal distribution of transaction load to the work processes
Management of buffer areas in main memory Integration of the presentation levels
Organization of communication activies

What is a work process ?
- A work process is where individual dialog steps are actually processed and the work is done. Each work process handles one type of request.

Name various work processes of R/3 system ?
1) Dialog or Online ( processes only one request at a time )
2) Background ( started at a specified time ) 3) Update ( primary or secondary ) 4) Enque( lock mechanism ) 5) Spool ( generated online or during back ground processing For printing )

What are the types of Update requests ?
- An update request can be divided into one primary (V1) and several Secondary update components (V2). Time-critical operations are placed in V1 component and those whose timing are less critical are placed in V2 components. If a V1 update fails, V2 components will not be processed.

What are the roll and page areas ?
- Roll and page areas are SAP R/3 buffers used to store user contexts ( process requests ) . The SAP dispatcher assigns process requests to work processes as they are received. If the work process is unavailable the process requests are queued in the roll and page areas. Paging area holds data from the application programs. Roll area holds data from previous dialog steps and data that characterizes user.

What is a Spool request ?
- Spool requests are generated during dialog or background processing and placed in the spool database with information about the printer and print format. The actual data is placed in the Tem Se (Temporary Sequential objects).

What are the different database integrities ?
- Semantic integrity
- Relational integrity
- Primary key integrity
- Value set integrity
- Foreign key integrity and
- Operational integrity.


DATA DICTIONARY :


Type of a table or structure
The table type determines how the logical table description defined in the ABAP/4 Dictionary is reproduced on the database. There are the following table types:
transparent table
structure
append structure

For internal purposes, such as storing control data or update texts, there are in addition the following table types:

pooled table
cluster table
generated view structure

Transparent table There is a physical table on the database for each transparent table. The names of the physical tables and the logical table definition in the ABAP/4 Dictionary correspond. All business data and application data are stored in transparent tables.

Structure No data records exist in the database for a structure. Structures are used for the interface definition between programs or between screens and programs.

Append structure An append structure defines a set of fields which belong to another table or structure but which are treated in the correction administration as its own object. Append structures are used to support modifications.

Pooled table Pooled tables can be used to store control data (e.g. screen sequences, program parameters or temporary data). Several pooled tables can be combined to form a table pool. The table pool corresponds to a physical table on the database in which all the records of the allocated pooled tables are stored.

Cluster table Cluster tables contain continuous text, for example, documentation. Several cluster tables can be combined to form a table cluster. Several logical lines of different tables are combined to form a physical record in this table type. This permits object-by-object storage or object-by-object access. In order to combine tables in clusters, at least parts of the keys must agree. Several cluster tables are stored in one corresponding table on the database.

Generated view structure In activation a structure is generated for a view. This structure serves as interface for the runtime environment. It does not generally appear in the ABAP/4 Dictionary.

What is a Data Class?

The Data class determines in which tablespace the table is stored when it is created in the database. What is a Size Category? The Size category describes the probable space requirement of the table in the database. How Many types of size categories and data classes are there? There are five size categories (0-4) and 11 data classes, only three of which are appropriate for application tables:
- APPL0 - Master data (data frequently accessed but rarely updated)
- APPL1 - Transaction data (data that is changed frequnetly)
- APPL2 - Organisational data (customizing data that is entered when system is
configured and then rarely changed)

What are control tables?

The values specified for the size category and data class are mapped to database-specific values via control tables.

What is the function of the transport system and workbench organiser?

The function of the transport system and the Workbench Organizer is to manage any changes made to objects of the ABAP/4 Development Workbench and to transport these changes between different SAP systems.

What is a table pool?
A table pool (or pool) is used to combine several logical tables in the ABAP/4 Dictionary. The definition of a pool consists of at least two key fields and a long argument field (VARDATA).

What are pooled tables?
These are logical tables which must be assigned to a table pool when they are defined. Pooled tables can be used to store control data (such as screen sequences or program parameters).

What is a table cluster?
A table cluster combines several logical tables in the ABAP/4 Dictionary. Several logical rows from different cluster tables are brought together in a single physical record. The records from the cluster tables assigned to a cluster are thus stored in a single common table in the database.

Which objects are independent transport objects?
Domains, Data elements, Tables, Technical settings for tables, Secondary indexes for transparent tables,
Structures, Views,
Matchcode objects, Matchcode IDs, Lock objects.

What are the Data types of the external layer?
ACCP, CHAR, CLNT, CUKY,CURR, DATS, DEC, FLTP, INT1,INT2, INT4, LANG, LCHR,LRAW, NUMC, PREC, QUAN,RAW ,TIMS, UNIT, VARC.

What are the Data types of the ABAP/4 layer?

Possible ABAP/4 data types: C: Character. D: Date, format YYYYMMDD. F: Floating-point number in DOUBLE PRECISION (8 bytes). I: Integer. N: Numerical character string of arbitrary length. P: Amount or counter field (packed; implementation depends on hardware platform). S: Time stamp YYYYMMDDHHMMSS. T: Time of day HHMMSS. V: Character string of variable length, length is given in the first two bytes. X: Hexadecimal (binary) storage.

How can we set the tablespaces and extent sizes ?
You can specify the extent sizes and the tablespace (physical storage
area in the database) in which a transparent table is to be stored by setting the size category and data class.

What is a data dictionary ?
Data dictionary is a central source of data in a data management system. Its main function is to support the .It has details about

- What data is contained ?
- What are the attributes of the data ?
- What is the relationship existing between the various data elements ?

What functions does a data dictionary perform ?
In a data management system, the principal functions performed by the data dictionary are
- Management of data definitions
- Provision of information for evaluation
- Support for software development
- Support form documentation
- Ensuring that the data definitions are flexible and up-to-date.

A field containing currency amounts (data type CURR) must be assigned to a reference table and a reference field. Explain.

As a reference table, a system table containing all the valid currencies is assigned or any other table which contains a field with the currency key format. This field is called as reference field. The assignment of the field containing currency amounts to the reference field is made at runtime. The value in the reference field determines the currency of the amount.

What is the significance of Technical settings (specified while creating a table in the data dictionary) ?

By specifying technical settings we can control how database tables are created in the database. The technical settings allows us to - optimize storage space requiremnets
- table access behaviour
- buffering required
- changes to entries logged

What is the significance of Delivery Class ?
- The delivery class controls the degree to which the SAP or the customer is responsible for table maintenance
- whether SAP provides the table with or without contents.
- determines the table type. - determines how the table behaves when it is first installed, at upgrade, when it is transported, and when a client copy is performed.

What is the maximum number of structures that can be included in a table or structure
- Nine.

What are the two methods of modifying Sap standard tables ?
- Append Structures and
- Customizing Includes.


What is the difference between a Substructure and an Append Structure ?
- In case of a substructure, the reference originates in the table itself, in the forma of a statement .include... . - In case of an append structure, the table itself remains unchanged and the refrence originates in the append structure.
What are the two ways for restricting the value range for a domain ? - By specifying fixed values.
- By stipulating a value table.

What is a Match Code ?

Match Code is a tool to help us to search for data records in the system. Match codes are an efficient and user-friendly search aid where key of a record is unknown. What are the two levels in defining a Match Code ?
- Match Code object
- Match Code Id.

What is the maximum number of match code Id's that can be defined for one Match code object ?
- 36. A match code Id is a one character ID which can be a letter or a number.

Can we define our own Match Code ID's for SAP Matchcodes ?
Yes, the numbers 0 to 9 are reserved for us to create our own Match Code IDs for a SAP defined Matchcode object.

What is an Update type with reference to a Match code ID?
If the data in one of the base tables of a matchcode ID changes, the matchcode data has to be updated. The update type stipulates when the matchcode is to be updated and how it is to be done. The update type also specifies which method is to be used for Building matchcodes . You must specify the update type when you define a matchcode ID.

What are conversion routines ?
- Non standard conversions from display format to sap internal format and vice-versa are implemented with so called conversion routines.
Aggregated Objects Views, matchcodes, and lock objects are also called aggregate objects because they are formed from several related tables.

What is a View ?
- A view is a logical view on one or more tables. A view on one or more tables i.e, the data from a view is not actually physically stored instead being derived from one or more tables. A view can be used to summarize data which is distributed among several tables

How many types of Views are there ? - Database View (SE11)
Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set. In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.

- Help View ( SE54)
Help views are used to output additional information when the online help system is called. When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is defined for this field. If this is not the case, the help view is displayed in which the check table of the field is the primary table. Thus, for each table no more than one help view can be created, that is, a table can only be primary table in at most one help view.

- Projection View

Projection views are used to suppress or mask certain fields in a table (projection), thus minimizing the number of interfaces. This means that only the data that is actually required is exchanged when the database is accessed. A projection view can draw upon only one table. Selection conditions cannot be specified for projection views.

- Maintenance View ( SE54 )

Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.


What is Locking ?
- When two users simultaneously attempt to access the same data record, this is synchronised by a lock mechanism.
When dialog transactions are programmed, locks are set and released by calling certain function modules. These function modules are generated automatically from the definition of so-called lock objects in the ABAP/4 Dictionary. To synchronize the access to a table by setting and removing locks, a Lock object has to be defined in the ABAP/4 Dictionary. Activating the lock object automatically creates #function modules for setting and removing locks. These function modules must be included when programming interactive transactions.

Lock Mechanism : To set locks, a lock object must be defined in the ABAP/4 Dictionary. In this lock object, those tables in which data records are to be locked by calling a lock are determined. All tables included in a lock object must be connected to each other via foreign keys. The key fields of the tables in a lock object form the Lock arguments for the tables. The lock arguments are the basis for formulating the logical condition for identifying the records to be locked. When activating this lock object, two function modulesB with the names ENQUEUE_ and DEQUEUE_ are generated.

Example :
Problem :
You wish to prevent a user from being able to change the name of a course or the name of the professor with responsibility for the course at a time when another user is editing the course description (which contains this information).

Solution : The problem described above can be solved by defining a lock object E_UKURS. This is done by defining primary and secondary tables in the lock object. Table UKURS is check table of table UKRSB, so UKURS should be selected as primary table and UKRSB as secondary table of the lock object. The Lock argument in this case is the field combination FABNR, KRSNR, and SPRAS (i.e Primary Key Combination). The Lock mode Shared is to be selected here. This allows several users to access the data simultaneously in display mode. The lock mode in the generated function modules for setting (ENQUEUE_E_UKURS) and releasing (DEQUEUE_E_UKURS) locks is therefore set to shared as default, but can be overridden by calling the function modules. If the function module ENQUEUE_E_UKURS is called with FABNR = '1' and KRSNR = '3', the record for course 3 in faculty 1 is locked in table UKURS. Furthermore, all the course descriptions for this course are locked in table UKRSB since field SPRAS was not specified when the function module was called. In such cases, the lock is made generically for a field which is not defined. If the function module DEQUEUE_E_UKURS is now called with FABNR = '1', KRSNR = '3' and SPRAS = 'D', the German course description is unlocked. All other course descriptions remain locked.

What is database utility ?
-
Database utility is the interface between the ABAP/4 Dictionary and the underlying the SAP system.
The database utility is the interface between the ABAP/4 Dictionary and the relational database underlying the SAP system. You can call the database utility from the initial screen of the ABAP/4 Dictionary with Utilities ® Database utility. The database utility allows you to create, delete and convert objects from the ABAP/4 Dictionary in the database. MODULARIZATION What is Modularization and its benefits? If the program contains the same or similar blocks of statements or it is required to process the same function several times, we can avoid redundancy by using modularization techniques. By modularizing the ABAP/4 programs we make them easy to read and improve their structure. Modularized programs are also easier to maintain and to update.

How can we create callable modules of program code within one ABAP/4 Program?
A. By defining macros. B. By creating include programs in the library.

What are subroutines?
Subroutines are program modules which can be called from other ABAP/4 programs or within the same program.

What are the types of Subroutines?
A. Internal Subroutines: The source code of the internal subroutines will be in the
same ABAP/4 program as the calling procedure (internal call).
B. External Subroutines: The source code of the external subroutines will be in an
ABAP/4 program other than the calling procedure.

What are the different types of parameters?
Formal parameters: Parameters which are defined during the definition of subroutine with the FORM statement. Actual parameters: Parameters which are specified during the call of a subroutine with the PERFORM statement.

How can one distinguish between different kinds of parameters?
A. Input parameters are used to pass data to subroutines. B. Output parameters are used to pass data from subroutines.

What are the different methods of passing data?
A. Calling by reference: During a subroutine call, only the address of the actual
parameter is transferred to the formal parameters. The formal parameter has no memory of its own, and we work with the field of the calling program within the subroutine. If we change the formal parameter, the field contents in the calling program also change.
B. Calling by value: During a subroutine call, the formal parameters are created as
copies of the actual parameters. The formal parameters have memory of their own. Changes to the formal parameters have no effect on the actual parameters.
C. Calling by value and result: During a subroutine call, the formal parameters are
created as copies of the actual parameters. The formal parameters have their own memory space. Changes to the formal parameters are copied to the actual parameters at the end of the subroutine.
The method by which internal tables are passed is By Reference.

What is the difference between the function module and a normal ABAP/4 subroutine?

In contrast to normal subroutines function modules have uniquely defined interface. Sub routines do not return values.
Sub routines do not return exceptions. Sub routines cannot be tested independently. Declaring data as common parts is not possible for function modules. Function modules are stored in a central library. What is a function group? A function group is a collection of logically related modules that share global data with each other. All the modules in the group are included in the same main program. When an ABAP/4 program contains a CALL FUNCTION statement, the system loads the entire function group in with the program code at runtime. Every function module belongs to a function group.

What is the difference between internal tables and extract datasets?

A. The lines of an internal table always have the same structure. By using extract
datasets, you can handle groups of data with different structure and get statistical figures from the grouped data.
B. You have to define the structure of the internal table at the begining. You need
not define the structure of the extract dataset.
C. In contrast to internal tables, the system partly compresses extract datasets
when storing them. This reduces the storage space required.
D. Internal tables require special work area for interface whereas extract datasets
do not need a special work area for interface.


LOGICAL DATABASE

What are logical databases?
What are the advantages/disadvantages of logical databases? Ans :- A Logical Database is a hierarchical structure of tables. Use the GET statement to process Logical Databases. - LDB consists of logically related tables grouped together ­ used for reading and processing data.
- Advantages = 1. No need of programming for retrieval , meaning for data selection
- 2. Easy to use standard user interface, have check completeness of user input.
Disadvantages = 1. Fast in case of lesser no. of tables But if the table is in the lowest level of hierarchy, all upper level tables should be read so performance is slower.

Preparation of the data records by the L.D.B and reading of the data records in the actual report are accomplished with the command pair.
- Put and Get.

The three main elements of LDB are - Structure, Selections, Database Program.

What sort of tables one can use in designing the hierarchy of a LDB ?
- Tables which are having Foreign key relations.

The structure of Logical Databases relfects the ________________ dependencies of hierarchical tables in the SAP System.
- Foreign key

If you want to improve the response time ( time to access data ) Logical DataBases permits you to achieve this using ______________
- VIEWS.

What are the advantages of Logical DataBases ?
- It offers an easy-to-use selection screen.
You can modify the pre-generated selection screen to your needs. It offers check functions to check whether user input is complete, correct, and plausible.
It offers reasonable data selections.
It contains central authorization checks for database accesses.
Enhancements such as improved performance immediately apply to all report programs that use the logical database.
Report FORMATTING In order to suppress the leading zeros of a number field the keywords used are : NO-ZERO. The Command that allows for vertical alignment of fields one below the other. UNDER. In order to concatenate strings only for output purposes the command _________ can be used in conjunction with the 'Write' statement. NO-GAP. Data can be moved from one field to another using a 'Write:' Statement and stored in the desired format. TRUE. Write : Date_1 to Date_2 format DD/MM/YY. In order to have boldfaced text as output the command used is Write : INTENSIFIED. Background and foreground colors can be interchanged using the command Format inverse. Which datatype cannot be used to define parameters. Type F. For each new event, the system resets all formatting options to their default values. TRUE.

The processing block following END-OF-PAGE is processed only if you reserve lines for the footer in the LINE-COUNT option of the REPORT statement.
To execute a page break under the condition that less than a certain number of lines is left on a page is acheived by ________________________. RESERVE n lines. What is the limit for the length of a page if the page length is not specified in the report statement. 60,000 Lines. How can Symbols or R/3 icons be output on the screen? WRITE AS SYMBOL. WRITE AS ICON.

REPORTING - GENERAL What are reports? and how do you set up reports? A report program reads and analyzes data from one or more database tables without modifying the database. Usually, the result of such a report program is in the form of a list which is output to the screen or sent to a printer. What are the different types of programs?
I Include Program
M Module Pool
F Function Modules
S External Subroutines
1 Online program

Events in Reporting ? Explain ?
The following events occur at runtime of a typical report program which uses logical databases: Event keyword
Event

-- INITIALIZATION
Point before the selection screen
is displayed
When you start a program in which a selection screen is defined (either in the program itself or in the linked logical database program), the system normally processes this selection screen first. If you want to execute a processing block before the selection screen is processed, you can assign it to the event keyword INITIALIZATION.

AT SELECTION-SCREEN
Point after processing user input on the selection screen while the selection screen is still active
The event keyword AT SELECTION-SCREEN provides you with several possibilities to carry out processing blocks while the system is processing the selection screen.

START-OF-SELECTION
Point after processing the selection screen
The event START-OF-SELECTION gives you the possibility of creating a processing block after processing the selection screen and before accessing database tables using a logical database. You can use this processing block, for example, to set the values of internal fields or to write informational statements onto the output screen. At the START-OF-SELECTION event, also all statements are processed that are not attached to an event keyword except those that are written behind a FORM-ENDFORM block .

GET

Point at which the logical database offers a line of the database table
The most important event for report programs with an attached logical database is the moment at which the logical database program has read a line from a database table (see Accessing Data Using Logical Databases ). To start a processing block at this event, use the GET statement as follows:

Syntax

GET


[FIELDS ].


[FIELDS ]. After this statement, you can work with the current line of the database table

. The data is provided in the table work area


GET LATE

Point after processing all tables which are hierarchically subordinate to the database table


in the structure of the logical database.
To start a processing block at the moment after the system has processed all database tables of a logical database that are hierarchically inferior to a specific database table, use the event keyword GET as follows:

Syntax :

GET


LATE [FIELDS ]


In analogy to report programs that use only SELECT statements (see table in Comparison of Access Methods ), the processing block of a GET LATE

statement would appear directly before the ENDSELECT statement in the SELECT loop for the database table

.
END-OF-SELECTION

Point after processing all lines offered by the logical database.
To define a processing block after the system has read and processed all database tables of a logical database, use the keyword END-OF-SELECTION. The following events occur during the processing of the output list of a report program: Event keyword

Event

-----------------------------------------------------------------------------------------------

TOP-OF-PAGE
Point during list processing when a new page is started
END-OF-PAGE

Point during list processing when a page is ended
The following events occur during the display of the output list of a report program: Event keyword

Event


--AT LINE-SELECTION
Point at which the user selects a line


AT USER-COMMAND
Point at which the user presses a function key or enters a command in the
command field.


AT PF
Point at which the user presses the function key with the function code
PF


With the selection screen, ABAP/4 offers an interactive element also for report programs. You can define a selection screen without having to bother about all the details required in dialog programming. The selection screen is always processed directly after a report program is started. The user can enter field values and selection criteria on this screen. The main purpose of the selection screen is to enable the user to control the database selections of the report program. If a report program is started from another ABAP/4 program with the SUBMIT statement (see Calling Reports), the selection screen objects also serve as a data interface, With a selection screen defined in the report program, you can enable the user to ·
assign values to variables with the PARAMETERS statement
·
determine selection criteria with the SELECT-OPTIONS statement


How do you read selected lines of database table into an internal table in packages of predefined size?.


SELECT * FROM INTO TABLE PACKAGE SIZE .
where 'n' is variable.
Name the WILDCARD characters which are used for comparisions with character strings & numeric strings.
'%' and '_'.


How to specify a client for database table processing.

TABLES SPFLI.
SELECT * FROM SPFLI CLIENT SPECIFIED
WHERE MANDT BETWEEN '001' AND '003'.
...
ENDSELECT.


Activation ­ During activation, the runtime object of aggregate object or tables is created. The runtime object is buffered so that the application program can access it quickly. Runtime object has information about the following objects of table - domain ­ data elements ­ field definition ­ table definition

Lock Mechanism ­ prevents a new database operation being started an existing one has been correctly completed. When conversion is done, lock is created automatically and released only when conversion is successful. Clearing of locks ­ restart adjustment ­ attempt is made to continue conversion at the point of
termination
Cancel adjustment ­ lock entry is simply deleted from table

Version Management functions ­

- Canceling changes ­ reset revised version to active version
- Storing changes ­ active version will be temporarily stored in version
Switching changes ­ switch between active and revised versions

Version catalog ­ list of all existing versions of an object

- Revised version ­ produced when we edit an existing object
- Active version ­ produced when we activate an object
- Temporary version ­ produced when we copy the active version temporarily to the database with store version functions
- Historical versions ­ created when 1. Correction is created 2 correction is
released

Table Buffering : Possible buffering types

- full buffering ­ either, whole table or none of the table is located in the buffer (Tables up to 30 kb done in client dependent fully buffered tables)
- Generic buffering ­ generic areas of the table are fully buffered.
- Generic key ­ left justified section of primary key of a table.
Single record buffering ­ records actually being accessed are loaded to buffers, large records where few records are accessed.


Internal Tables ? Types ?

STANDARD table Key access to a standard table uses a linear search. This means that the time required for a search is in linear relation to the number of table entries. You should use index operations to access standard tables.

SORTED table Defines the table as one that is always saved correctly sorted. Key access to a sorted table uses a binary key. If the key is not unique, the system takes the entry with the lowest index. The runtime required for key access is logarithmically related to the number of table entries.

HASHED table Defines the table as one that is managed with an internal hash procedure You can only access a hashed table using the generic key operations or other generic operations ( SORT, LOOP, and so on). Explicit or implicit index operations (such as LOOP ... FROM oe INSERT itab within a LOOP) are not allowed.

INDEX table A table that can be accessed using an index. Index table is only used to specify the type of generic parameters in a FORM or FUNCTION. That means that you can't create a table of type INDEX. Standard tables and sorted tables are index tables.

Syntax : DATA itab TYPE table type of line type [WITH UNIQUE/NON-UNIQUE KEY ] [Iinitial size n] [WITH HEADER LINE]

What are DATA CLUSTERS ?

You can group any complex internal data objects of an ABAP/4 program together in data clusters and store them temporarily in ABAP/4 memory or for longer periods in databases. You can store data clusters in special databases of the ABAP/4 Dictionary. These databases are known as ABAP/4 cluster databases and have a predefined structure.Storing a data cluster is specific to ABAP/4. Although you can also access
cluster databases using SQL statements, only ABAP/4 statements are able to decode the structure of the stored data cluster.


Describe the functions of the debugger screen.

- Single step(F5) - Use this option to step through the program statement by statement. This allows you to branch into subroutines and function modules, and to execute these routines step by step as well. Once a subroutine or function module has been processed, control returns to the statement following the CALL FUNCTION or PERFORM statement.


- Execute(F6)- Use this option to process a program line by line. All of the statements on the current line are processed in a single step. If you are positioned on a line that calls a subroutine and you choose Execute, the Debugger processes the whole subroutine and then moves on to the line following the subroutine call. This allows you to jump through the statements within the subroutine.


- Return(F7) - The Debugger returns from a routine to the point at which control returns to the main program. Use this option to return from a subroutine, function module, or called program to the calling program.


- Continue(F8)- Use this option to process the program up to the next dynamic or static breakpoint or up to the cursor position. If there are no more breakpoints in the program and no cursor has been set, the system exits debugging mode and executes the rest of the program normally.


- Tables - Display the contents of internal tables.

Problem:How to run a program in background?

Solution :Execute the Report In the selection screen :After filling the screen fields press F9. A screen appears requesting U to print the Background Parameters *Enter the output device(Eg HPLJ /SAP2 etc) *In the spool options Uncheck Print immedietly,Uncheck delete after output,and new spool request. Press enter. Another screen appears with heading start time .U can press start immly ,then save Now the Background job is scheduled for the given program .
To View the status of background Job,The transaction code is SM37. Execute from the resulting screen . Job overview -->From the Job list select U'r program and select Spool from the application toolbar Output Controller :List of Spool Requests Select U'r Spool request and click Display icon from the overview screen . U will be displayed with the List. Caution :See to that the list with does not exceed 255 columns ,If it exceeds the extra columns will be truncated in Background



What are presentation and application servers in SAP?

A presentation server is actually a program named Sapgui.exe. It is usually installed on a user's workstation. Application server is a set of executables that collectively interpret the ABAP/4 programs and manage the input & output for them.

In an ABAP/4 program how do you access data that exists on a presentation server v/s on an application server?

For presentation server use UPLOAD or WS_UPLOAD function modules. For application server use OPEN DATASET, READ DATASET and CLOSE DATASET commands.


Describe the syntax and function of the AUTHORITY CHECK command?

Ans :- AUTHORITY ­ CHECK OBJECT

ID FIELD ID FIELD ... IF SY-SUBRC NE 0. The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.


Dialog Programming FAQ

1) Why do I need to do dialog programming?
Ans: to have your own customized screens and processing

2) What does dialog programming consist of ?
Ans: Screens with their corresponding processing code, Menu , module pool program

3) Difference between the normal report / program and Module pool program?
Ans: Normal report can be run straight away by executing it and useually has a selection criteria – Attributes : 1 online program
Module pool program cannot be run straight away. It first needs to display a screen – attributes : M module pool program

4) What is PBO and PAI?
Ans: Process before output. Code that is executed prior to the display of a screen.
Process after input. Code that is executed after a button on the screen has been pressed.

5) How can I identify which button is pressed?
Ans: “ fcode” attributes of the button. Define the okcode value of the screen (type sy-ucomm)

6) What is the GUI interface to the program?
Ans: The menu bar where you define the ok-codes of the buttons and function keys for the screen. You typically code SAVE, BACK, CANC, EXIT and then more specific codes. CANC (leave to screen 0) allows you to get out of the current screen.

7) What does PAI and Pbo contain by default?
Ans: PBO - MODULE STATUS_0100 - Key / button definitions
PAI - * MODULE USER_COMMAND_0100 - How do you handle thecode behind the button that was pressed

8) If we do not have / give menu bar than what will menu bar have by default?
Ans: Not much -> system , help

9) How many PBO and PAI modules are allowed for a screen?
Ans: one PBO and one PAI

10) In the menu bar can you associate a function key to a button?
Ans: yes

More SAP ABAP Interview Faq's

51. What are the techniques involved in using SAP supplied programs?
Do you prefer to write your own programs to load master data? Why?

52. What are logical databases? What are the advantages/disadvantages of logical databases?
ANS:-
To read data from a database tables we use logical database.
A logical database provides read-only access to a group of related tables to an ABAP/4 program.

adv:-
The programmer need not worry about the primary key for each table.Because Logical database knows how the different tables relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.
i)An easy-to-use standard user interface.
ii)check functions which check that user input is complete,correct,and plausible.
iii)meaningful data selection.
iv)central authorization checks for database accesses.
v)good read access performance while retaining the hierarchical data view determined by the application logic.

disadv:-
i)If you donot specify a logical database in the program attributes,the GET events never occur.
ii)There is no ENDGET command,so the code block associated with an event ends with the next event
statement (such as another GET or an END-OF-SELECTION).

53. What specific statements do you using when writing a drill down report?
ans:-
AT LINE-SELECTION,AT USER-COMMAND,AT PF.

54. What are different tools to report data in SAP? What all have you used?
ans:-

55. What are the advantages and disadvantages of ABAP/4 query tool?

56. What are the functional areas? User groups? and how does ABAP/4 query work in relation to these?

57. Is a logical database a requirement/must to write an ABAP/4 query?

59. What are Change header/detail tables? Have you used them?

60. What do you do when the system crashes in the middle of a BDC batch session?
ans:-
we will look into the error log file (SM35).

61. What do you do with errors in BDC batch sessions?
ANS:-
We look into the list of incorrect session and process it again. To correct incorrect session we analyize the session to determine which screen and value produced the error.For small errors in data we correct them interactively otherwise
modify batch input program that has generated the session or many times even the datafile.

62. How do you set up background jobs in SAP? What are the steps? What are the event driven batch jobs?
ans:-
go to SM36 and create background job by giving job name,job class and job steps(JOB SCHEDULING)

63. Is it possible to run host command from SAP environment? How do you run?

64. What kind of financial periods exist in SAP? What is the relavent table for that?

65. Does SAP handle multiple currencies? Multiple languages?
ans:-
Yes.

66. What is a currency factoring technique?

67. How do you document ABAP/4 programs? Do you use program documentation menu option?

68. What is SAPscript and layout set?
ans:-
The tool which is used to create layout set is called SAPscript. Layout set is a design document.

69. What are the ABAP/4 commands that link to a layout set?
ans:-
control commands,system commands,

70. What is output determination?

71. What are IDOCs?
ans:-
IDOCs are intermediate documents to hold the messages as a container.

72. What are screen painter? menu painter? Gui status? ..etc.
ans:-
dynpro - flow logic + screens.
menu painter -
GUI Status - It is subset of the interface elements(title bar,menu bar,standard tool bar,push buttons) used for a certain screen.
The status comprises those elements that are currently needed by the transaction.

73. What is screen flow logic? What are the sections in it? Explain PAI and PBO.
ans:-
The control statements that control the screen flow.
PBO - This event is triggered before the screen is displayed.
PAI - This event is responsible for processing of screen after the user enters the data and clicks the pushbutton.

74. Overall how do you write transaction programs in SAP?
ans:-
Create program-SE93-create transcode-Run it from command field.

75. Does SAP has a GUI screen painter or not? If yes what operating systems is it available on? What is the other type of screen painter called?

76. What are step loops? How do you program pagedown pageup in step loops?
ans:-
step loops are repeated blocks of field in a screen.

77. Is ABAP a GUI language?
ANS:-
Yes.
ABAP IS AN EVENT DRIVEN LANGUAGE.

78. Normally how many and what files get created when a transaction program is written?
What is the XXXXXTOP program?
ans:-
ABAP/4 program.
DYNPRO

79. What are the include programs?
ANS:-
When the same sequence of statements in several programs are to be written repeadly they are coded in include programs (External programs) and are included in ABAP/4 programs.

80. Can you call a subroutine of one program from another program?
ans:- Yes- only external subroutines Using 'SUBMIT' statement.

81. What are user exits? What is involved in writing them? What precations are needed?

82. What are RFCs? How do you write RFCs on SAP side?

83. What are the general naming conventions of ABAP programs?
ANS:-
Should start with Y or Z.

84. How do you find if a logical database exists for your program requrements?
ans:-
SLDB-F4.

85. How do you find the tables to report from when the user just tell you the transaction he uses? And all the underlying data is from SAP structures?
ans:-
Transcode is entered in command field to open the table.Utilities-Table contents-display.

86. How do you find the menu path for a given transaction in SAP?
ans:-

87. What are the different modules of SAP?
ans:-
FI,CO,SD,MM,PP,HR.

89. How do you get help in ABAP?
ans:-
HELP-SAP LIBRARY,by pressing F1 on a keyword.

90. What are different ABAP/4 editors? What are the differences?
ans:-

91. What are the different elements in layout sets?
ans:-
PAGES,Page windows,Header,Paragraph,Character String,Windows.

92. Can you use if then else, perform ..etc statements in sap script?
ans:-
yes.

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

94. How do you number pages in sapscript layout outputs?

95. What takes most time in SAP script programming?
ANS:-
LAYOUT DESIGN AND LOGO INSERTION.

96. How do you use tab sets in layout sets?

97. How do you backup sapscript layout sets? Can you download and upload? How?

98. What are presentation and application servers in SAP?
ANS:-
The application layer of an R/3 System is made up of the application servers and the message server. Application programs in an R/3 System are run on application servers. The application servers communicate with the presentation components, the database, and also with each other, using the message server.

99. In an ABAP/4 program how do you access data that exists on a presentation server vs on an application server?
ans:-
i)using loop statements.
ii)flat

100. What are different data types in ABAP/4?
ans:-
Elementary -
predefined C,D,F,I,N,P,T,X.
userdefined TYPES.
ex: see in intel book page no 35/65

Structured -
predefined TABLES.
userdefined Field Strings and internal tables.

101. What is difference between session method and Call Transaction?
ans:-

102. Setting up a BDC program where you find information from?
ans:-

103. What has to be done to the packed fields before submitting to a BDC session.
ans:-
fields converted into character type.

104. What is the structure of a BDC sessions.
ans:-
BDCDATA (standard structure).

105. What are the fields in a BDC_Tab Table.
ans:-
program,dynpro,dynbegin,fnam,fval.

106. What do you define in the domain and data element.
Technical details like

107. What is the difference between a pool table and a transparent table and how they are stored at the database level.
ans:-
ii)Pool tables is a logical representation of transparent tables .Hence no existence at database level. Where as transparent tables are physical tables and exist at database level.

108. What is cardinality?
For cardinality one out of two (domain or data element) should be the same for Ztest1 and Ztest2 tables. M:N
Cardinality specifies the number of dependent(Target) and independent (source) entities which can be in a relationship.

What types of objects can be created in the ABAP Dictionary?

Tables
Views
Data Elements
Structures
Table Types
Type Groups
Domains
Search Helps
Lock Objects

What is the difference between Pooled tables and Cluster tables?

Cluster tables and Pooled tables have many to one relationship with the underlying database.

A table pool corresponds to a table in the database in which all records from the pooled tables assigned to it are stored.
Several logical data records from different cluster tables can be stored together in one physical record in a table cluster.

  • A pooled table cannot have the name having more than 10 characters.
  • All the key fields of the pooled table must be of character data type.
  • In pooled tables, the maximum length of the key field/data fields should not exceed the length of varkey/vardata of the pool respectively.
  • In cluster table the records having the same key are stored in a single key in the cluster.
  • If there is an overflow of the data records a continuation record is created with the same table key.

What is the difference between Database tables and Views?

The Table has a 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). It can also be created with table inner joins and specifying conditions for data retrieval.

What are the different types of Views? ABAP

  • Projection view - Just retrieves some fields from a single table.
  • Help View - This is used for search help.
  • 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.

What is Table Maintenance Generator? ABAP

The Table Maintenance Generator is used to create table maintenance program to add, modify or delete records in the database table. This can be accessed using transaction SE54 or in SE11 using the menu Utilities->Table Maintenance Generator.

Saturday, October 11, 2008

all interview questions sap abap faqs

1. What is the typical structure of an ABAP program? Secretary

2. What are field symbols and field groups.?

Ans: Field symbols: Field symbols are like pointers. Placeholders for fields or arbitrary data objects.

Field group: A field group combines several fields under one name.

**** Have you used "component idx of structure" clause with field groups?

3. What should be the approach for writing a BDC program?

Ans.

Analyzing data from local file.
Analyzing transaction
Declaring internal table
Similar to local file.

Similar to BDCDATA.

Transferring data from local file to internal table.
Population of BDCDATA. using call transaction/session method)
4. What is a batch input session?

Ans. In this method transfer data from internal table to database table through sessions. Session is intermediate step between internal table & database table. Unless session is processed, the data is not transferred to the database table.

5. What is the alternative to batch input session?

Ans. Call transaction method.

6. A situation: An ABAP program creates a batch-input session. We need to submit the program and the batch session in background. How to do it?

Ans. You should process batch-input sessions in the foreground or using the error display if you want to test the data transfer. If you want to execute the data transfer or test its performance, you should process the sessions in the background. To process the sessions in the background, Set the Run mode to Background.

7. What z the diff b/n a pool table and a transparent table and how they are stored at the database level.

Ans. From user point of view all tables are used to store data. From administrator point of view Transparent tables do exists with the same structure both in the dictionary as well as in the database.

Pool & Clustered tables are Logical tables, which are arranged as records of transparent table. These are not manageable directly by using database system tools.

8. What are the problems in processing batch input sessions?

Ans.

Q. How is batch input process different from processing online?

Ans. For online (Session method) external data is deposited in a session for later processing.

For inline (call transaction method) the entire batch input process takes place inline in your program.

9. What do you define in the domain and data element.

Ans. Domain is formal definition of data types from a technical point of view. Sets attributes i.e., type, range, length . . .

DataElements are definition of the properties and type for a table field. It is an intermediate between the object type domain & table filed.

10. What are the different types of data dictionary objects?

Ans.

Table.
Structures.
Views.
Dataelement.
Domains.
Lock Objects.
Match code objects.
11. How many types of tables exists and what are they in data dictionary?

12. What is the step by step process to create a table in data dictionary?

Ans.

Create Domain.
Create Data Element.
Create Actual Table.
13. Can a transparent table exist in data dictionary but not in the data base physically?

Ans. NO

14. What are the domains and data elements?

15. Can you create a table with fields not referring to data elements?

Ans. NO.

16. What is the advantage of structures? How do you use them in the ABAP programs?

17. What does an extract statement do in the ABAP program?

Ans. An extract dataset consists of a sequence of records. These records may have different structures. All records with the same structure form a record type. You must define each record type of an extract dataset as a field group, using the FIELD-GROUPS statement.

When the first EXTRACT statement occurs in a program, the system creates the extract dataset and adds the first extract record to it. In each subsequent EXTRACT statement, the new extract record is added to the dataset.

18. What is a collect statement? How is it different from append?

Ans. COLLECT: When the line is inserted, the system checks whether there is already a table entry that matches the key. If there is no corresponding entry already in the table, the COLLECT statement has the same effect as inserting the new line. If an entry with the same key already exists, the COLLECT statement does not append a new line, but adds the contents of the numeric fields in the work area to the contents of the numeric fields in the existing entry.

19. What is Open SQL Vs Native SQL?

Ans. Open SQL allows you to access database tables declared in the ABAP Dictionary regardless of the database platform that your R/3 System is using.

Native SQL allows you to use database-specific SQL statements in an ABAP program. This means that you can use database tables that are not administered by the ABAP Dictionary, and therefore integrate data that is not part of the R/3 System.

20 (a). What does an EXEC SQL stmt do in ABAP?

Ans. To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the ENDEXEC statement as follows:

EXEC SQL.

ENDEXEC.

Q20 (b). What is the disadvantage of using EXEC SQL stmt do in ABAP?

Ans. Using inverted commas (") or an asterisk (*) at the beginning of a line in a native SQL statement does not introduce a comment as it would in normal ABAP syntax

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

Ans. Area menu.

22. What are the events in ABAP language?

Ans.

Example for the structure of an ABAP program:

REPORT...

NODES: SPFLI, SFLIGHT.

DATA:...

INITIALIZATION.
AT SELECTION-SCREEN.
START-OF-SELECTION.
GET SPFLI...
GET SFLIGHT...
GET SPFLI LATE.
END-OF-SELECTION.
FORM...
ENDFORM.

23. What is an interactive report? What is the obvious differences of such report compared with classical type reports?

Ans. Interactive reporting allows the user to participate in retrieving and presenting data at each level during the session. Gives a basic list form which the user can call detailed information by positioning the cursor and entering the commands.

Classical reports consists of one program the creates a single list which contains clustered data requested, regardless of the details the user wants to see.

24. What is a drill down report?

Ans. A drilldown report is a report used for the interactive evaluation of data. (Interactive reports)

25. How do you write a function module in SAP? describe.

Ans.

create funtion group.
create funtion module program in se37.
specify the parameters for passing data to and from the module and the exceptions.

write source code.

write exe program calling the funtional program.
26. What are the exceptions in function module?

Ans. Exceptions are used to handle errors. The Funtion module checks for any type of error & raise exception & returns SY-SUBRC to the calling program. Main program checks for SY-SUBRC for any errors and then takes action accordingly.

27. What is a function group?

Ans. Funtion Modules that operate with same data can be grouped in one known as funtion group.

28. How are the date and time field values stored in SAP?

Ans. SY-DATUM & SY-UZEIT

29. What are the fields in a BDCTab Table.

Ans. PROGRAM
DYNPRO

DYNBEGIN

FNAM

FVAL

30. Name a few data dictionary objects?

31. What happens when a table is activated in DD?

Ans. To be able to accessed by other objects like programs.

32. What is a check table and what is a value table?

Ans. A foreign key links two tables T1 and T2 by assigning fields of table T1 to the primary key fields of table T2. Table T2 is then known as the check table of the foreign key.

value table : when you define a domain, you already know that all fields that use the domain will need to be checked against a particular table. You can store this information in the domain definition by specifying a value table.

If you try to define a foreign key for a field that points to this domain, the value table of the domain is proposed as the check table for the foreign key.

33. What are match codes? describe?

Ans.

34. What transactions do you use for data analysis?

35. What is table maintenance generator?

Ans.

36. What are ranges? What are number ranges?

Ans. SELECT-OPTION

37. What are select options and what is the diff from parameters?

Ans. Select options are for range of values.

Parameters are used for simple queries of single values.

38. How do you validate the selection criteria of a report?

Ans. AT SELECTION -SCREEN.

IF carrid = '11000'.

error message.

ENDIF.

Q. And how do you display initial values in a selection screen?

Ans. Using VARIANTS.

39. What are selection texts?

Ans. Long text for select option / parameters . Selection text (SELECT-OPTION, PARAMETER). This description appears on the selection screen.

40. What is CTS and what do you know about it?

Ans. It intended for the system administrator who sets up the Change and Transport System (CTS).

41. When a program is created and need to be transported to production does selection texts always go with it? if not how do you make sure? Can you change the CTS entries? How do you do it?

Ans.

42. What is the client concept in SAP? What is the meaning of client independent?

Ans. Sets of software component which acts as service requester are called as client.

43. Are programs client dependent?

Ans.

44. Name a few system global variables you can use in ABAP programs?

Ans. SY-DATUM, SY-UEZIT, SY-SUBRC, SY-DBCNT.

45. What are internal tables?

How do you get the number of lines in an internal table?

How to use a specific number occurs statement?

Ans. Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP. The data is stored line by line in memory, and each line has the same structure, they are dynamic data objects.

SY-DBCNT / SY-TABIX.

DATA : BEGIN OF ITAB OCCURS 19,

A1 TYPE I,

C1 TYPE C,

END OF ITAB.

46. How do you take care of performance issues in your ABAP programs?

Ans.

47. What are datasets?

Ans. Sequential files in application server.

48. How to find the return code of a stmt in ABAP programs?

Ans. SY-SUBRC (except for transfer stmt).

49. What are interface/conversion programs in SAP?

Ans.

50. Have you used SAP supplied programs to load master data?

Ans. BDC

51. What are the techniques involved in using SAP supplied programs? Do you prefer to write your own programs to load master data? Why?

Ans.


52. What are logical databases? What are the advantages/disadvantages of logical databases?

Ans. Logical database are special ABAP programs that retrive data & make it available to application programs.

Advantages of Logical database.

No need of taking care of the key field and the foreign key realtionship between the tables in question.(relationship between diff tables are reflected in tree structure of Logical database).
A selection screen with appropriate selection criteria is automatically created.
Program standard authority checks are executed by Logical database itself in reports.
Logical database improves the performance of reports at runtime.
53. What specific statements do you using when writing a drill down report?

Ans. Hide stmt.

54. What are different tools to report data in SAP? What all have you used?

Ans. ABAP query tool,

55. What are the advantages and disadvantages of ABAP query tool?

Ans.

56. What are the functional areas? User groups? and how does ABAP query work in relation to these?

Ans.

57. Is a logical database a requirement/must to write an ABAP query?

Ans. No.

58. What is the structure of a BDC sessions.

Ans.

Declare internal tables for upload.
declare another internal table with same structure of BDCDATA.
call function BDC_Open _group.
call function BDC_insert.
call function BDC_close_group.
59. What are Change header/detail tables? Have you used them?

Ans. The change header contains both fields that define and describe the change and administrative data on the change master. The administrative data is updated by the system.

60. What do you do when the system crashes in the middle of a BDC batch session?

Ans.

61. What do you do with errors in BDC batch sessions?

Ans. BDC session with errors appears in INCORRECT session & it can be processed again. to correct the errors , first you can analyze the session to determine which screen & value produced the error, if there r small errors, correct them else modify the BDC pgm which generates session or the flat file itself.


62. How do u set up background jobs in SAP? What r the steps? What are the event driven batch jobs?

Ans.

63. Is it possible to run host command from SAP environment? How do you run?

Ans.

64. What kind of financial periods exist in SAP? What is the relevant table for that?

Ans.

65. Does SAP handle multiple currencies? Multiple languages?

Ans. YES

66. What is a currency factoring technique?

Ans.

67. How do you document ABAP programs? Do you use program documentation menu option?

Ans.

68. What is SAPscript and layout set?

Ans. Printable document such as invoices, purchase order are printed with the use of forms, SAP allows the user to define these forms by using layout sets is SAP scripts.

Layout set is used to design a document. Layout set on its own does not contain any data. Selection of data for the document is done through the print program.

69. What r the ABAP commands that link to a layout set?

Ans. dataelement ... like ( /E ELE1)

70. What is output determination?

Ans.

71. What are IDOCs?

Ans. Intermediate document (IDoc) container for exchanging data between R/3, R/2 and non-SAP systems. ALE uses IDocs to exchange data between logical systems. Non-SAP systems can use IDocs as the standard interfacefor data transfer.

IDocs are created when message types and (object) methods are distributed. The message type is the format in which the data for a specific business process is transferred.

72. What are screen painter? menu painter? Gui status? ..etc.

Ans. Screen painter: Tool for creating the screens of a dialog transaction.

Menu painter: Tool for creating and designing the graphical user interface of an ABAP program.

GUI Status : Main element of the graphical user interface.A GUI status usually consists of a menu bar with menus, a standard toolbar, an application toolbar, and functions with function key settings.

Together with the GUI title, the GUI status defines the actual state of the user interface of an ABAP program.

73. What is screen flow logic? What are the sections in it? Explain PAI and PBO.

Ans. Flow logic : Code that processes a particular screen in the R/3 System.Flow logic statements are syntactically similar to ABAP statements, but you cannot use flow logic keywords in ABAP.

You define flow logic in the flow logic editor of the Screen Painter. Flow logic comprises four modules:

PBO (Process Before Output)
PAI (Process After Input)
POV(Process On value request)
POH(Process On Help request)
PBO : The processing of screen before the screen is displayed is done in this event. (event is triggered before the screen is displayed).

PAI : This event is responsible for processing of screen after the user enters the data and clicks the pushbutton.

POV : This is triggered when user clicks F4 function key (for listing all possible values for the field).

POH : This event is triggred when user places the cursor on field and press F1 , by default system displays its own HELP for that particular field one can add his own HELP by writting in POH.

74. Overall how do you write transaction programs in SAP?

Ans.

Create a module program.
Goto Screen painter in SE51. create & add all your elements.
write flow logic in screen painter
save & activate.
attach a transaction code in SE93.
75. Does SAP has a GUI screen painter or not? If yes what operating systems is it available on? What is the other type of screen painter called?

Ans.

76. What are step loops? How do you program pagedown/pageup in step loops?

Ans. Step Loops: these are repeated blocks of fields in a screen.

77. Is ABAP a GUI language?

Ans. YES

78. Normally how many and what files get created when a transaction program is written? what is the XXXXXTOP program?

Ans.

79. What are the include programs?

Ans. Self-contained program that executes a particular task.

An include program has two main functions:

It contains code which can be used by several different programs.
It helps you to modularize programs, which consist of many different logically related parts. Each of these parts is stored as a separate include program.
Include programs improve the readability of programs and make maintenance easier.

80. Can you call a subroutine of one program from another program?

Ans. yes (using PERFORM)

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

Ans. User Exits are used for enhancement of SAP Objects. Point in an SAP program where a customer's own program can be called.

82. What are RFCs? How do you write RFCs on SAP side?

Ans. Remote Function Call. RFCs enable you to call and execute predefined functions in a remote system - or even in the same system.RFCs manage the communication process, parameter transfer and error handling.

83. What are the general naming conventions of ABAP programs?

Ans.Starting with Z or Y

84. How do you find if a logical database exists for your program requirements?

Ans.

85. How do you find the tables to report from when the user just tell you the transaction he uses? And all the underlying data is from SAP structures?

Ans.


86. How do you find the menu path for a given transaction in SAP?

Ans. From the main R/3 menu choose:

Tools --> Administration ---> Data Retention Tool

87. What are the different modules of SAP?

Ans.

88. What is IMG in SAP?

Ans.

89. How do you get help in ABAP?

Ans. Place the cursor on the filed & press F1.

90. What are different ABAP editors? What are the differences?

Ans.

91. What are the different elements in layout sets?

Ans. Header, Page, Pagewindows, Windows, Paragraph Format, Character String.

92. Can you use if then else, perform ..etc statements in sap script?

Ans. Yes

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

Ans. system defined & user define in program

94. How do you number pages in Sapscript layout outputs?

Ans. &SY-PAGNO&

95. What takes most time in SAP script programming?

Ans.

96. How do you use tab sets in layout sets?

Ans.

97. How do you backup Sapscript layout sets? Can you download and upload? How?

Ans.

98. What are presentation and application servers in SAP?

Ans. Presentation server: Software layer in the R/3 System that accepts input from users and returns the results. Application Server :Server that provides a range of services to run the R/3 System. An application server consists of a dispatcher and one or more work processes for each service. The dispatcher manages processing requests, and work processes execute them.

Each application server provides at least one dialog service and one gateway.

99. In an ABAP program how do you access data that exists on a presentation server vs on an application server?

Ans. using dataset

100. What are different data types in ABAP?

Ans. There are eight predefined types in ABAP with fixed length:

Four character types: Character (C), Numeric character (N), Date (D), and Time (T).

One hexadecimal type: Byte field (X).

Three numeric types: Integer (I), Floating-point number (F) and Packed number (P).

There are two predefined types in ABAP with variable length:

STRING for character strings , XSTRING for byte strings

Complex type.

structure type. table type.

Reference type.

Data reference

Object Reference

class reference interface reference

101. What is difference between BDC and Call Transaction?

Ans. BDC Session Method

Data is not updated in database tables unless session is processed.
No SY-SUBRC returned.
Error log is created for error records.
Updation in database table is always synchronous
Call Transaction Method.

Immediate Updation in database table.
SY-SUBRC retuned.
Errors need to be handled explicitly.
Updation in database in database table can be Synchronous or Asynchronous
102. Setting up a BDC program where you find information from?

Ans.

103. What has to be done to the packed fields before submitting to a BDC session.

Ans.

SAP free download abap

ABAP FAQs

Important SAP ABAP FAQs

What are dml statements in sap?

Ans: Insert, Update, Delete.

What is the difference between open sql & native sql?

Ans: Open SQL allows you to access all database tables known to the SAP system, regardless of the database manufacturer. Sometimes, however, we may want to use database-specific SQL statements called Native SQL in your ABAP/4 program.
To avoid incompatibilities between different database tables and also to make ABAP/4 programs independent of the database system in use, SAP has created a set of separate SQL statements called Open SQL. Open SQL contains a subset of standard SQL statements as well as some enhancements which are specific to SAP.
A database interface translates SAP's Open SQL statements into SQL commands specific to the database in use. Native SQL statements access the database directly

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

Ans: Primary index: the primary index contains key fiels of a table and a pointer to non-key fields of the table. The primary index is created automatically when a table is created in database and moreover you can further define reference to the primary index which are known as Secondary index.

How many indexes can be created for a table?

Ans: 9.

What is data class?

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

Give few names of cluster tables in sap?

Ans: sorry i dont know

Give few names of pooled tables in sap?

Ans: A pool table has many to one relation with the table in the database. For one table in the database there are many tables in the dictionary. Tha table in the database has a diff name than in the table in the data dict, it has diff no of fields and field names are different. A pooled table is stored in the pool at the database level. A table pool is a databse table with a special struct that enables the data of many R3 tables to be stored in it. It can hold only pooled tables.
Sorry I dont know table names

Give few names of transparent tables?

Ans: A transparent table has a one to one relataionship in the database. The table in the dictionary has the same name, same no of fields, and the fields have the same name as in the R3 table defn. A transparent tabel has application data (Master and Transaction). sorry i dont know table names

What is a buffer and how many types?

Ans: Buffer is othing but which stores data temporarily. there are two types of buffers. they are Roll and Page areas.
Pages : it stores the application data.
Roll area: it stores the data of previous pages.Data areas of used programs are created in roll areas for each internal session.

What is table maintenance generator and how to create that? What is the transaction code?

Ans: Table maintanence generator is nothing but making a table available for adding records and deleting records.
The transaction code used is SM30.

How to add new fields to a standard sap table?

Ans: 1. Appended structures 2. Customizing tables

What are lock objects?

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

Diff betwn inner & outer join?

Ans:

What is the use of start-of-selection event?

Ans: Start-of-selection is called implicity even it is not used in the program. start-of-selection is triggered after the standard selection screen has been displayed.

What is the difference between end-of-page and end-of-selection?

Ans: End-of-page : is footer of the page. End-of-selection: is triggered At the end of the processing block.

If you write a write statement after end-of-selection, will that be triggered?

Ans: Yes

How to create a button in selection screen?

Ans: Using parametres

How to add a gui status in a selection screen?

Ans: sorry i dont know i thik using set pf.

How to create a check box/option button in a list?

Ans: Regarding Runtime creation of Check Boxes

Can you call a bdc program from a report? how?

Ans: Yes through Submit and return

Can you call a transaction from a report? how?

Ans: Yes Using Call transaction and leave to.

What are ALV reports? how they are different from normal reports?
Ans: these reports are used to find subtotals and totals in a report. If you want i'll give you an example program

What are the main events that are used in an ALV report?
Ans: sorry i dont know

What is the use of SLIS type pool in alv reports?

Ans: Slis type pool is a global defination of pooltypes of catalog structure, table and layout which we use in ALV reports

Difference between top-of-page and top-of-page during at-line- selection?

Ans: Top-of-page is a header on primary list. Top-of-page during line-selection is a header on secondary lists

In an interactive report, after going to 5th list, can you come back to 2nd list? how?

How many type of internal tables are there?

Ans: Standard, Hashed, Sorted tables

What is the difference between hashed & sorted internal tables?

Ans: Sorted internal table works on Binary Search and Hashed internal tables works on hashed alogorthim through indexes.

What is the difference between standard and sorted internal tables? (in performance wise)

Ans: Sorted table improve the performance in case of a huge table which has no: of records

What is the use of at new statement?

Ans:sorry i dont know

When do you need to create an internal table with header line? and with out a header line? line?

Ans: If we don't want to use any explicit work area then its better to go for an internal table with header line.

What does it mean occurs 0 while creating an internal table?

Ans: sorry i dont know

Which of these methods can be best used in background process?

Ans : Batch Input method.

What is direct input method?

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

Ans: Exec Sql[Performing

Disadvantages:

. Syntax check is not done to statements written inside the EXEC SQL statements.

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

What transactions do you use for data analysis?

ANs: Sorry i dont know but for runtime analysis we use transaction code : se30.

What are selection texts?

Ans: in the selection screen you can change the name of the field,title etc using selection texts. go to text--> text elemets---> selection texts in the menu bar to set selection texts.

What is the client concept in SAP? What is the meaning of client independent?

How to find the return code of a statement in ABAP programs?

Ans: Through functions.

What is performance tuning?

Ans: Performance tuning for Data Selection Statement

What are steps you follow to improve the performance of a report?

Ans: 1) USe select fields statements (not select *)
2) Use views rather than tables
3) Don't use nested Select.

What is the role of secondary index in performance?

Ans: sorry i dont know

What is the role of ST05 in performance tuning?

Ans: SQL trace

What is the role of extended syntax check in performance tuning?

Ans: sorry i dont know

Will join conditions in sql queries affect perfomance? how?

Ans : Yes

Will sorted internal tables help in performance?

Ans: Yes

Will where conditions in a sql query help improve performance?

Ans: No Not at all

Does select single *.. / select * .. affect performance? how?

Ans: Select single we use for first hit of the record. so obviously Select single will improve the performance

Archives