Download Android App of sapabap-vamsi

sapabap-vamsi : Download Android App for Mobiles

Wednesday, October 12, 2011

ABAP ALE Interview Questions


Q1: What are the strong features of ALE and how do we benefit from the?
A1: ALE is good because it gives the companies the possibility to enhance the performance of their business and to get solutions for technical and management problems. We can split businesses allowing operations at local level in an independent way. This splitting brings improved results to companies, better than the results that they may get at a bigger scale when they are centralized. This is because they are more flexible and this flexibility assures the adaptation of the information systems to the change speed that we find in the markets these days. Through distribution we gain a high freedom state, some of the companies that already have a good local management can make connections with the ALE businesses. Virtual connections can be made and partnerships between different companies in this way. Anyway, integration is not the best solution for all issues because many of the programs that a company uses could not be compatible with a system when we talk about complementary software and legacy systems. Companies can use a different SAP industry solution or a particular solution to a country that can’t work on the same system. If these programs run on two or more separate systems, they can’t be connected with a central database but they will use ALE as an integration method. ALE can connect SAP Core Systems to CRM, APO or Business Information Warehouse. Not only flexibility is an advantage but ALE has the great advantage of a low upgrade cost, along with other reduced costs. When the entire system works on a single integrated system the entire system has to be upgraded even in the case when just company component requires an upgrade. The Upgrade has an impact on the whole company and for this to be a success the users must be instructed with the new version. A distributed software with separate single interfaces like ALE we can concentrate to upgrade only the part of a company that is necessary to be updated while keeping the remaining parts the same with no update or instructions; the advantages of this procedure are obvious- saving big amounts of money and protecting the current investments. There is one more cost element that influences the communication cost, it is cheaper to have a 64k line connection to the central system than to have an overseas type of connection.

Q2: What is the meaning of ALE?
A2: ALE or Application Link Enabling is the totality of tools and business processes that can give the programs the possibility to connect from different computers. The computer can be two or multiple SAP systems or they can be SAP and non SAP. In one SAP system, through one database multiple applications can be incorporated. As example: sales, production, finances, human resources etc. The business that ALE is providing can connect programs from various platforms. Some of the ALE businesses are found in the SAP standard system, but with the aid of some utilities we can modify the current processes of ALE businesses or insert fresh processes. Along with the normal business processes there are specific ALE services needed for configuring the distributed environment control, services that contain business object synchronization, distribution model or utilities for error management and monitoring. Being a component of the SAP Business Architecture, ALE allows the cooperation of the framework parts, it works like a glue for the Business Framework.

Sunday, October 9, 2011

ABAP Internal Table Interview Questions


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.

Q6: How can we process sequential file, through what commands and syntax?
A7: 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.

Wednesday, October 5, 2011

Using the include Statement

An include program is a program in which the contents are designed to be used by another program. It is not usually complete all by itself. Instead, other programs use the code the include program contains by copying the lines of code from the include program into themselves. The copy is performed at runtime via the include statement. An include program is also known as an included program.



A program that includes another is known as an including program.

Syntax for the include Statement

The following is the syntax for the include statement.
include ipgm.
where:
  • ipgm is a type i program.
The following points apply:
  • An include program must be type i. You specify the program type in the Type field on the Program Attributes screen when you create the program.
  • An include program can be included into one or more including programs.
  • A type i program cannot contain partial or incomplete statements.
The include statement copies the contents of the include program into the including program. The code from the include program is copied as-is and replaces the include statement at the time of program generation.

An Including Program
1  report ztx1901 no standard page heading.
2  tables: ztxlfa1, ztxlfb1.
3  parameters p_lifnr like ztxlfa1-lifnr obligatory default '1000'.
4 
5  include: ztx1902,
6           ztx1903.
7 
8  top-of-page.
9      write: / 'Company Codes for Vendor', p_lifnr.
10     uline.

This Program Is Included into ztx1901 
1  ***INCLUDE ZTX1902. 
2 select single * from ztxlfa1 where lifnr = p_lifnr.



This Program Is also Included into ztx1901
1  ***INCLUDE ZTX1903.
2  select * from ztxlfb1 where lifnr = ztxlfa1-lifnr.
3      write: / ztxlfb1-bukrs.
4      endselect.

The code in Listings 19.1 through 19.3 produces this output:
Company Codes for Vendor 1000     
---------------------------------
1000                               
3000  






ANALYSIS 





  • At generation time for ztx1901, line 5 copies the code from program ztx1902 into ztx1901. The inserted code replaces line 5.
  • Still during program generation of ztx1901, line 6 copies the code from program ztx1903 into ztx1901. The inserted code replaces line 6.
  • When the program runs, ztx1901 behaves like a single program, as if those lines of code from the included programs had been typed directly into ztx1901.
SAP uses includes to reduce code redundancy and to divide very large programs into smaller units.

TIP
While viewing an including program, you can view the contents of an included program simply by double-clicking on its name. For example, while editing ztx1901 from the ABAP/4 Editor: Edit Program screen, double-click on the name ztx1902 orztx1903. The included program will be displayed immediately.

TIP
If you want to see the resulting code with all includes expanded in-line, run programRSINCL00. On the selection screen for RSINCL00, in the Program field, enter the name of a program that includes other programs. Place an X in the Program Source Code and Expand Include Lines fields and press Execute. A list of the resulting source code will be displayed on the next screen.

Monday, October 3, 2011

How to declare internal table with header line and without header line.

Internal table with header line.

data: begin of itab occurs 0,
       num1 type i,
       num2 type i,
       ........,
       ........,
      end of itab.

internal table without header line.

types: begin of itab,
        num1 type i,
        num2 type i,
        ........,
        ........,
       end of itab.
data: itab1 type itab occurs 0.


Internal table is declared by many ways:

(A)
Data : BEGIN OF IT_TAB occurs 10,
       num1 type i,
        num2 type i,
       END OF IT_TAB.

(B)
TYPES : BEGIN OF tT_TAB,
        num1 type i,
        num2 type i,
        END OF tT_TAB.

DATA : tT_TAB TYPE STANDARD TBLE OF tT_TAB with header line.

(C)
TYPES : BEGIN OF tT_TAB,
        num1 type i,
        num2 type i,
        END OF tT_TAB.

DATA : iT_TAB TYPE STANDARD OF tT_TAB.
   
(D)
DATA : BEGIN OF IT_TAB,
       num1 type i,
        num2 type i,
       END oF IT_TAB.

DATA : wa_TAB LIKE LINE OF IT_TAB,
       wa_TAB TYPE OF IT_TAB