Vous êtes sur la page 1sur 39

SAP ABAP INTERVIEW QUESTIONS

Compiled By Pankaj Pravin

TRANSACTION CODES

SE30 ABAP Objects Runtime Analysis SE32 ABAP Text Element Maintenance SE33 Context Builder SE35 ABAP/4 Dialog Modules SE36 Logical databases SE37 ABAP Function Modules SE38 ABAP Editor SE39 Splitscreen Editor: Program Compare SE40 MP: Standards Maint. and Translation SE41 Menu Painter SE43 Maintain Area Menu SE51 Screen Painter SE52 Parameterized screenpainter call SE55 Internal table view maintenance call SE56 internal call: display table view SE57 internal delete table view call SE61 R/3 Documentation SE62 Industry Utilities SE63 Translation: Initial Screen SE71 SAPscript form SE72 SAPscript Styles SE73 SAPscript font maintenance (revised) SE74 SAPscript format conversion SE75 SAPscript Settings SE76 SAPscript: Form Translation SE77 SAPscript Translation Styles SE78 SAPscript: Graphics administration SE80 Object Navigator SE81 Application Hierarchy SE82 Application Hierarchy SE84 R/3 Repository Information System SE85 ABAP/4 Repository Information System SE86 ABAP Repository Information System SE88 Development Coordination Info System SE89 Maintain Trees in Information System SE91 Maintain Messages SE92 New SysLog Msg Maintenance as of 46A SE93 Maintain Transaction Codes SE94 Customer enhancement simulation SE95 Modification Browser SEPS SAP Electronic Parcel Service SERP Reporting: Change Tree Structure SEU Repository Browser SF01 Client-Specific File Names SFAW Field Selection Maintenance SCMP View / Table Comparison SCU0 Table Analyses And Comparison SCU1 Table Comparison - Export to Tape SCU2 Table Comparison Against Tape

Compiled By Pankaj Pravin

SCU3 Table History SE16 Display Table Content SE17 Generate Table Display SE54 Generate table view SM31 Table maintenance SM31_OLD Old Table Maintenance SM32 Maintain Table Parameter ID TAB SM33 Display Table ParameterID TAB

Introduction What is ERP? ERP is a package with the techniques and concepts for the integrated management of business as a whole, for effective use of management resources, to improve the efficiency of an enterprise. Initially, ERP was targeted for manufacturing industry mainly for planning and managing core business like production and financial market. As the growth and merits of ERP package ERP software is designed for basic process of a company from manufacturing to small shops with a target of integrating information across the company. What is SAP R/3? Ans In 1972, five systems analysts began working nights and weekends to create standard software with realtime data processing SAP R/3 refers to Systems Application and Product for data processing Real-time having a 3 tier architecture i.e. Presentation layer, Application layer and Database layer. Their vision was to develop and market standard enterprise software which would integrate all business processes. Facts about SAP Leading global provider of client/server business software solutions.

Number one vendor of standard business application software. Fourth-largest independent software supplier in the world. Available in 14 languages. More than 7500 customers in over 90 countries have chosen SAP.

Why SAP? Ans Highly configurable.

Highly secure data handling. Minimize data redundancy, Maximize data consistency. Can capitalize on economic of sales like purchasing. Tight integration cross function.

Disadvantages of SAP? Ans Expensive.

Not very flexible. Difficult in customizing.

SAP Basics feature * Configuration of the SAP modules o Transaction SPRO - this is the main tree for all the configuration. * Function Key o F1 - Help o F4 - Possible entries or matchcode for the field you are accessing o F5 - Selection screen

Compiled By Pankaj Pravin

o o o o o o * o o o o o o o o o o

F7 - Previous screen F8 - Next screen F9 - Technical info CTRL+X - Cut CTRL+C - Copy CTRL+V - Paste Navigation /n Skip to the next record if you are processing one batch input session /bend Cancel a batch input foreground process /nend Close all R/3 sessions and logoff /nxxx x Call the transaction xxxx in the same session /o Generate a session list /oxxx x Call the transaction xxxx in an additional session /i Delete the current session /h Turn the debug mode on /$tab Reset all buffers (for System Administrators) /$syn c Synchronize instances buffers (for System Administrators)

In 4.x, you can have long SAP transaction code up to a maximum of 20 character Different types of ERP ? SAP, BAAN, JD Edwards, Oracle Financials, Siebel, PeopleSoft. Among all the ERPs most of the companies implemented or trying to implement SAP because of number of advantages over other ERP packages. Explain the concept of Business Content in SAP Business Information Warehouse? Business Content is a pre-configured set of role and task-relevant information models based on consistent Metadata in the SAP Business Information Warehouse. Business Content provides selected roles within a company with the information they need to carry out their tasks. These information models essentially contain roles, workbooks, queries, InfoSources, InfoCubes, key figures, characteristics, update rules and extractors for SAP R/3, mySAP.com Business Applications and other selected applications. Why do you usually choose to implement SAP? There are number of technical reasons numbers of companies are planning to implement SAP. Its highly configurable, highly secure data handling, min data redundancy, max data consistency, you can capitalize on economics of sales like purchasing, tight integration-cross function. Can BW run without a SAP R/3 implementation? Certainly. You can run BW without R/3 implementation. You can use pre-defined business content in BW using your non-SAP data. Here you simply need to map the transfer structures associated with BW data sources (InfoCubes, ODS tables) to the inbound data files or use 3rd part tool to connect your flat files and other data sources and load data in BW. Several third party ETL products such as Acta, Infomatica, DataStage and others will have been certified to load data in BW. What is IDES? International Demonstration and Education System. A sample application provided for faster learning and implementation. What is WF and its importance? Business Work Flow: Tool for automatic control and execution of cross-application processes. This involves coordinating the persons involved, the work steps required, the data, which needs to be processed (business objects). The main advantage is reduction in throughput times and the costs involved in managing business processes. Transparency and quality are enhanced by its use. What are presentation, application and database servers in SAP R/3? 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. All the data are stored in a centralized server. This server is called database server. What is SAP EASY ACCESS? Ans It displays a user menu that displays the option to perform tasks like creating & modifying transaction reports & web addresses. What is SAP NetWeaver? SAP NetWeaver is SAP's integrated technology platform and is the technical foundation for all SAP applications since the SAP Business Suite. SAP NetWeaver is marketed as a service-oriented application and

Compiled By Pankaj Pravin

integration platform. SAP NetWeaver provides the development and runtime environment for SAP applications and can be used for custom development and integration with other applications and systems. what is Web dyna pro? Web Dynpro (WD) is a proprietary web application user interface technology developed by SAP AG and exists in a Java Both have in general the same functionality, but usually one flavor is improved after the other, so temporary one flavor is more advanced than the other. Hence, the decision for one of the two flavors shall be based on organizational and business circumstances, but not on functionality. Main advantages of Web Dynpro over other technologies typed access for design time checks, e.g. navigation links and messages are accessed via types instead of string keys like in JSF diverse services for backend access, like aRFC, JEE and Web Service data models

integration with SAP Interactive Forms by Adobe, which are interactive PDF forms, during design (same IDE) and run time (data sharing) integration with business process management and business rules management (since NetWeaver CE 7.1 EHP 1) designed to support development big scale applications by adding multiple grouping layers on top of Java packages (DCs, SCs, products) runs on different clients e.g. web browser, mobile device, widget engine

Main disadvantages proprietary, running only on SAP servers

less flexible due to support for multiple clients (i.e. custom html is not possible). To reduce the limitations, several measures have been taken. For example, WD supports so-called "islands" for e.g. flash applications that enrich the Web Dynpro UI element collection by rich UI elements.

Compiled By Pankaj Pravin

ABAP DICTIONARY (SE11) What is an ABAP data dictionary? ABAP/4 data dictionary describes the logical structures of the objects used in application development and shows how they are mapped to the underlying relational database in tables/views. What are the different types of data dictionary objects? Answer Data Dictionary Objects * * * * * * * * * Tables Views Domain Data Element Type Groups Search Helps/Matchcode Objects Lock objects Structures Table Types

What are tables? Ans It creates a structure the table work area in a program for the database tables, views or structure What are Foreign Keys? You can define the relationships between tables in the ABAP Dictionary by creating foreign keys.Using foreign keys, you can easily create value checks for input fields. Foreign keys can also be used to link several tables in a view or a lock object. Field Assignment in the Foreign Key A foreign key links two tables T1 and T2 by assigning fields of table T1 to the primary key fields of table T2. Table T1 is called the foreign key table (dependent table) and table T2 the check table (referenced table). The pair of fields for the two tables must have the same data type and length. One field of the foreign key table therefore corresponds to each key field of the check table. This field is called the foreign key field.A foreign key permits you to assign data records in the foreign key table and check table. One record of the foreign key table uniquely identifies one record of the check table using the entries in the foreign key fields. Check Field and Value Check One of the foreign key fields is marked as the check field. This means that the foreign key relationship is maintained for this field.

Compiled By Pankaj Pravin

When an entry is made in the check field, there is a check whether the check table contains a record with the key defined by the values in the foreign key fields. If this is so, the entry is valid. Otherwise the system rejects the entry. In this example the entry Field2 = 2 and Field4 = 2 would be rejected since T2 does not contain a record with the key Field5 = 2 and Field6 = 2. If you do not want to check against all the key fields of the check table, you can exclude fields of the foreign key table from the assignment of the fields to the check table with generic and constant foreign keys. Variants Variants allow you to save sets of input values for programs that you often start with the same selections. You can use them for any programs except subroutine pools Search helps SEARCH HELP: The input help (F4 help) is a standard function of the R/3 System. It permits the user to display a list of possible values for a screen field. A value can be directly copied to an input field by list selection. What are all the differences between search helps and match code objects? Match Code Matchcodes were replaced with Search Helps starting with Release 4.0. Please use search helps to assign an input help to a field. Existing matchcodes were automatically converted to search helps. A matchcode object is hereby converted to a collective search help with the same name. Each matchcode ID of the matchcode object is converted into an elementary search help with the same name and assigned to the collective search help created from the matchcode object. A matchcode is a means of finding data records stored in the system. The matchcode is defined in the ABAP Dictionary in two steps: You first define the relevant tables and fields for the search in a matchcode object. A matchcode object describes the set of all possible search paths for a search string. You then create one or more matchcode IDs for a matchcode object. A matchcode ID describes a special search path for a search string. The matchcode ID defines the fields or field combinations to be used in the search. Search Help With this function you can search for objects, thereby defining and linking different selection conditions for the search help. You can call this function by: - Selecting Object -> Search... () in the main menu bar of the Integration Builder - Placing the cursor on a software component version and selecting Search... () in the context menu (only in the Integration Repository) In this case the software component version is defined as the search criteria. What Function does data dictionary perform? Ans Central information repository for application and system data. The ABAP Dictionary contains data definitions (metadata) that allow you to describe all of the data structures in the system (like tables, views, and data types) in one place. This eliminates redundancy. What is the difference between data elements and domain? A: Data element ABAP/4 Development Workbench (BC-DWB) A data element describes the contents of a field. For example, a data element contains the F1 help texts and the key word texts (field texts) for displaying the field on the screen. Several table fields with identical contents can refer to the same data element. Domain ABAP/4 Development Workbench (BC-DWB) A domain describes the technical attributes of a table field. These technical attributes include the data type and the field length. Several fields with the same technical attributes can refer to the same domain. In this case, each of these fields has the technical attributes specified in this domain. What are client-dependant tables and independent tables?

Compiled By Pankaj Pravin

In SAP systems we have many clients. A client independent table contains data that can be accessed from any client. Generally these tables contain SAP control data, language indicators and transaction codes. Client Dependent tables contain data which is applicable to one specific client. These tables contain data related to a particular company, for eg. structure of the company, basic commercial data etc.. How to distinguish them? All client dep tables have the field MANDT, other dont. What is Primary key, foreign key ? what is primary index? secondary index? Ans: Primary index: the primary index contains key fields 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 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. 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). What is a buffer and how many types? Ans: Buffer is nothing 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..

In Data dictionary in the table creation,What is the purpose of Technical settings. To identify the Size of the Table Created and to Set whether buffering needs to be done for the table or not. What are the contents in technical specifications?

Compiled By Pankaj Pravin

Ans There are five contents in Technical Settings: Data Class, Size Category, Buffering Permission, Buffering Type and Logging.

What is view? Different types of view. Explain? Ans View - A view is a virtual table containing fields from one or more tables. A virtual table that does not contain any data, but instead provides an application-oriented view of one or more ABAP Dictionary tables. Different Types of View: 1) 2) 3) 4) Maintenance Database It is on more than two tables. Projection It is only on one table. Help

What are the advantages and disadvantages of using views in ABAP programming ? advantages: view is used to retrieve the data very fastly from the database tables *memory wastage is reduced *faster than joins to retrieve the data from database tables disadvantages: view is not a container,it will not hold the data *view memory is not permanent memory

How data is stored in cluster table? A cluster table conatins data from mulitple DDIC tables. It stores data as a name value pair ( varkey, vardata)

What are aggregate object? Aggregate Object Views, Match Code and Lock objects are called aggregate objects because they are formed from several related table.

What is the difference between Table and Template? table is a dynamic and template is a static

What is the difference between Primary key and Unique Key? Ans Primary Key It can accepts 0 value and cannot be NULL. Unique Key It can be NULL. What is the transaction code for Table maintenance? Ans SM30 What are the check tables and value tables? Ans Check Table: The ABAP Dictionary allows you to define relationships between tables using foreign keys . A dependent table is called a foreign key table, and the referenced table is called the check table. Each key field of

Compiled By Pankaj Pravin

the check table corresponds to a field in the foreign key table. These fields are called foreign key fields. One of the foreign key fields is designated as the check field for checking the validity of values. The key fields of the check table can serve as input help for the check field. Value Table: Prior to Release 4.0, it was possible to use the value table of a domain to provide input help. This is no longer possible, primarily because unexpected results could occur if the value table had more than one key field. It was not possible to restrict the other key fields, which meant that the environment of the field was not considered, as is normal with check tables. In cases where this kind of value help was appropriate, you can reconstruct it by creating a search help for the data elements that use the domain in question, and using the value table as the selection method. Check table will be at field level checking. Value table will be at domain level checking ex: scarr table is check table for carrid. What is the difference between tables and structures? Ans Tables: 1) Data is permanently stored in tables in the database. 2) Database tables are generated from them. Structure: 1) It contains data temporarily during program run-time. 2) No Database tables are generated from it. What are lock objects? Ans Reason for Setting Lock: Suppose a travel agent want to book a flight. The customer wants to fly to a particular city with a certain airline on a certain day. The booking must only be possible if there are still free places on the flight. To avoid the possibility of overbooking, the database entry corresponding to the flight must be locked against access from other transactions. This ensures that one user can find out the number of free places, make the booking, and change the number of free places without the data being changed in the meantime by another transaction. The R/3 System synchronizes simultaneous access of several users to the same data records with a lock mechanism. When interactive transactions are programmed, locks are set and released by calling function modules (see Function Modules for Lock Requests). These function modules are automatically generated from the definition of lock objects in the ABAP Dictionary. Two types of Lock: Shared and Exclusive What is the difference between a pool table and a transparent table and how they are stored at the database level? Ans Pool Table 1) Many to One Relationship. 2) Table in the Dictionary has the different name, different number of fields, and the fields have the different name as in the R3 Table definition. 3) It can hold only pooled tables. Transparent Table 1) One to One relationship. 2) Table in the Dictionary has the same name, same number of fields, and the fields have the same name as in the R3 Table definition. 3) It can hold Application data. A table in the database in which all records from the pooled tables assigned to the table pool are stored corresponds to a table pool. The definition of a pool consists essentially of two key fields (Tabname and Varkey) and a long argument field (Vardata). Table Clusters Several logical data records from different cluster tables can be stored together in one physical record in a table cluster. A cluster key consists of a series of freely definable key fields and a field (Pageno) for distinguishing continuation records. A cluster also contains a long field (Vardata) that contains the contents of the data fields of the cluster tables for this key. If the data does not fit into the long field, continuation records are created. Control information on the structure of the data string is still written at the beginning of the Vardata field. What are Hashed Tables? Ans Hashed tables - This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table, which resembles a database table or for processing large amounts of data. Name the tables, which is used to see all the transaction available. Ans See tables, TSTC and TSTCT for all the transaction available

Compiled By Pankaj Pravin

What happens when a table is activated in DD? Ans When the table is activated, a physical table definition is created in the database for the table definition stored in the ABAP dictionary. The table definition is translated from the ABAP dictionary of the particular database. It is available for any insertion, modification and updation of records by any user.

ABAP WORKBENCH (SE38)

Compiled By Pankaj Pravin

What is ABAP WorkBench? ABAP Workbench is a set of programs for developing enterprise resource management (ERM) applications that run in the R/3 subsystem from SAP. The latest version includes ABAP Objects, an object-oriented programming language. R/3 will also run programs written in the earlier ABAP/4 language. What is the typical structure of an ABAP program? Ans HEADER, BODY, FOOTER. What is the meaning of ABAP editor integrated with ABAP data dictionary? Ans ABAP Editor: Tool in the ABAP Workbench in which you enter the source code of ABAP programs and check their syntax. You can also navigate from the ABAP Editor to the other tools in the ABAP Workbench. What is OPEN SQL vs NATIVE SQL? Ans Open SQL These statements are a subset of standard SQL. It consists of DML command (Select, Insert, Update, Delete). It can simplify and speed up database access. Buffering is partly stored in the working memory and shared memory. Data in buffer is not always up-to-date. Native SQL They are loosely integrated into ABAP. It allows access to all functions containing programming interface. They are not checked and converted. They are sent directly to the database system. Programs that use Native SQL are specific to the database system for which they were written. For e.g. to create or change table definition in the ABAP. What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it? 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 [PERFORMING ]. ENDEXEC. What are the differences between SAP memory and ABAP memory? Ans ABAP Memory is a memory area in the internal session (roll area) of an ABAP program. Data within this area is retained within a sequence of program calls, allowing you to pass data between programs that call one another. It is also possible to pass data between sessions using SAP Memory. SAP Memory is a memory area to which all sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session (as with ABAP memory) or to pass data from one session to another. What are field symbols and field groups? Have you used component idx of structure clause with field groups? Ans Field Symbols They are placeholder or symbolic names for the other fields. They do not physically reserve space for a field, but point to its contents. It can point to any data objects. Field-symbols Field Groups Field groups does not reserve storage space but contains pointers to existing fields. 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

What is the advantage of structures? How do you use them in the ABAP programs? Ans GLOBAL EXISTANCE (these could be used by any other program without creating it again). 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 .

Compiled By Pankaj Pravin

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

What is a collect statement? How is it different from append? Ans Collect : 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. Append Duplicate entries occurs. There is no period after Native SQL statements. Furthermore, 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. You need to know whether table and field names are case-sensitive in your chosen database.

What are ranges? What are number ranges? Ans Main function of ranges to pass data to the actual selection tables without displaying the selection screen. Min, Max values provided in selection screens. It is often necessary to directly access individual records in a data structure. This is done using unique keys. Number ranges are used to assign numbers to individual database records for a commercial object, to complete the key. Such numbers are e.g. order numbers or material master numbers. 164) Name a few system global variables you can use in ABAP programs? Ans SY-SUBRC, SY-DBCNT, SY-LILLI, SY-DATUM, SY-UZEIT, SY-UCOMM, SY-TABIX.. SY-LILLI is absolute number of lines from which the event was triggered.

How do you take care of performance issues in your ABAP programs? Ans Performance of ABAP programs can be improved by minimizing the amount of data to be transferred. The data set must be transferred through the network to the applications, so reducing the amount of time and also reduces the network traffic. Some measures that can be taken are: - Use views defined in the ABAP/4 DDIC (also has the advantage of better reusability). - Use field list (SELECT clause) rather than SELECT *. - Range tables should be avoided (IN operator) - Avoid nested SELECTS.

Compiled By Pankaj Pravin

How to find the return code of an stmt in ABAP programs? Ans Open SQL has 2 system fields with return codes: 1) SY-SUBRC 2) SY-DBCNT

What are the different types of ABAP statements? Ans There are six types of ABAP statements: 1) Declarative - Types, Data, Tables 2) Modularization - Event Keywords and Defining Keywords 3) Control - IfElse, While, Case 4) Call - Perform, Call, Set User Command, Submit, Leave to 5) Operational - Write, Add, Move 6) Database - Open SQL & Native SQL

What is runtime analysis? Have you used this? Ans It checks program execution time in microseconds. When you go to SE30. If you give desired program name in performance file. It will take you to below screen. You can get how much fast is your program.

Is ABAP a GUI language? Ans Yes, ABAP IS AN EVENT DRIVEN LANGUAGE What are user exits? What is involved in writing them? What precautions are needed? Ans User defined functionality included to predefined SAP standards. Point in an SAP program where a customers own program can be called. In contrast to customer exits, user exits allow developers to access and modify program components and data objects in the standard system. On upgrade, each user exit must be checked to ensure that it conforms to the standard system. There are two types of user exit: 1. User exits that use INCLUDEs - These are customer enhancements that are called directly in the program. 2. User exits that use TABLEs - These are used and managed using Customizing. Should find the customer enhancements belonging to particular development class. 2. How do you get help in ABAP? Ans HELP-SAP LIBRARY, by pressing F1 on a keyword. What are the events used in ABAP in the order of execution? Ans Events are: 1. INITIALIZATION 2. AT SELECTION-SCREEN 3. AT SELECTION-SCREEN ON 4. START-OF-SELECTION 5. TOP-OF-PAGE

Compiled By Pankaj Pravin

6. TOP-OF-PAGE DURING LINE SELECTION 7. END-OF-PAGE 8. END-OF-SELECTION 9. AT USER-COMMAND 10. AT LINE-SELECTION 11. AT PF 12. GET 13. GET LATE. 14. AT User Command In the select statement what is group by? Group by clause is used to fetch the data from the table by the specified field ex.select count (*) from emptable group by deptno where deptno = 1. It is used to find the number of employees present in the specified department no. What are the various types of selection screen event? Ans SELECTION-SCREEN BEGIN OF BLOCK ABC WITH FRAME TITLE T01. SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW. CALL SELECTION-SCREEN 500 STARTING AT 10 10. What is step-loop? Explain all the steps? Ans A step loop is a repeated series of field-blocks in a screen. Each block can contain one or more fields, and can extend over more than one line on the screen. Step loops as structures in a screen do not have individual names. The screen can contain more than one step-loop, but if so, you must program the LOOPENDLOOPs in the flow logic accordingly. The ordering of the LOOPENDLOOPs must exactly parallel the order of the step loops in the screen. The ordering tells the system which loop processing to apply to which loop. Step loops in a screen are ordered primarily by screen row, and secondarily by screen column. Transaction TZ61 (development class SDWA) implements a step loop version of the table you saw in transaction TZ60. Static and Dynamic Step Loops What are the system fields? Explain? Ans The ABAP system fields are active in all ABAP programs. They are filled by the runtime environment, and you can query their values in a program to find out particular states of the system. Although they are variables, you should not assign your own values to them, since this may overwrite information that is important for the normal running of the program. However, there are some isolated cases in which you may need to overwrite a system variable. For example, by assigning a new value to the field SY-LSIND, you can control navigation within details lists. What are the system fields u have worked with? Explain? Ans I had worked with the following (30) system fields: 1) SY-DBSYS - Central Database 2) SY-HOST - Server 3) SY-OPSYS - Operating System 4) SY-SAPRL - SAP Release 5) SY-SYSID - System Name 6) SY-LANGU - User Logon Language 7) SY-MANDT - Client 8)SY-UNAME - Logon User Name 9) SY-DATLO - Local Date 10) SY-DATUM - Server Date 11) SY-TIMLO - Local Time 12) SY-UZEIT - Server Time 13) SY-DYNNR - Screen Number 14) SY-REPID - Current ABAP program 15) SY-TCODE - Transaction Code 16) SY-ULINE - Horizontal Line 17) SY-VLINE - Vertical Line 18) SY-INDEX - Number of current loop Pass 19) SY-TABIX - Current line of internal table 20) SY-DBCNT - Number of table entries processed 21) SY-SUBRC - Return Code 22) SY-UCOMM - Function Code 23) SY-LINCT - Page Length of list

Compiled By Pankaj Pravin

24) 25) 26) 27) 28) 29) 30)

SY-LINNO - Current Line SY-PAGNO - Current Page Number SY-LSIND - Index of List SY-MSGID - Message Class SY-MSGNO - Message Number SY-MSGTY - Message Type SY-SPONO - Spool number during printing

How are the date and time field values stored in SAP? Ans DD.MM.YYYY. HH:MM:SS Are programs client dependent? Ans Yes, group of users can access these programs with a client number. What are the different types of data types? Ans There are three types of data types: Data Types Elementary Complex References Fixed Variable Structure Table Data Object Variable What is Asynchronous and Synchronous Update? Ans Asynchronous Update The program does not wait for the work process to finish the update. Commit Work. Synchronous Update The program wait for the work process to finish the update. Commit Work and Wait. What are the general naming conventions of ABAP programs? Ans Should start with Y or Z.

Internal Tables

Compiled By Pankaj Pravin

What are Internal Tables? An internal table is a temporary table stored in RAM on the application server. It is created and filled by a program during execution and is discarded when the program ends. Like a database table, an internal table consists of one or more rows with an identical structure, but unlike a database table, it cannot hold data after the program ends Size of the internal tables? The size of the internal tables are set using the 'occurs n' clause. Here n refers to a integer number that specifies the size. Usually its given as 'occurs 0' which creates an itab with the memmory space of 8kb. What is the basic difference internal tables and database tables? How can we differentiate by looking at the tables? Handling of internal tables The basic difference is database tables are stored in DB server and the internal tables are virtual tables these are created run time only Internal tables are created dynamically, the memory of internal tables is not permant memory, for internal tables the memory will be created in the application server and it is external memory and terminates after the program termination. Types of internal tables There are three types of Internal Tables exist. 1.Standard Internal Tables: These tables have a linear index and can be accessed using the index or the key. The response time is in linear relationship with number of table entries. These tables are useful when user wants to address individual table entries using the index. 2.Sorted Internal Tables: These tables also have an index and the key. But, the response time is in logarithmic relationship with number of table entries, since it uses binary search algorithm instead of linear search. These tables are useful when user wants the table to be sorted while additional entries have to be added. 3.Hashed Internal Tables: These tables have no index, but have the key. The response time is constant irrespective of number of table entries, since it uses a Hash algorithm. These tables are useful when user wants to access the entries with key only. Effective ways of using Internal Tables? Create Internal table without Header.Do all the internal table operations by Creating Workarea. This would be the effecient way of coding. <br>Don't forget to CLEAR Workarea whenever it is required. How to Eliminate duplicate entries in the internal tables? To delete all duplicate entries from a sorted internal table (e.g. just after SORT), you can use the DELETE ADJACENT DUPLICATES FROM itab statement. You can use the COMPARING adition to limit the fields that are used to test for duplicate entries e.g.SORT i_tab by matnr werks logort.DELETE ADJACENT DUPLICATES FROM itab COMPARING matnr werks.All duplicates withe same combination of matnr and werks will be deleted How to control Internal Tables? The control breaks in an Internal Table are At first At new At end of Sum Control Levels are of 5 types : 1) AT FIRST 2) AT NEW 3) AT END OF 4) AT LAST 5) ON CHANGE OF Explain row type and line type concept line type refers to the structure of an internal table,whereas row type is the actual part that contains the data and it refers to the table body.creating internal table using line type and row type concept is for reusability purpose.Line type and Row type are defined at DDIC LEVEL.

Explain internal table with and without header?

Compiled By Pankaj Pravin

Internal tables are of two types 1. tables with header line 2. tables without header line. With header line. Data can be directly go to header first and will be placed in body when we used APPEND statement. It can't be used for nesting of internal tables. ex: data: itab like mara occurs 0 with header line. or itab like standard table of ekko with header line. Then itab is a internal with header line so you can use itab directly. ex: select * from itab INTO TABLE itab where matnr in p_matnr. loop at itab. write:/10 itab-fld1. ,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,, endloop. Tables without header line: For these tables we need to create a explicit header [workarea] and doing anything for data should be through that explicit header only. ex: data: itab like mara, wa like mara. itab is a internal table without header line [only body] and wa is the explicit workarea. for this itab when you want to populate data you have to do like this. select * from mara into wa where mantr in p_matnr. append itab from wa. endselect. For accessing data of internal table loop at itab into wa. write:/10 wa-fld1, ................ ............ endloop.

SCREEN PAINTER (SE51)

Compiled By Pankaj Pravin

What are Screen Painters? Screen Painter is an ABAP Editor tools allowed us to create dialog screen. Dialog screen usually created as a screen to catch user input. It can be accessed by tcode SE51. Screen Painter Architecture: 1. Screen Attributes Define screen title, define its type (normal, subscreen). 2. Flow logic Flow logic control flow of program. The event block is introduced by the corresponding keyword statement, and it concludes either when the next block is introduced, or at the end of the program. There are four event blocks, each of which is introduced with the screen keyword PROCESS: PROCESS BEFORE OUTPUT. ... PROCESS AFTER INPUT. ... PROCESS ON HELP-REQUEST. ... PROCESS ON VALUE-REQUEST. Flow logic structured on event, in above example we can see there are two event involved, "process before output" (PBO) and "process after input" (PAI). PBO processed before the screen is displayed. It allow us to define toolbar and title, positioning the cursor, showing and hiding fields and changing field attributes dynamically. PAI processed after user command (double click, push button). It is allow us to validate user input, and determine next process based on user command. In flow logic, we only define module name to define program flow, to create "real code", double click on module name to create it, then write program in it. 3. Layout Editor We use layout editor to place screen element in screen layout. There are two modes in editing layout: Graphical and alphanumeric. Both modes offer the same functions but use different interfaces. In graphical mode, you use a drag and drop interface similar to a drawing tool. In alphanumeric mode, you use your keyboard and menus. It is easier to work in graphical mode, to toggle between this mode, in SE51 go to: Utilities->Settings: in screen painter tabs check graphical layout editor. Layout editor containing this tools: i. Element pallete On left screen you will find list of element (textbox, label, checkbox) you can use. Drag and drog element to put it on screen. ii. Name & Text Aftef put element on screen, write its name and text (in textbox, text will set default value). iii. Attributes Window Double click the element to display its attributes, or select it then click :Goto->Secondary window->attributes. For example, in textbox element, we can set its length, read only mode, in this window. iv. Dictionary/program field. If we want to create a field refer to field in data dictionay or field already declared in program, use this menu to create text field with the same type compared to its referral. 4. Element list. Element list shown all element in screen. We rarely use this menu, because it easier to maintain element in layout editor. What are the events in Screen Programming? Ans There are two events in Screen Programming: 1. PBO (Process Before Output) Before the screen is displayed, the PBO event is processed. 2. PAI (Process After Input) When the user interacts with the screen, the PAI event is processed. 3. POH (Process On Help) - are triggered when the user requests field help (F1). You can program the appropriate coding in the corresponding event blocks. At the end of processing, the system carries on processing the current screen. 4. POV (Process On Value) - are triggered when the user requests possible values help (F4). You can program the appropriate coding in the corresponding event blocks. At the end of processing, the system carries on processing the current screen. What are the difference between call screen and leave screen?

Compiled By Pankaj Pravin

Ans Call Screen: Calling a single screen is a special case of embedding a screen sequence. If you want to prevent the called screen from covering the current screen completely, you can use the CALL SCREEN statement with the STARTING AT and ENDING AT CALL SCREEN 1000. CALL SCREEN 1000 STARTING AT 10 10 ENDING AT 20 20. LEAVE SCREEN statement ends the current screen and calls the subsequent screen. LEAVE SCREEN. LEAVE TO SCREEN 2000. What are differences between At selection-screen and At selection-screen output? Ans AT SELECTION-SCREEN event is triggered in the PAI of the selection screen once the ABAP runtime environment has passed all of the input data from the selection screen to the ABAP program. AT SELECTION-SCREEN OUTPUT - This event block allows you to modify the selection screen directly before it is displayed. What are the elements of selection screen? Ans There are 5 elements of selection screen: Selection-screen include blocks Selection-screen include parameters Selection-screen include select-options Selection-screen include comment Selection-screen include push-button List of Screen elements. Ans There are 13 screen elements: i. Input / output fields ii. Text fields iii. Checkbox iv. Radio button v. Push Button vi. Drop down list vii. Subscreen viii. Table control ix. Tabstrip control x. Custom control xi. Box xii. Status icons xiii. OK_CODE fields How many default Tab Strips are there? How to insert more Tabs in it? Ans There 2 default Tab strips. Screen painter attributes contain Tab Title, which is used to insert more tabs in tab strip. What are different types of screen keywords? Ans There are four types of screen keywords: Module, Loop, Chain and Field. 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. Does SAP has a GUI screen painter or not? If yes what operating systems is it available on? Ans Yes. Operating System Windows based Screen Painter Alpha numeric Screen Painter

Menu Painter Purpose The Menu Painter is one of the tools of the ABAP Workbench. You use it to design user interfaces for your ABAP programs and to define the functions that you want to use within these interfaces.

Compiled By Pankaj Pravin

Features :ABAP programs contain a wide variety of functions which fall into different categories within the user interface. An instance of the user interface consisting of a menu bar, a standard toolbar, an application toolbar, and a function key setting, is called a GUI status. The GUI status and GUI title defines how the user interface looks and behaves in an ABAP program.

MODULARIZATION TECHNIQUES

What is an instance? Ans When you call a function module, an instance of its function group plus its data, is loaded into the memory area of the internal session. An ABAP program can load several instances by calling function modules from different function groups. What is Function group? Difference between function group and function module? Ans Function Groups act as containers for Function Modules that logically belong together. Function Groups 1) These cannot be defined in a Function Module. 2) It cannot be called. 3) They are containers for Function Module. Function Modules 1) These must be defined in a Function Group. 2) It can be called from any program. 3) They are not containers for Function Group. How to Create any functions? How to go about it? Ans Steps for creating the Functions: First Procedure: 1) /nSE37 2) Goto 3) Function Group (FG) 4) Create Group 5) Name of FG (ZREKHA_FG) 6) Short Text 7) Save Local Object Second Procedure 1) Environment 2) Inactive Object 3) Function Group (ZREKHA_FG) 4) Activate 5) Back Third Procedure 1) Name of Function Module (ZREKHA_FM) 2) Create 3) Write FG Name (ZREKHA_FG) 4) Short Text 5) Save Fourth Step: Call function ZREKHA_FM. Function modules used in F4 help. Ans There are two types of function modules used in F4 help: 1) F4IF_FIELD_VALUE_REQUEST 2) F4IF_INT_TABLE_VALUE_REQUEST What are the exceptions in function module? Ans Exceptions: Our function module needs an exception that it can trigger if there are no entries in table SPFLI that meet the selection criterion. The exception NOT_FOUND serves this function. COMMUNICATION_FAILURE & SYSTEM_FAILURE What are different types of attributes of Function Module?

Compiled By Pankaj Pravin

Ans There are 6 attributes of FM: 1. Import 2. Export 3. Table 4. Changing 5. Source 6. Exception

What are the include programs? Ans When the same sequence of statements in several programs is to be written repeatedly. They are coded in include programs (External programs) and are included in ABAP/4 programs. What is the difference between macro and subroutine? Macros can only be used in the program the are defined in and only after the definition are expanded at compilation / generation. Subroutines (FORM) can be called from both the program they are defined in and other programs . A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. Since debugging a MACRO is not really possible, prevent the use of them (Ive never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION. Can you call a subroutine of one program from another program? Ans Yes, only external subroutines Using SUBMIT statement

Compiled By Pankaj Pravin

BDC (Batch Data Communication) What are Conversion & Interface programs in SAP? Ans CONVERSION: Legacy system to flat file. INTERFACE: Flat file to SAP system. What is the structure of a BDC sessions. What is BDC? It is a type of CONVERSION in SAP. To convert Non-SaP data to SAP Types of BDCs? Ans There are two types of BDCs: 1) Transaction Method 2) Session Method Advantages & Disadvantages of different types of BDCs? Ans Transaction Method: 1) It is faster than session method. 2) While executing, it starts from starting. Session Method: 1) It is slower than transaction method. 2) While executing, it does not start from starting. How to write a BDC - how do u go about it? Ans Steps for writing BDC 1) /nSE38 2) Declare Tables, Data (for ITAB) and Data (for BDCITAB) 3) Call function Upload. 4) Write code for the First Screen, Radio Button, Filename, Change Button, Second Screen, Utilities (Create Entries), Third Screen and Save. 5) Call transaction SE11 using BDCITAB mode A. 6) Save, Check Errors, Activate and Execute. 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 i.e. data for screen fields, to which screen it is passed, program name behind it, and how next screen is processed. Create session BDC_OPEN_GROUP Insert batch input BDC_INSERT Close session BDC_CLOSE_GROUP What is the alternative to batch input session? Ans Call Transaction Method & Call Dialog

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 Go to SM36 and create background job by giving job name, job class and job steps (JOB SCHEDULING) What are the problems in processing batch input sessions? How is batch input process different from processing on line?

Compiled By Pankaj Pravin

Ans Two Problems: 1) 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. 2) If session processing fails, data will not be transferred to SAP database table. Is Session Method, Asynchronous or Synchronous ? Ans Synchronous What are the fields in a BDC_Tab and BDCDATA Table? Ans Fields of BDC_Tab & BDCDATA Table: Sr.No Fields - Description 1) Program - BDC Module pool 2) Dynpro - BDC Screen Number 3) Dynbegin - BDC Screen Start 4) Fname - Field Name 5) Fval - BDC field value Ans BDCDATA 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). Check number of records already updated and delete them from input file and run BDC again. 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 analyze 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 data file. What are the function module in BDC? Ans There are three function module in BDC: 1) BDC_OPEN_GROUP 2) BDC_INSERT 3) BDC_CLOSE_GROUP Write the steps to execute session method. Ans Steps for execution Session Method: 1) System 2) Service 3) Batch Input 4) Session 5) Choose Session Name 6) Process 7) Asks for Mode (Display All Screen, Display Errors & Background) What are the different types of mode (run code) in Call Transaction method? Ans There are three modes in Call Transaction: A Displays All Screen E Display Errors N Background Processing Difference b/w call transaction and session . Call transaction session 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 . What is the difference between Upload and WS_Upload ? The diffrence between WS_Upload and Upload is when you use function Upload it prompts for a dailog box where in you need to key in the file location.Where as in case of WS_Upload you specify the file location in the function input parameters itself

Compiled By Pankaj Pravin

If I want to execute a program only in background not in foreground is there any option for this? The sm37 transaction can be used for running a program in the background. Also in the session method while processing the session you can specify the processing type as background or foreground.

What kind of BDC programs are written ? There are five types of BDC methods available. They are 1.Batch input session 2.Call Transaction 3.Recording 4.Direct Input and 5.LSMW How to read files and process BDCs automatically? To read file from Presentation server use Upload or GUI Upload or WS upload and to read file from Application server use Opend Dataset,Read dataset and Close dataset In session method sy-subrc is not returned whereas in call transaction method sy-subrc is returned . what does it mean? While to transfer the data from the through if any errors occurs until the errors are the complete the data is not transfer to the SAP system. the system compulsory shows the errors. that errors are stored into the error logs (Transaction is SM35). so the session method should not return any value. In call transaction method data is directly pass to the SAP system. So its compulsory return the value. Because of the call transaction is the function. A function should return the value mandatory.

Compiled By Pankaj Pravin

LSMW
LSM Workbench: What is it? The LSM Workbench is an R/3-based tool that supports You when transferring data from non-SAP systems ("Legacy Systems") to SAP systems1 once or periodically. The tool supports conversion of data of the legacy system in a convenient way. The data can then be imported into the SAP system via batch input, direct input, BAPIs or IDocs Advantages The main advantages of the LSM Workbench: Part of the SAP system and thus independent of individual platforms A variety of technical possibilities of data conversion: Data consistency due to standard import techniques: Batch input Direct input BAPIs (Business Application Programming Interfaces) IDocs (Intermediate Documents) The import technique to be used in an individual case depends on the business object. Generation of the conversion program on the basis of defined rules Clear interactive process guide Interface for data in spreadsheet format Creation of data migration objects on the basis of recorded transactions Charge-free for SAP customers and SAP partners Project, Subproject and Object On the initial screen, you can create a new project, corresponding subprojects and objects via Edit -> Create new entry. Project: An ID with a maximum of 10 characters to name your data transfer project. If you want to transfer data from several legacy systems, you may create a project e.g. for every legacy system. Subproject: An ID with a maximum of 10 characters that is used as further structuring attribute. Object: An ID with a maximum of 10 characters to name the business object. What is difference between BDC & LSMW? The differences between LSMW and BDC are as follows: LSMW is generally for normal SAP applications, while BDC is mainly for any customized application. LSMW provides various methods for the migration of data, namely, those of direct input, Batch input recording and IDOC. BDC however, simply makes use of recording. There are two ways of implementing BDC, the call transaction method and the session method. In LSMW, mapping is taken care of with the help of SAP, whereas in BDC one has to provide explicit mapping directions. Coding is not very flexible in LSMW, whereas in BDC, coding is very flexible and applications can be easily customized. This is mainly because LSMW is devised specially for functional consultants who do not perform coding, while BDC is mainly made use of by technical consultants, who do perform coding

Compiled By Pankaj Pravin

REPORTS How many types of reports are there in SAP? A report is a presentation of data in a specific format & organized structure. 1) Classical report 2) Interactive report 3) ABAP query 4) LDB report 5) ALV report 6) SAPSCRIPT 7) SMARTFORMS

Classical Reports
What are Classical Reports? These reports consist of only one screen /list as an output. It displays data using the write statement inside a loop. They are normal reports & do not contain any sub report. Events 1. 2. 3. 4. 5. 6. in Classical Report INITIALIZATION AT SELECTION-SCREEN START-OF-SELECTION END-OF-SELECTION TOP-OF-PAGE END-OF-PAGE

Clauses of Classical report LINE-SIZE LINE-COUNT MESSAGE-ID NO STANDARD PAGE HEADING How do u display a data in a Detail List? Ans By using two statements: 1) Top-of-page during line-selection 2) At line-selection

Compiled By Pankaj Pravin

Interactive Reports
What are Interactive Reports? Ans An output list which displays just the basic details & allow user to interact, so that a new list is populated based on user-selection. With interactive list, the user can actively control data retrieval and display during the session.

What are the commands used for interactive reports? Ans Top-of-Page during line-selection

What is PF-STATUS? Ans PF-Status is used in interactive report for enhancing the functionality. If we go to SE41, we can get menus, items and different function keys, which we are using for secondary list in interactive report.

What is the significance of HIDE? Ans Its stores the click value and display the related record in the secondary list.

Where do u code the HIDE statement? Ans In a LOOP statement

What are the events used in Interactive Reports. Ans There are three events of Interactive Reports: I. At PF(nn) II. At line-selection III. At user-command

Systems fields used for Interactive Lists AND Lists Ans Interactive System Fields: SY-LSIND, SY-CPAGE, SY-LILLI, SY-LISEL, SY-LISTI, SY-LSTAT, SY-STACO, SY-STARO Lists: SY-COLNO, SY-LINCT, SY-LINNO, SY-LINSZ, SY-PAGNO,

Compiled By Pankaj Pravin

SY-TVAR0..SY-TVAR9, SY-WTITL

How do u move on to the next screen in interactive reporting? Ans Write code of the following: 1) Top-of-Page during line-selection 2) At line-selection

What is read line? Ans READ LINE and READ CURRENT LINE These statements are used to read data from the lines of existing list levels. These statements are closely connected to the HIDE technique.

How do you validate the selection criteria of a report? And how do you display initial values in a selection screen? Ans The selection criteria is validated in the processing block of the AT SELECTION SCREEN event for the input values on the screen and respective messages can be sent. To display initial values in the selection screen: 1) Use INITIALIZATION EVENT 2) Use DEFAULT VALUE option of PARAMETERS Statement 3) Use SPA/GPA Parameters (PIDs). Validate: - by using match code objects. Display :- Parameters default xxx. Select-options for spfli-carrid. Initial values in a selection screen: INITIALIZATION. DNO-LOW = 10. DNO-HIGH = 30 SIGN I. OPTION NB. APPEND DNO. What is an interactive report? What is the obvious difference 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. Difference: a) The list produced by classical report doesnt allow user to interact with the system where as the list produced by interactive report allows the user to interact with the system. B) Once a classical report, executed user looses control where as Interactive, user has control. C) In classical report, drilling is not possible where as in interactive, drilling is possible. ABAP QUERY What Is SAP Queries ? Many times a need arises for SAP Users and Functional Consultants to generate quick reports without getting any ABAP coding done time taken to complete the coding in development, transport and test it in QA system and then transport to production is sometimes too long. In such cases, ABAP/4 query is a tool provided by SAP for generating these kind of reports. Type of Report Desired: Before starting to write an ABAP query, its advisable to decide the type of report that the user wants. ABAP query provides the following type of reports:

Compiled By Pankaj Pravin

Basic List Statistics Ranked List

Simple report Report containing statistical functions like Average &Percentage Report written for analytical purpose

What are the advantages and disadvantages of ABAP query tool? Ans Advantages: No programming knowledge is required. Disadvantages: Depending on the complexity of the database tables, it may not be easy for the user to select the necessary data correctly. Is a logical database a requirement/must to write an ABAP query? Ans No, it is not must to use LDB. Apart from it, we have other options: 1) Table join by Basis Table 2) Direct Read of table 3) Data Retrieval by Program

SAPScripts What is SAP Script? What is the purpose of SAP Script? Difference between SAP Script and Report? Ans SAP Script It is the integrated text management system of the SAP R/3 System. Two types PC Editor & Line Editor. Reports - It is the way to display data fetched from database table onto screen or directly output it to a printer. Two types Classical and Interactive. What are the different functions used in sap script? What are the parameters used in each Function? Ans There are three different functions used in SAP Script: 1) OPEN_FORM 2) WRITE_FORM 3) CLOSE_FORM Parameters in Each Function: 1) OPEN_FORM Exporting Form Language 2) WRITE_FORM Exporting Element Window 3) CLOSE_FORM What are standard layouts sets in the SAP Script? Ans There are four standard layouts in the SAP Script: 1) Header 2) Logo 3) Main Window 4) Footer Difference between UPLOAD and WS_UPLOAD? Ans UPLOAD - File transfer with dialog from presentation server file to internal table. Data which is available in a file on the presentation server is transferred in an internal table. ASCII & Binary files can be transferred. WS_UPLOAD - To read data from the presentation server into an internal table without a user dialog, use the function module WS_UPLOAD. The most important parameters are listed below. What are the types of windows in SAP Script? Ans There are five Standard Layouts in SAP Script: 1) Page 2) Window 3) Page Window 4) Paragraph Format 5) Character Format

Compiled By Pankaj Pravin

What are the function modules used in a SAP Script driver program? Ans There are three functions used in SAP Script: 1) OPEN_FORM 2) WRITE_FORM 3) CLOSE_FORM 64) Logo in SAP Script? Ans RSTXLDMC OR Steps for making and inserting Logo in SAP Script: First Procedure: 1) Draw the picture 2) Save it 3) /nSE78 4) Write name & Choose Color 5) Click on Import 6) Browse picture 7) Enter Second Procedure 1) /nSE71 2) Insert 3) Graphics 4) Click on stored on document server 5) Execute 6) Choose name of BMAP If I forgot some command in SAP Script e.g.: suppress zero display - How to do find it? Ans Suppressing of entire screens is possible with this command. This command allows us to perform screen processing in the background. Suppressing screens is useful when we are branching to list-mode from a transaction dialog step. Can there be more than 1 main window in SAP Script? Ans No, there cannot be more than 1 main window in SAP Script because in WRITE_FORM, it asks for the parameter Window that will create the problem. WRITE_FORM Exporting Element Window What is the difference between OPEN_FORM and CLOSE_FORM? Ans OPEN_FORM This module opens layout set printing. This function must be called up before we can work with other layout set function like WRITE_FORM. WRITE_FORM Output text element in form window. The specified element of the layout set window entered is output. The element must be defined in the layout set. CLOSE_FORM End layout set printing. Form printing started with OPEN_FORM is completed. Possible closing operations on the form last opened are carried out. Form printing must be completed by this function module. If this is not carried out, nothing is printed or displayed on the screen. What are the page windows? How many main windows will be there in a page window? Ans Page Window: In this window, we define the margins for left, width, upper and height for the layout of Header, Logo, Main, & Footer. How to debugg a script? Ans Go to SE71, give layout set name, go to utilities select debugger mode on. How many maximum sessions can be open in SAPgui? Ans There are maximum 6 sessions open in SAPgui. 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. What is SAP Script and layout set? Ans The tool, which is used to create layout set is called SAP Script. Layout set is a design, appearance and structure of document. What are the ABAP commands that link to a layout set?

Compiled By Pankaj Pravin

Ans Control Commands, System Commands What are the different elements in layout sets? Ans PAGES, Page windows, Header, Paragraph, Character String, Windows. Can you use if then else, perform..etc statements in sap script? Ans Yes. How do you number pages in SAP Script layout outputs? Ans & page & &next Page & What takes most time in SAP script programming? Ans LAYOUT DESIGN AND LOGO INSERTION. How do you use tab sets in layout sets? Ans Define paragraph with defined tabs. How do you backup SAP Script layout sets? Can you download and upload? How? Ans SAP script backup :- In transaction SE71 goto Utilities -> Copy from client -> Give source form name, source client (000 default), Target form name. Download :- SE71, type form name -> Display -> Utilities -> form info -> List -> Save to PC file. Upload :- Create form with page, window, page window with the help of downloaded PC file. Text elements for Page windows to be copied from PC file. LDB( Logical Database) What is a Logical Database? Advantages & disadvantages. Ans Logical Databases are special ABAP programs that retrieve data and make it available to application programs. Use of LDB is used to read data from database tables by linking them to executable ABAP programs. Advantages: - 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. 1) An easy-to-use standard user interface. 2) Check functions, which check that user input is complete, correct, and plausible. 3) Meaningful data selection. 4) Central authorization checks for database accesses. 5) Good read access performance while retaining the hierarchical data view determined by the application logic. 6) No need of programming for retrieval, meaning for data selection Disadvantages: 1) If you do not specify a logical database in the program attributes, the GET events never occur. 2) 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). 3) 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. What are the events used for Logical Database? Ans Two Events 1) GET - This is the most important event for executable programs that use a logical database. It occurs when the logical database has read a line from the node

and made it available to the program in the work area declared using the statement NODES
. The depth to which the logical database is read is determined by the GET statements2) PUT - The PUT statement directs the program flow according to the structure of the logical database. What is the difference between Get and Get Late?

Ans GET - After the logical database has read an entry from the node .GET LATE - After all of the nodes of the logical database have been processed that are below

Compiled By Pankaj Pravin

in the database hierarchy.

If u are using Logical Databases how will u modify the selection-screen elements? Ans Select-options : dname for deptt-dname. What is sequence of event triggered in report? Ans There are 6 events in report: 1) Initialization 2) At Selection-Screen 3) Start-of-Selection 4) Get 5) Get Late 6) End-of-Selection 7) Top-of-Page 8) End-of-Page 9) At Line Selection 10) At User Command 11) At PF (nn)

ALV Reports What is ALV programming in ABAP? When is this grid used in ABAP? ALV is Application List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options. Which call functions are used in ALV reports? The commonly used ALV functions used for this purpose are; 1. REUSE_ALV_VARIANT_DEFAULT_GET 2. REUSE_ALV_VARIANT_F4 3. REUSE_ALV_VARIANT_EXISTENCE 4. REUSE_ALV_EVENTS_GET 5. REUSE_ALV_COMMENTARY_WRITE 6. REUSE_ALV_FIELDCATALOG_MERGE 7. REUSE_ALV_LIST_DISPLAY 8. REUSE_ALV_GRID_DISPLAY 9. REUSE_ALV_POPUP_TO_SELECT How you call this function in your report? After completion of all the data fetching from the database and append this data into an Internal Table. say I_ITAB. Then use follwing function module. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING I_CALLBACK_PROGRAM = 'Prog.name' I_STRUCTURE_NAME = 'I_ITAB' I_DEFAULT = 'X' I_SAVE = 'A' TABLES T_OUTTAB = I_ITAB. IF SY-SUBRC <> 0. WRITE: 'SY-SUBRC: ', SY-SUBRC . ENDIF. ENDFORM. " GET_FINAL_DATA ABAP List Viewer The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).

Compiled By Pankaj Pravin

Using ALV, we can have three types of reports: 1. Simple Report 2. Block Report 3. Hierarchical Sequential Report There are some function modules which will enable to produce the above reports without much effort. All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS. Simple Report The important function modules are: Reuse_alv_list_display Reuse_alv_fieldcatalog_merge Reuse_alv_events_get Reuse_alv_commentary_write Reuse_alv_grid_display A. REUSE_ALV_LIST_DISPLAY: This is the function module which prints the data. B. REUSE_ALV_FIELDCATALOG_MERGE: This function module is used to populate a fieldcatalog which is essential to display the data in ALV C . REUSE_ALV_EVENTS_GET: Returns table of possible events for a a list type D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list. E. REUSE_ALV_GRID_DISPLAY: A new function in 4.6 version, to display the results in grid rather than as a list. Parameters : same as reuse_alv_list_display HIERARCHICAL REPORTS A. REUSE_ALV_HIERSEQ_LIST_DISPLAY BLOCK REPORT This is used to display multiple lists continuously. The important functions used in this report are: A. REUSE_ALV_BLOCK_LIST_INIT B. REUSE_ALV_BLOCK_LIST_APPEND C. REUSE_ALV_BLOCK_LIST_DISPLAY D. REUSE_ALV_BLOCK_HS_LIST_APPEND A. REUSE_ALV_BLOCK_LIST_INIT This function module is used to set the default GUI status etc. B. REUSE_ALV_BLOCK_LIST_APPEND This function module adds the data to the block. INTERNAL TABLES IN SLIS Slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using REUSE_ALV_FIELDCATALOG_MERGE. Important Attributes: a. col_pos : position of the column b. fieldname : internal fieldname c. tabname : internal table name d. ref_fieldname : fieldname (dictionary) e. ref_tabname : table (dictionary) f. key(1) : column with key-color g. icon(1) : icon h. hotspot(1) : hotspot i. Symbol(1) : symbol j. Checkbox(1) : checkbox k. just(1) : (R)ight (L)eft (C)ent l. do_sum(1) : sum up m. no_out(1) : (O)blig. (X)no out n. outputlen : output length o. seltext-l : long key word p. seltext_m : middle key word q. seltext_s : short key word r. reptext_ddic : heading(ddic) s. ddictxt(1) : (S)hort (M)iddle (L)ong t. datatype : datatype

Compiled By Pankaj Pravin

SLIS_T_EVENT : Internal table for storing all the possible events of the ALV. This can be populated by the function module Reuse_alv_events_get The columns are : name : name of the event form : name of the routine SYNTAXES FOR THE ROUTINES I_CALLBACK_PF_STATUS_SET The table RT_EXTAB contains the function codes which are hidden in the standard interface. I_CALLBACK_USER_COMMAND The structure rs_selfield has the details about the current cursor position. SMARTFORMS What are SMARTFORMS? SAP Smart Forms is used to create and maintain forms for mass printing in SAP Systems.As output medium SAP Smart Forms support a printer, a fax, e-mail, or the Internet (by using the generated XML output). SAP introduced SmartForms in 1998 to overcome the limitations in SAP Scripts. SmartForms are easier to develop, maintain and transport than SAP Script. Advanatges of Smart Forms

They help adapting forms without any programming knowledge due to entirely graphical user interface When activating the smart form the system automatically generates the function module and at the runtime

To make any changes we have to use the Drag & Drop, Cut & Paste. These actions do not include writing of coding lines or using a script language. We can insert static and dynamic tables. These include the line feeds in the individual table cells, triggering events for table headings and subtotals and sorting data before output. The smart forms allow the user to include graphics, which can be displayed as a part of the form or as background graphics. During printout the user can suppress the background graphic as and when necessary. Web Publishing is possible using the generated XML output

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

Screens in SMARTFORMS The screen is divided into three sectionsNavigation window consist of nodes and sub nodes. They contain all the elements (text, window etc) that belong to sap forms Maintenance window shows attributes of the elements Form printer window shows the layout of the page Whenever we create smart forms, SAP creates/generates a function module.Unlike SAPscripts , SAP FORMS allow you to change language.

Compiled By Pankaj Pravin

In the navigation window you will find Global Data Declarations : The Data defined here can be used throughout the smartform for coding purposes. Form Interface : Here all the data which will be passed to the smartform from the Print program is defined. Right-Clicking on the Pages will allow creation of New Page, Window, Graphic or Address. Printing will take place on the basis of next page field. But processing will happen as per the sequence in navigation window!

Miscellaneous Why did u switch to SAP? Ans While pursuing BE I have gone thru a deep study about software market in world. I have found that the future of any software lies in the fact that how it can intergrate with other technologies. Bcos integration is the only process which drives the business in the future. And SAP has the power to integrate people, process and information in an efficient manner. I have also found that more and more companies are implementing SAP to run their enterprise business. More opportunities are rising in ERP Sector.

What will you code in START-OF-SELECTION & END-OF-SELECTON & why? Ans START-OF-SELECTION SELECT * FROM DEPTT INTO CORRESPONDING FIELDS OF ITAB WHERE DEPTNO IN DEPTNO. APPEND ITAB. ENDSELECT. LOOP AT ITAB. WRITE : / 10 ITAB-DEPTNO. HIDE : ITAB-DEPTNO. ENDLOOP. END-OF-SELECTION What are joins and different types joins? Ans There are four types of Joins: 1) Self Join 2) Inner Join 3) Outer Join 4) Equi Join Which is the default join? Ans INNER JOIN What are Extracts?

Compiled By Pankaj Pravin

Ans Extracts are dynamic sequential datasets in which different lines can have different structures. We can access the individual records in an extract dataset using a LOOP. What is get cursor field? Ans GET CURSOR statement transfers the name of the screen element on which the cursor is positioned during a user action into the variable . GET CURSOR FIELD [OFFSET ] [LINE ] [VALUE ] LENGTH ]. What are select options and what is the diff from parameters? ANS:select options provide ranges where as parameters do not. SELECT-OPTIONS declares an internal table which is automatically filled with values or ranges of values entered by the end user. For each SELECT-OPTIONS , the system creates a selection table. SELECT-OPTIONS <SEL> FOR <field>. A selection table is an internal table with fields SIGN, OPTION, LOW and HIGH. The type of LOW and HIGH is the same as that of <field>. The SIGN field can take the following values: I Inclusive (should apply) E Exclusive (should not apply) The OPTION field can take the following values: EQ Equal GT Greater than NE Not equal BT Between LE Less than or equal NB Not between LT Less than CP Contains pattern GE Greater than or equal NP No pattern. diff:PARAMETERS allow users to enter a single value into an internal field within a report. SELECT-OPTIONS allow users to fill an internal table with a range of values. For each PARAMETERS or SELECT-OPTIONS statement you should define text elements by choosing Goto - Text elements - Selection texts - Change. Eg:- Parameters name(30). when the user executes the ABAP/4 program,an input field for 'name' will appear on the selection screen.You can change the comments on the left side of the input fields by using text elements as described in Selection Texts. What is the inside concept in select-options? Ans Select-options specify are displayed on the selection screen for the user to enter values. Different Properties of Select-options: 1) Visible Length 2) Matchcode Object 3) Memory ID 4) Lowercase 5) Obligatory 6) No Display 7) Modify ID What is the difference between Free and Refresh? Ans Free - You can use FREE to initialize an internal table and release its memory space without first using the REFRESH or CLEAR statement. Like REFRESH, FREE works on the table body, not on the table work area. After a FREE statement, you can address the internal table again. It still occupies the amount of memory required for its header (currently 256 bytes). When you refill the table, the system has to allocate new memory space to the lines. Refresh - This always applies to the body of the table. As with the CLEAR statement, the memory used by the table before you initialized it remains allocated. To release the memory space, use the statement Can we have more than one selection-screen and how? Ans Yes, we can have more than one selection screen. Selection-screen begin of block honey with frame title text-101. Select-options : deptno for zrekha_deptt-deptno. Selection-screen end of block honey. Selection-screen begin of block honey1 with frame title text-102. Select-options : dname for zrekha_deptt-dname. Selection-screen end of block honey1. How to declare select-option as a parameter? Ans SELECT-OPTIONS: specify are displayed on the selection screen for the user to enter values. Select-options: dname for dept-dname No Extensions No Intervals.

Compiled By Pankaj Pravin

160) What is CTS and what do you know about it? Ans CTS stands for Correction and Transport System. The CTS provides a range of functions that help you to choose a transport strategy optimally suited to your requirements. We recommend that you follow the transport strategy while you plan and set up your system landscape. Correction and Transport System (CTS) is a tool that helps you to organize development projects in the ABAP Workbench and in Customizing, and then transport the changes between the SAP Systems and clients in your system landscape. This documentation provides you with an overview of how to manage changes with the CTS and essential information on setting up your system and client landscape and deciding on a transport strategy. Read and follow this documentation when planning your development project. For practical information on working with the Correction and Transport System, see Correction and Transport Organizer and Transport Management System. write syntax for Message Error (Report)? Ans AT SELECTION-SCREEN. SELECT * FROM ZREKHA_DEPTT INTO CORRESPONDING FIELDS OF ITAB WHERE DEPTNO IN DEPTNO. ENDSELECT. If SY-DBCNT = 0. MESSAGE E000 WITH NO RECORDS FOUND. ENDIF. How can I copy a standard table to make my own Z_TABLE? Ans Go to transaction SE11. Then there is one option to copy table. Press that button. Enter the name of the standard table and in the Target table enter Z_table name and press enter. What is the table, which contain the details of all the name of the programs and forms? Ans Table contains vertical and horizontal lines. We can store the data in table as blocks. We can scroll depends upon your wish. And these all are stored in database (data dictionary). What are IDOCs? Ans IDOCs are intermediate documents to hold the messages as a container. .

Common Tables used by SAP MM Below are few important Common Tables used in Materials Management Modules: EINA Purchasing Info Record- General Data EINE Purchasing Info Record- Purchasing Organization Data MAKT Material Descriptions MARA General Material Data MARC Plant Data for Material MARD Storage Location Data for Material MAST Material to BOM Link MBEW Material Valuation MKPF Header- Material Document MSEG Document Segment- Material MVER Material Consumption MVKE Sales Data for materials RKPF Document Header- Reservation T023 Mat. groups T024 Purchasing Groups T156 Movement Type T157H Help Texts for Movement Types MOFF Lists what views have not been created A501 Plant/Material EBAN Purchase Requisition EBKN Purchase Requisition Account Assignment EKAB Release Documentation EKBE History per Purchasing Document EKET Scheduling Agreement Schedule Lines EKKN Account Assignment in Purchasing Document EKKO Purchasing Document Header

Compiled By Pankaj Pravin

EKPO Purchasing Document Item IKPF Header- Physical Inventory Document ISEG Physical Inventory Document Items LFA1 Vendor Master (General section) LFB1 Vendor Master (Company Code) NRIV Number range intervals RESB Reservation/dependent requirements T161T Texts for Purchasing Document Types

Following are the list of Important MM tables. Please check if its useful. Inventory Management: |-------------------------+--------+--------------------------------------------------| | | Table | Description | |-------------------------+--------+--------------------------------------------------| | Material | MSEG | Material document / transaction details | | Document/Movements | MKPF | Material document header information | |-------------------------+--------+--------------------------------------------------| | Material Stock Balances | MARD | Material stock | | | MBEW | Material stock with valuation | |-------------------------+--------+--------------------------------------------------| | Sales Order Stock | MSKA | Stock balance with associated sales | | | | order data | |-------------------------+--------+-----------------------------------------| | Stock Transport | EKUB | Index for Stock Transport Orders for | | | MDUB | Material | | | | Reading View of Stock Transport Ord. for| | | | Release Ord. | |-------------------------+--------+-----------------------------------------| | Special Stocks | MKOL | Consignment, material provided to | | | | vendor, etc. | |-------------------------+--------+-----------------------------------------| Material Master Data: |-------------------------+---------+--------------------------------------| | |Table | Description | |-------------------------+---------+--------------------------------------| | Materials | MARA | General Data, material type, group, | | | | configurable & batch ind. | | | MAKT | Short Texts, descriptions | | | MARM | Conversion Factors | | | MVKE | Sales Org, distribution channel | | | MLAN | Sales data, tax indicator, tax | | | MARC | classification | | | MBEW | Plant Planning Data | | | MLGN | Valuation Data | | | MLGT | Warehouse Management Inventory Data | | | MVER | Warehouse Management Storage Type | | | MAPR | Data | | | MARD | Consumption Data | | | MCHA | Pointer for Forecast Data | | | MCHB | Storage location data with stock | | | | balances | | | | Batches | | | | Batch Stocks | |-------------------------+---------+--------------------------------------|

Compiled By Pankaj Pravin