Friday, November 7, 2014

28 [UPDATED] SAP ABAP Internal Tables interview questions and Answers

SAP ABAP internal Tables interview questions and Answers :


Q1: What is the meaning of Data Clusters?
A1: Data clusters are the way in which every type of complex internal data objects from an application in ABAP/4 are grouped. They are also deposited in the memory of BAP/4 for a limited period of time or in databases for a longer time. The databases of this type have the name accordingly, they are named cluster databases and their construction is predefined. This type of depositing data clusters is a particular feature of ABAP/4. With the aid of SQL statements it is possible to enter cluster databases and the data clusters that have been deposited in ABAP/4 can be decoded only by ABAP/4.

Q2: What is the meaning of these terms in SAP: application server and presentation server?
A2: An application server manages the output /input of ABAP/4 programs and interprets them. Application servers are groups of executables. Presentation servers are programs from the workstations of users that are called like this: Sapgui.exe.

Q3: In what way are Get and SET different?
A3: GET PARAMETER IF FIELD: The value deposited in ID is met in the variable by the statement, if a value is not found in SAP memory, the system configures SY-SUBRC to 4, in a different case is 0. SET PARAMETER ID FIELD: The field contents from ID are stored in SAP memory in a code with up to 20 characters in length. If a value is found there already it will be overwritten, if there is no ID we have to make a new parameter object by double-clicking the ABAP Editor.

Q4: What is the meaning of Field group, extract data set?
A4: Extract data sets are made of records sequences, we can have various structures for the records, record types are in fact a group of records that have the same structure. Every record type that an extract dataset has can be defined as a field group with the statement FIELD GROUPS. The FIELD GROUPS statement brings multiple fields together with providing one single name. Usually we should declare the field groups when the declaration part in a program is finished, this will make everything clearer.Field groupsdon’tgenerate field space but they show the fields that already exist, they show us the records content if the records are met in the extract dataset.

Q5:What is the way for accessing data that is found on an application server and on a presentation server in ABAP/4?
A5: We will have to make use of these modules: UPLOAD or WS_UPLOAD for the presentation server and OPEN DATASET, CLOSE DATASET, READ DATASET for the application server.

Q7: For reading we use READ DATASET, for writing we use TRANSFER and for mode at POSITION MESSAGE, OPEN DATASET.
READ DATASET INTO
CLOSE DATASET
DELETE DATASET
TRANSFER

Q8: How do we separate these statements: assign and move?
A8: Assign: at data object assigning, the data project’s technical attributes are verified by the system for compatibility with every type specifications of the field symbol (ASSIGN TO). General attributes can be taken by the field symbol if they are not found in the field type specifications. If we go with the assignment it shows in the memory. Move: the MOVE statement is used for giving data object values to variables. It can be found as text symbol, literal, constant but it is not necessary to be found as a variable. No matter what the personal configurations the user has the decimal points always have to be stated with a period (,).

Q9: How do we make a separation between these terms: appending, input and output?
A9: Through appending we understand opening a file in order to write at its end. In the case the file is not found we have to make it. Through input we understand the opening a file to read it and through output we mean opening a file for the purpose of writing. The file in which we write will be overwritten if it is already there and made if it doesn’t exist already.

Q10: How do we proceed for a row in a table when we want to run a report?
A10: In this case we will make use of the Graphics Multiplexer. We will have a procedure that resembles screen capture that allows us to capture just the data. With this data graphs can be designed 2D or 3D, a feature that we can always access from the Menu-generate Graphics. In this way the required data can be dragged and we can choose the data we need for making a graph. After selection we must hit Graphics and the Graphics Multiplexer will be opened.

Q11: At the creation of internal tables what is the criteria configuration of the value of an occurs?
A11: What we have to do for configuring the value of an occurs is to make optimizations and for this we have to keep in mind some things like:
a)      The default declared size will be maintained in the roll area – faster program access.
b)      The whole data area of the application will be 64 kilobytes.
c)      The data inserted that is bigger than the default size is deposited in the roll file- the program is accessed slow.
More, prior to deciding to do an optimization we have to analyze the rates of access and the volume .

Q12: What is the syntax and function used for command AUTHORITY CHECK?
A12: Syntax: AUTHORITY=CHECK OBJECT
IF SY-SUBRC NE 0. The verification for authorization from the user part for starting a specific action is made by AUTHORITY CHECK.

Q13: What are the details regarding the debugger screen functions?
A13: Single step or F5 is an option that can be used to go through a program by every statement, in the function modules and subroutines that will run also step by step. After the processing of every function module or subroutine with the aid of the statements CALL FUNCTION and PERFORM the control can go back at the statement. Execute or F6 is an option for running a program with every line, so in a single line the statements will be processed all at once. When we use Execute and we are on a line invoking a subroutine , the entire subroutine will be processed and it will go to the line with the subroutine invoking, and we can go from statement to statement inside the subroutine. Return or F7: When control is going back to the main program, also the debugger will go back there from the subroutine. Return is an option that is good for going back to the invoking program from a subroutine , invoked program or function module. Continue or F8 is an option good for processing the program up to the following dynamic or static breakpoint or the location of the cursor. When the breakpoints don’t exist anymore and there is no cursor, the remaining part of the program will be processed normally and the system will go out of the debugging mode.

Q14: What is the role of the following commands: IMPORT and EXPORT? When we use IMPORT what is the way for passing multiple data groups?
A14: IMPORT: The statement used or reading the data objects from the memory into a program in ABAP/4 has this syntax: IMPORT … FROM MEMORY ID. The data objects that are read are found in a memory cluster in the form of a list. Without the option TO the same name will be found at assigning the data object from the memory to the one from the application. In this case the data object will be read in the field from memory and the memory cluster will be seen by the name, which can be of a maximum of 32 characters in length. We don’t really have to read every object that was deposited on a specific name, the object count can be restricted by the names of the objects. When on a specific name in the memory there are no objects then SYSUBRC will be four. In another case when the name from memory has a data cluster then SY-SUBRC will be 0 no matter if there is nor not a data object contained.
EXPORT: The statement and syntax used for reading data objects from the program into memory in ABAP/4 is: EXPORT … TO MEMORY ID. A cluster in the memory is where the data objects are deposited in form of a list, when FROM is not used the data object will be stored in the name of the data object, when FORM is used a name will be used for storage and it will represent the cluster from the memory, 32 maximum characters in length. If we have the same name already EXPORT will overwrite what it finds in the current data cluster.

Q15: What types of Internal tables exist?
A15: The Internal table type are:
a)      The standard table: for key access to this type of table linear search is used, so the duration needed for a search has a linear connection to how many table entries we have. For accessing standard tables it is best to use index operations.
b)      The hashed table: it is a table that will be handled using an internal hash procedure and it will only be available to access with the generic (key) operations like LOOP, SORT and others, so implicit/explicit index operations are forbidden.
c)      The sorted table: it is a table that is every time sorted in the right way and to access it we need to use binary keys. The index from the lower level is picked up by the system if we don’t have a unique key. The table count determines directly in a logarithmic way the needed runtime for key access.
d)     The index table: is the table which is possible for us to access with the aid of an index. Its solely purpose if to say what kind of generic parameters we will have in a function or form.

Q16: How do we describe the “Check” statements and what is their mechanism?
A16: The “Check” statement is used for finishing one loop pass conditionally, when the condition says true the rest of the statements from the actual statement block will be ignored and will begin the next loop.

Q17: How can we describe the following commands: MODIFY LINE and READ LINE?
A17: The MODIFY LINE statement is meant for changing the lines of a full list from inside the program and the READ LINE statement is used for reading data found on the lines from the current levels. READ LINE is the same as READ CURRENT LINE and they are both related to HIDE.

Q18: In what way is made the client specification regarding data processing?
A18: TABLES SPFLI. SELECT * FROM SPFLI CLIENT SPECIFIED WHERE MANDT BETWEEN ‘001’ and ‘003’.
… END SELECT.

Q19: How do we describe Activation?
A19: In the time of activation, the runtime object of aggregate object/tables is being made, it will be buffered for the purpose of faster access from the application program; it contains details regarding the following objects of table: domain, data elements, field definition, table definition.

Q20: What is the best way for reading database table lines in an internal table in the form of packs of a known size?
A20: SELECT *FROM SPFLI INTO TABLE ITAB PACKAGE SIZE N (N being the variable). We must give a name to the WILDCARD characters that are meant to be compared with numeric and character strings.

Q21: What do we mean by Lock Mechanism?
A21: The Lock Mechanism stops the beginning of a fresh database operation when another has been finished in the right way. At the end of a conversion the lock will be made automatically if the conversion is correct.

Q22: What is the meaning of these terms: Switching changes, storing changes and cancelling changes?
A22: The switching changes are the switches from active to revised version, the storing changes mean that active version will be deposited for a limited period of time in versions and cancelling changes will make a reset of the revised versions to be an active versions.

A23: What is the significance of restart adjustment and cancel adjustment?
A23: With restart adjustment will continue the conversion when it is at the finish point and with cancel adjustment the lock entry will be erased from table.

Q24: What is the version catalog and what types of versions exist?
A24: The version catalog is the list that contains very version of an object in existence. The version types are:
a)      The active version: is the version made at the program activation.
b)      The revised version: is the version made at the editing of the current project.
c)      The temporary version: is the version made at the temporary copying of the active version in the database that has store version functions.
d)     The historical version: is the version made at the making of the correction and at the release of the correction.

Q25: How do we show the internal table contents and how does a program run in background?
A25: We can push F9 from the selection screen but not before we fill the screen, then the display will show a request for the user to print Background Parameters. Then we write the output device, that can be for example HPLI/SAP2. Print has to be unchecked urgently from the spool options then we c also delete then new spool request. After we hit enter a screen will be displayed showing the start time of the heading , we may pres start now and save. In this way we have a background job started for the specific program, for displaying its status we will use this transaction code: SM37. Then from the screen that appears –Job overview then we select our program then Spool in the toolbar of the application the Output Controller and List of Spool Requests. After this-we select our Spool request and we hit the Display icon that we see in the overview. The List should appear. We have to be careful because if the list exceeds 255 columns it will become truncated in background.

Q26: Which are the buffering types?
A26: Buffering can be full, generic or single record. In the first case the entire table or nothing will we found in the buffer while in the case of generic buffering the generic locations from the buffer are buffered entirely. Single record buffering is the third case in which the currently accessed records will be loaded into buffers.

Q27: What is generic key and generic area?
A27: The generic key is the left part of the first table key. The generic area represents every record that correspond to generic key fields.

Q28: How do we separate these terms: invoking a program, transactions with or without return and what is the way to succeed?
A28: When using AND RETURN the data of the invoking executable will be deposited by the system and the system will go back to the invoking once the invoked program was processed. The execution of the invoking program will be retaken when the statement is made. When we don’t add AND RETURN the entire data and the stages of the list that the invoking program has or we can say the whole internal session will be erased. Once the executable program is terminated the control will go back to where that start of the invoking program was. When it comes to transaction we have: CALL TRANSACTION [AND SKIP FIRST SCREEN] [USING]. It is a statement that preserves the invoking program data and the transaction begins. When the transaction finishes , the system will go back to the statement from the invoking report that is following the invoking. This statement: LEAVE TO TRANSACTION [AND SKIP FIRST SCREEN] finishes the invoking program and the transaction begins. The invoking stack will be erased (or what we name internal sessions) for all the past programs. When the transaction finishes, the system will go back to the area menu where the original program from the invoking stack begun.

24 [UPDATED] SAP ABAP Interactive lists /Reports Interview Questions and Answers

SAP ABAP Interactive lists / reports Interview Questions and Answers :


Q1: What is the significance of a stacked list?
A1: The secondary list is also called the stacked list and it will be shown on the entire screen if we don’t write its coordinates of the command window.

Q2: When it’s the right time to utilize the command GET CURSOR in interactive lists?
A2: The command GET CURSOR will be utilized when the hidden information is not enough for tracing the selected line, this command will give us the field name where the cursor is positioned in field that will be specified subsequently to the addition field. The selected field value will be in a field specified subsequently to the value.

Q3: How do we keep lists?
A3: The return from a high level in the list on the immediate lower position (SY-LSIND) is made by using Back from the secondary list. In this way the actual list that is displayed will disappear and we will see the previously made list. The list that disappeared was released by the system and deleted. The SY-LSIND field must be configured for indicating the list level at which we want the output to be. Just the index values that are the same with the levels of the list are accepted by the system and the list levels that have a higher index than the one we indicate or equal with it will be erased by the system. For instance when we configure SY-LSIND to be 0, every secondary list will be erased by the system and the basic list will be replaced by the actual secondary list.

Q4: What is the meaning of secondary lists?
A4: With secondary lists the details from the basic list can be improved and if, for instance, we want to choose a line from the basic list and we want more details about it to be displayed we can do it. The secondary information will be shown on the secondary list , which can be as an overlay of the basic list or it can appear in a separate window and this secondary list can be dynamical as well.

Q5: What is interactive reporting?
A5: With the use of interactive reporting we can be present in an active mode at the data presentation in a session. Actually interactive reporting generates a simple list that encapsulates the details, it can be extended and we can see the details with the aid of the cursor or commands. Interactive reporting lowers the amount of retrieved details to the real requirement of data.

Q6: Which are the event key words used in interactive reporting?
A6:AT LINE-SELECTION-this is a time when we choose a line with a double-click on the line or by moving the cursor over the line and hitting F2. AT USER-COMMAND- this is a time when we hit a function key. TOP-OF-PAGE DURING LINE-SELECTION-this is a time when, while the list is processing a secondary list, a new page is starting.

Q7:Is it possible to invoke transactions or reports from the interactive reporting lists?
A7: Yes, it is possible because with interactive reporting we can as well invoke transactions or different reports from the lists, in this way the programs will use the values that are shown in the list as their input information. As an example, a transaction can be invoked from a list and the database table that shows its data in the list can be modified.

Q8: How can we make user interfaces for a list?
A8: A graphical user interface or GUI is made automatically if we have a list with simple functions regarding list processing like list printing or saving, the GUI is made by the R/3 system. For more complicated functions like pushbuttons for example, we have to define our personal interface status and for making a new status we have the Menu Painter from the Development Workbench. In this way we can generate toolbars or menus for the program, we can also put shortcut keys for various functions. When the statement block of AT END_OF_SELECTION is started the status of the main list can be enabled with the SET PF-STATUS “STATUS” statement.

Q9: What page headers do the secondary lists have?
A9: There is no standard page header regarding secondary lists and also there is no event TOP-OF-PAGE triggered by the system, so for making page headers for secondary lists we have to improve the TPP-OF-PAGE. When we use TOP-OF-PAGE DURING LINE-SELECTION this event will be invoked for every secondary list, when we want to make separate page headers for each specific list level, the processing block correspondent to this event has to be configured for this like for instance when we use SY-LSIND(system field) and SY-PFKEY.

Q10: Which is the best way to choose valid lines for a secondary list?
A10: There are many ways for us to avoid the use of invalid lines in ABAP/4 like the ones below. When the processing block END-OF-SELECTION finishes we have to erase the field content that we deposited in the past for valid lines with the aid of the HIDE statement. We must verify if the work place is the default one or if the HIDE statement deposited the content of the field in this place, this is done when the AT LINE-SELECTION event occurs. We can make a secondary list because we deposited the content of the field just for valid lines, we have to clean the work place one more time for avoiding the creation of other secondary lists by the user starting from the secondary list on the screen.

Q11: When we make a new list, is it true that the main list will be erased?
A11: No way, the main list will not be erased and we can access it with the aid of the standard navigation functions such as the back or cancel buttons.

Q12: In what way should we transfer data from a list to a report?
A12: In ABAP/4 this can be made in 3 ways:
a)      By fetching the data with the aid of statements.
b)      By making an automated data transfer with the aid of the system fields.
c)      By transferring the attributes of the list.

Q13: What is the standard construction of an ABAP application?
A13: The basic construction of an ABAP program is made of these steps:
a)      The Reports are defined.
b)      The Data and tables are defined.
c)      The events are initialized.
d)     We have the Screen Select Options and Inputs.
e)      The selection screen events.
f)       The start of selection events.
g)      Performs and Events Statements.
h)      The End-of selection event
i)        The Initialization.

Q14: What is the significance of hotspots?
A14: The list place that makes our mouse pointer looking like an upright hand is called a hotspot, when a hotspot is active, single clicking is equivalent to double-clicking. This feature is compatible with versions 3.0c and above of R/3.

Q15: What is the system field that has the name of the actual GUI STATUS?
A15: The System field SY-PFKEY contains the actual GUI STATUS name.

Q16: What is the meaning of report transaction and how are programs called?
A16: The reports in ABAP can be called like transactions: for calling and returning- SUBMIT AND RETURN CALL TRANSACTION, for calling and not returning- SUBMIT LEAVE TO TRANSACTION. When we make an extensive application and we make one program, it will be very complicated and for reading the program in a simple way it is recommended to split the functions needed among the programs.

Q17: What is the meaning of Form Event?
A17: Form Event is just like PERFORM/SUBROUTINES, it STARTS by FORM and finishes by ENDFORM and the statements from ENDFORM to the finish of the application are not processed at all, every statement from ENDFORM to the event keyword will not be processed.

Q18: How do we describe START –OF-SELECTION and END-OF-SELECTION?
A18: The start and the finish of the main processing logic, which is default for every ABAP/4 application; the statements from START-OF-SELECTION to END-OF-SELECTION are executed automatically, there is no requirement for having END-OF-SELECTION. Every procedural statement in ABAP applications are dependent by default on the START-OF-SELECTION.

Q19: How do we transfer data by program statements?
A19: For transferring single output fields or supplementary details from lines to the processing blocks in the time of interactive events the following statements will be written: HIDE, READ LINE, GET CURSOR, SET CURSOR and others.

Q20: What system fields do we use for interactive reporting?
A20: The index of the actual list is found in the system field SY-LSIND , at the time of making the main list SY-LSIND is 0. The system fields below are configured automatically by the system at every interactive event: the system field information, SY-LINCT the whole line number of a list, SY-LINNO the number of line where the cursor is found, SY-LSIND is the index of the presently made list( in the time of the actual event-0), SY-LISTI is the index of the level that invoked the event, SYLILLI is the line number that invoked the event, SY-LISEL represents the content of the line that invoked the event, SY-CUROW represents the place in the window that the line which invoked the event has (beginning from 1), SY-CUCOL is the place in the window where the column that invoked the event is found (beginning from 2), SY-UCOMM represents the function code which invoked the event, SY-PFKEY has the actual list status.

Q21: How do we describe the HIDE AREA?
A21: With the aid of the HIDE command we can deploy the field content from actual line in a place that is named the HIDE AREA. This place a system controlled memory and the field content will be moved from the HIDE AREA when the interactive event occurs. If we invoke a secondary list from the HIDE AREA the values that were deposited will be moved in the program variables. When we write the program we have to use the HIDE statement in the present line after we use the WRITE statement.

Q22: What is the usage of GET CURSOR and SET CURSOR?
A22: GET CURSOR LINE and GET CURSOR FIELD are statements that we use to transfer an output field and an output line where, in the time of the interactive event the cursor was placed. Example of syntax: GET CUROSR FIELD [OFFSET] [LINE] [VALUE] [LENGTH]. SET CURSOR is a statement used to set the cursor the latest list made which when we make a basic or main list, the latest will be exactly this one: the basic list. The basic list will become previous when we make a secondary list. The set cursor statement also places the cursor on the column that is on the output window’s line.

Q23: How do we get data from the system fields of interactive lists?
A23: The details that we get from the system fields are: the list index, the coordinates of the list in the output window and the place where the cursor is found. The system field which has the chosen line contents is SY-LISEL only.

Q24: What is the role of the READ LINE and READ CURRENT LINE statements?
A24: These statements are used for reading the current list level data lines explicitly and they are linked together with the technique named HIDE. The syntax looks like this: READ LINE [INDEX] [FIELD VALUE [INTO]] [OF CURRENT PAGE | OF PAGE]. We can see this example: READ LINE SY-INDEX FIELD VALUE BOX.