16 January 2014

SAP ABAP QUESTIONS & ANSWERS-1


SAP ABAP QUESTIONS & ANSWERS-1 :-


 
Q. What is the typical structure of an ABAP/4 program ? 
ANS:-  Header ,body,footer.

Q. What should be the approach for writing a BDC program ? 
ANS:-
step 1: converting the legacy system data to a flat file to internal table called "conversion".
step 2: transfering the flat file into sap system called "sap data transfer".
step 3: depending upon the bdc type
         i)call transaction(Write the program explicity)
         ii) create sessions (sessions are created and processed.if success data will transfer).

Q. What is a batch input session ? 

ANS:-
Batch input session is an intermediate step between internal table and database table. 
Data along with the action is stored in session ie data for screen fields, to which screen it is passed,program name behind it, and how next screen is processed.

Q. What is the alternative to batch input session ? 

ANS:-
Call transaction.

Q. A situation: An ABAP program creates a batch input session. We need to submit the program and the batch session in back ground. How to do it ? 
ANS:-
Go to SM36 and create background job by giving job name,job class and job steps (JOB SCHEDULING) 

Q. What are the problems in processing batch input sessions ?  How is batch input process different from processing online ? 
ANS:-
PROBLEMS:-
i) If the user forgets to opt for keep session then the session will be automatically removed from the session queue(log remains).  However if session is processed we may delete it manually.
ii)if session processing fails data will not be transferred to SAP database table.

Q. What are the different types of data dictionary objects ?
 
ANS:-
Tables, structures, views, domains, data elements, lock objects, Matchcode objects.

Q. How many types of tables exists and what are they in data dictionary ? 

ANS:-
4 types of tables
i)Transparent tables - Exists with the same structure both in dictionary as well as in database exactly with the same data and fields.   Both Opensql and Nativesql can be used.
ii)Pool tables
iii)Cluster tables - These are logical tables that are arranged as records of transparent tables.one cannot use native sql on these tables(only opensql).They are not managable directly using database system tools.
iv)Internal tables.

Q. What is the step by step process to create a table in data dictionary ? 
ANS:-
step 1: creating domains(data type,field length,range).
step 2: creating data elements(properties and type for a table field).
step 3: creating tables(SE11).

Q. Can a transparent table exist in data dictionary but not in the data base physically ?
ANS:- NO.
Transparent table do exist with the same structure both in the dictionary as well as in the database,exactly with the same data and fields.

Q. What are the domains and data elements ? 
ANS:-
DOMAINS : Formal definition of the data types.they set attributes such  as data type,length,range.
Data element : a field in r/3 system is a data element.

Q. Can you create a table with fields not referring to data elements ? 
ANS:- 
YES.
eg:- ITAB LIKE SPFLI.here we are referening to a data object(SPFLI) not data element.

Q. What is the advantage of structures? How do you use them in the ABAP programs ? 
ANS:-
Adv:- GLOBAL EXISTANCE(these could be used by any other program without creating it again). 

Q. What does an extract statement do in the ABAP program ? 
ANS:-
Once you have declared the possible record types as field groups and defined their structure, you can fill the extract dataset using the following statements:
EXTRACT <fg>.
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
EXTRACT HEADER.
When you extract the data, the record is filled with the current values of the corresponding fields.
As soon as the system has processed the first EXTRACT statement for a field group <fg>, the structure of the corresponding extract record in the extract dataset is fixed. You can no longer insert new fields into the field groups <fg> and HEADER. If you try to modify one of the field groups afterwards and use it in another EXTRACT statement, a runtime error occurs. 
By processing EXTRACT statements several times using different field groups, you fill the extract dataset with records of different length and structure. Since you can modify field groups dynamically up to their first usage in an EXTRACT statement, extract datasets provide the advantage that you need not determine the structure at the beginning of the program.

Q. What is a collect statement? How is it different from append ? 
ANS:-
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. 

Q. What are the events in ABAP/4 language ? 
ANS:-
Initialization, At selection-screen,Start-of-selection,end-of-selection,top-of-page,end-of-page, At line-selection,At user-command,At PF,Get,At New,At last,at end, at first. 

Q. What is an interactive report ? What is the obvious diff of such report compared with classical type reports ? 
ANS:- 
An Interactive report is a dynamic drill down report that produces the list on users choice.
diff:-
a) The list produced by classical report doesn't allow user to interact with the system.
   The list produced by interactive report allows the user to interact with the system.
b) Once a classical report executed user looses control.ir user has control.
c) In classical report drilling is not possible.in interactive drilling is possible.

Q. What is a drill down report ? 
ANS:-
Its an Interactive report where in the user can get more relavent data by selecting explicitly.

Q. How do you write a function module in SAP ? describe. 
ANS:-
Creating function module:-
called program - se37-creating funcgrp,funcmodule by assigning attributes,importing,exporting,tables,exceptions.
calling program - SE38-in pgm click pattern and write function name- provide export,import,tables,exception values.

Q. What are the exceptions in function module ? 
ANS:-

COMMUNICATION_FAILURE 
SYSTEM_FAILURE 

No comments:

Post a Comment