+ All Categories
Home > Documents > SAP Interview Questions

SAP Interview Questions

Date post: 24-Oct-2014
Category:
Upload: yogimishra2004
View: 108 times
Download: 0 times
Share this document with a friend
Popular Tags:
329
SAP Interview Questions Page 1 of 173 Yogesh Mishra ([email protected]) ABAP FAQ’s on Reports / Scripts / BDC / Dialogs ABAP Reporting SAP TERMINOLOGY Master data is a collection of information about a person or an object, e.g. a cost object, vendor, or G/L account. For example, a vendor master record contains not only general information such as the vendor’s name and address, but also specific information, such as payment terms and delivery instructions. Generally for end users, master data is reference data that you will look up and use, but not create or change. Transactional data is data related to a single business event such as a purchase requisition or a request for payment. When you create a requisition, for example, SAP creates an electronic document for that particular transaction. SAP gives the transaction a document number and adds the document to the transaction data that is already in the system. Whenever you complete a transaction in SAP, that is, when you create, change, or print a document in SAP, this document number appears at the bottom of the screen. Workflow A routing tool in SAP that forwards documents for review or approval. For example, a requisition that needs to be approved is sent to the appropriate approver's inbox. Workflow is also used to route journal vouchers, credit card charges, and other documents in SAP. Cost Object: A Cost Object collects expenses and revenues for a particular purpose, such as a research project. In SAP there are three types of cost objects: Cost Center, Internal Order, and WBS (Work Breakdown Structure) Element (see below for definition). Cost Center:
Transcript
Page 1: SAP Interview Questions

SAP Interview Questions Page 1 of 173Yogesh Mishra ([email protected])ABAP FAQ’s on Reports / Scripts / BDC / DialogsABAP Reporting SAP TERMINOLOGYMaster data is a collection of information about a person or an object, e.g. a cost object,vendor, or G/L account. For example, a vendor master record contains not only generalinformation such as the vendor’s name and address, but also specific information, suchas payment terms and delivery instructions. Generally for end users, master data isreference data that you will look up and use, but not create or change.Transactional data is data related to a single business event such as a purchaserequisition or a request for payment. When you create a requisition, for example, SAPcreates an electronic document for that particular transaction. SAP gives the transactiona document number and adds the document to the transaction data that is already in thesystem. Whenever you complete a transaction in SAP, that is, when you create, change,or print a document in SAP, this document number appears at the bottom of the screen.WorkflowA routing tool in SAP that forwards documents for review or approval. For example, arequisition that needs to be approved is sent to the appropriate approver's inbox.Workflow is also used to route journal vouchers, credit card charges, and otherdocuments in SAP.Cost Object:A Cost Object collects expenses and revenues for a particular purpose, such as a researchproject. In SAP there are three types of cost objects: Cost Center, Internal Order, andWBS (Work Breakdown Structure) Element (see below for definition).Cost Center:General or operating Cost Objects are known in SAP as Cost Centers. Cost Centers arebudgeted on the fiscal year.Internal Order:A non-sponsored Cost Object (for example, funding from the MIT Provost) used to trackcosts over periods other than fiscal years. Internal Orders are often created to track giftsor endowments at MIT.WBS Element: WBS Elements are funded by outside sponsors and are used to trackcosts of a particular research project over the entire span of its activity. They may also be

Page 2: SAP Interview Questions

created to track other sponsored activities, such as gifts.G/L Account:G/L accounts are also called Cost Elements in SAP. They are a classification by expenseor revenue type. In the CO (Controlling) module of SAP, the term Cost Element is used.In the FI(Financial) module, the term G/L Account is used. These terms are used interchangeablyfor reporting, requisitions, and journal vouchers.

Page 3: SAP Interview Questions

SAP Interview Questions Page 2 of 173Yogesh Mishra ([email protected]) Database tables and open SQLAdd a single record to a database tableinsert into <database table> values <work area>Inserting all lines from an internal table into a database table:insert <database table> from table <internal table>Delete all recordsSelect * from zmellemtab.delete zmellemtab.endselect.Deleting records using records from an internal tabledelete employees from table itab. Q & ABASIS LAYERWhat are the central interfaces of the R/3 system ?- Presentation interfaceDatabase interfaceOperating system interfaceWhich interface controls what is shown on the p.c. ?- Presentation interfaceWhich interface converts SQL requirements in the SAP developmentsystem to those of the database ?- Database interfaceWhat is SAP dispatcher ?- SAP dispatcher is the control agent which manages theresources for the R/3 applications.What are the functions of dispatcher ?- Equal distribution of transaction load to the work processesManagement of buffer areas in main memoryIntegration of the presentation levelsOrganization of communication activiesWhat is a work process ?

Page 4: SAP Interview Questions

SAP Interview Questions Page 3 of 173Yogesh Mishra ([email protected])- A work process is where individual dialog steps are actually processedand the work is done. Each work process handles one type of request.Name various work processes of R/3 system ?1) Dialog or Online ( processes only one request at a time )2) Background ( started at a specified time )3) Update ( primary or secondary )4) Enque( lock mechanism )5) Spool ( generated online or during back ground processing For printing )What are the types of Update requests ?- An update request can be divided into one primary (V1) and several Secondaryupdate components (V2). Time-critical operations are placed in V1 componentand those whose timing are less critical are placed in V2 components. If a V1update fails, V2 components will not be processed.What are the roll and page areas ?- Roll and page areas are SAP R/3 buffers used to storeuser contexts ( process requests ) . The SAP dispatcher assignsprocess requests to work processes as they are received. Ifthe work process is unavailable the process requests are queued in the rolland page areas.Paging area holds data from the application programs.Roll area holds data from previous dialog steps and data that characterizes user.What is a Spool request ?- Spool requests are generated during dialog or background processing and placedin the spool database with information about the printer and print format. Theactual data is placed in the Tem Se (Temporary Sequential objects).What are the different database integrities ?- Semantic integrity- Relational integrity- Primary key integrity- Value set integrity- Foreign key integrity and- Operational integrity.DATA DICTIONARY .Type of a table or structureThe table type determines how the logical table description defined inthe ABAP/4 Dictionary is reproduced on the database.There are the following table types:o transparent tableo structureo append structure

Page 5: SAP Interview Questions

SAP Interview Questions Page 4 of 173Yogesh Mishra ([email protected])For internal purposes, such as storing control data or update texts,there are in addition the following table types:o pooled tableo cluster tableo generated view structureTransparent tableThere is a physical table on the database for each transparent table. Thenames of the physical tables and the logical table definition in theABAP/4 Dictionary correspond.All business data and application data are stored in transparent tables.StructureNo data records exist in the database for a structure. Structures areused for the interface definition between programs or between screens andprograms.Append structureAn append structure defines a set of fields which belong to another tableor structure but which are treated in the correction administration asits own object.Append structures are used to support modifications.Pooled tablePooled tables can be used to store control data (e.g. screen sequences,program parameters or temporary data). Several pooled tables can becombined to form a table pool. The table pool corresponds to a physicaltable on the database in which all the records of the allocated pooledtables are stored.Cluster tableCluster tables contain continuous text, for example, documentation. Several clustertables can be combined to form a table cluster. Several logical lines of different tablesare combined to form a physical recordin this table type. This permits object-by-object storage orobject-by-object access. In order to combine tables in clusters, at leastparts of the keys must agree. Several cluster tables are stored in onecorresponding table on the database.Generated view structureIn activation a structure is generated for a view. This structure serves as interface forthe runtime environment. It does not generally appear inthe ABAP/4 Dictionary.

Page 6: SAP Interview Questions

SAP Interview Questions Page 5 of 173Yogesh Mishra ([email protected])What is a Data Class?The Data class determines in which tablespace the table is stored when itis created in the database.What is a Size Category?The Size category describes the probable space requirement of the tablein the database.How Many types of size categories and data classes are there?There are five size categories (0-4) and 11 data classes, only three ofwhich are appropriate for application tables:- APPL0 - Master data (data frequently accessed but rarely updated)- APPL1 - Transaction data (data that is changed frequnetly)- APPL2 - Organisational data (customizing data that is entered when system isconfigured and then rarely changed)What are control tables?The values specified for the size category and data class are mapped todatabase-specific values via control tables.What is the function of the transport system and workbench organiser?The function of the transport system and the Workbench Organizer is tomanage any changes made to objects of the ABAP/4 Development Workbenchand to transport these changes between different SAP systems.What is a table pool?A table pool (or pool) is used to combine several logical tables in theABAP/4 Dictionary. The definition of a pool consists of at least two keyfields and a long argument field (VARDATA).What are pooled tables?These are logical tables which must be assigned to a table pool when theyare defined. Pooled tables can be used to store control data (such asscreen sequences or program parameters).What is a table cluster?A table cluster combines several logical tables in the ABAP/4 Dictionary.Several logical rows from different cluster tables are brought togetherin a single physical record. The records from the cluster tablesassigned to a cluster are thus stored in a single common table in thedatabase.Which objects are independent transport objects?Domains, Data elements, Tables, Technical settings for tables,Secondary indexes for transparent tables, Structures, Views,Matchcode objects, Matchcode IDs, Lock objects.

Page 7: SAP Interview Questions

SAP Interview Questions Page 6 of 173Yogesh Mishra ([email protected])What are the Data types of the external layer?ACCP, CHAR, CLNT, CUKY,CURR, DATS, DEC, FLTP, INT1,INT2, INT4, LANG,LCHR,LRAW, NUMC, PREC, QUAN,RAW ,TIMS, UNIT, VARC.What are the Data types of the ABAP/4 layer?Possible ABAP/4 data types:C: Character.D: Date, format YYYYMMDD.F: Floating-point number in DOUBLE PRECISION (8 bytes).I: Integer.N: Numerical character string of arbitrary length.P: Amount or counter field (packed; implementation depends on hardwareplatform).S: Time stamp YYYYMMDDHHMMSS.T: Time of day HHMMSS.V: Character string of variable length, length is given in the firsttwo bytes.X: Hexadecimal (binary) storage.How can we set the tablespaces and extent sizes ?You can specify the extent sizes and the tablespace (physical storagearea in the database) in which a transparent table is to be stored bysetting the size category and data class.What is a data dictionary ?Data dictionary is a central source of data in a data management system. Its mainfunction is to support the .It has details about- What data is contained ?- What are the attributes of the data ?- What is the relationship existing between the various data elements ?What functions does a data dictionary perform ?In a data management system, the principal functions performed by the datadictionary are- Management of data definitions- Provision of information for evaluation- Support for software development- Support form documentation- Ensuring that the data definitions are flexible and up-to-date.A field containing currency amounts (data type CURR) must be assigned toa reference table and a reference field. Explain.As a reference table, a system table containing all the valid currencies is assigned or anyother table which contains a field with the currency key format. This field is called asreference field.The assignment of the field containing currency amounts to the reference field is made atruntime. The value in the reference field determines the currency of the amount.

Page 8: SAP Interview Questions

SAP Interview Questions Page 7 of 173Yogesh Mishra ([email protected])What is the significance of Technical settings (specified while creating atable in the data dictionary) ?By specifying technical settings we can control how database tables are created in thedatabase.The technical settings allows us to- optimize storage space requiremnets- table access behaviour- buffering required- changes to entries loggedWhat is the significance of Delivery Class ?- The delivery class controls the degree to which the SAP or the customer isresponsible for table maintenance- whether SAP provides the table with or without contents.- determines the table type.- determines how the table behaves when it is first installed, at upgrade, when itis transported, and when a client copy is performed.What is the maximum number of structures that can be included in a tableor structure- Nine.What are the two methods of modifying Sap standard tables ?- Append Structures and- Customizing Includes.What is the difference between a Substructure and an Append Structure ?- In case of a substructure, the reference originates in the table itself, in the formaof a statement .include... .- In case of an append structure, the table itself remains unchanged and therefrence originates in the append structure.What are the two ways for restricting the value range for a domain ?- By specifying fixed values.- By stipulating a value table.What is a Match Code ?Match Code is a tool to help us to search for data records in the system. Match codes arean efficient and user-friendly search aid where key of a record is unknown.What are the two levels in defining a Match Code ?- Match Code object- Match Code Id.What is the maximum number of match code Id's that can be defined forone Match code object ?- 36. A match code Id is a one character ID which can be a letter or a number.

Page 9: SAP Interview Questions

SAP Interview Questions Page 8 of 173Yogesh Mishra ([email protected])Can we define our own Match Code ID's for SAP Matchcodes ?Yes, the numbers 0 to 9 are reserved for us to create our own Match Code IDs for a SAPdefined Matchcode object.What is an Update type with reference to a Match code ID?If the data in one of the base tables of a matchcode ID changes, the matchcode data hasto be updated. The update type stipulates when the matchcode is to be updated and howit is to be done. The update type also specifies which method is to be used for Buildingmatchcodes . You must specify the update type when you define a matchcode ID.What are conversion routines ?- Non standard conversions from display format to sap internal format and viceversaare implemented with so called conversion routines.Aggregated ObjectsViews, matchcodes, and lock objects are also called aggregate objects because they areformed from several related tables.What is a View ?- A view is a logical view on one or more tables. A view on one or more tables i.e, thedata from a view is not actually physically stored instead being derived from one ormore tables. A view can be used to summarize data which is distributed amongseveral tablesHow many types of Views are there ?- Database View (SE11)Database views are implement an inner join, that is, only records of the primary table(selected via the join operation) for which the corresponding records of thesecondary tables also exist are fetched. Inconsistencies between primary andsecondary table could, therefore, lead to a reduced selection set.In database views, the join conditions can be formulated using equality relationshipsbetween any base fields. In the other types of view, they must be taken from existingforeign keys. That is, tables can only be collected in a maintenance or help view ifthey are linked to one another via foreign keys.- Help View ( SE54)Help views are used to output additional information when the online help system iscalled.When the F4 button is pressed for a screen field, a check is first made on whether amatchcode is defined for this field. If this is not the case, the help view is displayed inwhich the check table of the field is the primary table. Thus, for each table no more

Page 10: SAP Interview Questions
Page 11: SAP Interview Questions

SAP Interview Questions Page 9 of 173Yogesh Mishra ([email protected])than one help view can be created, that is, a table can only be primary table in atmost one help view.- Projection ViewProjection views are used to suppress or mask certain fields in a table (projection),thus minimizing the number of interfaces. This means that only the data that isactually required is exchanged when the database is accessed.A projection view can draw upon only one table. Selection conditions cannot bespecified for projection views.- Maintenance View ( SE54 )Maintenance views enable a business-oriented approach to looking at data, while atthe same time, making it possible to maintain the data involved. Data from severaltables can be summarized in a maintenance view and maintained collectively via thisview. That is, the data is entered via the view and then distributed to the underlyingtables by the system.What is Locking ?- When two users simultaneously attempt to access the same data record, this issynchronised by a lock mechanism.When dialog transactions are programmed, locks are set and released by calling certainfunction modules. These function modules are generated automatically from thedefinition of so-called lock objects in the ABAP/4 Dictionary.To synchronize the access to a table by setting and removing locks, a Lock object has tobe defined in the ABAP/4 Dictionary. Activating the lock object automatically createsfunction modules for setting and removing locks. These function modules must beincluded when programming interactive transactions.Lock Mechanism :To set locks, a lock object must be defined in the ABAP/4 Dictionary. In this lock object,those tables in which data records are to be locked by calling a lock are determined. Alltables included in a lock object must be connected to each other via foreign keys. Thekey fields of the tables in a lock object form the Lock arguments for the tables. The lockarguments are the basis for formulating the logical condition for identifying the recordsto be locked.When activating this lock object, two function modulesB with the namesENQUEUE_<Object_name> and DEQUEUE_<Object_name> are generated.Example :Problem :

Page 12: SAP Interview Questions

SAP Interview Questions Page 10 of 173Yogesh Mishra ([email protected])You wish to prevent a user from being able to change the name of a course or the nameof the professor with responsibility for the course at a time when another user is editingthe course description (which contains this information).Solution :The problem described above can be solved by defining a lock object E_UKURS. This isdone by defining primary and secondary tables in the lock object. Table UKURS is checktable of table UKRSB, so UKURS should be selected as primary table and UKRSB assecondary table of the lock object.The Lock argument in this case is the field combination FABNR, KRSNR, and SPRAS(i.e Primary Key Combination).The Lock mode Shared is to be selected here. This allows several users to access thedata simultaneously in display mode.The lock mode in the generated function modules for setting (ENQUEUE_E_UKURS)and releasing (DEQUEUE_E_UKURS) locks is therefore set to shared as default, butcan be overridden by calling the function modules.If the function module ENQUEUE_E_UKURS is called with FABNR = '1' and KRSNR ='3', the record for course 3 in faculty 1 is locked in table UKURS. Furthermore, all thecourse descriptions for this course are locked in table UKRSB since field SPRAS was notspecified when the function module was called. In such cases, the lock is madegenerically for a field which is not defined.If the function module DEQUEUE_E_UKURS is now called with FABNR = '1', KRSNR= '3' and SPRAS = 'D', the German course description is unlocked. All other coursedescriptions remain locked.What is database utility ?- Database utility is the interface between the ABAP/4 Dictionary and theunderlying the SAP system.The database utility is the interface between the ABAP/4 Dictionary and the relationaldatabase underlying the SAP system. You can call the database utility from the initialscreen of the ABAP/4 Dictionary with Utilities ® Database utility.The database utility allows you to create, delete and convert objects from the ABAP/4Dictionary in the database.MODULARIZATION

Page 13: SAP Interview Questions

What is Modularization and its benefits?If the program contains the same or similar blocks of statements or it is required toprocess the same function several times, we can avoid redundancy by usingmodularization techniques. By modularizing the ABAP/4 programs we make them easyto read and improve their structure. Modularized programs are also easier to maintainand to update.

Page 14: SAP Interview Questions

SAP Interview Questions Page 11 of 173Yogesh Mishra ([email protected])How can we create callable modules of program code within one ABAP/4Program?A. By defining macros.B. By creating include programs in the library.What are subroutines?Subroutines are program modules which can be called from other ABAP/4 programs orwithin the same program.What are the types of Subroutines?A. Internal Subroutines: The source code of the internal subroutines will be in thesame ABAP/4 program as the calling procedure (internal call).B. External Subroutines: The source code of the external subroutines will be in anABAP/4 program other than the calling procedure.What are the different types of parameters?Formal parameters: Parameters which are defined during the definition of subroutinewith the FORM statement.Actual parameters: Parameters which are specified during the call of a subroutine withthe PERFORM statement.How can one distinguish between different kinds of parameters?A. Input parameters are used to pass data to subroutines.B. Output parameters are used to pass data from subroutines.What are the different methods of passing data?A. Calling by reference: During a subroutine call, only the address of the actualparameter is transferred to the formal parameters. The formal parameter has nomemory of its own, and we work with the field of the calling program within thesubroutine. If we change the formal parameter, the field contents in the callingprogram also change.B. Calling by value: During a subroutine call, the formal parameters are created ascopies of the actual parameters. The formal parameters have memory of theirown. Changes to the formal parameters have no effect on the actual parameters.C. Calling by value and result: During a subroutine call, the formal parameters arecreated as copies of the actual parameters. The formal parameters have their ownmemory space. Changes to the formal parameters are copied to the actualparameters at the end of the subroutine.The method by which internal tables are passed is By Reference.What is the difference between the function module and a normal ABAP/4subroutine?In contrast to normal subroutines function modules have uniquely defined interface.Sub routines do not return values.

Page 15: SAP Interview Questions

SAP Interview Questions Page 12 of 173Yogesh Mishra ([email protected])Sub routines do not return exceptions.Sub routines cannot be tested independently.Declaring data as common parts is not possible for function modules. Function modulesare stored in a central library.What is a function group?A function group is a collection of logically related modules that share global data witheach other. All the modules in the group are included in the same main program. Whenan ABAP/4 program contains a CALL FUNCTION statement, the system loads the entirefunction group in with the program code at runtime. Every function module belongs to afunction group.What is the difference between internal tables and extract datasets?A. The lines of an internal table always have the same structure. By using extractdatasets, you can handle groups of data with different structure and get statisticalfigures from the grouped data.B. You have to define the structure of the internal table at the begining. You neednot define the structure of the extract dataset.C. In contrast to internal tables, the system partly compresses extract datasets whenstoring them. This reduces the storage space required.D. Internal tables require special work area for interface whereas extract datasets donot need a special work area for interface.LOGICAL DATABASE.What are logical databases? What are the advantages/disadvantages oflogical databases?Ans :- A Logical Database is a hierarchical structure of tables. Use the GET statement toprocess Logical Databases.- LDB consists of logically related tables grouped together – used for reading andprocessing data.- Advantages = 1. No need of programming for retrieval , meaning for data selection- 2. Easy to use standard user interface, have check completeness of userinput.Disadvantages = 1. Fast in case of lesser no. of tables But if the table is in the lowest levelof hierarchy, all upper level tables should be read so performance is slower.Preparation of the data records by the L.D.B and reading of the datarecords in the actual report are accomplished with the command pair.- Put and Get.The three main elements of LDB are- Structure, Selections, Database Program.What sort of tables one can use in designing the hierarchy of a LDB ?

Page 16: SAP Interview Questions

- Tables which are having Foreign key relations.

Page 17: SAP Interview Questions

SAP Interview Questions Page 13 of 173Yogesh Mishra ([email protected])The structure of Logical Databases relfects the ________________dependencies of hierarchical tables in the SAP System.- Foreign keyIf you want to improve the response time ( time to access data ) LogicalDataBases permits you to achieve this using ______________- VIEWS.What are the advantages of Logical DataBases ?- It offers an easy-to-use selection screen. Youcan modify the pre-generated selection screen to your needs. Itoffers check functions to check whether user input is complete, correct, andplausible. Itoffers reasonable data selections. Itcontains central authorization checks for database accesses.Enhancements such as improved performance immediately apply to all reportprograms that use the logical database.Report FORMATTINGIn order to suppress the leading zeros of a number field the keywords usedare :NO-ZERO.The Command that allows for vertical alignment of fields one below theother.UNDER.In order to concatenate strings only for output purposes the command_________ can be used in conjunction with the 'Write' statement.NO-GAP.Data can be moved from one field to another using a 'Write:' Statement andstored in the desired format.TRUE. Write : Date_1 to Date_2 format DD/MM/YY.In order to have boldfaced text as output the command used isWrite : <f> INTENSIFIED.Background and foreground colors can be interchanged using the commandFormat inverse.Which datatype cannot be used to define parameters.Type F.For each new event, the system resets all formatting options to their defaultvalues. TRUE.

Page 18: SAP Interview Questions

SAP Interview Questions Page 14 of 173Yogesh Mishra ([email protected])The processing block following END-OF-PAGE is processed only if youreserve lines for the footer in the LINE-COUNT option of the REPORTstatement.To execute a page break under the condition that less than a certain numberof lines is left on a page is acheived by ________________________.RESERVE n lines.What is the limit for the length of a page if the page length is not specified inthe report statement.60,000 Lines.How can Symbols or R/3 icons be output on the screen?WRITE <symbol-name> AS SYMBOL.WRITE <icon-name> AS ICON.REPORTING - GENERALWhat are reports? and how do you set up reports?A report program reads and analyzes data from one or more database tables withoutmodifying the database. Usually, the result of such a report program is in the form of alist which is output to the screen or sent to a printer.What are the different types of programs?I Include ProgramM Module PoolF Function ModulesS External Subroutines1 Online programEvents in Reporting ? Explain ?The following events occur at runtime of a typical report program which uses logicaldatabases:Event keyword Event--------------------------------------------------------------------------------------------------INITIALIZATION Point before the selection screenis displayedWhen you start a program in which a selection screen is defined (either in the programitself or in the linked logical database program), the system normally processes thisselection screen first. If you want to execute a processing block before the selectionscreen is processed, you can assign it to the event keyword INITIALIZATION.

Page 19: SAP Interview Questions

SAP Interview Questions Page 15 of 173Yogesh Mishra ([email protected])AT SELECTION-SCREEN Point after processing userinput on the selection screenwhile the selection screen isstill activeThe event keyword AT SELECTION-SCREEN provides you with several possibilities tocarry out processing blocks while the system is processing the selection screen.START-OF-SELECTION Point after processing the selectionscreenThe event START-OF-SELECTION gives you the possibility of creating a processingblock after processing the selection screen and before accessing database tables using alogical database. You can use this processing block, for example, to set the values ofinternal fields or to write informational statements onto the output screen.At the START-OF-SELECTION event, also all statements are processed that are notattached to an event keyword except those that are written behind a FORM-ENDFORMblockGET <table> Point at which the logical databaseoffers a line of the database table<table>.The most important event for report programs with an attached logical database is themoment at which the logical database program has read a line from a database table (seeAccessing Data Using Logical Databases ). To start a processing block at this event, usethe GET statement as follows:SyntaxGET <table> [FIELDS <list>].After this statement, you can work with the current line of the database table <table>.The data is provided in the table work area <table>.GET <table> LATE Point after processing all tables whichare hierarchically subordinate to thedatabase table <table> in the structure ofthe logical database.To start a processing block at the moment after the system has processed all databasetables of a logical database that are hierarchically inferior to a specific database table, usethe event keyword GET as follows:SyntaxGET <table> LATE [FIELDS <list>].In analogy to report programs that use only SELECT statements (see table inComparison of Access Methods ), the processing block of a GET <table> LATE statement

Page 20: SAP Interview Questions
Page 21: SAP Interview Questions

SAP Interview Questions Page 16 of 173Yogesh Mishra ([email protected])would appear directly before the ENDSELECT statement in the SELECT loop for thedatabase table <table>.END-OF-SELECTION Point after processing all lines offeredby the logical database.To define a processing block after the system has read and processed all database tablesof a logical database, use the keyword END-OF-SELECTION.The following events occur during the processing of the output list of a report program:Event keyword Event--------------------------------------------------------------------------------------------------TOP-OF-PAGE Point during list processing whena new page is startedEND-OF-PAGE Point during list processing when a pageis endedThe following events occur during the display of the output list of a report program:Event keyword Event----------------------------------------------------------------------------------------------------AT LINE-SELECTION Point at which the user selects a lineAT USER-COMMAND Point at which the user presses afunction key or enters a command in thecommand field.AT PF<nn> Point at which the user presses thefunction key with the function codePF<n>With the selection screen, ABAP/4 offers an interactive element also for reportprograms. You can define a selection screen without having to bother about all thedetails required in dialog programming.The selection screen is always processed directly after a report program is started. Theuser can enter field values and selection criteria on this screen.The main purpose of the selection screen is to enable the user to control the databaseselections of the report program. If a report program is started from another ABAP/4program with the SUBMIT statement (see Calling Reports), the selection screen objectsalso serve as a data interface,With a selection screen defined in the report program, you can enable the user to· assign values to variables with the PARAMETERS statement· determine selection criteria with the SELECT-OPTIONS statementHow do you read selected lines of database table into an internal table inpackages of predefined size.

Page 22: SAP Interview Questions

SAP Interview Questions Page 17 of 173Yogesh Mishra ([email protected]) SELECT * FROM <SPFLI> INTO TABLE <ITAB> PACKAGE SIZE <N>.where 'n' is variable.Name the WILDCARD characters which are used for comparisions with characterstrings & numeric strings. '%' and '_'.How to specify a client for database table processing.TABLES SPFLI.SELECT * FROM SPFLI CLIENT SPECIFIEDWHERE MANDT BETWEEN '001' AND '003'....ENDSELECT.Activation – During activation, the runtime object of aggregate object or tables iscreated. The runtime object is buffered so that the application program can access itquickly. Runtime object has information about the following objects of table- domain – data elements – field definition – table definitionLock Mechanism – prevents a new database operation being started an existing onehas been correctly completed. When conversion is done, lock is created automaticallyand released only when conversion is successful.Clearing of locks– restart adjustment – attempt is made to continue conversion at the point ofterminationCancel adjustment – lock entry is simply deleted from tableVersion Management functions –- Canceling changes – reset revised version to active version- Storing changes – active version will be temporarily stored in versionSwitching changes – switch between active and revised versionsVersion catalog – list of all existing versions of an object- Revised version – produced when we edit an existing object- Active version – produced when we activate an object- Temporary version – produced when we copy the active version temporarily to thedatabase with store version functions- Historical versions – created when 1. Correction is created 2 correction isreleasedTable Buffering : Possible buffering types- full buffering – either, whole table or none of the table is located in the buffer (Tablesup to 30 kb done in client dependent fully buffered tables)- Generic buffering – generic areas of the table are fully buffered.- Generic key – left justified section of primary key of a table.

Page 23: SAP Interview Questions

SAP Interview Questions Page 18 of 173Yogesh Mishra ([email protected])- generic area – all records for which fields of generic key correspond- Single record buffering – records actually being accessed are loaded to buffers, largerecords where few records are accessed.Internal Tables ? Types ?STANDARD tableKey access to a standard table uses a linear search. This means that the time required fora search is in linear relation to the number of table entries.You should use index operations to access standard tables.SORTED tableDefines the table as one that is always saved correctly sorted.Key access to a sorted table uses a binary key. If the key is not unique, the system takesthe entry with the lowest index. The runtime required for key access is logarithmicallyrelated to the number of table entries.HASHED tableDefines the table as one that is managed with an internal hash procedureYou can only access a hashed table using the generic key operations or other genericoperations ( SORT, LOOP, and so on). Explicit or implicit index operations (such asLOOP ... FROM oe INSERT itab within a LOOP) are not allowed.INDEX tableA table that can be accessed using an index.Index table is only used to specify the type of generic parameters in a FORM orFUNCTION. That means that you can't create a table of type INDEX.Standard tables and sorted tables are index tables.Syntax :DATA itab TYPE table type of line type [WITH UNIQUE/NON-UNIQUE KEY <key>][Iinitial size n] [WITH HEADER LINE]What are DATA CLUSTERS ?You can group any complex internal data objects of an ABAP/4 program together in dataclusters and store them temporarily in ABAP/4 memory or for longer periods indatabases. You can store data clusters in special databases of the ABAP/4 Dictionary.These databases are known as ABAP/4 cluster databases and have a predefinedstructure.Storing a data cluster is specific to ABAP/4. Although you can also access

Page 24: SAP Interview Questions

SAP Interview Questions Page 19 of 173Yogesh Mishra ([email protected])cluster databases using SQL statements, only ABAP/4 statements are able to decode thestructure of the stored data cluster.Describe the functions of the debugger screen.- Single step(F5) - Use this option to step through the program statement bystatement. This allows you to branch into subroutines and function modules, and toexecute these routines step by step as well. Once a subroutine or function module hasbeen processed, control returns to the statement following the CALL FUNCTION orPERFORM statement.- Execute(F6)- Use this option to process a program line by line. All of thestatements on the current line are processed in a single step. If you are positioned ona line that calls a subroutine and you choose Execute, the Debugger processes thewhole subroutine and then moves on to the line following the subroutine call. Thisallows you to jump through the statements within the subroutine.- Return(F7) - The Debugger returns from a routine to the point at which controlreturns to the main program. Use this option to return from a subroutine, functionmodule, or called program to the calling program.- Continue(F8)- Use this option to process the program up to the next dynamic orstatic breakpoint or up to the cursor position. If there are no more breakpoints in theprogram and no cursor has been set, the system exits debugging mode and executesthe rest of the program normally.- Tables - Display the contents of internal tables.Problem:How to run a program in background?Solution :Execute the Report In the selection screen :After filling the screen fields press F9.A screen appears requesting U to print the Background Parameters*Enter the output device(Eg HPLJ /SAP2 etc)*In the spool options Uncheck Print immedietly,Uncheck delete after output,and newspool request.Press enter.Another screen appears with heading start time .U can press start immly ,then saveNow the Background job is scheduled for the given program .To View the status of background Job,The transaction code is SM37.Execute from the resulting screen .Job overview -->From the Job list select U’rprogram and select Spool from the application toolbarOutput Controller :List ofSpool RequestsSelect U’r Spool request and click Display icon from the overviewscreen .U will be displayed with the List.Caution :See to that the list with does not exceed 255 columns ,If it exceeds the extra

Page 25: SAP Interview Questions

columns will be truncated in BackgroundWhat are presentation and application servers in SAP?A presentation server is actually a program named Sapgui.exe. It is usually installedon a user’s workstation.Application server is a set of executables that collectively interpret the ABAP/4programs and manage the input & output for them.

Page 26: SAP Interview Questions

SAP Interview Questions Page 20 of 173Yogesh Mishra ([email protected])In an ABAP/4 program how do you access data that exists on apresentation server v/s on an application server?For presentation server use UPLOAD or WS_UPLOAD function modules.For application server use OPEN DATASET, READ DATASET and CLOSE DATASETcommands.Describe the syntax and function of the AUTHORITY CHECK command?Ans :- AUTHORITY – CHECK OBJECT <object name>ID <name1> FIELD <f1>ID <name2> FIELD <f2>…IF SY-SUBRC NE 0.The AUTHORITY-CHECK checks whether a user has the appropriate authorization toexecute a particular activity.Explain the EXPORT and IMPORT commands? How can you pass more thanone group of data by using IMPORT commands?EXPORT :-To read data objects from an ABAP program into ABAP memory, use the followingstatement:SyntaxEXPORT <f1> [FROM <g 1>] <f 2> [FROM <g 2>] ... TO MEMORY ID <key>.This statement stores the data objects specified in the list as a cluster in memory. If youdo not use the option FROM <f i >, the data object <f i > is saved under its own name. Ifyou use the FROM <g i > option, the data objet <g i > is saved under the name <f i >. Thename <key> identifies the cluster in memory. It may be up to 32 characters long.The EXPORT statement always completely overwrites the contents of any existing datacluster with the same name <key>.IMPORT :-To read data objects from ABAP memory into an ABAP program, use the followingstatement:SyntaxIMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID <key>.This statement reads the data objects specified in the list from a cluster in memory. Ifyou do not use the TO <g i > option, the data object <f i > in memory is assigned to thedata object in the program with the same name. If you do use the option, the data object<f i > is read from memory into the field <g i >. The name <key> identifies the cluster inmemory. It may be up to 32 characters long.You do not have to read all of the objects stored under a particular name <key>. You can

Page 27: SAP Interview Questions

restrict the number of objects by specifying their names. If the memory does not containany objects under the name <key>, SY-SUBRC is set to 4. If, on the other hand, there is a

Page 28: SAP Interview Questions

SAP Interview Questions Page 21 of 173Yogesh Mishra ([email protected])data cluster in memory with the name <key>, SY-SUBRC is always 0, regardless ofwhether it contained the data object <f i >. If the cluster does not contain the data object<f i >, the target field remains unchanged.Explain the READ LINE and MODIFY LINE commands.READ LINE :- Use the statements READ LINE and READ CURRENT LINE to read datafrom the lines of existing list levels. These statements are closely connected to the HIDEtechnique.MODIFY LINE :- To modify the lines of a completed list from within the program, usethe MODIFY LINE statement.What are the differences between calling a program, transaction ‘withreturn’ and ‘without return’ and how can each be accomplished? Program-SUBMIT <rep>|(<field>) [AND RETURN] [<options>].If you use AND RETURN, the system stores the data of the calling executable programand returns to the calling after processing the called program. The system resumesexecuting the calling program at the statement following the call.If you omit the AND RETURN addition, all data and list levels of the calling program(the entire internal session) are deleted. After the called executable program hasfinished, control returns to the level from which you started the calling program. Transaction-CALL TRANSACTION <tcod> [AND SKIP FIRST SCREEN] [USING <itab>].This statement saves the data of the calling program, and starts transaction <tcod>. Atthe end of the transaction, the system returns to the statement following the call in thecalling report.-LEAVE TO TRANSACTION <tcod> [AND SKIP FIRST SCREEN].This statement ends the calling program and starts transaction <tcod>. This deletes thecall stack (internal sessions) of all previous programs. At the end of the transaction, thesystem returns to the area menu from which the original program in the call stack wasstarted.What are the differences between the parameter SET and GET?SET PARAMETER ID <pid> FIELD <f>.This statement saves the contents of field <f> under the ID <pid> in the SAP memory.The code <pid> can be up to 20 characters long. If there was already a value storedunder <pid>, this statement overwrites it. If the ID <pid> does not exist, double-click

Page 29: SAP Interview Questions

<pid> in the ABAP Editor to create a new parameter object.GET PARAMETER ID <pid> FIELD <f>.This statement fills the value stored under the ID <pid> into the variable <f>. If thesystem does not find a value for <pid> in the SAP memory, it sets SY-SUBRC to 4,otherwise to 0.WHAT are the commands that allow you to process sequential file? Andwhat is their syntax? READ DATASET (reading) and TRANSFER (writing)

Page 30: SAP Interview Questions

SAP Interview Questions Page 22 of 173Yogesh Mishra ([email protected]) OPEN DTASET <dataset name> for <input output appending> in <binary text >mode at POSITION <position> MESSAGE <field> READ DATASET <dataset name > INTO <field> CLOSE DATASET <dataset name> DELETE DATASET <dataset name>TRANSFER <field> to <dataset name>What is the difference between opening a dataset for input, output,appending? FOR OUTPUTOpens the file for writing if exists it is overwritten if not then it is created. FOR INPUTOpens an existing file for reading. FOR APPENDINGOpens the file for writing at the end of the file .If it does not exist, it iscreated, if opened, you return to the end.When an internal table is created, the settings criteria for the value ofoccurs?The objective of setting the value of an occurs for an internal table is a question ofoptimization. The following facts should be taken into account when making suchdecision.1) The complete data area of a program is 64000 bytes.2) The initial size declared is kept in roll area (quicker access to program)3) Data entered that exceeds the initial size stores in the roll file (Slower access toprogram)You should also analyze the expected volume and access rates before making thedecision.Define "Check " statements, how it works?To terminate a single loop pass conditionally, use the CHECK <condition> statement inthe statement block of the loop.If the condition is not true, any remaining statements in the current statement blockafter the CHECK statement are ignored, and the next loop pass starts. <condition> canbe any logical expression.Explain Field Group(extract dataset)?An extract dataset consists of a sequence of records. These records may have differentstructures. All records with the same structure form a record type. You must define eachrecord type of an extract dataset as a field group, using the FIELD-GROUPS statement.FIELD-GROUPS <fg>.This statement defines a field group <fg>. A field group combines several fields underone name. For clarity, you should declare your field groups at the end of the declarationpart of your program.

Page 31: SAP Interview Questions
Page 32: SAP Interview Questions

SAP Interview Questions Page 23 of 173Yogesh Mishra ([email protected])A field group does not reserve storage space for the fields, but contains pointers toexisting fields. When filling the extract dataset with records, these pointers determinethe contents of the stored records.What is the difference between Move & assign statement?Move :- To assign the value of a data object <f1> to a variable <f2>, use the followingstatement:MOVE <f1> TO <f2>.or the equivalent statement<f2> = <f1>.The contents of <f1> remain unchanged. <f1> does not have to be a variable - it can alsobe a literal, a text symbol, or a constant. You must always specify decimal points with aperiod (.), regardless of the user’s personal settings.Multiple value assignments in the form<f4> = <f3> = <f2> = <f1>.Assign :- ASSIGN <f> TO <FS>.When you assign the data object, the system checks whether the technical attributes ofthe data object <f> correspond to any type specifications for the field symbol <FS>. Thefield symbol adopts any generic attributes of <f> that are not contained in its own typespecification. Following the assignment, it points to <f> in memory.How do you run a report for a row in table?Using Graphics Multiplexer. There is an option some thing similar to screen capturewhich captures data only. Using that data you can draw graphs (3D and 2D). This optionis available all the time from Menu! -> Generate Graphics which captures the data thenyou need to drag and select the data you want to draw a graph on. Once you select youcan click on Graphics, which launches graphics multiplexer.

Page 33: SAP Interview Questions

SAP Interview Questions Page 24 of 173Yogesh Mishra ([email protected])Memory ManagementSAP memory (Global Memory): - is available to a user during the entire duration ofa terminal session. Its contents are retained across transaction boundaries as wellas external and internal sessions.External session: - when user logs on to R/3 system, the system creates a newterminal session called external session. E.g. System Create Session.Internal session: - created by calling a transaction (with CALL TRANSACTION), adialog module (with CALL DIALOG) or a report (with SUBMIT or RETURN).For external session: - internal sessions are allowed.Roll area: - Data areas of used programs are created in roll areas for each internalsession.Posting data between internal sessions: - EXPORT TO MEMORY and IMPORTFROM MEMORY.Main program group: - Created when exporting an internal session.Additional program group: - If a function module belonging to a function group notso far loaded, additional program group is created.Subroutine call: - When external subroutine is called, system loads the relevantprogram and adds it to the program group of calling program.Work areas: - Both table & common workareas with the same name are createdonce for each program group and then shared by all programs in the group.List system: - Consists of basic list and all details list belonging to basic listassigned to exactly one screen level.User interface: - Only program has its own user interface. Internal sessionsinterface is initially empty. Special user interface has to be activated using SET PFSTATUSstatement.ABAP/4 memory: - Retained only during the lifetime of an external session.Data cluster: - Group of several data objects.Data objects: - Units of data, which a program processes at runtime.How do you write a DATA object from ABAP/4 program to ABAP/4 memoryand restore the same from memory to program.EXPORT <f1> [FROM <g1>] <f2> [FROM <g2>] ... TO MEMORY ID <key>.The ID <key>, which can be up to 32 characters long, identifies the data in memory.Statement used to delete data objects in ABAP/4 memory. FREE MEMORY [ID <key>].How will you create a file on application server Open dataset <dsn> for output.ABAP/4 statement for opening a file on application server for reading___________. Open dataset <dsn> for input.How will you transfer data into a file in application server ? Data fname(60) value 'mYFILE'.Data num type i.Open dataset fname for output.Do 10 times.

Page 34: SAP Interview Questions

SAP Interview Questions Page 25 of 173Yogesh Mishra ([email protected])Num = Num + 1.Transfer num to fname.Enddo......etc.Name the function modules to write data from an Internal Table to thePresentation Server.DOWNLOAD and WS_DOWNLOAD.Name the function modules to read data from Presentation Server into anInternal Table.UPLOAD and WS_UPLOAD.Name the function module that can be used to give information about fileson Presentation Server and about it's Operating System.WS_QUERY.Name the ABAP/4 key word for seaching a string in an Internal Table.SEARCH <itab> FOR <str> <options>.How would you find the attributes of a data type or data object ?DESCRIBE FIELD <f> [LENGTH <l>] [TYPE <t> [COMPONENTS <n>]][OUTPUT-LENGTH <o>] [DECIMALS <d>][EDIT MASK <m>].Which function module would you use to check the user's authorization toaccess files before opening a file?AUTHORITY_CHECK_DATASETName the function module used to convert logical file names to physical filenames in ABAP/4 programs.FILE_GET_NAME.What does CHAIN ....END CHAIN do?Sometimes you want to check several fields as a group. To do this, include the fields in aFIELD statement, and enclose everything in a CHAIN-ENDCHAIN block.Example**** Screen flow logic: ****CHAIN.FIELD: SPFLI-CARRID, SPFLI-CONNID.MODULE CHECK_FLIGHT.ENDCHAIN.When an error is found inside a chain, the screen is re-displayed, and all fields foundanywhere in the chain are input-enabled. All non-chain fields remain disabled.

Page 35: SAP Interview Questions

SAP Interview Questions Page 26 of 173Yogesh Mishra ([email protected])What does an extract statement do in the ABAP program?Fills the fields groups with values.What happens when a table is activated in DD?-A table definition is generated- Map to the database system-For each table, a table of the same name with the same fields andcorresponding data type is created in database. – Primaryindex is generated automaticallyWhat is a check table and what is a value table?- When we define a foreign key in a table (A). If this key refers to primary key ofanother table (B). Table B is check tableFields referring to a domain may assume values contained in thecorresponding fields of the value table. Field referring to the domainshould have a foreign keyWhat is CTS and What do you know about it? [ CTS is Correction andTransport Systems ]- Correction system manages the internal system components like objects like onlyoriginal version of the object exists. It stores all changes made to the object.- Transport system allows to transports the object from on SAP system to another(Development system to Production system). It allows to over write or delete existingobject in target system and import new objects to target systems.During development work we start by opening a task (correction) towhich we can assign new and changed objects. Once changes havebeen made, transport new or changed objects to other SAP system bymeans of transport (Change) request.Have you used SAP supplied programs to load master data?- SAP supplied BDC programs – RM06BBI0 (Purchase requisitions)- RMDATIND (Material master) RFBIKR00 (Vendor Masters)- RFBIDE00 (Customer Master) RVINVB00 (Sales Order)What are the Techniques involved in using SAP supplied programs? Do youprefer to write your own programs to load master data? Why?- Identify relevant fields- Maintain transfer structure ( Predefined – first one is always session record)- Session record structure , Header Data, Item ( STYPE – record type )- Fields in session structure – STYPE, GROUP , MANDT, USERNAME , NO DATA- Fields in header structure – consists of transaction code also – STYPE, BMM00,TCODE,MATNR and Fields in Item - ITEMS …- Maintain transfer file – sample data set creationHow do you set up background jobs in SAP? What are the steps? What areevents driven batch jobs?

Page 36: SAP Interview Questions

SAP Interview Questions Page 27 of 173Yogesh Mishra ([email protected])- Create a job using function module JOB-OPEN- Collect the job specifications.- Add a job step to the job with the function module JOB-SUBMIT.- Close the job and pass it to Background processing system for execution with thefunction module JOB-CLOSE- EVENT DRIVEN BATCH JOBS :-- Types = System events – triggered when activation of new operation mode takesplace- User events - Triggered from ABAP/4 or external program.- Triggering an event notifies the background processing that named condition hasbeen reached. The Background system reacts by starting any jobs that were waitingfor the event.Transaction codes related to background jobs creation and processing are :-SM36(Job creation)SM37(Job selection and execution).What are presentation and application servers in SAP?-A presentation server is actually a program named Sapgui.exe. It is usually installed ona user’s workstation.- Application server is a set of executables that collectively interpret the ABAP/4programs and manage the input & output for them.In an ABAP/4 program how do you access data that exists on a presentationserver v/s on an application server?- For presentation server use UPLOAD or WS_UPLOAD function modules.For application server use OPEN DATASET, READ DATASET and CLOSE DATASETcommands.What is the difference between Synchronous and Asynchronous updates ?- A program asks the system to perform a certain task, and then either waits ordoesn't wait for the task to finish. In synchronous processing, the program waits:control returns to the program only when the task has been completed. Inasynchronous processing, the program does not wait: the system returns controlafter merely logging the request for execution.Transferring SPA/GPA Parameters to TransactionsTo fill the input fields of a called transaction with data from the calling program, you canuse the SPA/GPA technique. SPA/GPA parameters are values that the system stores inthe global, user-related SAP memory. You use the SAP memory to transfer valuesbetween programs beyond the borders of transactions. A user can access the valuesstored in the SAP memory during one terminal session for all modes used in parallel.To fill an SPA/GPA parameter, use:SyntaxSET PARAMETER ID <pid> FIELD <f>.To read an SPA/GPA parameter into an ABAP program, use:Syntax

Page 37: SAP Interview Questions
Page 38: SAP Interview Questions

SAP Interview Questions Page 28 of 173Yogesh Mishra ([email protected])GET PARAMETER ID <pid> FIELD <f>.What is the difference between Commit-Work and Rollback-Work tasks ?- Commit-Work statement “performs” many functions relevant to synchronizedexecution of tasks. Rollback-Work statement “cancels” all requests relevant tosynchronized execution of tasks.What are the different database integrities ?- Semantic integrity- Relational integrity- Primary key integrity- Value set integrity- Foreign key integrity and- Operational integrity.What is SAP locking ?- It is a mechanism for defining and applying logical locks to database objects.What does a lock object involve ?- The tables- The lock argument.What are the different kinds of lock modes ?- Shared lock- Exclusive lock- Extended exclusive list.How can a lock object be called in the transaction ?- By calling Enqueue <lock object> and Dequeue <lock object> in thetransaction.What are the events by which we can program “help texts” and display“possible values lists” ?- PROCESS ON HELP-REQUEST (POH)- PROCESS ON VALUE-REQUEST (POV).What are function modules ? Types of parameters ?- Function modules are general-purpose library routines that are available systemwide.- In general, function module can have four types of parameters:- EXPORTING: for passing data to the called function- IMPORTING: for receiving data returned from the function module- TABLES: for passing internal tables only, by reference (that is, by address)- CHANGING: for passing parameters to and from the functionHow to send a report to the printer instead of displaying it on the screen ?

Page 39: SAP Interview Questions

SAP Interview Questions Page 29 of 173Yogesh Mishra ([email protected])- We can send a report to the printer instead of displaying it on the screen. To dothis, use the keywords TO SAP-SPOOL:SUBMIT RSFLFIND ... TO SAP-SPOOL DESTINATION 'LT50'.How can we send data to external programs ?- Using SPA/GPA parameters (SAP memory)- Using EXPORT/IMPORT data (ABAP/4 memory)What are the differences between SELECT-OPTIONS,VARIANTS ANDPARAMETERS?To enter values for variables on the selection screen, you must define the variables usingthe PARAMETERS statement.To enter a range of values for the variables on the selection screen we use SELECTOPTIONSstatement.If you want to run the same report program with the same selections at regular intervals(for example, for monthly sales statistics), In, ABAP/4 offers you combine the desiredvalues for all these selections in one selection set. Such a selection set is called aVARIANTS.What is SPA / GPA ? When do you use it?To fill the input fields of a called transaction with data from the report, you can use theSPA/GPA technique. SPA/GPA parameters are values that the system stores in theglobal, user-related SAP memory. You use the SAP memory to transfer values betweenprograms. A user can access the values stored in the SAP memory during one terminalsession for all modes used in parallel.Usually, the input fields on the initial screen of a transaction are connected to SPA/GPAparameters. If you fill these parameters from within your program before calling thetransaction, the system fills the input fields with the corresponding values.Why and how do you display a message? What are the message types?An ABAP/4 module lets the system know that an error has occurred by issuinginformation,error or warning messages. you can also use success messages when aparticular action is performed successfully. When the user presses ENTER, the currentprocess is interrupted. The system returns the user to the SAP main menu using Abendmessage.Message is displayed using MESSAGE Xnnn, where X is the type of the message and nnnis the number of the message.You have to declare the Id of the message class in the program usingMESSAGE-ID cc,where cc is the message class.How and where do You create Message class?

Page 40: SAP Interview Questions

You can create a message class from two places in the system:1) From an Object class object list (in the Object Browser)2) From an ABAP/4 module (in the ABAP/4 editor)What do you define in the Data element and Domain?For Data Element

Page 41: SAP Interview Questions

SAP Interview Questions Page 30 of 173Yogesh Mishra ([email protected])The information includes the field's representation on the screen in the form of FIELDTEXTS, COLUMN CAPTIONS in list outputs of the table contents and the format of theoutput via PARAMETER IDS and Online field documentation.For DomainData Type,Field Length and the allowed data values are defined .What is the difference between a pool table and a transparent table?Transparent Table :A tran table has a one to one relataionship in the database. The table in thedictionary has the same name, same no of fields, and the fields have the same name as inthe R3 table defn. A transparent tabel has application data (Master and Transaction).Pooled Table :A pool table has many to one relation with the table in the database. For onetable in the database there r many tables in the dictionary. Tha table in the database hasa diff name than in the table in the data dict, it has diff no of fields and field names aredifferent. A pooled table is stored in the pool at the database level. A table poo is adatabse table with a special struct that enables the data of many R3 tables to be stored init. It can hold only pooled tables.What are field symbols and field groups? Have you used component idx ofstructure with field groups?A field symbol does not physically reserve space for a field, but points to a field which isnot known until runtime of the program. Field symbols are comparable to the concept ofpointers as used in the programming language C.An extract dataset consists of a sequence of records. These records may have differentstructures. All records with the same structure form a record type. You must define eachrecord type of an extract dataset as a field group, using the FIELD-GROUPS statement.What is the step by step process to create a table in data dictionary?1. Selecting the table fields2. Maintaining foreign keys3. Creating secondary indexes (optional)4. Maintaining technical settings5. Activating a tableWhat is the advantage of structures and how do you use them in Abap/4programs?A structure is defined in the ABAP/4 Dictionary like a table and can be accessed fromABAP/4 programs. Any change to the definition of the structure in the ABAP/4

Page 42: SAP Interview Questions

Dictionary is automatically implemented in all programs.While data in tables is stored permanently in the database, structures contain data only

Page 43: SAP Interview Questions

SAP Interview Questions Page 31 of 173Yogesh Mishra ([email protected])during the runtime of a program.Structures are used in abap/4 programs to transfer data between programs as it isglobally defined.Structures are used in particular for defining data at the interfacebetween module pools and screens and for standardizing parameters for functionmodules.What does an extract statement do in the Abap/4 program?With the first EXTRACT statement of a report, the system creates the extract dataset andadds the first extract record. With each subsequent EXTRACT statement, the systemadds another extract record to the extract dataset.What is a collect statement and how is it different from the appendstatement?To fill an internal table with lines which have unique standard keys, we use theCOLLECT statement.If an entry with the same key already exists, the COLLECT statement does not append anew line as APPEND statement, but adds the contents of the numeric fields in the workarea to the contents of the numeric fields in the existing entry.What is an open SQL vs Native SQL.Open SQL allows you to access all database tables known to the SAP system, regardlessof the database manufacturer. Sometimes, however, we may want to use databasespecificSQL statements called Native SQL in your ABAP/4 program.To avoid incompatibilities between different database tables and also to make ABAP/4programs independent of the database system in use, SAP has created a set of separateSQL statements called Open SQL. Open SQL contains a subset of standard SQLstatements as well as some enhancements which are specific to SAP.A database interface translates SAP's Open SQL statements into SQL commands specificto the database in use. Native SQL statements access the database directly.What does an EXEC SQL statement do in ABAP? What is the disadvantage ofusing it?To use a Native SQL statement, it must be preceded by an EXEC SQL statement andconcluded by an ENDEXEC statement.An ABAP/4 program with Native SQL statements does not generally run with differentdatabases.What are the events used in ABAP4?The events are INITIALIZATION AT SELECTION-SCREEN

Page 44: SAP Interview Questions

AT SELECTION-SCREEN ON <field> START-OF-SELECTION TOP-OF-PAGE TOP-OF-PAGE DURING LINE SELECTION END-OF-PAGE END-OF-SELECTION

Page 45: SAP Interview Questions

SAP Interview Questions Page 32 of 173Yogesh Mishra ([email protected]) AT USER-COMMAND AT LINE-SELECTION AT PF<NN> GET GET LATE. AT User CommandWhat is an interactive reports ? What is the obvious difference of suchreports with HTML type reports?Interactive reporting allows the user to participate actively in retrieving and presentingdata during the session. Instead of one extensive and detailed list, with interactivereporting you create a condensed basic list from which the user can call detailedinformation by positioning the cursor and entering commands. Interactive reportingthus reduces information retrieval to the data actually required.Detailed information is presented in secondary lists. A secondary list may either overlaythe basic list completely or appear in an additional dialog window on the same screen.The secondary list can itself be interactive again.Apart from creating secondary lists, interactive reporting also allows to call transactionsor other reports from lists. These programs then use values displayed in the list as inputvalues. The user can, for example, call a transaction from within a list to change thedatabase table whose data is displayed in the list.What happens when a table is activated in DD?When the table is activated, a physical table definition in the database is added to thetable definition stored in the ABAP/4 Dictionary. The database-independent tabledefinition from the ABAP/4 Dictionary is translated into a definition of the relevantdatabase.What is a check table and What is a value table?The relational data model contains not only tables, but also relationships between tables.These relationships are defined in the ABAP/4 Dictionary by foreign keys. An importantfunction of foreign keys is to support data integrity in the relational data model. Foreignkey fields may assume only those values allowed by the check table, in other words,values occurring in the primary key of the check table.A foreign key provides a link between two tables, for eg.,T1 and T2 by including areference in table T1 to the primary key of table T2. For this purpose, Foreign key fieldsassigned to the primary key fields of T2 are included in T1. Table T1, which is the one

Page 46: SAP Interview Questions

being checked, is called a foreign key table, and table T2 is called a check table. Theterms dependent (foreign key) table and referenced (check) table are also used.VALUE TABLE:If the domain of the check field has a value table, this is proposed by thesystem as check table in the foreign field maintenance. The key fields of the value tableare in this case assigned fields of the foreign key table with the same domain. Thesefields may assume only those values allowed by the value table.The value range of the domain can be defined by specifying value table.All table fieldsreferring to this domain can then be checked against the corresponding field of this valuetable.In order the check can be executed, a foreign key must be defined for the valuetable.

Page 47: SAP Interview Questions

SAP Interview Questions Page 33 of 173Yogesh Mishra ([email protected])What are matchcodes? Describe?A matchcode is a tool to search for data records in the system. Matchcodes are anefficient and user-friendly search aid for cases where the key of a record is unknown.It consists of two stages one is Match code object and the other is Matchcode ID.A matchcode object describes the set of all possible search paths for a search term.Matchcode ID describes a special search path for a search term.What are ranges? What are number ranges?It is often necessary to directly access individual records in a data structure. This is doneusing unique keys. Number ranges are used to assign numbers to individual databaserecords for a commercial object, to complete the key. Such numbers are e.g. ordernumbers or material master numbers.How do you validate the selection criteria of a report? And how do youdisplay initial values in a selection screen?The selection criteria is validated in the processing block of the AT SELECTION SCREENevent for the input values on the screen and respective messages can be sent.To display initial values in the selection screen: Use INITIALIZATION EVENT Use DEFAULT VALUE option of PARAMETERS Statement Use SPA/GPA Parameters (PIDs).What is the Client concept in SAP? What is the meaning of Clientindependent?In commercial, organizational and technical terms, the client is a self contained unit inthe R3 system, with separate set of Master data and its own set of Tables.When a change is made in one client all other clients are affected in the system - this typeof objects are called Client independent objects.What is Internal table?Internal tables are table objects that only exist for the runtime of the program.There are several ABAP statements for working with internal tables, for example,append, insert, delete, or find lines.The number of lines of an internal table is extended dynamically at runtime as required.You can use internal tables for table calculations on subsets of database tables. Forexample, you can read a part of one or more database tables into an internal table.They also allow you to reorganize their contents to suit the needs of your program. Youcan, for example, read particular entries from one or more large customer tables into aninternal table, and then use them to create a list. When you run your program, you canaccess this data directly, instead of having to search for each record in the database.

Page 48: SAP Interview Questions

SAP Interview Questions Page 34 of 173Yogesh Mishra ([email protected])What is a variant and where do you use it?If you want to run a report program with same selections at regular intervals (forexample, for monthly sales statistics), you would not want to enter the same values eachtime. So, ABAP/4 offers you a possibility to combine the desired values for all theseselections in one selection set. You can create as many different selection sets as you likefor each report program and they remain assigned only to the report program inquestion. Such a selection set is called a variant.Using Variants OnlineUsing Variants in Background ProcessingOnline, starting a report via variant saves the user work,minimizes input errors. Inbackground processing, a variant is the only possibility you have to pass values for theselections.To fill certain selections with values that change according to the application, you use avariant, which takes the variable values from Table TVARV.What is set parameter and get parameter?We can pass data to a called program using SPA/GPA parameters. SPA/GPAparameters are field values saved globally in memory. Each parameter is identified by athree-character code: you can define these parameters in the object browser by selectingOther objects on the first screen. The SPA/GPA storage is user-specific and validthroughout all the user's sessions.by using the SET PARAMETER or GET PARAMETERstatementsThese statements let you store and retrieve SPA/GPA values from an ABAP/4 program.If the selection screens for the two transactions do not share the same required fields,use these statements to store screen fields explicitly by name.Before calling the new transaction from a PAI module, store the caller transaction's fieldsunder one name:SET PARAMETER ID 'RID' FIELD <FIELD NAME1>.The system stores the value in <field name1> in the SPA parameter 'RID'. The threecharacteridentifier 'RID' must be defined in the SAP table TPARA. If the SPA parameter'RID' already contains a value, the SET PARAMETER statement overwrites it (with thecontents of <FIELD NAME1>).In the PBO module for the called transaction, retrieve the fields under the other name:GET PARAMTER ID 'RID' FIELD <FIELD NAME2>.What is field symbol?A field symbol does not physically reserve space for a field, but points to a field

Page 49: SAP Interview Questions

which is not known until runtime of the program. Sometimes you only know which fieldyou want to process, and how you want to process it, at runtime.For this purpose, you can create field symbols in your program. At runtime, you canassign real fields to such field symbols. All operations which you have programmed withthe field symbol are then carried out with the assigned field. After successful assignment,

Page 50: SAP Interview Questions

SAP Interview Questions Page 35 of 173Yogesh Mishra ([email protected])there is no difference in ABAP/4 whether you reference the field symbol or the fielditself.How to use a grid list?Use Function Module Display_*LIST. In U’r program .Put all the data that U want tooutput in its final format and then pass this internal table to the function moduleTwo types of grid list .DISPLAY_GRID_LIST(Version 4.0b)DISPLAY_BASIC_LIST(Version 4.6b)Calculate the subtotal etc and save it as a variant ,However while printing it will printall the enties of the fieldsHow to pass data from the form to the Subroutine program?Use structure ITCSYHow can we pass selection and parameter data to a report ?- There are three options for passing selection and parameter data to the report.. using SUBMIT...WITH. using a report variant. using a RANGE tableStandard Programs that every ABAPer Shud KnowRSAVGL00 Table adjustment across clientsRSBDCSUB Release batch-input sessions automatically RSCLTCOP Copytables across clientsRSINCL00 Extended program listRSORAREL Get the Oracle ReleaseRSPARAM Display all instance parametersRSTXSCRP Transport SAPscript files across systemsRGUGBR00 Substitution/Validation utilityRSUSR003 Check the passwords of users SAP* and DDIC in all clientsRSUSR006 List users last loginRSTXLDMC To Load LOGO’s to application server Interactive ReportingInteractive reporting allows the user to participate actively in retrieving and presentingdata during the session. Instead of one extensive and detailed list, with interactivereporting you create a condensed basic list from which the user can call detailedinformation by positioning the cursor and entering commands. Interactive reportingthus reduces information retrieval to the data actually required.What are the event key words in interactive reporting ?Event keyword EventAT LINE-SELECTION Moment at which the user selects a line bydouble-clicking on it or by positioning the

Page 51: SAP Interview Questions

SAP Interview Questions Page 36 of 173Yogesh Mishra ([email protected])cursor on it and pressing F2.AT USER-COMMAND Moment at which the user presses afunction key.TOP-OF-PAGE DURING LINESELECTIONMoment during list processing of asecondary list at which a new page starts.What is secondary list ?Secondary lists allow you to enhance the information presented in the basic list. The usercan, for example, select a line of the basic list for which he wants to see more detailedinformation. You display these details on a secondary list.Secondary lists may eitheroverlay the basic list completely or you can display them in an extra window on thescreen. The secondary lists can themselves be interactive again.How to select valid lines for secondary list ?To prevent the user from selecting invalid lines, ABAP/4 offers several possibilities. Atthe end of the processing block END-OF-SELECTION, delete the contents of one ormore fields you previously stored for valid lines using the HIDE statement. At the eventAT LINE-SELECTION, check whether the work area is initial or whether the HIDEstatement stored field contents there. In the latter case, create a secondary list, since youpreviously stored field contents for valid lines only. After processing the secondary list,clear the work area again. This prevents the user from trying to create further secondarylists from the secondary list displayed.How to create user interfaces for lists ?The R/3 system automatically generates a graphical user interface (GUI) for your liststhat offers the basic functions for list processing, such as saving or printing the list. Ifyou want to include additional functionality, such as pushbuttons, you must define yourown interface status.To create a new status, the Development Workbench offers theMenu Painter. With the Menu Painter,you can create menus and applicationtoolbars.And you can assign Function keys to certain functions. At the beginning of thestatement block of AT END-OF-SELECTION, activate the status of the basic list usingthe statement: SET PF-STATUS 'STATUS'.Can we call reports and transactions from interactive reporting lists ?YES.Interactive reporting also allows you to call transactions or other reports from lists.

Page 52: SAP Interview Questions

These programs then use values displayed in the list as input values.The user can, forexample, call a transaction from within a list to change the database table whose data isdisplayed in the list.How to maintain lists ?To return from a high list level to the next-lower level (SY-LSIND), the user chooses Backon a secondary list.The system then releases the currently displayed list and activates thelist created one step earlier.The system deletes the contents of the released list.Toexplicitly specify the list level into which you want to place output, set the SY-LSINDfield. The system accepts only index values which correspond to existing list levels.It

Page 53: SAP Interview Questions

SAP Interview Questions Page 37 of 173Yogesh Mishra ([email protected])then deletes all existing list levels whose index is greater or equal to the index youspecify.For example, if you set SY-LSIND to 0, the system deletes all secondary lists andoverwrites the basic list with the current secondary list.What are the page headers for secondary lists?On secondary lists, the system does not display a standard page header and it does nottrigger the event TOP-OF-PAGE.To create page headers for secondary list, you mustenhance TOP-OF-PAGE:Syntax TOP-OF-PAGE DURING LINE-SELECTION. The system triggers this event foreach secondary list. If you want to create different page headers for different list levels,you must program the processing block of this event accordingly, for example by usingsystem fields such as SY-LSIND or SY-PFKEY in control statements (IF, CASE).What is meant by stacked list ?A Stacked list is nothing but secondary list and is displayed on a full-size screen unlessyou have specified its coordinates using the window command.Is the basic list deleted when the new list is created?NO.It is not deleted and you can return back to it using one of the standard navigationfunctions like clicking on the back button or the cancel button.What is meant by hotspots ?Hotspot is a list area where the mouse pointer appears as an upright hand symbol.Whena user points to that area(and the hand cursor is active),a single-click does the samething as a double-click. Hotspots are supported from R/3 release 3.0c.In which system field does the name of current gui status is there ?The name of the current GUI STATUS is available in the system field SY-PFKEY.What is meant by hide area ?The hide command temporarily stores the contents of the field at the current line in asystem-controlled memory called the HIDE AREA.At an interactive event,the contents ofthe field is restored from the HIDE AREA. When calling a secondary list from a list linefor which the HIDE fields are stored, the system fills the stored values back into thevariables in the program. In the program code, insert the HIDE statement directly afterthe WRITE statement for the current line.When the get cursor command used in interactive lists ?If the hidden information is not sufficient to uniquely identify the selected line ,the

Page 54: SAP Interview Questions

command GET CURSOR is used.The GET CURSOR command returns the name of thefield at the cursor position in a field specified after the addition field,and the value of theselected field in a field specified after value.How to pass data from list to report ?ABAP/4 provides three ways of passing data:---Passing data automatically using system fields---Using statements in the program to fetch data

Page 55: SAP Interview Questions

SAP Interview Questions Page 38 of 173Yogesh Mishra ([email protected])---Passing list attributesHow to call other programs ?Report TransactionCall and return SUBMIT AND RETURN CALL TRANSACTIONCall withoutreturnSUBMIT LEAVE TO TRANSACTIONSystem fields used in interactive ReportingThe SY-LSIND system field contains the index of the list currently created. Whilecreating a basic list, SY-LSIND equals 0.With each interactive event, the system automatically sets the following system fields:System field InformationSY-LINCT total line count of a listSY-LINNO current line no where cursor is placed.SY-LSIND Index of the list currently created during the current event (basic list = 0)SY-LISTI Index of the list level from which the event was triggeredSY-LILLI Absolute number of the line from which the event was triggeredSY-LISEL Contents of the line from which the event was triggeredSY-CUROW Position of the line in the window from which the event was triggered(counting starts with 1)SY-CUCOL Position of the column in the window from which the event was triggered(counting starts with 2)SY-UCOMM Function code that triggered the eventSY-PFKEY Always contains the status of the current list.TOP-OF-PAGE DURING LINE-SELECTION.The system triggers this event for each secondary list. If you want to create different pageheaders for different list levels, you must program the processing block of this eventaccordingly, for example by using system fields such as SY-LSIND or SY-PFKEY incontrol statements (IF, CASE).

Page 56: SAP Interview Questions

SAP Interview Questions Page 39 of 173Yogesh Mishra ([email protected]) Data from System Fields of Interactive ListsFrom system fields, you retrieve the following information: the index of a list, theposition of the list in the output window, and the location of the cursor. The only systemfield that contains the contents of the selected line is SY-LISEL. Passing Data by Program StatementsTo pass individual output fields or additional information from a line to thecorresponding processing block during an interactive event, use these statements:HIDEThe HIDE statement is one of the fundamental statements for interactive reporting.Using the HIDE technique, you can at the moment you create a list level define, whichinformation later to pass to the subsequent secondary lists.Syntax HIDE <f>.Eg HIDE: SPFLI-CARRID, SPFLI-CONNID, NUM.READ LINEUse the statements READ LINE and READ CURRENT LINE to explicitly read data fromthe lines of existing list levels. These statements are tightly connected to the HIDEtechnique.Syntax :READ LINE <lin> [INDEX <idx>][FIELD VALUE <f1> [INTO <g 1>]... <f n> [INTO <g n>]][OF CURRENT PAGE|OF PAGE <p>].Eg :READ LINE SY-INDEX FIELD VALUE BOX.GET CURSORUse the statements GET CURSOR FIELD and GET CURSOR LINE to pass the outputfield or output line on which the cursor was positioned during the interactive event to theprocessing block.SyntaxGET CURSOR FIELD <f> [OFFSET <off>] [LINE <lin>][VALUE <val>] [LENGTH <len>].SET CURSORTo set the cursor, use the SET CURSOR statement. This statement sets the cursor in the

Page 57: SAP Interview Questions

SAP Interview Questions Page 40 of 173Yogesh Mishra ([email protected])most recently created list. While creating the basic list, this is always the basic list itself.While creating a secondary list, this is the previous list.SET CURSOR <col> <lin>.This statement sets the cursor to column <col> of line <lin> of the output window.Calling ProgramsIf you need to program an extensive application, one single program will become verycomplex. To make the program easier to read, it is often reasonable to divide therequired functions among several programs.ABAP allows you to call reports as well as transactions using these statements:Report TransactionCall without return SUBMIT LEAVE TO TRANSACTIONCall and return SUBMIT AND RETURN CALL TRANSACTIONTypical Structure of ABAP Program1. Report Definitions *2. Table and Data definitions *3. Initialization event4. Screen Select Options/Inputs *5. Selection-screen event6. Start-of-selection event7. Performs and other Events *Statements8. End-of-selection event1. Initialization Triggered prior to first display of selection screen To specify Default value in SELECT-OPTIONS

Page 58: SAP Interview Questions

SAP Interview Questions Page 41 of 173Yogesh Mishra ([email protected])2. At Selection-Screen Processed after the selection screen value are entered For validation of screen accepts Returns back to SELECT-OPTIONS4. START-OF-SELECTION & END-OF-SELECTION This is implicit in any ABAP/4 program Start & end of main processing logic More in use with logical database access All Statements between START-OF-SELECTION and END-OF-ELECTION isonly executed By Default , no need to have END-OF-SELECTION Each procedural statement in an ABAP program automatically belongs toSTART-OF-SELECTION5. Form Event Similar to PERFORM/SUBROUTINES STARTS with FORM and ends with ENDFORM All statements between ENDFORM and end of program are never processed Similarly all statements between ENDFORM and event keyword are neverprocessed.6. Limitations of Simple PERFORM Values can be passed through PERFORM to FORM. Giving the flexibility to use the same subroutine multiple number of times.Syntax1: PERFORM <XXXX> using <YYY>changing <MMM>FORM <XXXX> using <YYY> like <ZZZ>changing <MMM> like <NNN> - Pass by referenceOR

Page 59: SAP Interview Questions

SAP Interview Questions Page 42 of 173Yogesh Mishra ([email protected])FORM <XXXX> using value (YYY) like <ZZZ> - Pass by value, createsanother copy of the variable.Example1:PERFORM date-invert using in-dateChanging out-dateFORM date-invert using in-date like datumSyntax2: PERFORM function-name(program) IF FOUND.Example2: PERFORM HEADER(FORMPOOL) IF FOUND.6. Get event GET < table name > Reads data of all columns from all database table falling in the hierarchy Needs to mention table name inTABLES: parameters……… Only fields part of the tables mentioned in the TABLES: parameter can beviewed & edited7. To Exit from an Event Exit – It exits from the respective subroutine were this syntax is used ,generally condition for the EXIT is stated before this syntax Check - here the conditional check is done at the same time .CHECK <condition>If the condition is not satisfied, the system leaves the subroutine and resumesthe processing after the PERFORM statement Stop – it is the abrupt stopping the program flow8. CALLing Functional ModulesSyntax:CALL FUNCTION <module>[EXPORTING f1 = a1 .... fn = an][IMPORTING f1 = a1 .... fn = an]

Page 60: SAP Interview Questions

SAP Interview Questions Page 43 of 173Yogesh Mishra ([email protected])[CHANGING f1 = a1 .... fn = an][TABLES f1 = a1 .... fn = an][EXCEPTIONS e1 = r1 .... en = rnExample:CALL FUNCTION 'Z_DATE_CONVERSION'EXPORTING STD_DATE = GEN_DATEIMPORTING CH_DATE = NEW_DATE9. List EventsTOP-Of-PAGE, END-OF-PAGE,AT LINE-SELECTION, AT USER-COMMANDThese events are triggered by the ABAP runtime environment while a list isbeing created or when a user performs an action on a list. The statement inthese blocks can format the list or process the user’s request.ABAP PERFORMANCE ISSUES.ABAP/4 Optimization Use the GET RUN TIME command to help evaluate performance. It's hard to knowwhether that optimization technique REALLY helps unless you test it out. Using thistool can help you know what is effective, under what kinds of conditions. The GETRUN TIME has problems under multiple CPUs, so you should use it to test smallpieces of your program, rather than the whole program. Avoid 'SELECT *', especially in tables that have a lot of fields. Use SELECT A B CINTO instead, so that fields are only read if they are used. This can make a very bigdifference. Field-groups can be useful for multi-level sorting and displaying. However, theywrite their data to the system's paging space, rather than to memory (internal tablesuse memory). For this reason, field-groups are only appropriate for processing largelists (e.g. over 50,000 records). If you have large lists, you should work with thesystems administrator to decide the maximum amount of RAM your program shoulduse, and from that, calculate how much space your lists will use. Then you can decidewhether to write the data to memory or swap space. See the Fieldgroups ABAPexample. Use as many table keys as possible in the WHERE part of your select statements. Whenever possible, design the program to access a relatively constant number ofrecords (for instance, if you only access the transactions for one month, then there

Page 61: SAP Interview Questions

SAP Interview Questions Page 44 of 173Yogesh Mishra ([email protected])probably will be a reasonable range, like 1200-1800, for the number of transactionsinputted within that month). Then use a SELECT A B C INTO TABLE ITABstatement. Get a good idea of how many records you will be accessing. Log into your productivesystem, and use SE80 -> Dictionary Objects (press Edit), enter the table name youwant to see, and press Display. Go To Utilities -> Table Contents to query the tablecontents and see the number of records. This is extremely useful in optimizing aprogram's memory allocation. Try to make the user interface such that the program gradually unfolds moreinformation to the user, rather than giving a huge list of information all at once to theuser. Declare your internal tables using OCCURS NUM_RECS, where NUM_RECS is thenumber of records you expect to be accessing. If the number of records exceedsNUM_RECS, the data will be kept in swap space (not memory). Use SELECT A B C INTO TABLE ITAB whenever possible. This will read all of therecords into the itab in one operation, rather than repeated operations that resultfrom a SELECT A B C INTO ITAB... ENDSELECT statement. Make sure that ITAB isdeclared with OCCURS NUM_RECS, where NUM_RECS is the number of recordsyou expect to access. Many tables contain totals fields (such as monthly expense totals). Use these avoidwasting resources by calculating a total that has already been calculated and stored. Program Analysis UtilityTo determine the usage of variables and subroutines within a program, you can use theABAP utility called ‘Program Analysis’ included in transaction SE38. To do so, executetransaction SE38, enter your program name, then use the path Utilities -> ProgramAnalysisABAP PERFORMANCE IMPROVEMENTS VIA DATA DICTIONARY INDEX CREATION SUGGESTIONS RELATED TO DATABASE PERFORMANCE· The columns at the beginning of an index are the most “common”. The most“common” columns are those where reports are selecting columns with no ranges - thewhere clause for these columns is an “equal to” expression. Rearrange columns of anindex to match the selection criteria. For example, if a select statement is written toinclude columns 1 and 2 with “equal to” expressions in the where clause and column 3

Page 62: SAP Interview Questions

and 4 are selected with value ranges, then the index should be created with columns inthe sequence of 1,2,3,4.· Columns towards the end of the index are either infrequently used in selects or arepart of reporting selects that involve ranges of values. TABLE TYPE SUGGESTIONS RELATED TO DATABASE PERFORMANCE

Page 63: SAP Interview Questions

SAP Interview Questions Page 45 of 173Yogesh Mishra ([email protected])· Use VIEW tables to effectively join and “denormalize” related tables that are takinglarge amounts of time to select for reporting. For example, at times where highlyaccessed tables normalize description text into one table and the header data intoanother table, it may make sense to create a view table that joins the relevant fields of thetwo associated with a poor performing ABAP. For POOL tables that contain large amounts of data and are highly accessed, convertthe pooled table into a transparent table and add an index. POOLED tables aresupposed to be collections of smaller tables that are quickly accessed from thedatabase or are completely buffered in memory. Pooled tables containing more thana few hundred rows and are accessed many times in a report or transaction arecandidates for POOL to TRANSPARENT Conversion. For example, table A053contains tax jurisdiction condition information and are accessed morethan ten times in the sales order create transaction. If the entire UnitedStates tax codes are loaded into these condition tables, the time to save asales order increases to unacceptable levels. Converting the taxcondition table to transparent and creating an index based upon the keyfields, decreases processing time from minutes to seconds.· Do not allow the use of LIKE in an SAP SQL statement accessing a large table.· Use internal tables in ABAPs to preselect values once and store values in memoryfor sorting and searching purposes (this is an assumption stated at the beginning of thisdiscussion).· Avoid logical databases when not processing all row s of a table. In fact, a logicaldatabase is merely a group of nested SAP SQL SELECT statements. In general, whenprocessing a small number of rows in a larger table is required, the use of internal tablesand NOT using a logical database or nested selects will be much better for performance.ABAP IMPORTANT REPORTS RSBDCBTCSubmit a BDC job with an internal batch number and wait for the end of the batch inputsession. RSBDCSUBRelease batch input sessions automaticallyABAP IMPORTANT TCODESOSS1 SAP Online Service SystemSM13 Update monitor. Will show update tasks status. Very useful to determine why anupdate failed.S001 ABAP Development WorkbenchSE01 Old Transport & Corrections screenSE10 New Transport & Correction screen

Page 64: SAP Interview Questions
Page 65: SAP Interview Questions

SAP Interview Questions Page 46 of 173Yogesh Mishra ([email protected])SE09 Workbench OrganizerSE16 Data Browser: Initial Screen.SE30 ABAP/4 Runtime AnalysisSE36 ABAP/4: Logical DatabasesSE37 ABAP/4 Function ModulesSE38 ABAP EditorSE39 Splitscreen Editor: Program CompareSE41 Menu PainterSE51 Screen Painter: Initial Screen.SE71 SAPscript layout setSE80 ABAP/4 Development Workbench Object BrowserSM12 Lock table entries (unlock locked tables)SM21 View the system log, very useful when you get a short dump. Provides muchmore info than short dumpSM35 View Batch Input SessionsSQ00 ABAP/4 Query: Start QueriesBDC1What should be the approach for writing a BDC program?Ans.: 1. Analysis the Data. 2. Generate SAP structure. 3. Develop transferprogram 4. Create sequential file. 5. Create batch input program. 6. Processbatch input data

Page 66: SAP Interview Questions

SAP Interview Questions Page 47 of 173Yogesh Mishra ([email protected])What is the alternative to batch input session?Ans. : Call transaction & call dialog2What are the steps in a BDC session ?The first step in a BDC session is to identify the screens of the transaction that theprogram will process. Next step is to write a program to build the BDC table that willbe used to submit the data to SAP. The final step is to submit the BDC table to thesystem in the batch mode or as a single transaction by the CALL TRANSACTIONcommand.3 What are the problems in processing batch input sessions? How is batchinput process different from processing on line?Ans.: Sessions cannot be run in parallel and not fast.4 What do you do when the system crashes in the middle of a BDC batchsession?-Check no. of records already updated and delete them from input file and run BDCagain.5 What do you do with errors in BDC batch session?-Analysis and correct input file format and entries in internal table BDCDATA.6 WHAT are the commands that allow you to process sequential file? Andwhat is their syntax?Ans :- READ DATASET (reading) and TRANSFER (writing) OPEN DTASET <dataset name> for <input output appending> in <binary text >mode at POSITION <position> MESSAGE <field> READ DATASET <dataset name > INTO <field> CLOSE DATASET <dataset name> DELETE DATASET <dataset name>TRANSFER <field> to <dataset name>7 What is the process for transferring data from legacy system to SAP?Ans :- FTP file transfer, Manufacturer –specific field transfer NFS(network filesystem)/BDC.8 Explain the process to transfer a record to a dataset?Ans :- TRANSFER <field> to <dataset name>.9 Why batch input?Ans :- To input a large amount of information at off peak times.10 Can data be put directly into the database?Ans :- No, only after the data has been entered via transaction.11 Explain at high level, the batch input process?Ans :- Batch data is placed into queues called batch input sessions , then placed intothe application programs for maintenance into the database.12 What are the function modules associated with batch input?Ans :- BDC_OPEN_GROUP , BDC_CLOSE_GROUP , BDC_INSERT13 What is the structure of the BDC table?Ans :- Program/Dynpro/start/field name/ field content.

Page 67: SAP Interview Questions

SAP Interview Questions Page 48 of 173Yogesh Mishra ([email protected])14 Write out a coding example for filling a BDC Table.Ans :-FORM <NAME>REFEESH <bdc table>CLEAR <bdc table>MOVE <program name > to <bdc table>-PROGRAM<number1> TO <bdc table>-DYNPRO‘X’ TO <bdc table>-DYNBEGINAPPEND <bdc table>CLEAR <bdc table>MOVE: <field1> TO <bdc table>-FNAM<field2> TO <bdc table>-FVALAPPEND <bdc table>15 How do you find the transaction number, program number and fieldnames?Ans :- Transaction no.,program no. – System -> statusField names - F1, Technical help16 What are the processing modes for Batch Input?Ans :- Process on screen(foreground) , Display errors only and process in thebackground17 What are the available OK Codes that can be utilized during batch inputprocessing? /n – terminates current batch input transaction and marks as incorrect. /bdel – delete current batch input transaction from session. /bend – terminate batch input processing and mark session as incorrect. /bda – change display mode to process the session on screen instead ofdisplaying only errors./bde – change display mode to display only errors instead of processing the sessionon the screen.18 What is the effect of the BDC_CURSOR field name in the BDC table?Ans :- You can set the cursor and enter as a corresponding field value the name ofthe field on which the cursor is to be positioned .19 How many types of BDCs you have done?21 Why you choose Call transaction and/or session method?Call transaction is mainly used when you want to update the database using a singletransaction , you can also update the database in asynchronous mode, where assession is used to perform huge database updations using more than one transactionand which will last for a long time.22 How you trap errors in call TransactionErrors while updating the database using call transaction technique are trappedusing a structure bdcmsgcall, whose field msgtyp become ‘e’ when an error record isencountered. Those records are formatted using format_message function call inthe desired format and stored in an internal table for listing of all error records inone shot.

Page 68: SAP Interview Questions

23 What are different types of Update modesSAP Interview Questions Page 49 of 173Yogesh Mishra ([email protected])In BDC’s we have two types of updation modes – 1) Synchronous 2) Asynchronous24 What is main difference between session method and LSMWIn the context of session method,the method of updating is “Batch Input” ,we require a program to be coded,But in the context of LSMW method,The methods of updatingusing “Batch Input/Direction Input”from an IDOC,from a BAPI structure.No source code is required, the complete operation is performed in 16 stepssequence25 What is main difference between CATT and LSMWUsing LSMW you can update any kind of data but no changes to database areallowed, where as CATT tool can update only master data, which also allowschanges to the master data and also a significant testing of data is possible26 What is BDC and How you use it?BC Basis Components--ABAP workbench--BC Basis Programming interfaces--Data transferDuring data transfer, data is transferred from an external system into the SAPR/3 System. •Transfer data from an external system into an R/3 System as it isinstalled. •Transfer data regularly from an external system into an R/3 System.Example: If data for some departments in your company is input using a systemother than the R/3 System, you can still integrate this data in the R/3 System. To dothis, you export the data from the external system and use a data transfer method toimport it into the R/3 System.Batch input with batch input sessions : Data consistency check with the help ofscreen logic.With the batch input method, an ABAP program reads the external data that is to beentered in the R/3 System and stores the data in a "batch input session". The sessionrecords the actions that are required to transfer data into the system using normalSAP transactions.When the program has generated the session, you can run the session to execute theSAP transactions in it. You can explicitly start and monitor a session with the batchinput management function (by choosing System ® Services ® Batch input), or havethe session run in the background processing system.Use the BDC_OPEN_GROUP function module to create a new session. Once youhave created a session, then you can insert batch input data into it withBDC_INSERT. Use the BDC_INSERT function module to add a transaction to abatch input session. Use the BDC_CLOSE_GROUP function module to close asession after you have inserted all of your batch input data into it.

Page 69: SAP Interview Questions

What is Dataset and how you use it?

Page 70: SAP Interview Questions

SAP Interview Questions Page 50 of 173Yogesh Mishra ([email protected])ABAP/4 provides three statements for handling files:The OPEN DATASET statement opens a file.The CLOSE DATASET statement closes a file.The DELETE DATASET statement deletes a file.To open a file for read access, use the FOR INPUT option of the OPEN DATASETstatementTo open a file for write access, use the FOR OUTPUT option of the OPEN DATASETstatementTo open a file for appending data to the file, use the FOR APPENDING option of theOPEN DATASET statementTo process a file in binary mode, use the IN BINARY MODE option of the OPENDATASET statementTo process a file in text mode, use the IN TEXT MODE option of the OPENDATASET statementTo open a file at a specific position, use the AT POSITION option of the OPENDATASET statementWhen you work with the operating systems UNIX or WINDOWS NT, you can sendan operating system command with the statement OPEN DATASET. To do so, usethe option FILTERTo receive the operating system message after trying to open a file, use theMESSAGE option of the OPEN DATASET statementTo close a file on the application server, use the CLOSE DATASET statementTo delete a file on the application server, use the DELETE DATASET statementTo write data to a file on the application server, use the TRANSFER statementTo read data from a file on the application server, use the READ DATASETstatement.36 Give real time work done by u in BDC ? Transactions used ? parameterspassed with functions.37 will ask u for screen no's and dynpro names for BDC that u say u havedone.39 Which technical field in the BDCDATA table holds the last cursor

Page 71: SAP Interview Questions

SAP Interview Questions Page 51 of 173Yogesh Mishra ([email protected])position?41 What is true about the LSMW: (choose correct option/s) Part of the SAP system Processes hierarchical data files (header and position) Needs a source field for every target field44 How do you read a LOCAL sequential file?45 How do you write a sequential file?46 How do you send the BDCDATA table in a Call Transaction statement?47 What loop do you code for a READ DATASET statement?51 What are the steps in a BDC session ?The first step in a BDC session is to identify the screens of the transaction that theprogram will process. Next step is to write a program to build the BDC table that willbe used to submit the data to SAP. The final step is to submit the BDC table to thesystem in the batch mode or as a single transaction by the CALL TRANSACTIONcommand.52 How do you find the information on the current screen ?- The information on the current screen can be found by System Statuscommand from any menu.53 How do you save data in BDC tables ?- The data in BDC tables is saved by using the field name ‘BDC_OKCODE’ andfield value of ‘/11’54 What is the last entry in all BDC tables ?- In all BDC tables, the last entry is to save the data by using the field nameBDC_OKCODE and a field value of ‘/11’.55 What is a multiple line field ?- A multiple line field is a special kind of field which allows the user to entermultiple lines of data into it.56 How do you populate data into a multiple line field ?- To populate data into a multiple line field, an index is added to the field nameto indicate which line is to be populated by the BDC session (Line index ).57 Write the BDC table structure.

Page 72: SAP Interview Questions

SAP Interview Questions Page 52 of 173Yogesh Mishra ([email protected])- BDC table structureFIELD TYPE DESCRIPTIONProgram CHAR(8) Program name of transactionDynPro CHAR(4) Screen number of transactionDynBegin CHAR(1) Indicator for new screenFnam CHAR(35) Name of database field fromScreenFval CHAR(80) Value to submit to field58 Does the CALL TRANSACTION method allow multiple transactions to beprocessed by SAP ?- No. The CALL TRANSACTION method allows only a single transaction to beprocessed by SAP.59 Does the BDC_INSERT function allow multiple transactions to beprocessed by SAP ?- Yes.60 What is the syntax for ‘CALL TRANSACTION’ ?- CALL TRANSACTION trans [ using bdctab MODE mode ].Three possible entries are there for MODE.A - show all screensE - show only screens with errorsN - show no screensWhich mode of ‘CALL TRANSACTION’ method allows background processing ?- N is the only mode that allows background processing.61 Is it possible to use ‘CALL TRANSACTION’ without a BDC table ?- Yes, it is possible to use ‘CALL TRANSACTION’ without a BDC table. In suchcase, the current program is suspended, the transaction specified is broughtup, and a user must enter the data into the screens.62 What is TCODE ?- TCODE is the transaction code for the transaction that should be used toprocess the data in the BDC table being inserted.63 What are the function modules that need to be called from BDC programto submit the transactions for processing ?- BDC_OPEN_GROUP- BDC_INSERT- BDC_CLOSE_GROUP64 How many sessions will be opened using BDC_OPEN_GROUP ?- Only one session can be created using the BDC_OPEN_GROUP functon.65 What is ‘BATCH INPUT’ or ‘BDC’ ?- The SAP system offers two primary methods (BDC SESSION METHOD,CALL TRANSACTION METHOD) for transferring data into the system fromother systems and Non-SAP systems. These two methods are collectively

Page 73: SAP Interview Questions

SAP Interview Questions Page 53 of 173Yogesh Mishra ([email protected])called as ‘BATCH INPUT’ or ‘Batch Data Communication’ (BDC).66 What are the advantages in Batch Input ?- The Batch Input ensures Data integrity.No manual interaction is required during Data transfer.67 What is the functionality of ‘Classical Batch Input’ ?In ‘Classical Batch Input’ an ABAP/4 program reads the external data that is to beentered in the SAP system and stores the data in a Batch Input session. This sessionstores the actions that are required to enter your data using normal SAPtransactions.68 Which Function Modules are used in ‘Classical Batch Input’ ?- BDC_OPEN_GROUP , BDC_INSERT, BDC_CLOSE_GROUP.69 What is Synchronous Database update ?- During the processing no transaction is stored until the previous transactionhas been written to the Database. This is called Synchronous Databaseupdate.70 What are the differences between CALL TRANSACTION and BATCHINPUT SESSION ?- The most important aspects of the batch session interface are:- Asynchronous processing- Transfers data for multiple transactions- Synchronous database updateDuring processing, no transaction is started until the previous transactionhas been written to the database.- A batch input processing log is generated for each session- Sessions cannot be generated in parallelThe most important aspects of the CALL TRANSACTION USING interface are:- Synchronous processing- Transfers data for a single transaction- Synchronous and asynchronous database updating both possibleThe program specifies which kind of updating is desired.- Separate LUW for the transactionThe system performs a database commit immediately before and after theCALL TRANSACTION USING statement.- No batch input processing log is generated71 What are the types of Batch Input ?- Classical Batch Input- Call Transaction- Call Dialog72 What is BDC_OKCODE ?- The command field is identified by a special name in batch input calledBDC_OKCODE. This name is constant and always identifies the commandfield.

Page 74: SAP Interview Questions

SAP Interview Questions Page 54 of 173Yogesh Mishra ([email protected])73 How can we execute a function in a BDC session ?- We can execute a function in a transaction by entering the function code orfunction key number in the command field of an SAP session. A function keynumber must be prefixed with the / (slash) character. A function code mustbe prefixed with the = character.- Example:BDCDATA-FNAM = 'BDC_OKCODE'BDCDATA-FVAL = '=UPDA'74 How can we position the cursor on a particular field ?- BDCDATA-FNAM = ‘BDC_CURSOR’BDCDATA-FVAL = <FIELDNAME>75 Who are Dialog users and who are Background users ?- Dialog users are normal interactive users in the SAP system. Backgroundusers are user master records that are specially defined for providingauthorizations for background processing jobs.76 What is the use of BDC_INSERT ?- We add a transaction to a Batch Input Session by using this function.77 What are the update modes in CALL TRANSACTION ?- S : Synchronous- A : Asynchrnous- L : Local78 What does the message parameter indicates ?- The message parameter indicates there all system messages issued during aCALL TRANSACTION are written into the internal table <itab>. The internaltable must have the structure of BDCMSGCOLL.79 What is Direct Input ?- To enhance the batch input procedure, the system offers the direct inputtechnique especially for transferring large amount of data. This techniquedoesn’t create sessions but stores the data directly. The direct inputprograms must be executed in the back ground only. To maintain and startthese programs, use program RBMVSHOW or the transaction BMVO.80 What are the features of Recording Function ?- recording transaction runs- creating batch input sessions from the recorded transaction runs.- Generating a batch input program from the recorded data.81 What is synchrnous database update ?- During the processing, no transaction is stored until the previous transaction

Page 75: SAP Interview Questions

SAP Interview Questions Page 55 of 173Yogesh Mishra ([email protected])has been written to the database. This is called Synchronous databaseupdate.82 How do you set up batch process?Data analysis: Analyze the data that is to be transferred to the SAP System.||Generate SAP structures: Generate SAP data structures for incorporation into yourdata export program.||Develop transfer program: You can write the program in ABAP/4 or as an externalprogram.||Create sequential file: Export the data that is to be transferred, to a sequential file.||Create batch input program: ABAP/4 batch input program that will read the data tobe transferred from the sequential file.||Process batch input data: Process the data and add it to the SAP System. You can dothis either by:batch-input session method or Call transaction method.||Analyse results: Check that all data has been successfully processed.||Analyse Error session: Correct and re-process erroneous data.83 Where do you use BDC? transferring data from another system when you install your SAP System regularly transferring data that is captured by a non-SAP system in yourcompany into the SAP System. Assume, for example, that data collection in someareas of your company is still performed by a non-SAP system. You can stillconsolidate all of your data in the SAP System by exporting the data from theother system and reading it into the SAP System with batch input.You can also use batch input to transfer data between two R/3 Systems. However,there are more direct methods for doing this, such as RFC (remote function calls).84 What has to be done to the packed fields before submitting to a BDCsession?Declare these fields in the internal table as characters and the length of the fieldshould be same as the field length of the field's data element. This internal table isused to hold the data fetched from the sequential file using WS-upload functionmoduleWhat is LSMWThe LSMW is a cross-application component (CA) of the SAP R/3 System.The tool has interfaces with the Data Transfer Center and with batch input and directinput processing as well as standard interfaces BAPI and IDoc in R/3.The LSMW comprises the following main functions:1. Read data (legacy data in spreadsheet tables and/or sequential files).Function Read data replaces and enhances functions Spreadsheet interfaceand Host interface of LSMW version 1.0. You can use any combination out of

Page 76: SAP Interview Questions
Page 77: SAP Interview Questions

SAP Interview Questions Page 56 of 173Yogesh Mishra ([email protected])PC and server files now.2. Convert data (from the source into the target format).3. Import data (to the database used by the R/3 application).TCODE - LSMWSAP ScriptsWhat is sap script and layout set?Ans - SAPscript is the integrated text management system of the SAP R/3 System.SAPscript is tightly integrated into the SAP System. It is used for many differentword-processing tasks all over the SAP System.What is layout set?

Page 78: SAP Interview Questions

SAP Interview Questions Page 57 of 173Yogesh Mishra ([email protected])A layout set in SAPscript is used for page layout. The layout set contains variouselements, which are used for layout control of the individual pages and also containlayout information for texts which are to be output on the individual pages.The layot of a document is defined in a layot set.A layout set specified the appearance and structure of a document.Layout sets contain predefined text modules with space reserved for variable data. Youcan use these text modules for different application.Every SAPscript document uses a layout set.To make changes to your documents, such as moving a piece of text, or changing fonts,paragraph formats, and tabs, you only need to change the layout set.There are two ways of formatting texts using layout sets:The text is entered and output in standard text maintenance. You can assign anylayout set. Text can also be entered via the layout set a letter header, for example.The text is formatted via an ABAP/4 program using a layout set. The program caneither dynamically output individual predefined text modules, text elements ortransfer entire texts, which are to be output in the layout set.You can use Styles to define the formatting of the text in your documents.A styledetermines text formatting by setting the paragraph and characterformats used in adocument. You can, for example, use a style to highlight characterstrings or wholeparagraphs. You can assign a style to any text. Typically, however, you’lluse stylesprimarily in the main windows of layout sets, where users type or entertext directlyin documents.Header data is found in both style and layout set maintenance.In style maintenance, it is used primarily to present important information -designed to make it easier for the end user to select a style. The header data in layoutset maintenance, on the other hand, is used for information and control purposes.Windows are defined in layout set maintenance. They represent areaswhich are positioned on pages as page windows and in which text islater output. At least one window must be defined for each layout set. Ifnot, a text cannot be formatted by SAP script.The following window types can be used:MAIN – Main window in which continuous text is output. This is the window usedby dialog users of a print program and layout set. For example the body text of aletter would be entered in MAIN.

Page 79: SAP Interview Questions

SAP Interview Questions Page 58 of 173Yogesh Mishra ([email protected])VAR – Window with variable contents. The text can vary on each page in which thewindow is positioned. Variable windows are formatted for each page.CONST – Window with constant contents which is only formatted once.A layout set has the following elements:Header data - Data related to development (created by, development class, etc.)and layout set information (which elements are used) are both stored in the headerdata. A start page must be entered here.Paragraph formats - Paragraph formats are required in layout sets - as in styles -in order to format texts. However, they are also used for word processing in layoutsets, for example, to format text elements.Character formats - You can also use character formats to format texts orparagraphs. Unlike paragraph formats, however, they are used to format text withina paragraph.Windows - Windows are names and window types, which are notphysically positioned until they are allocated to pages and units ofmeasurement are specified.Pages - Pages are defined to provide the system with a start and end point in textformatting.Page windows - Page windows are the combination of windows and pages, wherethe dimensions of a window and its position on a page are specified.The purpose of SAP script control commands is to allow control of theoutput formatting. These commands are not interpreted by the SAPscripteditor, but are passed through to the SAPscript Composer for processing. Thecomposer is the program that converts text from the form displayed in the editor tothe form used for printing.What is SAPscript and explain its purpose?SAP Script is the SAP system’s own text-proessing system. You’ll find that it looksand feels a lot like other leading text-processing system that you may use on yourpersonal computer.Every company needs to output documents with a uniformly defined layout (eg.Invoices, delivery notes, etc..) all the time.The basic layout of the document is pre-defined , but in many cases, other data has tobe merged with it, such as address data or purchase order items. This data might beentered manually by a employee, or retrieved from a database table.Large quantities of these documents have to be produced. From printing is usually amattter of large print runs of documents such as payslips, checks, orderconfirmation, reminders etc.

Page 80: SAP Interview Questions

SAP Interview Questions Page 59 of 173Yogesh Mishra ([email protected])SAPscript has been developed to meet the above requirements. IT is an integratedtool for text entry and form printing in R/3 applications.These documents are normally provided by SAP but every organization have theirunique waqys of these documents so to customize these and for creating newer onesif required; SAP script is used.What are components of SAPscript?Layout set, SAPscript Text, ABAP Print program , symbols, functionmodules like open_form, close_From, Read_text etc,.What are the ABAP/4 Commands that link to a layout set?Call function OPEN-form.Call function WRITE-from.Call function CLOSE-fromImporting Graphics (Logos) into SAPScriptThe program RSTXLDMC can be used to upload graphics (file extension .tif on PCfiles) into individual standard text.Other useful programs for SAPScriptRSTXFCON - Converts page formatRSTXSCRP - Upload/Download layout setsRSTXDBUG - SAPScript debuggerDebug SAPScriptYou can debug a SAPScript: Use Tools - Word Processing - Layout Set.Enter name of layout set and then Utilities - Activate Debugger.It is of no consequence which layout set you enter when selecting the SAPscriptdebugger. (Menu path: Tools-Word-processing - Forms, Utilities - ActivateDebugger) The next layoutset called will invoke the debugger. This is quite handywhen verifying which layoutset is being called (Verifying customizing settings).Another way to set the SAPScript debugger is to run program RSTXDBUG.When a Form is copied from one client to another .And If U try to display or changethe form in the copied client .The possible error message cud be :1.Form not foundTry coping again specifing the language .2.IF IT dispalys an error message saying That the text file is inconsistent .Then go to SE38 and Run “RSTXCHKO” .It will ask for the form name ,then check all the checkboxes and then run theprogram.Note : all Script related problems can be solved using Program ‘RSTX*’.How to take a back up of script layout into U’r hard disk and load it laterUse Program RSTXSCRP.

Page 81: SAP Interview Questions

SAP Interview Questions Page 60 of 173Yogesh Mishra ([email protected])Use EXPORT mode, when downloading and IMPORT when uploading a script. Don’tforget to give the form name in the object field. This will create a script with thesame name as that of the original script . If a script with the same name exists inthe same client ,then it will give an error ‘Object cannot be overwritten ’ .I want to copy table across clientsUse Program RSCLTCOPTo transfer script files across systems (Not Clients) - RSTXSCRPTo compare the contents of a table across clients: RSTBSERVTo change the development class of any object - RSWBO052What type of variables normally used in sap script to output data?&Tables name- fields&.How do you number pages in sap script layout outputs?& page &&next Page &What takes most time in SAP script programming?Defining layout set up / sets.How do you use tab sets in layout sets?Define paragraph with defined tabs.How do you backup sap script layout sets? Can you download andupload? How?SAP script backup :- In transaction SE71 goto Utilities -> Copy from client -> Givesource form name, source client (000 default), Target form name.Download :- SE71, type form name -> Display -> Utilities -> form info -> List -> Saveto PC file.Upload :- Create form with page, window, pagewindow with the help of downloadedPC file. Text elements for Page windows to be copied from PC file.What is Compare Tool in SAP Script ?SAP Script offers tools for comparing objects across clients. We can compare or copythe following kinds of objects.StylesLayout setsDocumentsWith the Compare tool we can do the following :Check whether an object exists in both clientsDisplay the differences between the versions of an objectLayout Sets are used to control page layout and text formatting in documents .SAP Standard styles and layout sets are always held in Client 000.

Page 82: SAP Interview Questions

SAP Interview Questions Page 61 of 173Yogesh Mishra ([email protected])In what format does SAP Script store text ?SAPscript texts are stored in Interchange Text Format (ITF). SAPscript offersconversion programs for the text file formats Rich Text Format (RTF) and ASCIIas an interface to other word processors.The various window types in SAP Script areMain, Variable and Constant.The New-Page command is used to force a Page break in the text at any point.Protect ... Endprotect command pairs can be nested (True / False).False.Delimiter & must be used immediately before and after the symbol.What does the composer do?The final appearance of your documednt depends on interaction between the printprogram and the layout set.The SAPscript print program initializes the printing process. Every commandentered using the SAPscript programming interfaces is transferred to the composer.The composer received layout information from the layout set specified by the printprogram. The documents are formatted according to this layout information.If the documents contain variables, the compoer replaces these variables with datafrom the R/3 system, such as the current date, or with the userdata selected by theprint program.The print program controls the completion of thelayout set. Once this is done, thecomposer places the completed document in the spool.Where do we define Tab space for data in SAPScript?When defining the paragraph for the text element we can define the TABS then.There is parameter called TABS to be defined in paragraph definition.what is difference between Window & a Page Window?Window: An area that is predefined in the layout set. Windows are text modules,which are positioned on a document page.

Page 83: SAP Interview Questions

SAP Interview Questions Page 62 of 173Yogesh Mishra ([email protected])We define the window type, Default Paragraph, specify the text elements or aSAPscript text to be included etc in the Windcow Component.PageWindow: we define the parameters of the earlier defined Window, appearanceon the document like left or right margins, Width & Height.What are symboles & state their different types with E.g.A Symbol is a constant, which can be inserted in a document. It saves the userunnecessary work when replacing sections of text, phrases, etc. Each symbol has aname which is encloses by &.Eg. &variable name &System symbols eg &Date&, &time& etc.Standard symbols :Standard symbols are user-defined. They are maintainedcentrally in table TTDTG. Eg. &SGDH& for the opening salutation : “dearsir/madam”.&MFG& for the closing salutation :”yours Faithfully”.Program Symbols : Program symbols display data from the ABAP/4 program whichhas called the word processing function Eg. Itab-connid.Text symbols: You can define a text symbol for any text module. This symbol is validonly in the text module for which you have defined it. Eg. Define &Symbol& =‘value’.How do we define Text symbols?Using the control command DEFINE &x1& = ‘56’.State few control commands?.Protect .. endprotect, define, new-page, include.. if… endif.what is the purpose of “Protect and EndProtect”?.You can specify either in the style or in the layout set that a particular paragraphshould not be slit in two by a page beak. If the page protect attribute is set then thecomplete paragraph is always output ona single page. This property applies only tothat particular paragraph. SAPScript provides the PROTECT… ENDPROTECTcommand pair to allow you to define the areas to be protected against a page beak onan individual basis. Thus the PROTECT/ENDPROTECT commands may be regardedas a kind of conditional NEW-PAGE command, the condition being whether or notthe lines enclosed between the two commands fit in the space remaining in thecurrent main window.How do we set the date, time format?SET TIME MASK : CONROLS THE TIME FIELD FORMAT.

Page 84: SAP Interview Questions

SAP Interview Questions Page 63 of 173Yogesh Mishra ([email protected])SET DATE MASK : CONTRLS THE DATE FIELD FORMAT.EG. Set Time Mask = “ HH:MM:SS”.what is the role of an ABAP progrm in SAPScript?Retrieves R/3 application data from the database.Defines the layout set processing logic ( The order and repetition of text elements).Chooses a layout set for printing.Selects the output device, such as printer,monitor, or fax.Sets print attributes such as immediate output, number of copies ,and pages tobeprinted.How to reuse some components of the script layout to other program?Is this script layout is standard for all the printer? If not then y we are going forscript layout?Give me couple of methods that I will take standard script layout printout fordifferent printer.How u will analysis script program? ( which goes to main and how many windowsetc….)Can V inserted logo on your program?. Give me the program namewhich uploads my logo and syntax for logo inserting in sap script.Yes u can insert a logo on your script layout.Use this Report “RSTXLDMC” which will uploads the logo.Use the following statement which includes the logo on your script prog./: INCLUDE 'ZHEX-MACRO-XXX' OBJECT TEXT ID ST LANGUAGE 'E'.XXX – object name, u will gives @ runtime in rstxldmc program.Give me syntax for box command.BOX XPOS 2 MM WIDTH 0 CM HEIGHT '9.5' CM FRAME 10 TWScript Commands.Defining a variable

Page 85: SAP Interview Questions

SAP Interview Questions Page 64 of 173Yogesh Mishra ([email protected])DEFINE &CUST& = '00000021'.Define and insert a standard text:Standard texts is predifined textst that can be used in more than one form. Standardtexts are can be created, changed and displayed using transaction SO10.The text ID is used to callsify texts.To include a stadard text in a form, use the INCLUDE command:/: INCLUDE Z_BC460_EX4_HF OBJECT TEXT ID SDVDWhen formatting the standard text the PARAGRAPH parameter is used. To centerthe text use:/: INCLUDE Z_BC460_EX4_HF OBJECT TEXT ID SDVD LANGUAGE ENPARAGRAPH C.Formatting addressesThe ADDRESS-ENDADDRESS command formats addresses according to the postalnorms of the recipient's country, as defined in thecountry parameter.ADDRESS DELIVERY PARAGRAPH ADNAME &KNA1-NAME&STREET &KNA1-STRAS&POSTCODE &KNA1-PSTLZ&CITY &KNA1-ORT01&'COUNTRY&KNA1-LAND1&FROMCOUNTRY 'DE'ENDADDRESSAvoiding pagebreaks in a paragraph/: PROTECT::/: ENDPROTECTThe text lines to be protected are enclosed between the two commandsConditonal text ouput IF - ENDIFYou can use IF/ENDIF like in a normal ABAP program

Page 86: SAP Interview Questions

SAP Interview Questions Page 65 of 173Yogesh Mishra ([email protected])/: IF condition::/: ENDIFand/: IF condition:/: ELSE:/: ENDIFExample:/: IF &SPFLI-CITYTO& = "BERLIN"..... put some text here/: ENDIFSymbols and Control commandsSymbols are placeholders for values that are inserted during print formatting.Symbols are indentified by name surrounded by "&" and are not case sensitiveTypes of symbolsSystem symbolsDATE DateDAY DayNAME_OF_DAY Name of dayMONTH MonthYEAR YearTIME TimeHOURS HoursMINUTES MinutesSECONDS SecondsPAGE Page numberNEXTPAGE Number of next pagreDEVICE Output deviceSPACE Blank spaceULINE UnderlineVLINE Vertical line

Page 87: SAP Interview Questions

SAP Interview Questions Page 66 of 173Yogesh Mishra ([email protected])Standard symbolsStandard symbols are user defined and are maintained in table TTDG(table is notavailable???). You use transaction SM30 to change or display standard symbols.An examples of standard symbols is &MFG& fot "Yours faithfully"Standard textStandard texts is predifined texts that can be used in more than one form. Standardtexts are can be created, changed and displayed using transaction SO10.The text ID is used to classify texts.To include a standard text in a form, use the INCLUDE command:/: INCLUDE Z_BC460_EX4_HF OBJECT TEXT ID SDVDWhen formatting the standard text the PARAGRAPH parameter is used. To centerthe text use:/: INCLUDE <name> <Parameter><parameter> = Object, ID, Language, ParagraphExample:/: INCLUDE Z_BC460_EX4_HF OBJECT TEXT ID SDVD LANGUAGE ENPARAGRAPH C.Name: Z_BC460_EX4_HFObject: TextText id: SDVD (Text id from SO10)Language: ENParagraph: C (Centered)Tip: You can use menu Insert->Text->Standard to make it easier to insert the textProgram symbols

Page 88: SAP Interview Questions

SAP Interview Questions Page 67 of 173Yogesh Mishra ([email protected])Program symbols are for contents of database fields or global program symbols.When you print the form, data from the database tables are printed isntead of thesymbols.In the print program:TABLES: kna1.In the form:&KNA1-NAME1&Formatting&SYMBOL& No formatting&SYMBOL+4& Offset - Output begins here. Offset refers to formatted value&SYMBOL(5)& Length - Output data in the specified length&SYMBOL(I)& Suppress initial value - If the field has been initialized, nothing isoutput&SYMBOL(Z)& Suppress leading zeros&SYMBOL(C)& Compress blank spaces - Consecutice spaces are compressed into asingle space. Leading spacesare suppressed.&SYMBOL(R)& Right align output&SYMBOL(S)& Operators are suppressed&SYMBOL(*)& Dictionary length - The data length is defined by the ABAPdictionary&SYMBOL(8.2)& Decimal format. Length 8 decimals 2&'text1'SYMBOL'text2'& Text can be inserted before and after the symbolControl commandsControl command are used to modify text output. Use format key /: in the formatcolumn./: INCLUDE/: DEFINE/: ADDRESS....ENDADDRESS/: PROTECT.....ENDPROTECT/: NEW-PAGE/: IF....ENDIF/: CASE...ENDCASEExamples of control commandsINCLUDEINCLUDE name <parameter>

Page 89: SAP Interview Questions

SAP Interview Questions Page 68 of 173Yogesh Mishra ([email protected])Parameters:OBJECT E.g. TEXT, DOKU (Document), DSYS (Hypertext).ID Text ID -Text ID is a way to group texts - Se transaction SO10LANGUAGE If the parameter is not specefied, the logon language will be usedPARAGRAPH The text to be included is formatted using the style allocated. ThePARAGRAPH parameter can be used to redefine the standard paragraph for thisstyle for the current call. All *-paragraphs in the included text will then be formattedusing the paragraph specified here.ObjectIDLanguageParagraphStandard texts are maintained in transaction SO10.Example 1:You have created a standard text in SO10 Named MYTEXT and with Text Id ST/: INCLUDE MYTEXT OBJECT text ID stExample 2:You can also use a dynamic name so that you can retreive a ext depeding of the namevariable:/: INCLUDE &SCUSTOM-NAME& text ID st.Depending on the name in the variable &SCUSTOM-NAME& different texts will beshown. Note that a text with the name in the variable &SCUSTOM-NAME& namemust be created in SO10.DEFINE/: DEFINE &SYMBOL& = 'String1 String2'/: DEFINE &CUST& = '00000021'.ADDRESS-ENDDRESSThe ADDRESS-ENDADDRESS command formats addresses according to the postalnorms of the recipient's country, as defined in thecountry parameter./: ADDRESS DELIVERY PARAGRAPH AD/: NAME &KNA1-NAME&/: STREET &KNA1-STRAS&/: POSTCODE &KNA1-PSTLZ&/: CITY &KNA1-ORT01&/: COUNTRY &KNA1-LAND1&

Page 90: SAP Interview Questions

SAP Interview Questions Page 69 of 173Yogesh Mishra ([email protected])/: FROMCOUNTRY 'DE'/: ENDADDRESSTime Date and decimal formatExamples:/: SET TIME MASK = 'HH:MM'/: SET DATE MASK = 'DD.MMMM.YYYY'/: SET COUNTRY 'USA'Frames, lines and shadingBOXDraws a boxSyntax:/: BOX <xpos> <ypos> <width> <height> <frame> <intensity>The intensity is the grey scale of the box as %. The frame parameters is the thicknessof the frame. Default is 0.Each of the paramteters ypos, xpos, width, height and frame muts be followed of themeasurement unit:TW (twip)PT (point)IN (inch)MM (millimeter)CM (centimeter)LN (line)CH (character).Examples:/: BOX XPOS '11.21' MM YPOS '5.31' MM HEIGHT '10' MM WIDTH '20' MMINTENSITY 10 FRAME 0 TW/: BOX FRAME 10 TWDraws a frame around the current window with a frame thickness of 10 TW (= 0.5PT)./: BOX INTENSITY 10Fills the window background with shading having a gray scale of 10 %./: BOX HEIGHT 0 TW FRAME 10 TWDraws a horizontal line across the complete top edge of the window./: BOX WIDTH 0 TW FRAME 10 TW

Page 91: SAP Interview Questions

SAP Interview Questions Page 70 of 173Yogesh Mishra ([email protected])Draws a vertical line along the complete height of the left hand edge of the window./: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15/: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TWDraws two rectangles and two lines to construct a table of three columns with ahighlighted heading section.POSITION and SIZEYou can use the POSITION and SIZE commands to set default parmeters for a box.This can be usefull if you have several boxes that share the same parameters.Example:/: POSITION XORIGIN '11.21' YORIGIN '5.31' MM/: SIZE HEIGHT '2' MM WIDTH '76' MM/: BOX FRAME 10 TW INTENSITY 10If you want to set the position realtively to the window use POSITION WINDOW toset the position to the top/left start of the window. Then use POSITION to set thecurrent position relatively to the start of the Window. Note thatyou uses "+" or "-" in the ORIGIN position to the set the position relatively./: POSITION WINDOW/: POSITION XORIGIN '+5' MM YORIGIN '+10' MMthe position is now 5 MM from the left and 10 MM from the top of the window.NOTE: After using the position command you can move the current positionrealtively to the last used position/: POSITION XORIGIN '+10' MM YORIGIN '+20' MMNow the position will be X = 15 and Y = 30Drawing a lineYou can draw a line by setting the Height or Width of a box to 0 and add a frame. E.g.a horizontal line:/: SIZE HEIGHT '0' MM WIDTH '200' MM/: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.81' MM INTENSITY 100

Page 92: SAP Interview Questions

SAP Interview Questions Page 71 of 173Yogesh Mishra ([email protected])Window and PageWINDOW sets the values for the width and height to the values of the currentwindow (default setting).PAGE Sets the values for the width and height to the values of the current outputpage.Examples:/: SIZE WINDOWSets WIDTH and HEIGHT to the current window dimensions./: SIZE WIDTH '3.5' CM HEIGHT '7.6' CMSets WIDTH to 3.5 cm and HEIGHT to 7.6 cm./: POSITION WINDOW/: POSITION XORIGIN -20 TW YORIGIN -20 TW/: SIZE WIDTH +40 TW HEIGHT +40 TW/: BOX FRAME 10 TWA frame is added to the current window. The edges of the frame extend beyond theedges of the window itself, so as to avoid obscuring the leading and trailing textcharacters.61. Calling a form from SapScript (*****)/:DEFINE &CUST& = '00000021'./:PERFORM GET_NAME IN PROGRAM Z_BC460_EX4_HF/: USING &CUST&/: CHANGING &NAME&/:ENDPERFORM.Dear &NAME&The ABAP routine could be defined as follows:IMPORTANT: The structure itcsy must be used for the parameters.REPORT Z_HENRIKF_SCRIPT_FORM .tables scustom.form get_name tables in_tab structure itcsyout_tab structure itcsy.read table in_tab index 1.select single * from scustomwhere id = in_tab-value.

Page 93: SAP Interview Questions

SAP Interview Questions Page 72 of 173Yogesh Mishra ([email protected])if sy-subrc = 0.read table out_tab index 1.move scustom-name to out_tab-value.modify out_tab index sy-tabix.else.read table out_tab index 1.move 'No name' to out_tab-value.modify out_tab index sy-tabix.endif.** You could also fill the ouput parameter table this wayREAD TABLE out_par WITH KEY 'NAME1'.out_par-value = l_name1.MODIFY out_par INDEX sy-tabix.endform.Note that if you use more than one parameter you must use Using or Changingbefore every parameter !/: PERFORM <form> IN PROGRAM <prog>/: USING &INVAR1&/: USING &INVAR2&....../: CHANGING &OUTVAR1&/: CHANGING &OUTVAR2&....../: ENDPERFORM62. Structure of a print programThe print program is used to print forms. The program retieves the necesary datafrom datbase tables, defines the order of in which text elements are printed, choosesa form for printing and selects an output device and print options.Open form printing - Must be called before working with any of the other formfunction modules.call function 'OPEN_FORM'.....Must be ended with function module CLOSE FORM*To begin several indentical forms containing different data within a single spoolrequest, begin each form using START_FORM, and end it using END_FORMcall funtion 'START_FORM'.....Write text elements to a window of the formcall function 'WRITE_FORM'.....

Page 94: SAP Interview Questions

SAP Interview Questions Page 73 of 173Yogesh Mishra ([email protected])Ends formcall funtion 'END_FORM'.....Closes form printingcall function 'CLOSE_FORM'....Examples of function callsOPEN FORMCALL FUNCTION 'OPEN_FORM'EXPORTING* APPLICATION = 'TX'* ARCHIVE_INDEX =* ARCHIVE_PARAMS =DEVICE = 'PRINTER'DIALOG = 'X'* FORM = ' '* LANGUAGE = SY-LANGUOPTIONS = OPTIONS* MAIL_SENDER =* MAIL_RECIPIENT =* MAIL_APPL_OBJECT =* RAW_DATA_INTERFACE = '*'IMPORTING* LANGUAGE =* NEW_ARCHIVE_PARAMS =* RESULT =EXCEPTIONSCANCELED = 1DEVICE = 2FORM = 3OPTIONS = 4UNCLOSED = 5MAIL_OPTIONS = 6ARCHIVE_ERROR = 7INVALID_FAX_NUMBER = 8MORE_PARAMS_NEEDED_IN_BATCH = 9OTHERS = 10.START_FORMCALL FUNCTION 'START_FORM'EXPORTING* ARCHIVE_INDEX =FORM = 'MY_FORM'

Page 95: SAP Interview Questions

SAP Interview Questions Page 74 of 173Yogesh Mishra ([email protected])* LANGUAGE = ' '* STARTPAGE = ' '* PROGRAM = ' 'MAIL_APPL_OBJECT =IMPORTING* LANGUAGE =EXCEPTIONSFORM = 1FORMAT = 2UNENDED = 3UNOPENED = 4UNUSED = 5OTHERS = 6WRITE_FORMSee 'WRITE_FORM'END_FORMCALL FUNCTION 'END_FORM'IMPORTING* RESULT =EXCEPTIONS* UNOPENED = 1BAD_PAGEFORMAT_FOR_PRINT = 2OTHERS = 3CLOSE_FORMStructure for Print options (return values) - Pages selected for printing, Number ofcopies etc.DATA BEGIN OF RESULT.INCLUDE STRUCTURE ITCPP.DATA END OF RESULT.CALL FUNCTION 'CLOSE_FORM'IMPORTINGRESULT = RESULT* RDI_RESULT =TABLES* OTFDATA =EXCEPTIONS* UNOPENED = 1BAD_PAGEFORMAT_FOR_PRINT = 2* SEND_ERROR = 3* OTHERS = 4.

Page 96: SAP Interview Questions

SAP Interview Questions Page 75 of 173Yogesh Mishra ([email protected])63. CONTROL_FORM - Calling Commands Using a programThe function module CONTROL_FORM can be used to create SapScript controlstatements from within an ABAP program.Example:call function 'CONTROL_FORM'EXPORTINGCOMMAND = 'PROTECT'.call function 'WRITE_FORM'.....................call function 'CONTROL_FORM'EXPORTINGCOMMAND = 'ENDPROTECT'.StylesStyles are used to predefine paragraph and character formats for forms. SAPprovides several standard styles e.g. for Address includes, on-line documentation andso on. You can define your own styles.To find styles, create styles and maintaine styles, use transaction SE72.You assign style to a text by using menu Format -> StyleYou can make temporary style changes using the control command /: STYLEUsing graphics in SapScriptUse transaction SE78 to inmport graphics to SAP.In the form painter, you can either include directly to the form using menu Edit->Graphic->Create or using the INCLUDE statement in a window.To use an INCLUDE stanment, goto into the woindow script editor and use menuInclude->Graphic. The include can look like this for a bitmap:/: BITMAP MYLOGO OBJECT GRAPHICS ID BMAP TYPE BMONModificationsConsiderations in connection with modifications

Page 97: SAP Interview Questions

SAP Interview Questions Page 76 of 173Yogesh Mishra ([email protected])The standard SAP print program should only be changed when it is absolutelynecessary. If additional data is needed, these can in many cases be retrieved using a aPERFORM statement in the form instead of changing the print program..There can be the following reasons to change the print program:Structureal changesNew text eloements are neededPrint program to be used to print additional formsDetermine/change which forms and printprograms that are used for printingThe forms and print programs for a given output type and application can be foundin table TNAPR Processing programs for outputUse view V_TNAPR in (Transaction SE30) to change entries.Import/Export SapScript form from PC fileUse ABAP program: RSTXSCRPSD - Finding the name of the print programFor SD dopcuments you can use table TNAPR top find the name of the aprintprogramModule PoolTransactions:A transaction is a program that conducts a dialog with the user. In a typical dialog,the system displays a screen on which the user can enter or request information.Based on the the user input or request, the program executes the appropriate actionslike, it branches to the next screen, displays an output, or changes the database.Explain what is a transaction in SAP terminology.- In SAP terminology, a transaction is series of logically connected dialog steps.Explain how SAP GUI handles output screen for the user.- User terminal input is accepted by SAP GUI and sent to the SAP dispatcher. Thedispatcher co-ordinates the information exchange between the SAP GUIs andthe work processes. The dispatcher first places the processing request in requestqueues, which it then processes. The dispatcher dispatches the requests to the

Page 98: SAP Interview Questions

SAP Interview Questions Page 77 of 173Yogesh Mishra ([email protected])available work process. The actual processing takes place in the work process.When processing is complete, the result of a work process is returned via thedispatcher to the SAP GUI. The SAP GUI interprets the received data andgenerates the output screen for the user.What is LUW or Database LUW or Database Transaction ?- A “LUW” ( logical unit of work ) is the span of time during which any databaseupdates must be performed . Either they are all performed ( committed ) , orthey are all thrown away ( rolled back ).LUW ( or “database LUW” or “database transaction” )This is the set of updates terminated by a database commit. A LUW lasts, atmost, from one screen change to the next ( because the SAP system triggersdatabase commits automatically at every screen change ).LUWs help to guarantee database integrity. When an LUW has been successfullyconcluded, the database is once again in a correct state. If, however, an error occurswithin an LUW, all database changes made since the beginning of the LUW are canceledand the database is then in the same state as before the LUW started.An LUW begins- Each time you start a transaction- When the database changes of the previous LUW have been confirmed (databasecommit) or- when the database changes of the previous LUW have been cancelled (databaserollback)An LUW ends- When the database changes have been confirmed (database commit) or- When the database changes have been canceled (database rollback)What is SAP LUW or Update Transaction ?- Update transaction ( or “SAP LUW”)This is a set of updates terminated by an ABAP/4 commit. A SAP LUW may last muchlonger than a database LUW, since most update processing extends over multipletransaction screens.The programmer terminates an update transaction by issuing aCOMMIT WORK statement.Does the external program run in the same SAP LUW as the caller, or in aseparate one?- Transactions run with a separate SAP LUW- Reports run with a separate SAP LUW- Dialog modules run in the same SAP LUW as the caller- Function modules run in the same SAP LUW as the callerThe only exceptions to the above rules are function modules called with INUPDATE TASK (V2 function only) or IN BACKGROUND TASK (ALEapplications). These always run in their own (separate) update transactions.

Page 99: SAP Interview Questions

SAP Interview Questions Page 78 of 173Yogesh Mishra ([email protected])What are the requirements a dialog program must fulfill ?- A dialog program must fulfill the following requirements. a user friendly user interface. format and consistency checks for the data entered by the user. easy correction of input errors. access to data by storing it in the database.What are the basic components of dialog program ?- Screens (Dynpros)Each dialog in an SAP system is controlled by dynpros. A Dynpro consists of ascreen and its flow logic and controls exactly one dialog step.- ABAP/4 module poolEach dynpro refers to exactly one ABAP/4 dialog program. Such a dialogprogram is also called a module pool, since it consists of interactive modules.What is a dynpro ? What are its components ?- A dynpro (DYnamic PROgram) consists of a screen and its flow logic and controlsexactlyone dialog step.- The different components of the dynpro are:Flow logic: Calls of the ABAP/4 modules for a screenScreen layout: Positions of the texts, fields, pushbuttons, and so on for a screenScreen attributes: Number of the screen, number of the subsequent screen, andothersField attributes: Definition of the attributes of the individual fields on a screenWhat is screen flow logic? What are the selections in it? Explain PAI andPBO?Ans - Screen flow logic contains the procedural part of a screen. Thescreen flow logic is like an ABAP program in that it serves as a containerfor processing blocks. There are four event blocks, each of which isintroduced with the screen keyword PROCESS:PROCESS BEFORE OUTPUT....PROCESS AFTER INPUT....PROCESS ON HELP-REQUEST....PROCESS ON VALUE-REQUEST.Selections are performed in PAI.PROCESS BEFORE OUTPUT (PBO) is automatically triggered after the PAIprocessing of the previous screen and before the current screen is displayed. You canprogram the PBO processing of the screen in this block. At the end of the PBOprocessing, the screen is displayed.

Page 100: SAP Interview Questions

SAP Interview Questions Page 79 of 173Yogesh Mishra ([email protected])PROCESS AFTER INPUT (PAI) is triggered when the user chooses a function onthe screen. You can program the PAI processing of the screen in this block. At theend of the PAI.processing, the system either calls the next screen or carries on processing at thepoint from which the screen was called.PROCESS ON HELP-REQUEST (POH) and PROCESS ON VALUEREQUEST(POV) are triggered when the user requests field help (F1) or possiblevalues help (F4) respectively. You can program the appropriate coding in thecorresponding event blocks. At the end of processing, the system carries onprocessing the current screen.Can we use WRITE statement in screen fields ? If not how is datatransferred from field data to screen fields- We cannot write field data to the screen using the WRITE statement. The systeminstead transfers data by comparing screen field names with ABAP/4 variablenames. If both names are the same, it transfers screen field values to ABAP/4program fields and vice-versa. This happens immediately before andimmediately after displaying the screen.How does the interaction between the Dynpro and the ABAP/4 modulestakes place ?- A transaction is a collection of screens and ABAP/4 routines, controlled andexecuted by a Dialog processor. The Dialog processor processes screen afterscreen, thereby triggering the appropriate ABAP/4 processing for each screen.For each screen, the system executes the flow logic that contains thecorresponding ABAP/4 processing. The control passes from screen flow logic toABAP/4 code and back.How does the Dialog handle user requests ?- When an action is performed, the system triggers the PROCESS AFTER INPUTevent. The data passed includes field screen data entered by the user and afunction code. A function code is a technical name that has been allocated in theScreen Painter or Menu Painter to a menu entry, a pushbutton, the ENTER keyor a function key of a screen. An internal work field (ok-code) in the PAI moduleevaluates the function code, and the appropriateaction is taken.How are the function codes handled in flow logic ?- When the user selects a function in a transaction, the system copies the functioncode into a specially designated work field called OK_CODE. This field is globalin the ABAP/4 module pool. The OK_CODE can then be evaluated in thecorresponding PAI module.The function code is always passed in exactly the same way, regardless of whetherit comes from a screen's pushbutton, a menu option, function key or other GUIelement.What controls the screen flow ?- The SET SCREEN and LEAVE SCREEN statements control screen flow.

Page 101: SAP Interview Questions

SAP Interview Questions Page 80 of 173Yogesh Mishra ([email protected])What are “field” and “chain” statements ?- The FIELD and CHAIN flow logic statements let you program your own fieldchecks. FIELD and CHAIN tell the system which fields you are checking,andwhether the system should perform checks in the flow logic or call an ABAP/4module.What is an on “*-input field” statement ?- ON *-INPUTThe ABAP/4 module is called if the user has entered a "*" in the first character ofthe field, and the field has the attribute *-entry in the Screen Painter. You can usethis option in exceptional cases where you want to check only fields with certainkinds of input.What are conditional chain statements ?- ON CHAIN-INPUT similar to ON INPUT.The ABAP/4 module is called if any one of the fields in the chain contains a valueother than its initial value (blanks or nulls).ON CHAIN-REQUESTThis condition functions just like ON REQUEST, but the ABAP/4 module iscalled if any one of the fields in the chain changes value.What is “at exit-command” ?- The flow logic keyword AT EXIT-COMMAND is a special addition to theMODULE statement in the flow logic. AT EXIT-COMMAND lets you call amodule before the system executes the automatic field checks.Which function type has to be used for using “at exit-command” ?- To use AT EXIT-COMMAND, we must assign a function type ‘E’ to the relevantfunction in the Menu Painter or Screen Painter.What is the difference between SET SCREEN and CALL SCREEN ?With SET SCREEN, the current screen simply specifies the next screen in the chain.control branches to this next screen as soon as the current screen has beenprocessed. Return from next screen to current screen is not automatic. It does notinterrupt processing of the current screen. If we want to branch to the next screenwithout finishing the current one, use LEAVE SCREEN.With CALL SCREEN, the current (calling) chain is suspended, and a next screen (orscreen chain) is called in. The called screen can then return to the suspended chainwith the statement LEAVE SCREEN TO SCREEN 0. Sometimes we might want tolet an user call a popup screen from the main application screen to let them entersecondary information. After they have completed their entries, the users should beable to close the popup and return directly to the place where they left off in the mainscreen. Here comes CALL SCREEN into picture. This statement lets us insert such asequence into the current one.Can we specify the next-screen number with a variable. ( Yes / No ).

Page 102: SAP Interview Questions

SAP Interview Questions Page 81 of 173Yogesh Mishra ([email protected])Yes.The field SY-DYNNR refers to ________________.Number of the current screen.What is a dialog module ?A dialog module is a callable sequence of screens that does not belong to a particulartransaction. Dialog modules have their own module pools, and can be called by anytransaction.The syntax used to call a screen as a dialog box ( popup ) is_________________.CALL SCREEN <screen number>STARTING AT <start column> <start line>ENDING AT <end column> <end line> .What is a “call mode” ?In the ABAP/4 world, each stackable sequence of screens is a "call mode". This isimportant because of the way you return from a given current sequence. Toterminate a call mode and return to a suspended chain, set the "next screen" to 0 andleave to it:LEAVE TO SCREEN 0 or ( SET SCREEN 0 and LEAVE SCREEN ). When youreturn to the suspended chain, execution resumes with the statement directlyfollowing the original CALL SCREEN statement. The original sequence ofscreens in a transaction is itself is acalling mode. If you LEAVE TO SCREEN 0 in this sequence ( that is, withouthaving stacked any additional call modes ), you return from the transactionaltogether.The maximum number of calling modes stacked at one time is ______.Nine.What is LUW or Database LUW or Database Transaction ?A “LUW” ( logical unit of work ) is the span of time during which any databaseupdates must be performed in an “all or nothing” manner. Either they are allperformed ( committed ) , or they are all thrown away ( rolled back ). In theABAP/4 world, LUWs and transactions can have several meanings:LUW ( or “database LUW” or “database transaction” )This is the set of updates terminated by a database commit. A LUW lasts, at most,from one screen change to the next ( because the SAP system triggers databasecommits automatically at every screen change ).What is SAP LUW or Update Transaction ?Update transaction ( or “SAP LUW”)This is a set of updates terminated by an ABAP/4 commit. A SAP LUW may lastmuch longer than a database LUW, since most update processing extends overmultiple transaction screens.The programmer terminates an update transaction byissuing a COMMIT WORK statement.

Page 103: SAP Interview Questions

SAP Interview Questions Page 82 of 173Yogesh Mishra ([email protected])What happens if only one of the commands SET SCREEN and LEAVESCREEN is used without using the other?If we use SET SCREEN without LEAVE SCREEN, the program finishes processingfor the current screen before branching to <scr no>. If we use LEAVE SCREENwithout a SET SCREEN before it, the current screen process will be terminated andbranch directly to the screen specified as the default next-screen in the screenattributes.What is significance of the screen number ‘0’ ?In "calling mode", the special screen number 0 (LEAVE TO SCREEN 0) causes thesystem to jump back to the previous call level. That is, if you have called a screensequence with CALL SCREEN leaving to screen 0 terminates the sequence andreturns to the calling screen. If you have not called a screen sequence, LEAVE TOSCREEN 0 terminates the transaction.What does the command ‘SUPPRESS DIALOG’ do ?Suppressing of entire screens is possible with this command. This command allowsus to perform screen processing “in the background”. Suppresing screens is usefulwhen we are branching to list-mode from a transaction dialog step.What is the significance of the memory table ‘SCREEN’ ?At runtime, attributes for each screen field are stored in the memory table called‘SCREEN’. We need not declare this table in our program. The system maintains thetable for us internally and updates it with every screen change.What are the fields in the memory table ‘SCREEN’ ?- Name Length DescriptionWhy grouping of fields is required ? What is the maximum number ofmodification groups for each field ?- If the same attributes need to be changed for several fields at the same time thesefields can be grouped together. We can specify up to four modification groups foreach field.What is a screen group ? How it is useful ?Screen group is a field in the Screen Attributes of a screen. Here we can define astring of up to four characters which is available at the screen runtime in the SYDNGRfield. Rather than maintaining field selection separately for each screen of aprogram, we can combine logically associated screens together in a screen group.What is a Subscreen ? How can we use a Subscreen ?A subscreen is an independent screen that is displayed in an area of another ("main")screen. To use a subscreen we must call it in the flow logic ( both PBO and PAI ) ofthe main screen. The CALL SUBSCREEN statement tells the system to execute thePBO and PAI events for the subscreen as part of the PBO or PAI events of the mainscreen. The flow logic of your main program should look as follows:PROCESS BEFORE OUPTPUT.CALL SUBSCREEN <area> INCLUDING '<program>' '<screen>'.

Page 104: SAP Interview Questions

SAP Interview Questions Page 83 of 173Yogesh Mishra ([email protected])PROCESS AFTER INPUT.CALL SUBSCREEN <area>.Area is the name of the subscreen area you defined in your main screen. This namecan have up to ten characters. Program is the name of the program to which thesubscreen belongs and screen is the subscreen's number.What are the restrictions on Subscreens ?Subscreens have several restrictions. They cannot:Set their own GUI statusHave a named OK codeCall another screenContain an AT EXIT-COMMAND moduleSupport positioning of the cursorHow can we use / display table data in a screen ?ABAP/4 offers two mechanisms for displaying and using table data in a screen. Thesemechanisms are TABLE CONTROLS and STEP LOOPS.What are the differences between TABLE CONTROLS and STEP LOOPS ?- TABLE CONTROLS are simply enhanced STEP LOOPS that display data with thelook and feel of a table widget in a desktop application. But from a programmingstandpoint, TABLE CONTROLS and STEP LOOPS are almost exactly the same. Onemajor difference between STEP LOOPS and TABLE CONTROLS is in STEP LOOPStheir table rows can span more than one line on the screen. By contrast the rows in aTABLE CONTROLS are always single lines, but can be very long. ( Table controlrows are scrollable ). The structure of table controls is different from step loops. Astep loop, as a screen object, is simply a series of field rows that appear as a repeatingblock. A table control, as a screen object consists of : i ) table fields ( displayed inthe screen ) ii ) a control structure that governs the table display and what the usercan do with it.Why do we need to code a LOOP statement in both the PBO and PAIevents for each table in the screen ?We need to code a LOOP statement in both PBO and PAI events for each table in thescreen. This is because the LOOP statement causes the screen fields to be copiedback and forth between the ABAP/4 program and the screen field. For this reason, atleast an empty LOOP......ENDLOOP must be there.The field SY-STEPL refers to ___________________ .The index of the screen table row that is currently being processed. The systemvariable SY-STEPL only has a meaning within the confines of LOOP...ENDLOOPprocessing. Outside the loop, it has no valid value.How can we declare a table control in the ABAP/4 program ?Using the syntax controls <table control name> type tableview using screen <scrno>.Differentiate between static and dynamic step loops.

Page 105: SAP Interview Questions

SAP Interview Questions Page 84 of 173Yogesh Mishra ([email protected])Step loops fall into two classes: Static and dynamic. Static step loops have a fixedsize that cannot be changed at runtime. Dynamic step loops are variable in size. Ifthe user re-sizes the window the system automatically increases or decreases thenumber of step loops blocks displayed. In any given screen you can define anynumber of static step loops but only a single dynamic one.What are the two ways of producing a list within a transaction ?By submitting a separate report.By using leave to list-processing.What is the use of the statement Leave to list-processing ?Leave to list-processing statement is used to produce a list from a module pool.Leave to list-processing statement allows to switch from dialog-mode to listmodewithin a dialog program.When will the current screen processing terminates ?A current screen processing terminates when control reaches either a Leave-screenor the end of PAI.How is the command Suppress-Dialog useful ?Suppressing entire screens is possible using this command. This command allowsus to perform screen processing “in the background”. The system carries out all PBOand PAI logic, but does not display the screen to the user. Suppressing screens isuseful when we are branching to list-mode from a transaction dialog step.What happens if we use Leave to list-processing without using Suppress-Dialog ?If we don't use Supress-Dialog the next screen will be displayed but as empty.when the user presses ENTER, the standard list output is displayed.How the transactions that are programmed by the user can be protected ?By implementing an authority check.What are the modes in which any update tasks work ?Synchronous and Asynchronous.What is the difference between Synchronous and Asynchronous updates ?A program asks the system to perform a certain task, and then either waits or doesn'twait for the task to finish. In synchronous processing, the program waits: controlreturns to the program only when the task has been completed. In asynchronousprocessing, the program does not wait: the system returns control after merelylogging the request for execution.What is the difference between Leave Transaction and Call Transaction ?- In contrast to LEAVE TO TRANSACTION, the CALL TRANSACTIONstatement causes the system to start a new SAP LUW . This second SAPLUW runs parallel to the SAP LUW for the calling transaction.Overall how do you write transaction program in SAP?Create the transaction using object browser (SE80)

Page 106: SAP Interview Questions

SAP Interview Questions Page 85 of 173Yogesh Mishra ([email protected])Define the objects e.g. screen, Transactions. – Modules – PBO, PAI.And you can create a transaction from SE93 also.Does SAP has a GUI screen painter? If yes What operating systems is itavailable on? What is the other type of screen painter called?YesOn what OS is it available – Window based.Other type of screen painter – alpha numeric screen painter.What are step loops? How do you program page down page up in steploop?Step loops: Method of displaying a set of records.Page down & Page up: decrement / increment base counterIndex = base + sy-step1 – 1Normally how many and what files get created when a transactionprogram is written? What is top XXXXXXTOP program?Main program with A IncludesI ) TOP INCLUDE – GLOBAL DATAII ) Include for PBOIII) Include for PAIIV) include for FormsWhere is processing logic located in an on-line program?Ans :- ABAP/4 program (module pool)Describe the online processor. What is its function?Ans :- Controls the flow of online program.How are screen names defined? Do you create a screen first or defineyour program first?Ans :- Define the program first and then create a screen.What does PBO stands for? When is the PBO logic performed?Ans :- PROCESS BEFORE OUTPUT –Processed before the screen is displayed.What does PAI stands for? When is the PAI logic performed?Ans :- PROCESS AFTER INPUT –Processed after the user has pressed ENTER.How is data passed from the screen fields to the ABAP/4 program?Ans :- Through the flow logic.What does the TOP Include do for you as a programmer?Ans: For global declarations.What are the steps in creating screen?Where are the module statement declared? Where is the logic withineach module?Ans :-1. Go to SE41 ( Screen Painter )

Page 107: SAP Interview Questions

SAP Interview Questions Page 86 of 173Yogesh Mishra ([email protected])Enter the program name and screen number . Press Enter.2. Design the screen and save, check and activate it.Module statements are in the flow logic within each module is in the ABAP/4 modulepoolProgram.What is the significance of the word ‘OUTPUT’ in the declarationMODULE TEST_KNOWLEDGE OUTPUTENDMODULE.Ans :- Then we know that it is part of the PBO, therefore is processed before thescreen is presented.Describe the fields on the screen ?Ans :- Attributes screen , Screen types ,follow up screens , cursor position etc. Afteryou have entered the screen number, the screen branches to the screen attributemaintenance. Enter a short description , select the type NORMAL and specify thenumber of the follow-up screen.What are the three components of ON-LINE program?Ans :- Screen , ABAP/4 program and transaction code.What is gained by using the Dictionary Fields menu option when creatingyour screen?Ans :- The fields you have created inherits the same attributes as those in the DataDictionary.How to Create a checkbox , frame, pushbuttons and radio buttons on ascreen?Ans :- Just type a name and go to graphic element push button.How do you assign an OK_CODE for a push button? How it is used in yourABAP?Ans :- In the field list ,name the element and give it the value that it will representwhen pushed You must make sure that you clear the field that represents thepushbutton after every check.What automatic checks does the screen perform? (should be four)Describe all four and how they are used?Ans :- The field format, required input, a foreign key table ,parameters.What are the two methods to declare input field as mandatory?If you set required field as program attribute, the user must enter a value in the field.Required fields appear on the screen containing a question mark (?).How does foreign key work? What you have to put in your screen toidentify the foreign key?

Page 108: SAP Interview Questions

SAP Interview Questions Page 87 of 173Yogesh Mishra ([email protected])No? Then where is the foreign key identified?Ans :- You have defined a screen field by referring to a Data Dictionary, which has acheck table. When the foreign key is checked the system compares the values of thefields to be checked with the contents of the key fields of the corresponding table.What are the two effects of the foreign key from a user standpoint?Ans :- Possible entries & a check against the key field contents.What is user defined validation checks in the flow logic?Ans :- FIELD…SELECT FIELD…VALUES or in the module pool FIELD…MODULE.Does the value command in the flow logic go in the PAI or the PBO event?Ans :- PAI.If an error occurs in the module pool, which fields are available for entryand which are display only fields?Ans :- Only those fields defined with the FIELD statement before MODULE &relevant checks in a chain.When is the chain command used in the PBO event?Ans :- If you want to make more than one field ready for input after an error.What table stores the online messages? What is the message class and whatis its significance?Ans :- Table T100. The message class is a specific class of messages for a group oftransactions.What are the 5 different message types and how are they handled by thesystem? What is then difference between the Warning and Errormessages?Ans :-A : Abend Message displayed on the current screen and subsequent task terminatedI : Information Message displayed on the current screen , but user can continueprogram by pressing ENTERE: Error Message displayed on the current screen. With FIELD statements , the fieldsconcerned become ready again for input and user is required to make the entry/entries againW : Warning As E message , but correcting input is optionalS: Success Message displayed on the follow-up screen as an I message.What does WITH statement add to a message?Ans :- In the place of the & or $ the fields or values are placed in the error message.What effect does the FIELD statement have within the flow logic?Ans :- The field statement resets the fields so those fields are ready for input again.Where are the messages displayed on the screen?Ans :- At the bottom.

Page 109: SAP Interview Questions

SAP Interview Questions Page 88 of 173Yogesh Mishra ([email protected])Is the SET PARAMETER statement to be issued in PBO or PAI module?Why?Ans :- PAI, the value must be input into the fields first before it can be placed in thebuffer.Where does the GET PARAMETER statement get its values? Which fieldgets populated with the new value?Ans :- From the buffer.Where can the SET CURSOR command be executed? What is its effect?Ans :- In PBO, To position the CURSOR in a particular field after the screen isdisplayed.What are the matchcodes and how do they affect the screen field? Whereare they specified in the online program?Ans :- In the Properties window of the Field.What is the effect of an ON CHAIN-REQUEST command in your flow logic?Ans :- When value of any of the fields between CHAIN…..ENDCHAIN is attemptedto change.What commands are used to change database table entries?Ans :-How can you check if the changes to the database were successful?Ans :-What is the difference between the Long form and the short form of makingdatabase changes?Ans :- Long Form:Update MARA and set brgew = 0 where matnr = ‘MAT!’.This is a standard Oracle Statement to modify the entry in theDatabase.Short Form:MARA-MATNR = ‘MAT1’. MARA-BRGEW = 0.Modify MARA.This is an SAP defined statement to modify the table.It is more secure and consistent.What is the advantages using the SAP long form over the short form ofdatabase changes?Ans :- May be Fast Effect.Can ‘where’ clause be used when updating database entries?Ans :- Yes.Describe array operations and their advantages?Ans :-

Page 110: SAP Interview Questions

SAP Interview Questions Page 89 of 173Yogesh Mishra ([email protected])What is logical unit of work? How is it defined?Ans :- Logical Unit of work is a block of memory area where database contents arestored and manipulated.For every SAP application LUW is automatically created for databasecommunication. Besides this we have SAP LUW s also there.What function is performed by the commit work command?Ans :- When you perform Commit , all the LUW s work will be reflected to thedatabase.Why is it so important for a programmer to check the lock entries?Ans :- To find out if record is locked and also to maintain data integrity.How can you find a lock entry for a database table?Ans :- The function module ‘ENQUEUE <lock object>’ checks whether a lock wastriggered for the same object. Otherwise an exception FOREIGN_LOCK is carriedout. If the object is not locked the function module sets the lock.What steps are necessary to set a lock on a record within a database table?Ans :-Execute CALL FUNCTION statementCALL FUNCTION “ENQUEUE <lock object’>EXPORTING…EXCEPTIONS…CASE SY-SUBRC...ENDCASE.How do you unlock the entry? Why is this necessary?Ans :-Execute the CALL FUNCTION statementCALL FUNCTION ‘DEQUEUE <lock object>’EXPORTING…It is important to unlock the entry so others can update it.What is the difference between ‘CALL SCREEN # # # ‘ and ‘SET SCREEN### ’… LEAVE SCREEN?Ans :-SET SCRREN statement sets or overwrites the follow-up screen.LEAVE SCREEN executes the screen number currently in the follow-screen fieldCALL SCREEN interrupts the processing of the current screen to call a new screen ora chain of screens, processing of the current screen is resumed directly after the call.After a CALL SCREEN command where does the processing return afterthe screen has been executed?Ans :- It returns the processing to the calling screen.Which is the more similar to a call with return, the SET SCREEN or theCALL SCREEN?Ans :- The CALL SCREEN command.

Page 111: SAP Interview Questions

SAP Interview Questions Page 90 of 173Yogesh Mishra ([email protected])What function is performed by the SET SCREEN 0 command?Ans :- Returns to the original screen.What are the main differences between the repot status and screen status?Ans :-Where must you place the SET PF-STATUS command in your onlineprogram?Ans :- Place it in the PBO module of the screen.Why is it good idea to clear OK_CODE field after deciding which action totake?Ans :- You need to clear the OK code to avoid sending a screen that already has afunction code.How do you specify that a function is an exit type command?Ans :- By specifying function type E for the pushbuttons or menu options in thescreen painter or menu painter.What is the purpose of the ‘AT EXIT-COMMAND’?Ans :- Usually there are many ways to leave a screen (back,exit,cancel) .Thiscommand will perform termination logic for all functions of type E.What are screen groups?Ans :- A group of screen fields such as radio buttons or checkboxes.What is the correct syntax for dynamically modifying a large number ofscreen fields?Ans :-MODULE MODIFY _SCREEN_OUTPUT...LOOP AT SCREENIF SCREEN –GROUP = 3D ‘GR1’SCREEN-INPUT=3D 1ENDIF.IF SCREEN-NAME = 3D ‘TAB-FIELD’SCREEN-ACTIVE=3D 0.ENDIF.MODIFY SCREEN.ENDLOOP.What is the name of the internal table that stores the screen information?Ans :- SCREEN.What is the purpose of the MODIFY command when performing thedynamic screen modifications?Ans :- after you activate or deactivate the field attributes by assigning them 1 or 0,you save the modifications via MODIFY SCREEN command.

Page 112: SAP Interview Questions

SAP Interview Questions Page 91 of 173Yogesh Mishra ([email protected])Direction for the use of check box and radio buttons in screen painter?Ans :-Creating Radio Button and Check Boxes on the screenGo to the full screen editor.Place an underscore at the point where you want to place the field.Define the name of the field using <Field Attributes>Place the cursor on the field and press <Graphic element>Then press <Radio Buttons> or <Check boxes> depending on which graphic elementyou wantThen you group related check boxes and radio boxes.What are user Exits and transactions?Ans :- Generally, user exits are the forms defined within SAP standard code (usuallystarting with user exit). These predefined areas in the code allow programmers toinsert custom defined code into the standard processing of a transaction (e.g. allowresorting of the batch sequence in VA01 batch processing). There are many specificexamples if you are interested, but usually user exits are searched for when a specificuse is being analyzed.What happens if you enter 0 in NEXT Screen attribute?Ans :- It does not go to any other screen and it moves back one level. However youcan control this in run-time using SET SCREEN command.How to modify the attributes of screen fields at run time ?.We loop through the fields of the screen. When you find the name of a screen fieldyou want tomodify, set attributes for the field and use MODIFY SCREEN to update theattribtes.You can find the attributes in the internal table SCREEN.This loop makes some of the screen fields invisible ind a selection screen:AT SELECTION-SCREEN OUTPUT.LOOP AT SCREEN.IF screen-name = 'P_VERAB' ORscreen-name = 'P_STXT1' ORscreen-name = 'P_STXT2' ORscreen-name = '%_P_VERAB_%_APP_%-TEXT' ORscreen-name = '%_P_STXT1_%_APP_%-TEXT' ORscreen-name = '%_P_STXT2_%_APP_%-TEXT'.screen-active = '0'.MODIFY SCREEN.ENDIF.ENDLOOP.How to leave dynpro allthough required entry not made ?In the menu painter - Function attributes for the button, set Functionaltype to E (Exit command)PROCESS AFTER INPUT.

Page 113: SAP Interview Questions

SAP Interview Questions Page 92 of 173Yogesh Mishra ([email protected])Call module that leaves screen before User_Command_xxxx isexecutedMODULE ReturnExit AT EXIT-COMMAND.MODULE user_command_1000.MODULE returnexit.CASE sy-ucomm.WHEN 'CANC'. "Or whatever you want to call itClear w_screen.LEAVE TO SCREEN 0.ENDCASE.ENDMODULE.Calling a report from a dynproThere are to ways to do this:Use leave to list-processing if you want to do it in your module pool.You will not be able to useselection-screens.Use the submit statement to start a seperate report from yourdynpro.Anyone who have idea on how to know the selected value on run-time?How can get the table control attribute selected value ? I try to read the value indebuger which is #(table_control-cols-selected). There is no difference on the other row which is notselected.The tc-cols-selected is for column selection only. For row selection you have twoscenariosturn on the SelColumn attribute in screen painter, give it a name and declarean abap variable with the same name type C length 1. In your PAI loop atitab, when the selected row is processed the abap variable will = 'X'. At thispoint you can save the record or key.you can determine which row the cursor is on in your table control as follows:DATA: LINE_SEL LIKE SY-STEPL,TABIX LIKE SY-TABIXGET CURSOR LINE LINE_SEL.TABIX = <table control>-TOP_LINE + LINE_SEL - 1.TABIX is now the index of the selected row.F4 Help - Calling it from a program and limiting values ?

Page 114: SAP Interview Questions

SAP Interview Questions Page 93 of 173Yogesh Mishra ([email protected])To avoid the standard F4 help to be show, insert the event PROCESS ON-VALUEREQUESTin the program and add a field statement for the field that should triggerthe F4 help. In the mdoule called fromPROCESS ON-VALUE-REQUEST, call function moduleF4IF_FIELD_VALUE_REQUEST.Example 1 - Dynproprocess before output......process after input......PROCESS ON VALUE-REQUEST.FIELD it_zsd00003-prctr MODULE f4_help_for_pctr.MODULE f4_help_for_pctr INPUT.NOTE:Tabname/fieldname is the name of the table and fieldfor which F4 should be shown.*Dynprog/Dynpnr/Dynprofield are the names of theProgran/Dynpro/Fieldin which the f4 value should be returned.*Value: The value of the Dynpro fuield when calling the F4 help.You can limit the values shown, by inseting a value in this parametere.g '50*' to show only values beginning with 50CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'EXPORTINGtabname = 'ZSD00003'fieldname = 'PRCTR'* SEARCHHELP = ' '* SHLPPARAM = ' 'dynpprog = 'ZSD00002_BRUGERKONV_LISTE'dynpnr = '0100'dynprofield = 'IT_ZSD00003-PRCTR'* STEPL = 0value = '50*'* MULTIPLE_CHOICE = ' '* DISPLAY = ' '* SUPPRESS_RECORDLIST = ' '* CALLBACK_PROGRAM = ' '

Page 115: SAP Interview Questions

SAP Interview Questions Page 94 of 173Yogesh Mishra ([email protected])* CALLBACK_FORM = ' 'TABLES* RETURN_TAB =EXCEPTIONS* FIELD_NOT_FOUND = 1* NO_HELP_FOR_FIELD = 2* INCONSISTENT_HELP = 3* NO_VALUES_FOUND = 4* OTHERS = 5.IF sy-subrc <> 0.MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNOWITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.ENDIF.ENDMODULE. " F4_help_for_pctr INPUT.What you can do with a transaction variantInsert default values into fieldshange the ready for input status for fieldsHide various screen elements, menu functions or entire screensAdjust table control settingsNote: Transaction variants can only be used with dialog transactions.How to create a transaction variantTransaction variants are created with transaction: SHD0In the field Transaction on SHD0 enter the transactioncode for the screen you wanttpo modify (E.g. VA03) . In the field Variant on SHD0 enter the name you want togive the transaction variant (E.g. ZVA03)Press CreateNow the screen for the transaction is shown and you can enter default values in thefields of the screenPress Enter. Now a screen that enbles you to make further customizing (Hide, Outputonly, Invisible, Mandatory) if the screen fields is shown.After you have finished customizing the screen press Enter to go to the next screen orave and exit to save the Transaction variantHow to find user exitsDisplay the program where you are searching for and exit and search for CALLCUSTOMER-EXITIf you know the Exit name, go to transaction CMOD. Choose menu Utillities->SAPEnhancements. Enter the exit name and press enter.You will now come to a screen that shows the function module exits for the exit.Using Project management of SAP EnhancementsWe want to create a project to enahance trasnaction VA01Go to transaction CMOD

Page 116: SAP Interview Questions

SAP Interview Questions Page 95 of 173Yogesh Mishra ([email protected])Create a project called ZVA01Choose the Enhancement assign radio button and press the ChangebuttonIn the first column enter V45A0002 Predefine sold-to party in salesdocument . Note that an enhancement can only be used i 1 project. Ifthe enhancement is allready in use, and error message will bedisplayedPress SavePress Components. You can now see that enhancement uses user exitEXIT_SAPMV45A_002. Double click on the exit.Now the function module is displayed. Double click on include ZXVVAU04 in thefunction moduleInsert the following code into the include: E_KUNNR = '2155'.Activate the include program. Go back to CMOD and activate theproject.Goto transaction VA01 and craete a salesorder. Note that Sold-topartynow automatically is "2155"To run the transaction varian, you must create a new Transaction code in SE93 thatreferes to the Transaction variant. Choose Transaction with variant as Start object.Note: The transaction variant can also be called from a program that imcludes a callto function module RS_HDSYS_CALL_TC_VARIANTCan a field exit on a screen access the values entered by a user on thatscreen for the screen fields other than the field for which the exit hasbeen applied. if yes then how?Maybe this function helps you: DYNP_VALUES_READ. It reads the dynpro-valuesbefore processing PAI.What are events in dialogs?Process Before Output andProcess After Input.Process On ValueProcess On HelpModule output.Module input.What are significance of PBO and PAI?Before display the screen PBO is fired. This is for screen displayAfter giving the user input PAI is fired. This is for input validationWhere you will validate entries in the fields?Entries can be validated in PAI.You can validate in Field Exits also.What is use of Chain and EndChain?For calling a particular PAI module if any one of fields in a group meets a condition, weuse to combine all such fields .

Page 117: SAP Interview Questions

SAP Interview Questions Page 96 of 173Yogesh Mishra ([email protected])How to change screen dynamically?By modifying the screen attributes.How to capture changes on the screen fields? Same in case of table control?We can capture changes on the screen fields using module on input and on request.If you are validating contents of field but user want to exit from thetransaction without validating contents; How to handle this scenario?By at exit-command we can do.How to pass field values from one screen to other screen?By using set and get parameter id statements.What is the difference in using COMMIT WORK within a calledtransaction and within a called dialog module in an existing module.Ans.:Transaction: It will create a new LUW and so you have to say COMMIT WORK in acalled transaction for getting any of the update statements to be fruitful inside thecalled transaction.Dialog module: Since no new LUW is created, COMMIT WORK is not necessary.Which 2 transaction codes are used to manage enhancements?Ans: SMOD and CMODWhich enhancement is local, which is global:Field ExitsScreen ExitsProgram ExitsMenu ExitsWhere can you create an enhancement to show your own F1 Help on afield?Ans: in POHWhat enhancements can be created using Cmod?Ans: Customer Enhancements, i.e., Field Exits.What is the code for showing a list produced in a dialog program?Ans: Leave screen.Leave to List-processing.OrSubmit <program name>.When is field Name1 transported to the program in this coding:Process After Input.Module ABC.Field Name1 Module DEF.

Page 118: SAP Interview Questions

SAP Interview Questions Page 97 of 173Yogesh Mishra ([email protected])What is the effect of SUPPRESS DIALOG in PBO?Field Name2 Module GHI.If an error message was raised in Module GHI, which fields would beready for input?Ans: The fields that are placed in CHAIN………ENDCHAIN.In which 2 places could you set the GUI status and title bar for a modaldialog box?What does CHAIN ....END CHAIN do?Sometimes you want to check several fields as a group. To do this, include the fields in aFIELD statement, and enclose everything in a CHAIN-ENDCHAIN block.Example**** Screen flow logic: ****CHAIN.FIELD: SPFLI-CARRID, SPFLI-CONNID.MODULE CHECK_FLIGHT.ENDCHAIN.When an error is found inside a chain, the screen is re-displayed, and all fields foundanywhere in the chain are input-enabled. All non-chain fields remain disabled.How can you test flow logic?Check function checks the syntax,data-consisteny and screen layout of the screen.To test the syntax, from the menu path choose screen---->check-------> syntax.To test the data consistency, from the menu path choose screen---->check------>consistency.To check the layout,from ythe menu path choose screen----->check----->layout.What happens if you choose hold data option in screen atributes?To retain data entered by a user. The system automatically displays this data if the userreturns to this screen.What happens if you enter 0 in NEXT screen attribute?In ABAP/4 each stackable sequence of screens is a "call mode". This is importantbecause of the way you return from a given current sequence. To terminate a call modeand return to a suspended chain, set the "next screen" to 0 and leave to it:When youreturn to the suspended chain, execution resumes with the statement directly followingthe original CALL SCREEN statement.The original sequence of screens in a transactionis itself a calling mode. The original sequence of screens in a transaction is itself a callingmode. If you LEAVE TO SCREEN 0 in this sequence (that is, without having stacked anyadditional call modes), you return from the transaction altogether.How many menu titles you can have in a main menu?You can have six menus in a menu bar.In addition to this system provides two moremenus ie system and help. You can have only one menu bar for a status.

Page 119: SAP Interview Questions

You can maintain 15 entries in a menu and upto three levels.

Page 120: SAP Interview Questions

SAP Interview Questions Page 98 of 173Yogesh Mishra ([email protected])What is the difference between the "change on-input" and "Change onrequest" in the PAI of a screen? ON INPUTThe ABAP/4 module is called only if the field contains a value other than its initial value.This initial value is determined by the field's data type: blanks for character fields, zeroesfor numerics. ON REQUESTThe ABAP/4 module is called only if the user has entered a value in the field value sincethe last screen display. The value counts as changed even if the user simply types in thevalue that was already there.What are user exits? What is involved in writing them? What precautionsare needed?User defined functionality included to predefined SAP standards. Point in an SAPprogram where a customer's own program can be called. In contrast to customerexits, user exits allow developers to access and modify program components and dataobjects in the standard system. On upgrade, each user exit must be checked to ensurethat it conforms to the standard system.There are two types of user exit:User exits that use INCLUDEs.These are customer enhancements that are called directly inthe program.User exits that use tables.These are used and managed using Customizing.Should find the customer enhancements belonging toparticular development class.What are the different ways in which you can make changes to SAPstandard software ?CustomizingEnhancements to the SAP StandardModifications to the SAP StandardCustomer DevelopmentWhat is customizing ?Customizing is the setting of system parameters via SAP's own interface.Why do you need enhancements ?The standard applications do not offer some of the functionality you need. The R/3enchancement concept allows you to add your own functionality to SAP's standardbusiness applications.

Page 121: SAP Interview Questions

SAP Interview Questions Page 99 of 173Yogesh Mishra ([email protected])What are the different types of enhancements ?Enhancements using customer exitsCustomers' potential requirements which are not included in the standard softwareare incorporated in the standard as empty modification 'shells'. Customers can thenfill these with their own coding. Enhancements can relate to programs, menus andscreens. Upward compatibility is assured. In other words, SAP guarantees that thejump from the standard software to the exit and the interface which call the exit willremain valid in future releases.Enhancements to ABAP/4 Dictionary elementsThese are ABAP/4 Dictionary enhancements (creation of table appends), textenhancements (customer-specific key words and documentation for data elements)and field exits (creation of additional coding for data elements).What is customer development ?Creating customer-specific objects within the customer name range.What is SSCR ?SSCR (SAP Software Change Registration) is a procedure, for registering all manualchanges to SAP source coding and SAP Dictionary objects.What is the difference between modifications and enhancements ?Modifications mean making changes to the SAP standard functionality.Enhancements mean adding some functionality to SAP standard functionality.What are the disadvantages of modification ?Modifying standard code can lead to errorsModifications mean more work during software upgradesWhat are the advantages of enhancements ?Do not affect standard SAP source codeDo not affect software upgradeswhen do you opt for modification ?Customer exits are not available for all programs and screens within the R/3standard applications. You can only use exits if they already exist within the SAP R/3System . Otherwise you have to opt for modifications .What are the various types of customer exits ?Menu exitsScreen exitsFunction module exitsKeyword exitsWhat is a menu exit ?Adding items to the pulldown menus in standard R/3 applications .13.What is a screen exit ?Adding fields to the screens within R/3 applications. SAP creates screen exits byplacing special subscreen areas within a standard R/3 screen and calling a customersubscreen from within the standard dynpro's flow logic.

Page 122: SAP Interview Questions

SAP Interview Questions Page 100 of 173Yogesh Mishra ([email protected])What is a function module exit ?Adding functionality to R/3 applications. Function module exits play a role in bothmenu and screen exits.What is a keyword exit ?Add documentation to the data elements of key words defined in the ABAP/4Dictionary. The system displays this documentation whenever a user presses F1 toget online help for a screen field.How do SAP organizes its exits ?SAP organizes its exits in packages that are called SAP enhancements. Each SAPenhancement can contain many individual exits.What is an add-on project ?To take advantage of the exits available within standard R/3 applications, you needto create an add-on project. This project lets you organize the enhancementpackages and exits you want to use. The add-on project also allows you to hang addonfunctionality onto the exit hooks contained with SAP enhancements.www.geocities.com/abap_sap_tutorialMaster data is a collection of information about a person or an object, e.g. a cost object,vendor, or G/L account. For example, a vendor master record contains not only generalinformation such as the vendor's name and address, but also specific information, suchas payment terms and delivery instructions. Generally for end users, master data isreference data that you will look up and use, but not create or change.Transactional data is data related to a single business event such as a purchaserequisition or a request for payment. When you create a requisition, for example, SAPcreates an electronic document for that particular transaction. SAP gives the transactiona document number and adds the document to the transaction data that is already in thesystem. Whenever you complete a transaction in SAP, that is, when you create, change,or print a document in SAP, this document number appears at the bottom of the screen.WorkflowA routing tool in SAP that forwards documents for review or approval. For example, arequisition that needs to be approved is sent to the appropriate approver's inbox.

Page 123: SAP Interview Questions

SAP Interview Questions Page 101 of 173Yogesh Mishra ([email protected])Workflow is also used to route journal vouchers, credit card charges, and otherdocuments in SAP.Cost Object:A Cost Object collects expenses and revenues for a particular purpose, such as aresearch project. In SAP there are three types of cost objects: Cost Center, InternalOrder, and WBS (Work Breakdown Structure) Element (see below for definition).Cost Center:General or operating Cost Objects are known in SAP as Cost Centers. Cost Centers arebudgeted on the fiscal year.Internal Order:A non-sponsored Cost Object (for example, funding from the MIT Provost) used to trackcosts over periods other than fiscal years. Internal Orders are often created to track giftsor endowments at MIT.WBS Element: WBS Elements are funded by outside sponsors and are used to trackcosts of a particular research project over the entire span of its activity. They may alsobe created to track other sponsored activities, such as gifts.G/L Account:G/L accounts are also called Cost Elements in SAP. They are a classification byexpense or revenue type. In the CO (Controlling) module of SAP, the term Cost Elementis used. In the FIDatabase tables and open SQLAdd a single record to a database tableinsert into <database table> values <work area>Inserting all lines from an internal table into a database table:insert <database table> from table <internal table>Delete all recordsSelect * from zmellemtab.delete zmellemtab.endselect.Deleting records using records from an internal tabledelete employees from table itab.BASIS LAYERWhat are the central interfaces of the R/3 system ? - Presentation interface Databaseinterface Operating system interfaceWhich interface controls what is shown on the p.c. ? - Presentation interface Whichinterface converts SQL requirements in the SAP development systemto those of the database ? - Database interfaceWhat is SAP dispatcher ? - SAP dispatcher is the control agent which manages theresources for the R/3 applications.

Page 124: SAP Interview Questions

SAP Interview Questions Page 102 of 173Yogesh Mishra ([email protected])What are the functions of dispatcher ? - Equal distribution of transaction load to thework processes Management of buffer areas in main memoryIntegration of the presentation levels Organization of communication activiesWhat is a work process ? - A work process is where individual dialog steps are actuallyprocessed and the work is done. Each work process handles one type of request.Name various work processes of R/3 system ? 1) Dialog or Online ( processes only onerequest at a time ) 2) Background ( started at a specified time )3) Update ( primary or secondary )4) Enque( lock mechanism )5) Spool ( generated online or during back ground processing For printing )What are the types of Update requests ? - An update request can be divided into oneprimary (V1) and several Secondary update components (V2). Time-critical operationsare placed in V1 component and those whose timing are less critical are placed in V2components. If a V1 update fails, V2 components will not be processed.What are the roll and page areas ? - Roll and page areas are SAP R/3 buffers used tostoreuser contexts ( process requests ) . The SAP dispatcher assigns process requests to workprocesses as they are received. If the work process is unavailable the process requests arequeued in the roll and page areas. Paging area holds data from the application programs.Roll area holds data from previous dialog steps and data that characterizes user.What is a Spool request ? - Spool requests are generated during dialog or backgroundprocessing and placed in the spool database with information about the printer and printformat.The actual data is placed in the Tem Se (Temporary Sequential objects).What are the different database integrities ? - Semantic integrity - Relational integrity -Primary key integrity - Value set integrity - Foreign key integrity and - Operationalintegrity.Type of a table or structure ::The table type determines how the logical table descriptiondefined in the ABAP/4 Dictionary is reproduced on the database.There are the following table types: a. transparent table b. structure c. append structureFor internal purposes, such as storing control data or update texts, there are in addition

Page 125: SAP Interview Questions

the following table types: a. pooled table b. cluster table c. generated view structureTransparent tableThere is a physical table on the database for each transparent table. The names of thephysical tables and the logical table definition in the ABAP/4 Dictionary correspond.All business data and application data are stored in transparent tables.Structure No data records exist in the database for a structure. Structures are used forthe interface definition between programs or between screens and programs.

Page 126: SAP Interview Questions

SAP Interview Questions Page 103 of 173Yogesh Mishra ([email protected])Append structure An append structure defines a set of fields which belong to anothertableor structure but which are treated in the correction administration as its own object.Append structures are used to support modifications.Pooled table Pooled tables can be used to store control data (e.g. screen sequences,program parameters or temporary data). Several pooled tables can be combined to forma table pool. The table pool corresponds to a physical table on the database in which allthe records of the llocated pooled tables are stored.Cluster table Cluster tables contain continuous text, for example, documentation.Several cluster tables can be combined to form a table cluster. Several logical lines ofdifferent tables are combined to form a physical record in this table type. This permitsobject-by-object storage or object-by-object access. In order to combine tables inclusters, at least parts of the keys must agree. Several cluster tables are stored in onecorresponding table on the database.Generated view structureIn activation a structure is generated for a view. This structure serves as interface for theruntime environment. It does not generally appear in the ABAP/4 Dictionary.What is a Data Class?The Data class determines in which tablespace the table is stored when it is created inthe database.What is a Size Category?The Size category describes the probable space requirement of the table in the database.How Many types of size categories and data classes are there?There are five size categories (0-4) and 11 data classes, only three of which areappropriate for application tables:- APPL0 - Master data (data frequently accessed but rarely updated) - APPL1 -Transaction data (data that is changed frequnetly) - APPL2 - Organisational data(customizing data that is entered when system is configured and then rarely changed)What are control tables?The values specified for the size category and data class are mapped to database-specificvalues via control tables.What is the function of the transport system and workbench organiser?The function of the transport system and the Workbench Organizer is to manage any

Page 127: SAP Interview Questions

changes made to objects of the ABAP/4 Development Workbench and to transport thesechanges between different SAP systems.What is a table pool?A table pool (or pool) is used to combine several logical tables in the ABAP/4 Dictionary.The definition of a pool consists of at least two key fields and a long argument field(VARDATA).What are pooled tables?

Page 128: SAP Interview Questions

SAP Interview Questions Page 104 of 173Yogesh Mishra ([email protected])These are logical tables which must be assigned to a table pool when they are defined.Pooled tables can be used to store control data (such as screen sequences or programparameters).What is a table cluster?A table cluster combines several logical tables in the ABAP/4 Dictionary. Several logicalrows from different cluster tables are brought together in a single physical record. Therecords from the cluster tables assigned to a cluster are thus stored in a single commontable in the database.Which objects are independent transport objects?Domains, Data elements, Tables, Technical settings for tables, Secondary indexes fortransparent tables, Structures, Views, Matchcode objects, Matchcode IDs, Lock objects.What are the Data types of the external layer? ACCP, CHAR, CLNT, CUKY,CURR, DATS,DEC, FLTP, INT1,INT2, INT4, LANG,LCHR,LRAW, NUMC, PREC, QUAN,RAW ,TIMS, UNIT, VARC.What are the Data types of the ABAP/4 layer?Possible ABAP/4 data types:C: Character.D: Date, format YYYYMMDD.F: Floating-point number in DOUBLE PRECISION (8 bytes).I: Integer.N: Numerical character string of arbitrary length.P: Amount or counter field (packed; implementation depends on hardwareplatform).S: Time stamp YYYYMMDDHHMMSS.T: Time of day HHMMSS.V: Character string of variable length, length is given in the firsttwo bytes.X: Hexadecimal (binary) storage.How can we set the tablespaces and extent sizes ? You can specify the extent sizes andthe tablespace (physical storage area in the database) in which a transparent table is tobe stored bysetting the size category and data class.What is a data dictionary ? Data dictionary is a central source of data in a datamanagement system. Its main function is to support the .It has details about - What datais contained ? - What are the attributes of the data ? - What is the relationship existingbetween the various data elements ?

Page 129: SAP Interview Questions

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

Page 130: SAP Interview Questions

SAP Interview Questions Page 105 of 173Yogesh Mishra ([email protected])A field containing currency amounts (data type CURR) must be assigned to a referencetable and a reference field. Explain. As a reference table, a system table containing all thevalid currencies is assigned or any other table which contains a field with the currencykey format. This field is called as reference field. The assignment of the field containingcurrency amounts to the reference field is made at runtime. The value in the referencefield determines the currency of the amount.What is the significance of Technical settings (specified while creating a table inthe data dictionary) ?By specifying technical settings we can control how database tables are created in thedatabase. The technical settings allows us to- optimize storage space requiremnets - table access behaviour - buffering required -changes to entries loggedWhat is the significance of Delivery Class ? - The delivery class controls the degree towhich the SAP or the customer is responsible for table maintenance - whether SAPprovides the table with or without contents. - determines the table type. - determineshow the table behaves when it is first installed, at upgrade, when it is transported, andwhen a client copy is performed.What is the maximum number of structures that can be included in a table orstructure - Nine.What are the two methods of modifying Sap standard tables ?- Append Structures and - Customizing Includes.What is the difference between a Substructure and an Append Structure ? - In case of asubstructure, the reference originates in the table itself, in the format of a statement.include... .- In case of an append structure, the table itself remains unchanged and the refrenceoriginates in the append structure.What are the two ways for restricting the value range for a domain ?- By specifying fixed values. - By stipulating a value table.What is a Match Code ?Match Code is a tool to help us to search for data records in the system. Match codesare an efficient and user-friendly search aid where key of a record is unknown.What are the two levels in defining a Match Code ?- Match Code object - Match Code Id. What is the maximum number of matchcode Id's that can be defined for one Match code object ?

Page 131: SAP Interview Questions

A match code Id is a one character ID which can be a letter or a number.Can we define our own Match Code ID's for SAP Matchcodes ? Yes, the numbers 0 to 9are reserved for us to create our own Match Code IDs for a SAP defined Matchcodeobject.What is an Update type with reference to a Match code ID? If the data in one of the basetables of a matchcode ID changes, the matchcode data has to be updated. The updatetype stipulates when the matchcode is to be updated and how it is to be done. The updatetype also specifies which method is to be used for Building matchcodes . You mustspecify the update type when you define a matchcode ID.

Page 132: SAP Interview Questions

SAP Interview Questions Page 106 of 173Yogesh Mishra ([email protected])What are conversion routines ? - Non standard conversions from display format to sapinternal format and vice-versa are implemented with so called conversion routines.Aggregated ObjectsViews, matchcodes, and lock objects are also called aggregate objects because they areformed from several related tables.What is a View ? - A view is a logical view on one or more tables. A view on one or moretables i.e, the data from a view is not actually physically stored instead being derivedfrom one ormore tables. A view can be used to summarize data which is distributed among severaltablesHow many types of Views are there ?- Database View (SE11)Database views are implement an inner join, that is, only records of the primary table(selected via the join operation) for which the corresponding records of the secondarytables also exist are fetched. Inconsistencies between primary and secondary table could,therefore, lead to a reduced selection set.In database views, the join conditions can be formulated using equality relationshipsbetween any base fields. In the other types of view, they must be taken from existingforeign keys. That is, tables can only be collected in a maintenance or help view if theyare linked to one another via foreign keys.- Help View ( SE54)Help views are used to output additional information when the online help system iscalled.When the F4 button is pressed for a screen field, a check is first made on whether amatchcode is defined for this field. If this is not the case, the help view is displayed inwhich the check table of the field is the primary table. Thus, for each table no more thanone help view can be created, that is, a table can only be primary table in at most onehelp view.- Projection View Projection views are used to suppress or mask certain fields in a table(projection), thus minimizing the number of interfaces. This means that only the data

Page 133: SAP Interview Questions

that isactually required is exchanged when the database is accessed. A projection view candraw upon only one table. Selection conditions cannot be specified for projection views.- Maintenance View ( SE54 )Maintenance views enable a business-oriented approach to looking at data, while atthe same time, making it possible to maintain the data involved. Data from several tablescan be summarized in a maintenance view and maintained collectively via this view. Thatis, the data is entered via the view and then distributed to the underlying tables by thesystem.What is Locking ? - When two users simultaneously attempt to access the same datarecord, this is synchronised by a lock mechanism. When dialog transactions are

Page 134: SAP Interview Questions

SAP Interview Questions Page 107 of 173Yogesh Mishra ([email protected])programmed, locks are set and released by calling certain function modules. Thesefunction modules are generated automatically from the definition of so-called lockobjects in the ABAP/4 Dictionary. To synchronize the access to a table by setting andremoving locks, a Lock object has to be defined in the ABAP/4 Dictionary. Activating thelock object automatically creates function modules for setting and removing locks. Thesefunction modules must be included when programming interactive transactions.Lock Mechanism :To set locks, a lock object must be defined in the ABAP/4 Dictionary. In this lock object,those tables in which data records are to be locked by calling a lock are determined. Alltables included in a lock object must be connected to each other via foreign keys. The keyfields of the tables in a lock object form the Lock arguments for the tables. The lockarguments are the basis for ormulating the logical condition for identifying the records tobe locked.When activating this lock object, two function modulesB with the namesENQUEUE_<Object_name> and DEQUEUE_<Object_name> are generated.Example : Problem : You wish to prevent a user from being able to change the name of acourse or the name of the professor with responsibility for the course at a time whenanother user is editing the course description (which contains this information).Solution : The problem described above can be solved by defining a lock objectE_UKURS. Thisis done by defining primary and secondary tables in the lock object. Table UKURS ischeck table of table UKRSB, so UKURS should be selected as primary table andUKRSB as secondary table of the lock object. The Lock argument in this case is the fieldcombination FABNR, KRSNR, and SPRAS (i.e Primary Key Combination).The Lock mode Shared is to be selected here. This allows several users to access thedata simultaneously in display mode. The lock mode in the generated function modulesfor setting (ENQUEUE_E_UKURS) and releasing (DEQUEUE_E_UKURS) locks istherefore set to shared as default, but can be overridden by calling the function modules.If the function module ENQUEUE_E_UKURS is called with FABNR = '1' and KRSNR ='3', the record for course 3 in faculty 1 is locked in table UKURS. Furthermore, all the

Page 135: SAP Interview Questions

course descriptions for this course are locked in table UKRSB since field SPRAS was notspecified when the function module was called. In such cases, the lock is madegenerically for a field which is not defined. If the function moduleDEQUEUE_E_UKURS is now called with FABNR = '1', KRSNR ='3' and SPRAS = 'D', the German course description is unlocked. All other coursedescriptions remain locked.What is database utility ? - Database utility is the interface between the ABAP/4Dictionary and the underlying the SAP system.The database utility is the interface between the ABAP/4 Dictionary and the relationaldatabase underlying the SAP system. You can call the database utility from the initialscreen of the ABAP/4 Dictionary with Utilities ® Database utility. The database utilityallows you to create, delete and convert objects from the ABAP/4 Dictionary in thedatabase.

Page 136: SAP Interview Questions

SAP Interview Questions Page 108 of 173Yogesh Mishra ([email protected])What is Modularization and its benefits?If the program contains the same or similar blocks of statements or it is required toprocess the same function several times, we can avoid redundancy by usingmodularization techniques. By modularizing the ABAP/4 programs we make them easyto read and improve their structure. Modularized programs are also easier to maintainand to update.How can we create callable modules of program code within one ABAP/4 Program?A. By defining macros. B. By creating include programs in the library.What are subroutines? Subroutines are program modules which can be called from otherABAP/4 programs or within the same program.What are the types of Subroutines? A. Internal Subroutines: The source code of theinternal subroutines will be in the same ABAP/4 program as the calling procedure(internal call). B. External Subroutines: The source code of the external subroutines willbe in an ABAP/4 program other than the calling procedure.What are the different types of parameters?Formal parameters: Parameters which are defined during the definition of subroutinewith the FORM statement.Actual parameters: Parameters which are specified during the call of a subroutine withthe PERFORM statement.How can one distinguish between different kinds of parameters? A. Input parameters areused to pass data to subroutines. B. Output parameters are used to pass data fromsubroutines.What are the different methods of passing data?A. Calling by reference: During a subroutine call, only the address of the actualparameter is transferred to the formal parameters. The formal parameter has no memoryof its own, and we work with the field of the calling program within the subroutine. If wechange the formal parameter, the field contents in the calling program also change. B.Calling by value: During a subroutine call, the formal parameters are created as copies ofthe actual parameters. The formal parameters have memory of their own. Changes to theformal parameters have no effect on the actual parameters. C. Calling by value andresult: During a subroutine call, the formal parameters are created as copies of the actualparameters. The formal parameters have their own memory space. Changes to the formalparameters are copied to the actual parameters at the end of the subroutine. The method

Page 137: SAP Interview Questions

by which internal tables are passed is By Reference.What is the difference between the function module and a normal ABAP/4subroutine? In contrast to normal subroutines function modules have uniquely definedinterface.Sub routines do not return values.Sub routines do not return exceptions. Sub routines cannot be tested independently.Declaring data as common parts is not possible for function modules. Function modulesare stored in a central library.What is a function group?

Page 138: SAP Interview Questions

SAP Interview Questions Page 109 of 173Yogesh Mishra ([email protected])A function group is a collection of logically related modules that share global data witheach other. All the modules in the group are included in the same main program. Whenan ABAP/4 program contains a CALL FUNCTION statement, the system loads the entirefunction group in with the program code at runtime. Every function module belongs to afunction group.What is the difference between internal tables and extract datasets?A. The lines of an internal table always have the same structure. By using extractdatasets, you can handle groups of data with different structure and get statistical figuresfrom the grouped data. B. You have to define the structure of the internal table at thebegining. You need not define the structure of the extract dataset. C. In contrast tointernal tables, the system partly compresses extract datasets when storing them. Thisreduces the storage space required. D. Internal tables require special work area forinterface whereas extract datasets do not need a special work area for interface.What are logical databases? What are the advantages/disadvantages of logicaldatabases?Ans :- A Logical Database is a hierarchical structure of tables. Use the GET statement toprocess Logical Databases.- LDB consists of logically related tables grouped together used for reading andprocessing data. - Advantages = 1. No need of programming for retrieval , meaning fordata selection - 2. Easy to use standard user interface, have check completeness ofuser input. Disadvantages = 1. Fast in case of lesser no. of tables But if the table is in thelowestlevel of hierarchy, all upper level tables should be read so performance is slower.Preparation of the data records by the L.D.B and reading of the data records inthe actual report are accomplished with the command pair. - Put and Get.The three main elements of LDB are- Structure, Selections, Database Program. What sort of tables one can use indesigning the hierarchy of a LDB ? - Tables which are having Foreign keyrelations.The structure of Logical Databases relfects the ________________ dependenciesof hierarchical tables in the SAP System. - Foreign key If you want to improve theresponse time ( time to access data ) LogicalDataBases permits you to achieve this using ______________ - VIEWS. What are theadvantages of Logical DataBases ? - It offers an easy-to-use selection screen. You canmodify the pre-generated selection screen to your needs.It offers check functions to check whether user input is complete, correct, and

Page 139: SAP Interview Questions

plausible. It offers reasonable data selections. It contains central authorization checks fordatabase accesses. Enhancements such as improved performance immediately apply toall reportprograms that use the logical database.Report FORMATTING : In order to suppress the leading zeros of a number field thekeywords used are : NO-ZERO.The Command that allows for vertical alignment of fields one below the other.UNDER.In order to concatenate strings only for output purposes the command _________

Page 140: SAP Interview Questions

SAP Interview Questions Page 110 of 173Yogesh Mishra ([email protected])can be used in conjunction with the 'Write' statement.NO-GAP.Data can be moved from one field to another using a 'Write:' Statement and storedin the desired format.TRUE. Write : Date_1 to Date_2 format DD/MM/YY.In order to have boldfaced text as output the command used isWrite : <f> INTENSIFIED.Background and foreground colors can be interchanged using the commandFormat inverse.Which datatype cannot be used to define parameters.Type F.For each new event, the system resets all formatting options to their defaultvalues. TRUE.The processing block following END-OF-PAGE is processed only if you reservelines for the footer in the LINE-COUNT option of the REPORT statement.To execute a page break under the condition that less than a certain number oflines is left on a page is acheived by ________________________.RESERVE n lines.What is the limit for the length of a page if the page length is not specified in thereport statement.60,000 Lines.How can Symbols or R/3 icons be output on the screen?WRITE <symbol-name> AS SYMBOL.WRITE <icon-name> AS ICON.REPORTING - GENERALWhat are reports? and how do you set up reports?A report program reads and analyzes data from one or more database tables withoutmodifying the database. Usually, the result of such a report program is in the form of alist which is output to the screen or sent to a printer.What are the different types of programs?I Include Program M Module Pool F Function Modules S External Subroutines 1 OnlineprogramEvents in Reporting ? Explain ?The following events occur at runtime of a typical report program which uses logicaldatabases:Event keyword Event --------------------------------------------------------------------------------------------------INITIALIZATION Point before the selection screen is displayed When you start aprogram in which a selection screen is defined (either in the program itself or in thelinked logical database program), the system normally processes this selection screenfirst. If you want to execute a processing block before the selection screen is processed,

Page 141: SAP Interview Questions

you can assign it to the event keyword INITIALIZATION.

Page 142: SAP Interview Questions

SAP Interview Questions Page 111 of 173Yogesh Mishra ([email protected])AT SELECTION-SCREEN Point after processing user input on the selection screenwhile the selection screen is still active The event keyword AT SELECTION-SCREENprovides you with several possibilities to carry out processing blocks while the system isprocessing the selection screen.START-OF-SELECTION Point after processing the selection screen The event STARTOF-SELECTION gives you the possibility of creating a processing block after processingthe selection screen and before accessing database tables using a logical database. Youcan use this processing block, for example, to set the values of internal fields or to writeinformational statements onto the output screen.At the START-OF-SELECTION event, also all statements are processed that are notattached to an event keyword except those that are written behind a FORM-ENDFORMblockGET <table> Point at which the logical database offers a line of the database table<table>.The most important event for report programs with an attached logical database is themoment at which the logical database program has read a line from a database table(see Accessing Data Using Logical Databases ). To start a processing block at thisevent, use the GET statement as follows:SyntaxGET <table> [FIELDS <list>].After this statement, you can work with the current line of the database table <table>.The data is provided in the table work area <table>.GET <table> LATE Point after processing all tables which are hierarchically subordinateto thedatabase table <table> in the structure of the logical database. To start a processingblock at the moment after the system has processed all database tables of a logicaldatabase that are hierarchically inferior to a specific database table, use the eventkeyword GET as follows:SyntaxGET <table> LATE [FIELDS <list>].In analogy to report programs that use only SELECT statements (see table inComparison of Access Methods ), the processing block of a GET <table> LATE statementwould appear directly before the ENDSELECT statement in the SELECT loop for thedatabase table <table>.

Page 143: SAP Interview Questions

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

Page 144: SAP Interview Questions

SAP Interview Questions Page 112 of 173Yogesh Mishra ([email protected])a new page is started END-OF-PAGE Point during list processing when a page is endedThe following events occur during the display of the output list of a report program:Event keyword Event ----------------------------------------------------------------------------------------------------AT LINE-SELECTION Point at which the user selects a line AT USER-COMMAND Pointat which the user presses a function key or enters a command in the command field. ATPF<nn> Point at which the user presses the function key with the function code PF<n>With the selection screen, ABAP/4 offers an interactive element also for reportprograms. You can define a selection screen without having to bother about all thedetails required in dialog programming.The selection screen is always processed directly after a report program is started. Theuser can enter field values and selection criteria on this screen.The main purpose of the selection screen is to enable the user to control the databaseselections of the report program. If a report program is started from another ABAP/4program with the SUBMIT statement (see Calling Reports), the selection screen objectsalso serve as a data interface, With a selection screen defined in the report program, youcan enable the user to · assign values to variables with the PARAMETERS statement ·determine selection criteria with the SELECT-OPTIONS statementHow do you read selected lines of database table into an internal table inpackages of predefined size. SELECT * FROM <SPFLI> INTO TABLE <ITAB>PACKAGE SIZE <N>. where 'n' is variable.Name the WILDCARD characters which are used for comparisions with characterstrings & numeric strings. '%' and '_'.How to specify a client for database table processing.TABLES SPFLI. SELECT * FROM SPFLI CLIENT SPECIFIED WHERE MANDTBETWEEN '001' AND '003'. ... ENDSELECT.Activation During activation, the runtime object of aggregate object or tables is created.The runtime object is buffered so that the application program can access it quickly.Runtime object has information about the following objects of table - domain dataelements field definition table definitionLock Mechanism prevents a new database operation being started an existing one hasbeen correctly completed. When conversion is done, lock is created automatically andreleased only when conversion is successful.

Page 145: SAP Interview Questions

Clearing of locksrestart adjustment attempt is made to continue conversion at the point of terminationCancel adjustment lockentry is simply deleted from tableVersion Management functions- Canceling changes reset revised version to active version - Storing changes activeversion will be temporarily stored in version Switching changes switch between activeand revised versionsVersion catalog list of all existing versions of an object

Page 146: SAP Interview Questions

SAP Interview Questions Page 113 of 173Yogesh Mishra ([email protected])- Revised version produced when we edit an existing object - Active version producedwhen we activate an object - Temporary version producedwhen we copy the activeversion temporarily to the database with store version functions - Historical versionscreated when 1. Correction is created 2 correction is releasedTable Buffering : Possible buffering types- full buffering either, whole table or none of the table is located in the buffer (Tables upto 30 kb done in client dependent fully buffered tables) - Generic buffering generic areasof the table are fully buffered. - Generic key leftjustified section of primary key of atable. - generic area all records for which fields of generic key correspond- Single record buffering records actually being accessed are loaded to buffers,large records where few records are accessed. Internal Tables ? Types ?STANDARD tableKey access to a standard table uses a linear search. This means that the time required fora search is in linear relation to the number of table entries.You should use index operations to access standard tables.SORTED tableDefines the table as one that is always saved correctly sorted.Key access to a sorted table uses a binary key. If the key is not unique, the system takesthe entry with the lowest index. The runtime required for key access is logarithmicallyrelated to the number of table entries.HASHED tableDefines the table as one that is managed with an internal hash procedureYou can only access a hashed table using the generic key operations or other genericoperations ( SORT, LOOP, and so on). Explicit or implicit index operations (such asLOOP ... FROM oe INSERT itab within a LOOP) are not allowed.INDEX tableA table that can be accessed using an index.Index table is only used to specify the type of generic parameters in a FORM orFUNCTION. That means that you can't create a table of type INDEX.Standard tables and sorted tables are index tables.Syntax :DATA itab TYPE table type of line type [WITH UNIQUE/NON-UNIQUE KEY <key>][Iinitial size n] [WITH HEADER LINE]What are DATA CLUSTERS ?You can group any complex internal data objects of an ABAP/4 program together in dataclusters and store them temporarily in ABAP/4 memory or for longer periods in

Page 147: SAP Interview Questions

databases. You can store data clusters in special databases of the ABAP/4 Dictionary.

Page 148: SAP Interview Questions

SAP Interview Questions Page 114 of 173Yogesh Mishra ([email protected])These databases are known as ABAP/4 cluster databases and have a predefinedstructure. Storing a data cluster is specific to ABAP/4. Although you can also accesscluster databases using SQL statements, only ABAP/4 statements are able to decodethe structure of the stored data cluster.Describe the functions of the debugger screen.- Single step(F5) - Use this option to step through the program statement by statement.This allows you to branch into subroutines and function modules, and to execute theseroutines step by step as well. Once a subroutine or function module has been processed,control returns to the statement following the CALL FUNCTION or PERFORMstatement. - Execute(F6)- Use this option to process a program line by line. All of thestatements on the current line are processed in a single step. If you are positioned on aline that calls a subroutine and you choose Execute, the Debugger processes the wholesubroutine and then moves on to the line following the subroutine call. This allows youto jump through the statements within the subroutine. - Return(F7) - The Debuggerreturns from a routine to the point at which control returns to the main program. Usethis option to return from a subroutine, function module, or called program to the callingprogram. - Continue(F8)- Use this option to process the program up to the next dynamicor static breakpoint or up to the cursor position. If there are no more breakpoints in theprogram and no cursor has been set, the system exits debugging mode and executes therest of the program normally. - Tables - Display the contents of internal tables.Problem:How to run a program in background?Solution :Execute the ReportIn the selection screen :After filling the screen fields press F9.A screen appears requesting U to print the Background Parameters*Enter the output device(Eg HPLJ /SAP2 etc)*In the spool options Uncheck Print immedietly,Uncheck delete after output,and newspool request.Press enter.Another screen appears with heading start time .U can press start immly ,then saveNow the Background job is scheduled for the given program . To View the status ofbackground Job,The transaction code is SM37. Execute from the resulting screen . Job

Page 149: SAP Interview Questions

overview -->From the Job list select U'r program and select Spool from the applicationtoolbar Output Controller :List ofSpool Requests Select U'r Spool request and click Display icon from the overview screen .U will be displayed with the List.Caution :See to that the list with does not exceed 255 columns ,If it exceeds theextra columns will be truncated in Background What are presentation and applicationservers in SAP?A presentation server is actually a program named Sapgui.exe. It is usually installedon a user's workstation.Application server is a set of executables that collectively interpret the ABAP/4programs and manage the input & output for them.In an ABAP/4 program how do you access data that exists on a presentationserver v/s on an application server?For presentation server use UPLOAD or WS_UPLOAD function modules.

Page 150: SAP Interview Questions

SAP Interview Questions Page 115 of 173Yogesh Mishra ([email protected])For application server use OPEN DATASET, READ DATASET and CLOSEDATASET commands.Describe the syntax and function of the AUTHORITY CHECK command?Ans :- AUTHORITY CHECK OBJECT <object name>ID <name1> FIELD <f1>ID <name2> FIELD <f2>...IF SY-SUBRC NE 0.The AUTHORITY-CHECK checks whether a user has the appropriate authorization toexecute a particular activity.Explain the EXPORT and IMPORT commands? How can you pass more than onegroup of data by using IMPORT commands?EXPORT :-To read data objects from an ABAP program into ABAP memory, use the followingstatement:SyntaxEXPORT <f1> [FROM <g 1>] <f 2> [FROM <g 2>] ... TO MEMORY ID <key>.This statement stores the data objects specified in the list as a cluster in memory. If youdo not use the option FROM <f i >, the data object <f i > is saved under its own name. Ifyou use the FROM <g i > option, the data objet <g i > is saved under the name <f i >.The name <key> identifies the cluster in memory. It may be up to 32 characters long.The EXPORT statement always completely overwrites the contents of any existing datacluster with the same name <key>.IMPORT :-To read data objects from ABAP memory into an ABAP program, use the followingstatement:SyntaxIMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID <key>.This statement reads the data objects specified in the list from a cluster in memory. Ifyou do not use the TO <g i > option, the data object <f i > in memory is assigned to thedata object in the program with the same name. If you do use the option, the data object<f i > is read from memory into the field <g i >. The name <key> identifies the cluster inmemory. It may be up to 32 characters long. You do not have to read all of the objectsstored under a particular name <key>. You can restrict the number of objects byspecifying their names. If the memory does not contain any objects under the name<key>, SY-SUBRC is set to 4. If, on the other hand, there is a data cluster in memory

Page 151: SAP Interview Questions

with the name <key>, SY-SUBRC is always 0,regardless of whether it contained the data object <f i >. If the cluster does not containthe data object <f i >, the target field remains unchanged.Explain the READ LINE and MODIFY LINE commands.READ LINE :- Use the statements READ LINE and READ CURRENT LINE to read datafrom the lines of existing list levels. These statements are closely connected to the HIDEtechnique.

Page 152: SAP Interview Questions

SAP Interview Questions Page 116 of 173Yogesh Mishra ([email protected])MODIFY LINE :- To modify the lines of a completed list from within the program, usetheMODIFY LINE statement.What are the differences between calling a program, transaction `with return' and`without return' and how can each be accomplished?· Program-SUBMIT <rep>|(<field>) [AND RETURN] [<options>].If you use AND RETURN, the system stores the data of the calling executable programand returns to the calling after processing the called program. The system resumesexecuting the calling program at the statement following the call. If you omit the ANDRETURN addition, all data and list levels of the calling program (the entire internalsession) are deleted. After the called executable program has finished, control returns tothe level from which you started the calling program.· Transaction-CALL TRANSACTION <tcod> [AND SKIP FIRST SCREEN] [USING <itab>]. Thisstatement saves the data of the calling program, and starts transaction <tcod>. At theend of the transaction, the system returns to the statement following the call in thecalling report.-LEAVE TO TRANSACTION <tcod> [AND SKIP FIRST SCREEN].This statement ends the calling program and starts transaction <tcod>. This deletes thecall stack (internal sessions) of all previous programs. At the end of the transaction, thesystem returns to the area menu from which the original program in the call stack wasstarted.What are the differences between the parameter SET and GET?SET PARAMETER ID <pid> FIELD <f>.This statement saves the contents of field <f> under the ID <pid> in the SAP memory.The code <pid> can be up to 20 characters long. If there was already a value storedunder <pid>, this statement overwrites it. If the ID <pid> does not exist, double-click<pid> in the ABAP Editor to create a new parameter object.GET PARAMETER ID <pid> FIELD <f>.This statement fills the value stored under the ID <pid> into the variable <f>. If thesystem does not find a value for <pid> in the SAP memory, it sets SY-SUBRC to 4,otherwise to 0.WHAT are the commands that allow you to process sequential file? And what istheir syntax?-· READ DATASET (reading) and TRANSFER (writing)

Page 153: SAP Interview Questions

· OPEN DTASET <dataset name> for <input output appending> in <binary text > modeat POSITION <position> MESSAGE <field> · READ DATASET <dataset name > INTO<field>· CLOSE DATASET <dataset name>· DELETE DATASET <dataset name>TRANSFER <field> to <dataset name>What is the difference between opening a dataset for input, output, appending?· FOR OUTPUT

Page 154: SAP Interview Questions

SAP Interview Questions Page 117 of 173Yogesh Mishra ([email protected])Opens the file for writing if exists it is overwritten if not then it is created.· FOR INPUTOpens an existing file for reading.· FOR APPENDINGOpens the file for writing at the end of the file .If it does not exist, it iscreated, if opened, you return to the end.When an internal table is created, the settings criteria for the value of occurs?The objective of setting the value of an occurs for an internal table is a question ofoptimization. The following facts should be taken into account when making suchdecision.1) The complete data area of a program is 64000 bytes.2) The initial size declared is kept in roll area (quicker access to program)3) Data entered that exceeds the initial size stores in the roll file (Slower access toprogram) You should also analyze the expected volume and access rates before makingthe decision.Define "Check " statements, how it works?To terminate a single loop pass conditionally, use the CHECK <condition> statement inthe statement block of the loop. If the condition is not true, any remaining statements inthe current statement block after the CHECK statement are ignored, and the next looppass starts. <condition> can be any logical expression.Explain Field Group(extract dataset)?An extract dataset consists of a sequence of records. These records may have differentstructures. All records with the same structure form a record type. You must define eachrecord type of an extract dataset as a field group, using the FIELD-GROUPS statement.FIELD-GROUPS <fg>. This statement defines a field group <fg>. A field group combinesseveral fields under one name. For clarity, you should declare your field groups at theend of the declaration part of your program.A field group does not reserve storage space for the fields, but contains pointers toexisting fields. When filling the extract dataset with records, these pointers determinethecontents of the stored records.What is the difference between Move & assign statement?Move :- To assign the value of a data object <f1> to a variable <f2>, use the followingstatement: MOVE <f1> TO <f2>. or the equivalent statement <f2> = <f1>. The contentsof <f1> remain unchanged. <f1> does not have to be a variable - it can also be a literal, a

Page 155: SAP Interview Questions

text symbol, or a constant. You must always specify decimal points with a period (.),regardless of the user's personal settings. Multiple value assignments in the form <f4> =<f3> = <f2> = <f1>.Assign :- ASSIGN <f> TO <FS>.When you assign the data object, the system checks whether the technical attributes ofthe data object <f> correspond to any type specifications for the field symbol <FS>. Thefield symbol adopts any generic attributes of <f> that are not contained in its own typespecification. Following the assignment, it points to <f> in memory.

Page 156: SAP Interview Questions

SAP Interview Questions Page 118 of 173Yogesh Mishra ([email protected])How do you run a report for a row in table?Using Graphics Multiplexer. There is an option some thing similar to screen capturewhich captures data only. Using that data you can draw graphs (3D and 2D). This optionis available all the time from Menu! -> Generate Graphics which captures the data thenyou need to drag and select the data you want to draw a graph on. Once you select youcan click on Graphics, which launches graphics multiplexer.Memory ManagementSAP memory (Global Memory): - is available to a user during the entire duration ofa terminal session. Its contents are retained across transaction boundaries as wellas external and internal sessions.External session: - when user logs on to R/3 system, the system creates a newterminal session called external session. E.g. System Create Session.Internal session: - created by calling a transaction (with CALL TRANSACTION), adialog module (with CALL DIALOG) or a report (with SUBMIT or RETURN).For external session: - internal sessions are allowed.Roll area: - Data areas of used programs are created in roll areas for each internalsession.Posting data between internal sessions: - EXPORT TO MEMORY and IMPORT FROMMEMORY.Main program group: - Created when exporting an internal session.Additional program group: - If a function module belonging to a function group notso far loaded, additional program group is created.Subroutine call: - When external subroutine is called, system loads the relevantprogram and adds it to the program group of calling program.Work areas: - Both table & common workareas with the same name are created oncefor each program group and then shared by all programs in the group.List system: - Consists of basic list and all details list belonging to basic list assigned toexactly one screen level.User interface: - Only program has its own user interface. Internal sessions interface isinitially empty. Special user interface has to be activated using SET PF-STATUSstatement.ABAP/4 memory: - Retained only during the lifetime of an external session.Data cluster: - Group of several data objects.Data objects: - Units of data, which a program processes at runtime.How do you write a DATA object from ABAP/4 program to ABAP/4 memory andrestore the same from memory to program.EXPORT <f1> [FROM <g1>] <f2> [FROM <g2>] ... TO MEMORY ID <key>. The ID

Page 157: SAP Interview Questions

<key>, which can be up to 32 characters long, identifies the data in memory.Statement used to delete data objects in ABAP/4 memory. FREE MEMORY [ID <key>].How will you create a file on application server Open dataset <dsn> for output.ABAP/4 statement for opening a file on application server for reading___________. Open dataset <dsn> for input.How will you transfer data into a file in application server ? Data fname(60) value'mYFILE'. Data num type i.Open dataset fname for output.Do 10 times.

Page 158: SAP Interview Questions

SAP Interview Questions Page 119 of 173Yogesh Mishra ([email protected])Num = Num + 1.Transfer num to fname.Enddo. .....etc.Name the function modules to write data from an Internal Table to thePresentation Server. ::DOWNLOAD and WS_DOWNLOAD.Name the function modules to read data from Presentation Server into anInternal Table. ::UPLOAD and WS_UPLOAD.Name the function module that can be used to give information about files onPresentation Server and about it's Operating System. ::WS_QUERY.Name the ABAP/4 key word for seaching a string in an Internal Table.SEARCH <itab> FOR <str> <options>.How would you find the attributes of a data type or data object ?DESCRIBE FIELD <f> [LENGTH <l>] [TYPE <t> [COMPONENTS <n>]][OUTPUT-LENGTH <o>] [DECIMALS <d>][EDIT MASK <m>].Which function module would you use to check the user's authorization to accessfiles before opening a file?AUTHORITY_CHECK_DATASETName the function module used to convert logical file names to physical filenames in ABAP/4 programs.FILE_GET_NAME.What does CHAIN ....END CHAIN do?Sometimes you want to check several fields as a group. To do this, include the fields in aFIELD statement, and enclose everything in a CHAIN-ENDCHAIN block.**** Screen flow logic: ****CHAIN.FIELD: SPFLI-CARRID, SPFLI-CONNID. MODULE CHECK_FLIGHT. ENDCHAIN.When an error is found inside a chain, the screen is re-displayed, and all fields foundanywhere in the chain are input-enabled. All non-chain fields remain disabled.What does an extract statement do in the ABAP program?Fills the fields groups with values.What happens when a table is activated in DD?-A table definition is generated- Map to the database system-For each table, a table of the same name with the same fields andcorresponding data type is created in database.Primary index is generated automaticallyWhat is a check table and what is a value table?

Page 159: SAP Interview Questions

SAP Interview Questions Page 120 of 173Yogesh Mishra ([email protected])- When we define a foreign key in a table (A). If this key refers to primary key of anothertable (B). Table B is check table Fields referring to a domain may assume valuescontained in the corresponding fields of the value table. Field referring to the domainshould have a foreign keyWhat is CTS and What do you know about it? [ CTS is Correction and TransportSystems ]- Correction system manages the internal system components like objects like onlyoriginal version of the object exists. It stores all changes made to the object. - Transportsystem allows to transports the object from on SAP system to another (Developmentsystem to Production system). It allows to over write or delete existing object in targetsystem and import new objects to target systems. During development work we start byopening a task (correction) to which we can assign new and changed objects. Oncechanges have been made, transport new or changed objects to other SAP system bymeans of transport (Change) request.Have you used SAP supplied programs to load master data?- SAP supplied BDC programs RM06BBI0(Purchase requisitions) - RMDATIND(Material master) RFBIKR00 (Vendor Masters) - RFBIDE00 (Customer Master)RVINVB00 (Sales Order)What are the Techniques involved in using SAP supplied programs? Do youprefer to write your own programs to load master data? Why?- Identify relevant fields - Maintain transfer structure ( Predefined first one is alwayssession record) - Session record structure , Header Data, Item ( STYPE recordtype ) -Fields in session structure STYPE, GROUP , MANDT, USERNAME , NO DATA - Fieldsin header structure consists of transaction code also STYPE,BMM00,TCODE,MATNR and Fields in Item - ITEMS ... - Maintain transfer file sample data setcreationHow do you set up background jobs in SAP? What are the steps? What are eventsdriven batch jobs?- Create a job using function module JOB-OPEN - Collect the job specifications. - Add ajob step to the job with the function module JOB-SUBMIT. - Close the job and pass it toBackground processing system for execution with the function module JOB-CLOSE -

Page 160: SAP Interview Questions

EVENT DRIVEN BATCH JOBS :- - Types = System events triggered when activation ofnew operation mode takes place - User events - Triggered from ABAP/4 or externalprogram. - Triggering an event notifies the background processing that named conditionhas been reached. The Background system reacts by starting any jobs that were waitingfor the event. Transaction codes related to background jobs creation and processing are:- SM36 (Job creation)SM37(Job selection and execution).What are presentation and application servers in SAP?-A presentation server is actually a program named Sapgui.exe. It is usually installed ona user's workstation.- Application server is a set of executables that collectively interpret the ABAP/4programs and manage the input & output for them.In an ABAP/4 program how do you access data that exists on a presentationserver v/s on an application server?

Page 161: SAP Interview Questions

SAP Interview Questions Page 121 of 173Yogesh Mishra ([email protected])- For presentation server use UPLOAD or WS_UPLOAD function modules. Forapplication server use OPEN DATASET, READ DATASET and CLOSE DATASETcommands.What is the difference between Synchronous and Asynchronous updates ? - A programasks the system to perform a certain task, and then either waits or doesn't wait for thetask to finish. In synchronous processing, the program waits: control returns to theprogram only when the task has been completed. In asynchronous processing, theprogram does not wait: the system returns control after merely logging the request forexecution.Transferring SPA/GPA Parameters to TransactionsTo fill the input fields of a called transaction with data from the calling program, you canuse the SPA/GPA technique. SPA/GPA parameters are values that the system stores inthe global, user-related SAP memory. You use the SAP memory to transfer valuesbetween programs beyond the borders of transactions. A user can access the valuesstored in the SAP memory during one terminal session for all modes used in parallel.To fill an SPA/GPA parameter, use:SyntaxSET PARAMETER ID <pid> FIELD <f>.To read an SPA/GPA parameter into an ABAP program, use:SyntaxGET PARAMETER ID <pid> FIELD <f>.What is the difference between Commit-Work and Rollback-Work tasks ? - Commit-Work statement "performs" many functions relevant to synchronizedexecution of tasks. Rollback-Work statement "cancels" all requests relevant tosynchronized execution of tasks.What are the different database integrities ? - Semantic integrity - Relational integrity -Primary key integrity - Value set integrity - Foreign key integrity and - Operationalintegrity.What is SAP locking ? - It is a mechanism for defining and applying logical locks todatabase objects.What does a lock object involve ? - The tables - The lock argument. What are thedifferent kinds of lock modes ? - Shared lock - Exclusive lock - Extended exclusive list.How can a lock object be called in the transaction ? - By calling Enqueue <lock object>and Dequeue <lock object> in the transaction.What are the events by which we can program "help texts" and display "possiblevalues lists" ? - PROCESS ON HELP-REQUEST (POH) - PROCESS ON VALUEREQUEST(POV).

Page 162: SAP Interview Questions

What are function modules ? Types of parameters ? - Function modules are generalpurposelibrary routines that are available system- wide.

Page 163: SAP Interview Questions

SAP Interview Questions Page 122 of 173Yogesh Mishra ([email protected])- In general, function module can have four types of parameters: - EXPORTING:for passing data to the called function - IMPORTING: for receiving data returnedfrom the function module - TABLES: for passing internal tables only, byreference (that is, by address) - CHANGING: for passing parameters to and fromthe functionHow to send a report to the printer instead of displaying it on the screen ? - We can senda report to the printer instead of displaying it on the screen. To do this, use the keywordsTO SAP-SPOOL: SUBMIT RSFLFIND ... TO SAP-SPOOL DESTINATION 'LT50'.How can we send data to external programs ? - Using SPA/GPA parameters (SAPmemory) - Using EXPORT/IMPORT data (ABAP/4 memory)What are the differences between SELECT-OPTIONS,VARIANTS AND PARAMETERS?To enter values for variables on the selection screen, you must define the variables usingthe PARAMETERS statement. To enter a range of values for the variables on theselection screen we use SELECT-OPTIONS statement. If you want to run the same reportprogram with the same selections at regular intervals (for example, for monthly salesstatistics), In, ABAP/4 offers you combine the desired values for all these selections inone selection set. Such a selection set is called a VARIANTS.What is SPA / GPA ? When do you use it?To fill the input fields of a called transaction with data from the report, you can use theSPA/GPA technique. SPA/GPA parameters are values that the system stores in theglobal, user-related SAP memory. You use the SAP memory to transfer values betweenprograms. A user can access the values stored in the SAP memory during one terminalsession for all modes used in parallel.Usually, the input fields on the initial screen of a transaction are connected to SPA/GPAparameters. If you fill these parameters from within your program before calling thetransaction, the system fills the input fields with the corresponding values.Why and how do you display a message? What are the message types?An ABAP/4 module lets the system know that an error has occurred by issuinginformation,error or warning messages. you can also use success messages when aparticular action is performed successfully. When the user presses ENTER, thecurrentprocess is interrupted. The system returns the user to the SAP main menu usingAbendmessage.Message is displayed using MESSAGE Xnnn, where X is the type of the message and

Page 164: SAP Interview Questions

nnn is the number of the message.You have to declare the Id of the message class in the program usingMESSAGE-ID cc,where cc is the message class.How and where do You create Message class?You can create a message class from two places in the system: 1) From an Objectclass object list (in the Object Browser)2) From an ABAP/4 module (in the ABAP/4 editor)

Page 165: SAP Interview Questions

SAP Interview Questions Page 123 of 173Yogesh Mishra ([email protected])What do you define in the Data element and Domain?For Data ElementThe information includes the field's representation on the screen in the form ofFIELDTEXTS, COLUMN CAPTIONS in list outputs of the table contents and the format oftheoutput via PARAMETER IDS and Online field documentation.For DomainData Type,Field Length and the allowed data values are defined .What is the difference between a pool table and a transparent table?Transparent Table :A tran table has a one to one relataionship in the database. The table in thedictionary has the same name, same no of fields, and the fields have the same nameasin the R3 table defn. A transparent tabel has application data (Master andTransaction).Pooled Table :A pool table has many to one relation with the table in the database. For one table inthe database there r many tables in the dictionary. Tha table in the database hasa diff name than in the table in the data dict, it has diff no of fields and field namesaredifferent. A pooled table is stored in the pool at the database level. A table poo is adatabse table with a special struct that enables the data of many R3 tables to bestoredin it. It can hold only pooled tables.What are field symbols and field groups? Have you used component idx ofstructure with field groups?A field symbol does not physically reserve space for a field, but points to a field whichisnot known until runtime of the program. Field symbols are comparable to theconcept ofpointers as used in the programming language C.An extract dataset consists of a sequence of records. These records may havedifferentstructures. All records with the same structure form a record type. You must defineeach record type of an extract dataset as a field group, using the FIELD-GROUPSstatement.What is the step by step process to create a table in data dictionary?1. Selecting the table fields 2. Maintaining foreign keys 3. Creating secondary indexes(optional) 4. Maintaining technical settings 5. Activating a tableWhat is the advantage of structures and how do you use them in Abap/4programs?A structure is defined in the ABAP/4 Dictionary like a table and can be accessed from

Page 166: SAP Interview Questions

ABAP/4 programs. Any change to the definition of the structure in the ABAP/4Dictionary

Page 167: SAP Interview Questions

SAP Interview Questions Page 124 of 173Yogesh Mishra ([email protected])is automatically implemented in all programs.While data in tables is stored permanently in the database, structures contain dataonlyduring the runtime of a program.Structures are used in abap/4 programs to transfer data between programs as it isglobally defined.Structures are used in particular for defining data at the interfacebetween module pools and screens and for standardizing parameters for functionmodules.What does an extract statement do in the Abap/4 program?With the first EXTRACT statement of a report, the system creates the extract datasetand adds the first extract record. With each subsequent EXTRACT statement, thesystem adds another extract record to the extract dataset.What is a collect statement and how is it different from the append statement?To fill an internal table with lines which have unique standard keys, we use theCOLLECT statement. If an entry with the same key already exists, the COLLECTstatement does not append a new line as APPEND statement, but adds the contentsof the numeric fields in the work area to the contents of the numeric fields in theexisting entry.What is an open SQL vs Native SQL.Open SQL allows you to access all database tables known to the SAP system,regardless of the database manufacturer. Sometimes, however, we may want to usedatabase-specific SQL statements called Native SQL in your ABAP/4 program. Toavoid incompatibilities between different database tables and also to make ABAP/4programs independent of the database system in use, SAP has created a set ofseparate SQL statements called Open SQL. Open SQL contains a subset of standardSQL statements as well as some enhancements which are specific to SAP. A databaseinterface translates SAP's Open SQL statements into SQL commands specific to thedatabase in use. Native SQL statements access the database directly.What does an EXEC SQL statement do in ABAP? What is the disadvantage ofusing it?To use a Native SQL statement, it must be preceded by an EXEC SQL statement andconcluded by an ENDEXEC statement.An ABAP/4 program with Native SQL statements does not generally run withdifferentdatabases.What are the events used in ABAP4?The events are· INITIALIZATION· AT SELECTION-SCREEN· AT SELECTION-SCREEN ON <field>· START-OF-SELECTIONTOP-OF-PAGE

Page 168: SAP Interview Questions
Page 169: SAP Interview Questions

SAP Interview Questions Page 125 of 173Yogesh Mishra ([email protected])· TOP-OF-PAGE DURING LINE SELECTION· END-OF-PAGE· END-OF-SELECTION· AT USER-COMMAND· AT LINE-SELECTION· AT PF<NN>· GET· GET LATE.· AT User CommandWhat is an interactive reports? What is the obvious difference of such reports withHTML type reports?Interactive reporting allows the user to participate actively in retrieving andpresenting data during the session. Instead of one extensive and detailed list, withinteractive reporting you create a condensed basic list from which the user can calldetailed information by positioning the cursor and entering commands. Interactivereporting thus reduces information retrieval to the data actually required. Detailedinformation is presented in secondary lists. A secondary list may either overlay thebasic list completely or appear in an additional dialog window on the same screen.The secondary list can itself be interactive again. Apart from creating secondary lists,interactive reporting also allows to call transactions or other reports from lists. Theseprograms then use values displayed in the list as input values. The user can, forexample, call a transaction from within a list to change the database table whose datais displayed in the list.What happens when a table is activated in DD?When the table is activated, a physical table definition in the database is added to thetable definition stored in the ABAP/4 Dictionary. The database-independent tabledefinition from the ABAP/4 Dictionary is translated into a definition of the relevantdatabase.What is a check table and What is a value table?The relational data model contains not only tables, but also relationships betweentables.These relationships are defined in the ABAP/4 Dictionary by foreign keys. Animportantfunction of foreign keys is to support data integrity in the relational data model.Foreignkey fields may assume only those values allowed by the check table, in other words,values occurring in the primary key of the check table.A foreign key provides a link between two tables, for eg.,T1 and T2 by including areference in table T1 to the primary key of table T2. For this purpose, Foreign keyfieldsassigned to the primary key fields of T2 are included in T1. Table T1, which is the one

Page 170: SAP Interview Questions

being checked, is called a foreign key table, and table T2 is called a check table. Theterms dependent (foreign key) table and referenced (check) table are also used.VALUE TABLE:If the domain of the check field has a value table, this is proposed bythe

Page 171: SAP Interview Questions

SAP Interview Questions Page 126 of 173Yogesh Mishra ([email protected])system as check table in the foreign field maintenance. The key fields of the valuetableare in this case assigned fields of the foreign key table with the same domain. Thesefields may assume only those values allowed by the value table. The value range ofthe domain can be defined by specifying value table. All table fields referring to thisdomain can then be checked against the corresponding field of this value table. Inorder the check can be executed, a foreign key must be defined for the value table.What are matchcodes? Describe?A matchcode is a tool to search for data records in the system. Matchcodes are anefficient and user-friendly search aid for cases where the key of a record is unknown.It consists of two stages one is Match code object and the other is Matchcode ID.A matchcode object describes the set of all possible search paths for a search term.Matchcode ID describes a special search path for a search term.What are ranges? What are number ranges?It is often necessary to directly access individual records in a data structure. This isdoneusing unique keys. Number ranges are used to assign numbers to individual databaserecords for a commercial object, to complete the key. Such numbers are e.g. ordernumbers or material master numbers.How do you validate the selection criteria of a report? And how do you displayinitial values in a selection screen?The selection criteria is validated in the processing block of the AT SELECTIONSCREEN event for the input values on the screen and respective messages can besent.To display initial values in the selection screen:· Use INITIALIZATION EVENT· Use DEFAULT VALUE option of PARAMETERS Statement· Use SPA/GPA Parameters (PIDs).What is the Client concept in SAP? What is the meaning of Client independent?In commercial, organizational and technical terms, the client is a self contained unitinthe R3 system, with separate set of Master data and its own set of Tables. When achange is made in one client all other clients are affected in the system - this type ofobjects are called Client independent objects.What is Internal table?Internal tables are table objects that only exist for the runtime of the program. Thereare several ABAP statements for working with internal tables, for example, append,insert, delete, or find lines.The number of lines of an internal table is extended dynamically at runtime as

Page 172: SAP Interview Questions

required.You can use internal tables for table calculations on subsets of database tables. Forexample, you can read a part of one or more database tables into an internal table.

Page 173: SAP Interview Questions

SAP Interview Questions Page 127 of 173Yogesh Mishra ([email protected])They also allow you to reorganize their contents to suit the needs of your program.You can, for example, read particular entries from one or more large customer tablesinto aninternal table, and then use them to create a list. When you run your program, youcanaccess this data directly, instead of having to search for each record in the database.What is a variant and where do you use it?If you want to run a report program with same selections at regular intervals (forexample, for monthly sales statistics), you would not want to enter the same valueseach time. So, ABAP/4 offers you a possibility to combine the desired values for allthese selections in one selection set. You can create as many different selection setsas you like for each report program and they remain assigned only to the reportprogram in question. Such a selection set is called a variant.Using Variants OnlineUsing Variants in Background ProcessingOnline, starting a report via variant saves the user work,minimizes input errors. Inbackground processing, a variant is the only possibility you have to pass values forthe selections.To fill certain selections with values that change according to the application, you usea variant, which takes the variable values from Table TVARV.What is set parameter and get parameter?We can pass data to a called program using SPA/GPA parameters. SPA/GPAparameters are field values saved globally in memory. Each parameter is identifiedby a three-character code: you can define these parameters in the object browser byselecting other objects on the first screen. The SPA/GPA storage is user-specific andvalid throughout the entire user's sessions. By using the SET PARAMETER or GETPARAMETER statementsThese statements let you store and retrieve SPA/GPA values from an ABAP/4program.If the selection screens for the two transactions do not share the same required fields,use these statements to store screen fields explicitly by name.Before calling the new transaction from a PAI module, store the caller transaction'sfieldsunder one name:SET PARAMETER ID 'RID' FIELD <FIELD NAME1>.The system stores the value in <field name1> in the SPA parameter 'RID'. The threecharacteridentifier 'RID' must be defined in the SAP table TPARA. If the SPAparameter'RID' already contains a value, the SET PARAMETER statement overwrites it (with

Page 174: SAP Interview Questions

thecontents of <FIELD NAME1>).In the PBO module for the called transaction, retrieve the fields under the othername:

Page 175: SAP Interview Questions

SAP Interview Questions Page 128 of 173Yogesh Mishra ([email protected])GET PARAMTER ID 'RID' FIELD <FIELD NAME2>.What is field symbol?A field symbol does not physically reserve space for a field, but points to a field whichis not known until runtime of the program. Sometimes you only know which fieldyou want to process, and how you want to process it, at runtime. For thispurpose, you can create field symbols in your program. At runtime, you can assignreal fields to such field symbols. All operations which you have programmed with thefield symbol are then carried out with the assigned field. After successful assignment,there is no difference in ABAP/4 whether you reference the field symbol or the fielditself.How to use a grid list?Use Function Module Display_*LIST. In U'r program .Put all the data that U want tooutput in its final format and then pass this internal table to the function moduleTwo types of grid list . DISPLAY_GRID_LIST(Version 4.0b)DISPLAY_BASIC_LIST(Version 4.6b)Calculate the subtotal etc and save it as a variant ,However while printing it will printall the enties of the fieldsHow to pass data from the form to the Subroutine program? Use structure ITCSYHow can we pass selection and parameter data to a report ? - There are three optionsfor passing selection and parameter data to the report.. using SUBMIT...WITH. using a report variant. using a RANGE tableStandard Programs that every ABAPer Shud KnowRSAVGL00 Table adjustment across clientsRSBDCSUB Release batch-input sessions automatically RSCLTCOP Copy tablesacross clients RSINCL00 Extended program list RSORAREL Get the Oracle ReleaseRSPARAM Display all instance parameters RSTXSCRP Transport SAPscript filesacross systems RGUGBR00 Substitution/Validation utility RSUSR003 Check thepasswords of users SAP* and DDIC in all clientsRSUSR006 List users last loginRSTXLDMC To Load LOGO's to application serverInteractive ReportingInteractive reporting allows the user to participate actively in retrieving andpresentingdata during the session. Instead of one extensive and detailed list, with interactivereporting you create a condensed basic list from which the user can call detailedinformation by positioning the cursor and entering commands. Interactive reportingthus reduces information retrieval to the data actually required.What are the event key words in interactive reporting ?

Page 176: SAP Interview Questions

Event keyword Event AT LINE-SELECTION Moment at which the user selects a linebydouble-clicking on it or by positioning thecursor on it and pressing F2.

Page 177: SAP Interview Questions

SAP Interview Questions Page 129 of 173Yogesh Mishra ([email protected])AT USER-COMMAND Moment at which the user presses afunction key. TOP-OF-PAGE DURING LINESELECTIONMoment during list processing of asecondary list at which a new page starts.What is secondary list ?Secondary lists allow you to enhance the information presented in the basic list. Theuser can, for example, select a line of the basic list for which he wants to see moredetailed information. You display these details on a secondary list. Secondary listsmayeither overlay the basic list completely or you can display them in an extra window onthe screen. The secondary lists can themselves be interactive again.How to select valid lines for secondary list ?To prevent the user from selecting invalid lines, ABAP/4 offers several possibilities.Atthe end of the processing block END-OF-SELECTION, delete the contents of one ormore fields you previously stored for valid lines using the HIDE statement. At theeventAT LINE-SELECTION, check whether the work area is initial or whether the HIDEstatement stored field contents there. In the latter case, create a secondary list, sinceyou previously stored field contents for valid lines only. After processing thesecondarylist, clear the work area again. This prevents the user from trying to create furthersecondary lists from the secondary list displayed.How to create user interfaces for lists ?The R/3 system automatically generates a graphical user interface (GUI) for yourlists that offers the basic functions for list processing, such as saving or printing thelist. If you want to include additional functionality, such as pushbuttons, you mustdefine your own interface status. To create a new status, the DevelopmentWorkbench offers the Menu Painter. With the Menu Painter, you can create menusand application toolbars. And you can assign Function keys to certain functions. Atthe beginning of the statement block of AT END-OF-SELECTION, activate the statusof the basic list using the statement: SET PF-STATUS 'STATUS'.Can we call reports and transactions from interactive reporting lists ?YES. Interactive reporting also allows you to call transactions or other reports fromlists.These programs then use values displayed in the list as input values. The user can,for example, call a transaction from within a list to change the database table whosedata is displayed in the list.How to maintain lists ?To return from a high list level to the next-lower level (SY-LSIND), the user chooses

Page 178: SAP Interview Questions

Back on a secondary list. The system then releases the currently displayed list andactivates the list created one step earlier. The system deletes the contents of the

Page 179: SAP Interview Questions

SAP Interview Questions Page 130 of 173Yogesh Mishra ([email protected])released list.To explicitly specify the list level into which you want to place output, settheSY-LSIND field. The system accepts only index values which correspond to existinglistlevels.It then deletes all existing list levels whose index is greater or equal to theindexyou specify.For example, if you set SY-LSIND to 0, the system deletes all secondarylists and overwrites the basic list with the current secondary list.What are the page headers for secondary lists?On secondary lists, the system does not display a standard page header and it doesnottrigger the event TOP-OF-PAGE.To create page headers for secondary list, you mustenhance TOP-OF-PAGE:Syntax TOP-OF-PAGE DURING LINE-SELECTION. The system triggers this eventforeach secondary list. If you want to create different page headers for different listlevels,you must program the processing block of this event accordingly, for example byusingsystem fields such as SY-LSIND or SY-PFKEY in control statements (IF, CASE).What is meant by stacked list ?A Stacked list is nothing but secondary list and is displayed on a full-size screenunlessyou have specified its coordinates using the window command.Is the basic list deleted when the new list is created?NO.It is not deleted and you can return back to it using one of the standardnavigationfunctions like clicking on the back button or the cancel button.What is meant by hotspots ?Hotspot is a list area where the mouse pointer appears as an upright handsymbol.Whena user points to that area(and the hand cursor is active),a single-click does the samething as a double-click. Hotspots are supported from R/3 release 3.0c.In which system field does the name of current gui status is there ?The name of the current GUI STATUS is available in the system field SY-PFKEY.What is meant by hide area ?The hide command temporarily stores the contents of the field at the current line in asystem-controlled memory called the HIDE AREA.At an interactive event,thecontents ofthe field is restored from the HIDE AREA. When calling a secondary list from a listlinefor which the HIDE fields are stored, the system fills the stored values back into the

Page 180: SAP Interview Questions

SAP Interview Questions Page 131 of 173Yogesh Mishra ([email protected])variables in the program. In the program code, insert the HIDE statement directlyafterthe WRITE statement for the current line.When the get cursor command used in interactive lists ?If the hidden information is not sufficient to uniquely identify the selected line ,thecommand GET CURSOR is used.The GET CURSOR command returns the name ofthefield at the cursor position in a field specified after the addition field,and the value oftheelected field in a field specified after value.How to pass data from list to report ?ABAP/4 provides three ways of passing data:---Passing data automatically using system fields---Using statements in the program to fetch data---Passing list attributesHow to call other programs ?Report Transaction Call and return SUBMIT AND RETURN CALL TRANSACTIONCall without return SUBMIT LEAVE TO TRANSACTIONSystem fields used in interactive ReportingThe SY-LSIND system field contains the index of the list currently created. Whilecreating a basic list, SY-LSIND equals 0.With each interactive event, the system automatically sets the following systemfields:System field InformationSY-LINCT total line count of a listSY-LINNO current line no where cursor is placed.SY-LSIND Index of the list currently created during the current event (basic list = 0)SY-LISTI Index of the list level from which the event was triggeredSY-LILLI Absolute number of the line from which the event was triggeredSY-LISEL Contents of the line from which the event was triggeredSY-CUROW Position of the line in the window from which the event was triggered(counting starts with 1)SY-CUCOL Position of the column in the window from which the event was triggered(counting starts with 2)SY-UCOMM Function code that triggered the eventSY-PFKEY Always contains the status of the current list.TOP-OF-PAGE DURING LINE-SELECTION.The system triggers this event for each secondary list. If you want to create differentpage headers for different list levels, you must program the processing block of this

Page 181: SAP Interview Questions

SAP Interview Questions Page 132 of 173Yogesh Mishra ([email protected])event accordingly, for example by using system fields such as SY-LSIND or SYPFKEYin control statements (IF, CASE).Data from System Fields of Interactive ListsFrom system fields, you retrieve the following information: the index of a list, thepositionof the list in the output window, and the location of the cursor. The only system fieldthatcontains the contents of the selected line is SY-LISEL.Passing Data by Program StatementsTo pass individual output fields or additional information from a line to thecorrespondingprocessing block during an interactive event, use these statements:HIDEThe HIDE statement is one of the fundamental statements for interactive reporting.Using the HIDE technique, you can at the moment you create a list level define,whichinformation later to pass to the subsequent secondary lists.Syntax HIDE <f>. Eg HIDE: SPFLI-CARRID, SPFLI-CONNID, NUM.READ LINEUse the statements READ LINE and READ CURRENT LINE to explicitly read datafromthe lines of existing list levels. These statements are tightly connected to the HIDEtechnique.Syntax :READ LINE <lin> [INDEX <idx>][FIELD VALUE <f1> [INTO <g 1>]... <f n> [INTO <g n>]][OF CURRENT PAGE|OF PAGE <p>].Eg :READ LINE SY-INDEX FIELD VALUE BOX.GET CURSORUse the statements GET CURSOR FIELD and GET CURSOR LINE to pass the outputfield or output line on which the cursor was positioned during the interactive event totheprocessing block.SyntaxGET CURSOR FIELD <f> [OFFSET <off>] [LINE <lin>][VALUE <val>] [LENGTH <len>].

Page 182: SAP Interview Questions

SAP Interview Questions Page 133 of 173Yogesh Mishra ([email protected])SET CURSORTo set the cursor, use the SET CURSOR statement. This statement sets the cursor inthe most recently created list. While creating the basic list, this is always the basic listitself. While creating a secondary list, this is the previous list.SET CURSOR <col> <lin>.This statement sets the cursor to column <col> of line <lin> of the output window.Calling ProgramsIf you need to program an extensive application, one single program will becomeverycomplex. To make the program easier to read, it is often reasonable to divide therequired functions among several programs.ABAP allows you to call reports as well as transactions using these statements:Report TransactionCall without return SUBMIT LEAVE TO TRANSACTIONCall and return SUBMIT AND RETURN CALL TRANSACTIONTypical Structure of ABAP Program1. Report Definitions *2. Table and Data definitions *3. Initialization event4. Screen Select Options/Inputs *5. Selection-screen event6. Start-of-selection event7. Performs and other Events * Statements8. End-of-selection event1. Initialization· Triggered prior to first display of selection screen · To specify Default value inSELECT-OPTIONS2. At Selection-Screen· Processed after the selection screen value are entered· For validation of screen accepts· Returns back to SELECT-OPTIONS4. START-OF-SELECTION & END-OF-SELECTION· This is implicit in any ABAP/4 program· Start & end of main processing logic· More in use with logical database access· All Statements between START-OF-SELECTION and END-OF-ELECTION is onlyexecuted· By Default , no need to have END-OF-SELECTION

Page 183: SAP Interview Questions

SAP Interview Questions Page 134 of 173Yogesh Mishra ([email protected])· Each procedural statement in an ABAP program automatically belongs to STARTOF-SELECTION5. Form Event· Similar to PERFORM/SUBROUTINES· STARTS with FORM and ends with ENDFORM· All statements between ENDFORM and end of program are never processed· Similarly all statements between ENDFORM and event keyword are neverprocessed.6. Limitations of Simple PERFORM· Values can be passed through PERFORM to FORM.· Giving the flexibility to use the same subroutine multiple number of times.Syntax1: PERFORM <XXXX> using <YYY>changing <MMM>FORM <XXXX> using <YYY> like <ZZZ> changing <MMM> like <NNN> - Pass byreference OR FORM <XXXX> using value (YYY) like <ZZZ> - Pass by value,creates another copy of the variable.Example1:PERFORM date-invert using in-date Changing out-dateFORM date-invert using in-date like datumSyntax2: PERFORM function-name(program) IF FOUND.Example2: PERFORM HEADER(FORMPOOL) IF FOUND.6. Get event· GET < table name >· Reads data of all columns from all database table falling in the hierarchy· Needs to mention table name inTABLES: parameters.........· Only fields part of the tables mentioned in the TABLES: parameter can be viewed &edited7. To Exit from an Event· Exit It exits from the respective subroutine were this syntax is used , generallycondition for the EXIT is stated before this syntax· Check - here the conditional check is done at the same time .CHECK <condition>If the condition is not satisfied, the system leaves the subroutine and resumesthe processing after the PERFORM statement· Stop it is the abrupt stopping the program flow8. CALLing Functional ModulesSyntax:CALL FUNCTION <module> [EXPORTING f1 = a1 .... fn = an][IMPORTING f1 = a1 .... fn = an][CHANGING f1 = a1 .... fn = an]

Page 184: SAP Interview Questions

SAP Interview Questions Page 135 of 173Yogesh Mishra ([email protected])[TABLES f1 = a1 .... fn = an][EXCEPTIONS e1 = r1 .... en = rnExample:CALL FUNCTION 'Z_DATE_CONVERSION' EXPORTING STD_DATE =GEN_DATEIMPORTING CH_DATE = NEW_DATE9. List EventsTOP-Of-PAGE, END-OF-PAGE,AT LINE-SELECTION, AT USER-COMMANDThese events are triggered by the ABAP runtime environment while a list isbeing created or when a user performs an action on a list. The statement inthese blocks can format the list or process the user's request.ABAP PERFORMANCE ISSUES.ABAP/4 OptimizationUse the GET RUN TIME command to help evaluate performance. It's hard to knowwhether that optimization technique REALLY helps unless you test it out. Using thistool can help you know what is effective, under what kinds of conditions. The GETRUN TIME has problems under multiple CPUs, so you should use it to test smallpieces of your program, rather than the whole program. Avoid 'SELECT *', especiallyin tables that have a lot of fields. Use SELECT A B C INTO instead, so that fields areonly read if they are used. This can make a very big difference. Field-groups can beuseful for multi-level sorting and displaying. However, they write their data to thesystem's paging space, rather than to memory (internal tables use memory). For thisreason, field-groups are only appropriate for processing large lists (e.g. over 50,000records). If you have large lists, you should work with the systemsadministrator to decide the maximum amount of RAM your program should use, andfrom that, calculate how much space your lists will use. Then you can decide whetherto write the data to memory or swap space. See the Fieldgroups ABAP example.Use as many table keys as possible in the WHERE part of your select statements.Whenever possible, design the program to access a relatively constant number ofrecords (for instance, if you only access the transactions for one month, then thereprobably will be a reasonable range, like 1200-1800, for the number of transactionsinputted within that month). Then use a SELECT A B C INTO TABLE ITABstatement. Get a good idea of how many records you will be accessing. Log into yourproductive system, and use SE80 -> Dictionary Objects (press Edit), enter the tablename you want to see, and press Display. Go to Utilities -> Table Contents to querythe table contents and see the number of records. This is extremely useful in

Page 185: SAP Interview Questions

optimizing a program's memory allocation. Try to make the user interface such thatthe program gradually unfolds more information to the user, rather than giving ahuge list of information all at once to the user. Declare your internal tables usingOCCURS NUM_RECS, where NUM_RECS is the number of records you expect to beaccessing. If the number of records exceeds NUM_RECS, the data will be kept inswap space (not memory).

Page 186: SAP Interview Questions

SAP Interview Questions Page 136 of 173Yogesh Mishra ([email protected])Use SELECT A B C INTO TABLE ITAB whenever possible. This will read all of therecords into the itab in one operation, rather than repeated operations that resultfrom a SELECT A B C INTO ITAB... ENDSELECT statement. Make sure that ITAB isdeclared with OCCURS NUM_RECS, where NUM_RECS is the number of recordsyou expect to access. Many tables contain totals fields (such as monthly expensetotals). Use these avoid wasting resources by calculating a total that has already beencalculated and stored. Program Analysis Utility To determine the usage of variablesand subroutines within a program, you can use the ABAP utility called `ProgramAnalysis' included in transaction SE38. To do so, execute transaction SE38, enteryour program name, then use the path Utilities -> ProgramAnalysisABAP PERFORMANCE IMPROVEMENTS VIA DATA DICTIONARYINDEX CREATION SUGGESTIONS RELATED TO DATABASE PERFORMANCE· The columns at the beginning of an index are the most "common". The most"common" columns are those where reports are selecting columns with no ranges -thewhere clause for these columns is an "equal to" expression. Rearrange columns of anindex to match the selection criteria. For example, if a select statement is written toinclude columns 1 and 2 with "equal to" expressions in the where clause and column3 and 4 are selected with value ranges, then the index should be created withcolumns inthe sequence of 1,2,3,4.· Columns towards the end of the index are either infrequently used in selects orare part of reporting selects that involve ranges of values.TABLE TYPE SUGGESTIONS RELATED TO DATABASE PERFORMANCE· Use VIEW tables to effectively join and "denormalize" related tables that are takinglarge amounts of time to select for reporting. For example, at times where highlyaccessed tables normalize description text into one table and the header data intoanother table, it may make sense to create a view table that joins the relevant fields ofthe two associated with a poor performing ABAP.For POOL tables that contain large amounts of data and are highly accessed, convertthe pooled table into a transparent table and add an index. POOLED tables aresupposed to be collections of smaller tables that are quickly accessed from thedatabase or are completely buffered in memory. Pooled tables containing more thana few hundred rows and are accessed many times in a report or transaction arecandidates for POOL to TRANSPARENT Conversion. For example, table A053contains tax jurisdiction condition information and are accessed more than ten times

Page 187: SAP Interview Questions

in the sales order create transaction. If the entire United States tax codes are loadedinto these condition tables, the time to save a sales order increases to unacceptablelevels. Converting the tax condition table to transparent and creating an index basedupon the key fields, decreases processing time from minutes to seconds.· Do not allow the use of LIKE in an SAP SQL statement accessing a large table.· Use internal tables in ABAPs to preselect values once and store values in memory

Page 188: SAP Interview Questions

SAP Interview Questions Page 137 of 173Yogesh Mishra ([email protected])for sorting and searching purposes (this is an assumption stated at the beginning ofthisDiscussion).· Avoid logical databases when not processing all row s of a table. In fact, a logicaldatabase is merely a group of nested SAP SQL SELECT statements. In general, whenprocessing a small number of rows in a larger table is required, the use of internaltablesand NOT using a logical database or nested selects will be much better forperformance.ABAP IMPORTANT REPORTSRSBDCBTCSubmit a BDC job with an internal batch number and wait for the end of the batchinputsession.RSBDCSUBRelease batch input sessions automaticallyABAP IMPORTANT TCODESOSS1 SAP Online Service SystemSM13 Update monitor. Will show update tasks status. Very useful to determine whyanupdate failed.S001 ABAP Development WorkbenchSE01 Old Transport & Corrections screenSE10 New Transport & Correction screenSE09 Workbench OrganizerSE16 Data Browser: Initial Screen.SE30 ABAP/4 Runtime AnalysisSE36 ABAP/4: Logical DatabasesSE37 ABAP/4 Function ModulesSE38 ABAP EditorSE39 Splitscreen Editor: Program CompareSE41 Menu PainterSE51 Screen Painter: Initial Screen.SE71 SAPscript layout setSE80 ABAP/4 Development Workbench Object BrowserSM12 Lock table entries (unlock locked tables)SM21 View the system log, very useful when you get a short dump. Provides muchmore info than short dump SM35 View Batch Input SessionsSQ00 ABAP/4 Query: Start QueriesWhat should be the approach for writing a BDC program?Ans.: 1. Analysis the Data. 2. Generate SAP structure. 3. Develop transfer program 4.Create sequential file. 5. Create batch input program. 6. Process batch input dataWhat is the alternative to batch input session? Ans. : Call transaction & call dialog

Page 189: SAP Interview Questions

SAP Interview Questions Page 138 of 173Yogesh Mishra ([email protected])2 What are the steps in a BDC session ? The first step in a BDC session is to identifythe screens of the transaction that the program will process. Next step is to write aprogram to build the BDC table that will be used to submit the data to SAP. The finalstep is to submit the BDC table to the system in the batch mode or as a singletransaction by the CALL TRANSACTION command.3 What are the problems in processing batch input sessions? How is batchinput process different from processing on line?Ans.: Sessions cannot be run in parallel and not fast. 4 What do you do when thesystem crashes in the middle of a BDC batch session?-Check no. of records already updated and delete them from input file and run BDCagain. 5 What do you do with errors in BDC batch session?-Analysis and correct input file format and entries in internal table BDCDATA. 6WHAT are the commands that allow you to process sequential file? And whatis their syntax? Ans :-· READ DATASET (reading) and TRANSFER (writing)· OPEN DTASET <dataset name> for <input output appending> in <binary text >mode at POSITION <position> MESSAGE <field> · READ DATASET <dataset name> INTO <field>· CLOSE DATASET <dataset name>· DELETE DATASET <dataset name>TRANSFER <field> to <dataset name> 7 What is the process for transferring datafrom legacy system to SAP?Ans :- FTP file transfer, Manufacturer specific field transfer NFS(network filesystem)/BDC. 8 Explain the process to transfer a record to a dataset?Ans :- TRANSFER <field> to <dataset name>.9 Why batch input?Ans :- To input a large amount of information at off peak times.10 Can data be put directly into the database?Ans :- No, only after the data has been entered via transaction.11 Explain at high level, the batch input process?Ans :- Batch data is placed into queues called batch input sessions , then placed intothe application programs for maintenance into the database. 12 What are the functionmodules associated with batch input?Ans :- BDC_OPEN_GROUP , BDC_CLOSE_GROUP , BDC_INSERT13 What is the structure of the BDC table?Ans :- Program/Dynpro/start/field name/ field content.14 Write out a coding example for filling a BDC Table.Ans :-FORM <NAME>REFEESH <bdc table>CLEAR <bdc table>MOVE <program name > to <bdc table>-PROGRAM<number1> TO <bdc table>-DYNPRO

Page 190: SAP Interview Questions

`X' TO <bdc table>-DYNBEGINAPPEND <bdc table>CLEAR <bdc table>MOVE: <field1> TO <bdc table>-FNAM<field2> TO <bdc table>-FVAL

Page 191: SAP Interview Questions

SAP Interview Questions Page 139 of 173Yogesh Mishra ([email protected])APPEND <bdc table> 15 How do you find the transaction number, program number andfield names?Ans :-· Transaction no.,program no. System -> statusField names - F1, Technical help 16 What are the processing modes for Batch Input?Ans :- Process on screen(foreground) , Display errors only and process in thebackground 17 What are the available OK Codes that can be utilized during batch inputprocessing?Ans :-· /n terminates current batch input transaction and marks as incorrect.· /bdel delete current batch input transaction from session.· /bend terminate batch input processing and mark session as incorrect.· /bda change display mode to process the session on screen instead of displaying onlyerrors. /bde change display mode to display only errors instead of processing the sessionon the screen.18 What is the effect of the BDC_CURSOR field name in the BDC table?Ans :- You can set the cursor and enter as a corresponding field value the name ofthe field on which the cursor is to be positioned . 19 How many types of BDCs you havedone? 21 Why you choose Call transaction and/or session method? Call transaction ismainly used when you want to update the database using a single transaction , you canalso update the database in asynchronous mode, where as session is used to performhuge database updations using more than one transaction and which will last for a longtime.22 How you trap errors in call Transaction Errors while updating the database using calltransaction technique are trapped using a structure bdcmsgcall, whose field msgtypbecome `e' when an error record is encountered. Those records are formatted usingformat_message function call in the desired format and stored in an internal table forlisting of all error records in one shot.23 What are different types of Update modes In BDC's we have two types of updationmodes 1) Synchronous 2) Asynchronous24 What is main difference between session method and LSMW In the context of session

Page 192: SAP Interview Questions

method, the method of updating is "Batch Input" , we require a program to be coded,But in the context of LSMW method, The methods of updating using "BatchInput/Direction Input"from an IDOC, from a BAPI structure. No source code is required, the completeoperation is performed in 16 steps sequence25 What is main difference between CATT and LSMW Using LSMW you can update anykind of data but no changes to database are allowed, where as CATT tool can update onlymaster data, which also allows changes to the master data and also a significant testingof data is possible 26 What is BDC and How you use it? BC Basis Components--ABAPworkbench--BC Basis Programming interfaces--Data transferDuring data transfer, data is transferred from an external system into the SAP R/3System. ·Transfer data from an external system into an R/3 System as it isinstalled. ·Transfer data regularly from an external system into an R/3 System.Example: If data for some departments in your company is input using a systemother than the R/3 System, you can still integrate this data in the R/3 System. To dothis, you export the data from the external system and use a data transfer method to

Page 193: SAP Interview Questions

SAP Interview Questions Page 140 of 173Yogesh Mishra ([email protected])import it into the R/3 System.Batch input with batch input sessions : Data consistency check with the help ofscreen logic.With the batch input method, an ABAP program reads the external data that is to beentered in the R/3 System and stores the data in a "batch input session". Thesession records the actions that are required to transfer data into the system usingnormal SAP transactions.When the program has generated the session, you can run the session to executethe SAP transactions in it. You can explicitly start and monitor a session with thebatch input management function (by choosing System ® Services ® Batch input), orhave the session run in the background processing system.Use the BDC_OPEN_GROUP function module to create a new session. Once youhave created a session, then you can insert batch input data into it withBDC_INSERT. Use the BDC_INSERT function module to add a transaction to abatch input session. Use the BDC_CLOSE_GROUP function module to close asession after you have inserted all of your batch input data into it.What is Dataset and how you use it? ABAP/4 provides three statements for handlingfiles:The OPEN DATASET statement opens a file.The CLOSE DATASET statement closes a file.The DELETE DATASET statement deletes a file.To open a file for read access, use the FOR INPUT option of the OPEN DATASETstatementTo open a file for write access, use the FOR OUTPUT option of the OPENDATASET statementTo open a file for appending data to the file, use the FOR APPENDING option of theOPEN DATASET statementTo process a file in binary mode, use the IN BINARY MODE option of the OPENDATASET statementTo process a file in text mode, use the IN TEXT MODE option of the OPENDATASET statementTo open a file at a specific position, use the AT POSITION option of the OPENDATASET statementWhen you work with the operating systems UNIX or WINDOWS NT, you can sendan operating system command with the statement OPEN DATASET. To do so, usethe option FILTERTo receive the operating system message after trying to open a file, use theMESSAGE option of the OPEN DATASET statementTo close a file on the application server, use the CLOSE DATASET statementTo delete a file on the application server, use the DELETE DATASET statementTo write data to a file on the application server, use the TRANSFER statementTo read data from a file on the application server, use the READ DATASET

Page 194: SAP Interview Questions

SAP Interview Questions Page 141 of 173Yogesh Mishra ([email protected])statement.36 Give real time work done by u in BDC ? Transactions used ? parameterspassed with functions.37 will ask u for screen no's and dynpro names for BDC that u say u have done.39 Which technical field in the BDCDATA table holds the last cursor position?41 What is true about the LSMW: (choose correct option/s) · Part of the SAP system ·Processes hierarchical data files (header and position) · Needs a source field for everytarget field 44 How do you read a LOCAL sequential file? 45 How do you write asequential file?46 How do you send the BDCDATA table in a Call Transaction statement?47 What loop do you code for a READ DATASET statement?51 What are the steps in a BDC session ? The first step in a BDC session is to identify thescreens of the transaction that theprogram will process. Next step is to write a program to build the BDC table that will beused to submit the data to SAP. The final step is to submit the BDC table to the system inthe batch mode or as a single transaction by the CALL TRANSACTION command.52 How do you find the information on the current screen ? - The information on thecurrent screen can be found by System Statuscommand from any menu.53 How do you save data in BDC tables ? - The data in BDC tables is saved by using thefield name `BDC_OKCODE' and field value of `/11'54 What is the last entry in all BDC tables ? - In all BDC tables, the last entry is to savethe data by using the field nameBDC_OKCODE and a field value of `/11'.55 What is a multiple line field ? - A multiple line field is a special kind of field whichallows the user to entermultiple lines of data into it.56 How do you populate data into a multiple line field ? - To populate data into amultiple line field, an index is added to the field name to indicate which line is to bepopulated by the BDC session (Line index ).57 Write the BDC table structure.- BDC table structureFIELD TYPE DESCRIPTION Program CHAR(8) Program name of transaction DynProCHAR(4) Screen number of transaction DynBegin CHAR(1) Indicator for new screenFnam CHAR(35) Name of database field from Screen Fval CHAR(80) Value to submit to

Page 195: SAP Interview Questions

field58 Does the CALL TRANSACTION method allow multiple transactions to be processedby SAP ? - No. The CALL TRANSACTION method allows only a single transaction to beprocessed by SAP.59 Does the BDC_INSERT function allow multiple transactions to be processedby SAP ? - Yes.60 What is the syntax for `CALL TRANSACTION' ? - CALL TRANSACTION trans [using bdctab MODE mode ]. Three possible entries are there for MODE. A - show allscreens E - show only screens with errors N - show no screens Which mode of `CALL

Page 196: SAP Interview Questions

SAP Interview Questions Page 142 of 173Yogesh Mishra ([email protected])TRANSACTION' method allows background processing ? - N is the only mode thatallows background processing.61 Is it possible to use `CALL TRANSACTION' without a BDC table ? - Yes, it is possibleto use `CALL TRANSACTION' without a BDC table. In such case, the current program issuspended, the transaction specified is brought up, and a user must enter the data intothe screens.62 What is TCODE ? - TCODE is the transaction code for the transaction that should beused to process the data in the BDC table being inserted.63 What are the function modules that need to be called from BDC program tosubmit the transactions for processing ?- BDC_OPEN_GROUP - BDC_INSERT - BDC_CLOSE_GROUP64 How many sessions will be opened using BDC_OPEN_GROUP ? - Only one sessioncan be created using the BDC_OPEN_GROUP function.65 What is `BATCH INPUT' or `BDC' ? - The SAP system offers two primary methods(BDC SESSION METHOD,CALL TRANSACTION METHOD) for transferring data into the system fromother systems and Non-SAP systems. These two methods are collectivelycalled as `BATCH INPUT' or `Batch Data Communication' (BDC).66 What are the advantages in Batch Input ? - The Batch Input ensures Data integrity.No manual interaction is required during Data transfer.67 What is the functionality of `Classical Batch Input' ? In `Classical Batch Input' anABAP/4 program reads the external data that is to beentered in the SAP system and stores the data in a Batch Input session. Thissession stores the actions that are required to enter your data using normal SAPtransactions.68 Which Function Modules are used in `Classical Batch Input' ? -BDC_OPEN_GROUP , BDC_INSERT, BDC_CLOSE_GROUP.69 What is Synchronous Database update ? - During the processing no transaction isstored until the previous transactionhas been written to the Database. This is called Synchronous Databaseupdate.70 What are the differences between CALL TRANSACTION and BATCH INPUTSESSION ? - The most important aspects of the batch session interface are:- Asynchronous processing - Transfers data for multiple transactions - Synchronousdatabase update During processing, no transaction is started until the previoustransaction hasbeen written to the database.- A batch input processing log is generated for each session - Sessions cannot begenerated in parallel The most important aspects of the CALL TRANSACTION USING interface are: -

Page 197: SAP Interview Questions

Synchronous processing - Transfers data for a single transaction - Synchronous andasynchronous database updating both possible The program specifies which kind ofupdating is desired.- Separate LUW for the transaction The system performs a database commitimmediately before and after theCALL TRANSACTION USING statement. - No batch input processing log is generated71 What are the types of Batch Input ? - Classical Batch Input - Call Transaction - CallDialog72 What is BDC_OKCODE ? - The command field is identified by a special name inbatch input calledBDC_OKCODE. This name is constant and always identifies the command

Page 198: SAP Interview Questions

SAP Interview Questions Page 143 of 173Yogesh Mishra ([email protected])field.73 How can we execute a function in a BDC session ? - We can execute a function in atransaction by entering the function code orfunction key number in the command field of an SAP session. A function keynumber must be prefixed with the / (slash) character. A function code mustbe prefixed with the = character. - Example:BDCDATA-FNAM = 'BDC_OKCODE'BDCDATA-FVAL = '=UPDA'74 How can we position the cursor on a particular field ? - BDCDATA-FNAM =`BDC_CURSOR'BDCDATA-FVAL = <FIELDNAME>75 Who are Dialog users and who are Background users ? - Dialog users are normalinteractive users in the SAP system. Backgroundusers are user master records that are specially defined for providingauthorizations for background processing jobs.76 What is the use of BDC_INSERT ? - We add a transaction to a Batch Input Session byusing this function.77 What are the update modes in CALL TRANSACTION ? - S : Synchronous - A :Asynchrnous - L : Local78 What does the message parameter indicates ? - The message parameter indicatesthere all system messages issued duringa CALL TRANSACTION are written into the internal table <itab>. Theinternal table must have the structure of BDCMSGCOLL.79 What is Direct Input ? - To enhance the batch input procedure, the system offers thedirect input technique especially for transferring large amount of data. This techniquedoesn't create sessions but stores the data directly. The direct input programs must beexecuted in the back ground only. To maintain and start these programs, use programRBMVSHOW or the transaction BMVO.80 What are the features of Recording Function ? - recording transaction runs - creatingbatch input sessions from the recorded transaction runs. - Generating a batch inputprogram from the recorded data.81 What is synchrnous database update ? - During the processing, no transaction isstored until the previous transactionhas been written to the database. This is called Synchronous databaseupdate.82 How do you set up batch process?Data analysis: Analyze the data that is to be transferred to the SAP System.

Page 199: SAP Interview Questions

||Generate SAP structures: Generate SAP data structures for incorporation into yourdata export program.||Develop transfer program: You can write the program in ABAP/4 or as an externalprogram.||Create sequential file: Export the data that is to be transferred, to a sequential file.||Create batch input program: ABAP/4 batch input program that will read the data tobe transferred from the sequential file.||Process batch input data: Process the data and add it to the SAP System. You can

SAP Interview Questions Page 144 of 173Yogesh Mishra ([email protected])do this either by:batch-input session method or Call transaction method.||Analyse results: Check that all data has been successfully processed.||Analyse Error session: Correct and re-process erroneous data.83 Where do you use BDC? · transferring data from another system when you installyour SAP System· regularly transferring data that is captured by a non-SAP system in your company intothe SAP System. Assume, for example, that data collection in some areas of yourcompany is still performed by a non-SAP system. You can still consolidate all of yourdata in the SAP System by exporting the data from the other system and reading it intothe SAP System with batch input.You can also use batch input to transfer data between two R/3 Systems. However, thereare more direct methods for doing this, such as RFC (remote function calls).84 What has to be done to the packed fields before submitting to a BDC session? Declarethese fields in the internal table as characters and the length of the field should be sameas the field length of the field's data element. This internal table is used to hold the datafetched from the sequential file using WS-upload function module.What is LSMW The LSMW is a cross-application component (CA) of the SAP R/3System.The tool has interfaces with the Data Transfer Center and with batch input and directinput processing as well as standard interfaces BAPI and IDoc in R/3.The LSMW comprises the following main functions: 1. Read data (legacy data in

Page 200: SAP Interview Questions

spreadsheet tables and/or sequential files). Function Read data replaces and enhancesfunctions Spreadsheet interface and Host interface of LSMW version 1.0. You can useany combination out ofPC and server files now. 2. Convert data (from the source into the target format).3. Import data (to the database used by the R/3 application). TCODE – LSMWSAP ScriptsWhat is sap script and layout set?Ans - SAPscript is the integrated text management system of the SAP R/3 System.SAPscript is tightly integrated into the SAP System. It is used for many differentword-processing tasks all over the SAP System.What is layout set?A layout set in SAPscript is used for page layout. The layout set contains variouselements, which are used for layout control of the individual pages and also containlayout information for texts which are to be output on the individual pages.The layot of a document is defined in a layot set.A layout set specified the appearance and structure of a document. Layout sets containpredefined text modules with space reserved for variable data. Youcan use these text modules for different application. Every SAPscript document uses alayout set. To make changes to your documents, such as moving a piece of text, orchanging fonts,paragraph formats, and tabs, you only need to change the layout set.

Page 201: SAP Interview Questions

SAP Interview Questions Page 145 of 173Yogesh Mishra ([email protected])There are two ways of formatting texts using layout sets:The text is entered and output in standard text maintenance. You can assign any layoutset. Text can also be entered via the layout set a letter header, for example. The text isformatted via an ABAP/4 program using a layout set. The program can eitherdynamically output individual predefined text modules, text elements or transfer entiretexts, which are to be output in the layout set. You can use Styles to define the formattingof the text in your documents. A style determines text formatting by setting theparagraph and character formats used in a document. You can, for example, use a styleto highlight character strings or whole paragraphs. You can assign a style to any text.Typically, however, you'll use styles primarily in the main windows of layout sets, whereusers type or enter text directly in documents. Header data is found in both style andlayout set maintenance.In style maintenance, it is used primarily to present important information - designedto make it easier for the end user to select a style. The header data in layout setmaintenance, on the other hand, is used for information and control purposes. Windowsare defined in layout set maintenance. They represent areas which are positioned onpages as page windows and in which text is later output. At least one window must bedefined for each layout set. If not, a text cannot be formatted by SAP script. Thefollowing window types can be used:MAIN Main window in which continuous text is output. This is the window used bydialog users of a print program and layout set. For example the body text of a letterwould be entered in MAIN.VAR Window with variable contents. The text can vary on each page in which thewindow is positioned. Variable windows are formatted for each page.CONST Windowwith constant contents which is only formatted once. A layout set hasthe following elements: Header data - Data related to development (created by,development class, etc.) and layout set information (which elements are used) are bothstored in the headerdata. A start page must be entered here. Paragraph formats - Paragraph formats arerequired in layout sets - as in styles - in order to format texts. However, they are also

Page 202: SAP Interview Questions

used for word processing in layout sets, for example, to format text elements. Characterformats - You can also use character formats to format texts or paragraphs. Unlikeparagraph formats, however, they are used to format text within a paragraph.Windows - Windows are names and window types, which are not physically positioneduntil they are allocated to pages and units of measurement are specified.Pages - Pages are defined to provide the system with a start and end point in textformatting.Page windows - Page windows are the combination of windows and pages, where thedimensions of a window and its position on a page are specified. The purpose of SAPscript control commands is to allow control of the output formatting. These commandsare not interpreted by the SAPscript editor, but are passed through to the SAPscriptComposer for processing. The composer is the program that converts text from the formdisplayed in the editor to the form used for printing.

Page 203: SAP Interview Questions

SAP Interview Questions Page 146 of 173Yogesh Mishra ([email protected])What is SAPscript and explain its purpose?SAP Script is the SAP system's own text-proessing system. You'll find that it looks andfeels a lot like other leading text-processing system that you may use on your personalcomputer. Every company needs to output documents with a uniformly defined layout(eg. Invoices, delivery notes, etc..) all the time. The basic layout of the document is predefined, but in many cases, other data has to be merged with it, such as address data orpurchase order items. This data might be entered manually by a employee, or retrievedfrom a database table. Large quantities of these documents have to be produced. Fromprinting is usually a matter of large print runs of documents such as payslips, checks,order confirmation, reminders etc. SAPscript has been developed to meet the aboverequirements. IT is an integrated tool for text entry and form printing in R/3applications. These documents are normally provided by SAP but every organization hastheir unique waqys of these documents so to customize these and for creating newerones if required; SAP script is used.What are components of SAPscript? Layout set, SAPscript Text, ABAP Print program,symbols, function modules like open_form, close_From, Read_text etc,. What are theABAP/4 Commands that link to a layout set?Call function OPEN-form.Call function WRITE-from. Call function CLOSE-fromImporting Graphics (Logos) into SAPScriptThe program RSTXLDMC can be used to upload graphics (file extension .tif on PCfiles) into individual standard text. Other useful programs for SAPScriptRSTXFCON - Converts page formatRSTXSCRP - Upload/Download layout setsRSTXDBUG - SAPScript debugger Debug SAPScriptYou can debug a SAPScript: Use Tools - Word Processing - Layout Set.Enter name of layout set and then Utilities - Activate Debugger.It is of no consequence which layout set you enter when selecting the SAPscriptdebugger. (Menu path: Tools-Word-processing - Forms, Utilities - Activate Debugger)The next layoutset called will invoke the debugger. This is quite handy when verifyingwhich layoutset is being called (Verifying customizing settings). Another way to set theSAPScript debugger is to run program RSTXDBUG.

Page 204: SAP Interview Questions

When a Form is copied from one client to another .And If U try to display or changethe form in the copied client .The possible error message cud be :1.Form not foundTry coping again specifing the language .2.IF IT dispalys an error message saying That the text file is inconsistent .Then go to SE38 and Run "RSTXCHKO" .It will ask for the form name ,then check all the checkboxes and then run theprogram. Note : all Script related problems can be solved using Program `RSTX*'.How to take a back up of script layout into U'r hard disk and load it laterUse Program RSTXSCRP. Use EXPORT mode, when downloading and IMPORT whenuploading a script. Don't forget to give the form name in the object field. This will createa scriptwith the same name as that of the original script . If a script with the same nameexists in the same client ,then it will give an error `Object cannot be overwritten '

Page 205: SAP Interview Questions

SAP Interview Questions Page 147 of 173Yogesh Mishra ([email protected]). I want to copy table across clients Use Program RSCLTCOPTo transfer script files across systems (Not Clients) - RSTXSCRPTo compare the contents of a table across clients: RSTBSERVTo change the development class of any object - RSWBO052 What type of variablesnormally used in sap script to output data?&Tables name- fields&. How do you number pages in sap script layout outputs?& page &&next Page & What takes most time in SAP script programming?Defining layout set up / sets. How do you use tab sets in layout sets?Define paragraph with defined tabs. How do you backup sap script layout sets? Can youdownload and upload? How?SAP script backup :- In transaction SE71 goto Utilities -> Copy from client -> Givesource form name, source client (000 default), Target form name.Download :- SE71, type form name -> Display -> Utilities -> form info -> List -> Saveto PC file.Upload :- Create form with page, window, pagewindow with the help of downloadedPC file. Text elements for Page windows to be copied from PC file.What is Compare Tool in SAP Script ?SAP Script offers tools for comparing objects across clients. We can compare orcopy the following kinds of objects.StylesLayout setsDocumentsWith the Compare tool we can do the following :Check whether an object exists in both clientsDisplay the differences between the versions of an object Layout Sets are used to controlpage layout and text formatting in documents . SAP Standard styles and layout sets arealways held in Client 000. In what format does SAP Script store text ? SAPscript texts arestored in Interchange Text Format (ITF). SAPscript offers conversion programs for thetext file formats Rich Text Format (RTF) and ASCII as an interface to other wordprocessors. The various window types in SAP Script are Main, Variable and Constant.The New-Page command is used to force a Page break in the text at any point. Protect ...Endprotect command pairs can be nested (True / False). False.Delimiter & must be used immediately before and after the symbol.What does the composer do? The final appearance of your documednt depends oninteraction between the print program and the layout set. The SAPscript print programinitializes the printing process. Every command entered using the SAPscript

Page 206: SAP Interview Questions

programming interfaces is transferred to the composer. The composer received layoutinformation from the layout set specified by the print program. The documents areformatted according to this layout information. If the documents contain variables, thecomposer replaces these variables with data from the R/3 system, such as the currentdate, or with the user data selected by theprint program. The print program controls the completion of the layout set. Once this isdone, thecomposer places the completed document in the spool.

Page 207: SAP Interview Questions

SAP Interview Questions Page 148 of 173Yogesh Mishra ([email protected])Where do we define Tab space for data in SAP Script? When defining the paragraph forthe text element we can define the TABS then.There is parameter called TABS to be defined in paragraph definition.what is difference between Window & a Page Window?Window: An area that is predefined in the layout set. Windows are text modules,which are positioned on a document page. We define the window type, DefaultParagraph, specify the text elements or a SAPscript text to be included etc in the WindowComponent. Page Window: we define the parameters of the earlier defined Window,appearance on the document like left or right margins, Width & Height.What are symboles & state their different types with E.g. A Symbol is a constant, whichcan be inserted in a document. It saves the user unnecessary work when replacingsections of text, phrases, etc. Each symbol has a name which is encloses by &. Eg.&variable name & System symbols eg &Date&, &time& etc. Standard symbols :Standardsymbols are user-defined. They are maintained centrally in table TTDTG. Eg. &SGDH&for the opening salutation : "dear sir/madam". &MFG& for the closing salutation :"yoursFaithfully". Program Symbols : Program symbols display data from the ABAP/4 programwhich has called the word processing function Eg. Itab-connid. Text symbols: You candefine a text symbol for any text module. This symbol isvalid only in the text module for which you have defined it. Eg. Define &Symbol& =`value'.How do we define Text symbols? Using the control command DEFINE &x1& = `56'.State few control commands?. Protect .. endprotect, define, new-page, include.. if...endif.what is the purpose of "Protect and EndProtect"?.You can specify either in the style or in the layout set that a particular paragraph shouldnot be slit in two by a page beak. If the page protect attribute is set then the completeparagraph is always output ona single page. This property applies only to that particularparagraph. SAPScript provides the PROTECT... ENDPROTECT command pair to allowyou to define the areas to be protected against a page beak on an individual basis. Thusthe PROTECT/ENDPROTECT commands may be regarded as a kind of conditionalNEW-PAGE command, the condition being whether or not the lines enclosed betweenthe two commands fit in the space remaining in

Page 208: SAP Interview Questions

the current main window. How do we set the date, time format? SET TIME MASK :CONROLS THE TIME FIELD FORMAT.SET DATE MASK : CONTRLS THE DATE FIELD FORMAT. EG. Set Time Mask = "HH:MM:SS". what is the role of an ABAP progrm in SAPScript? Retrieves R/3application data from the database. Defines the layout set processing logic ( The orderand repetition of text elements). Chooses a layout set for printing. Selects the outputdevice, such as printer,monitor, or fax. Sets print attributes such as immediate output,number of copies, and pages to be printed.How to reuse some components of the script layout to other program? Is this scriptlayout is standard for all the printer? If not then y we are going for script layout? Give me

Page 209: SAP Interview Questions

SAP Interview Questions Page 149 of 173Yogesh Mishra ([email protected])couple of methods that I will take standard script layout printout for different printer.How u will analysis script program? ( which goes to main and how many windows etc....)Can V inserted logo on your program?. Give me the program name which uploads mylogo and syntax for logo inserting in sap script.Yes u can insert a logo on your script layout.Use this Report "RSTXLDMC" which will upload the logo.Use the following statement which includes the logo on your script prog./: INCLUDE 'ZHEX-MACRO-XXX' OBJECT TEXT ID ST LANGUAGE 'E'. XXX objectname, u will gives @ runtime in rstxldmc program.Give me syntax for box command.BOX XPOS 2 MM WIDTH 0 CM HEIGHT '9.5' CM FRAME 10 TWScript Commands.Defining a variableDEFINE &CUST& = '00000021'. Define and insert a standard text: Standard texts ispredifined textst that can be used in more than one form.Standard texts are can be created, changed and displayed using transaction SO10. Thetext ID is used to callsify texts. To include a stadard text in a form, use the INCLUDEcommand:/: INCLUDE Z_BC460_EX4_HF OBJECT TEXT ID SDVD When formatting thestandard text the PARAGRAPH parameter is used.To center the text use: /: INCLUDE Z_BC460_EX4_HF OBJECT TEXT ID SDVDLANGUAGE EN PARAGRAPH C. Formatting addresses The ADDRESS-ENDADDRESScommand formats addresses according to the postal norms of the recipient's country, asdefined in the country parameter.ADDRESS DELIVERY PARAGRAPH ADNAME &KNA1-NAME& STREET &KNA1-STRAS& POSTCODE &KNA1-PSTLZ&CITY &KNA1-ORT01&'COUNTRY &KNA1-LAND1& FROMCOUNTRY 'DE'ENDADDRESSAvoiding pagebreaks in a paragraph /: PROTECT::/: ENDPROTECT The text lines to be protected are enclosed between the two commandsConditonal text ouput IF - ENDIF You can use IF/ENDIF like in a normal ABAPprogram /: IF condition::/: ENDIF and /: IF condition:

Page 210: SAP Interview Questions

/: ELSE:/: ENDIFExample: /: IF &SPFLI-CITYTO& = "BERLIN"..... put some text here

Page 211: SAP Interview Questions

SAP Interview Questions Page 150 of 173Yogesh Mishra ([email protected])/: ENDIF Symbols and Control commands Symbols are placeholders for values that areinserted during print formatting. Symbols are indentified by name surrounded by "&"and are not case sensitiveTypes of symbols System symbols DATE DateDAY DayNAME_OF_DAY Name of dayMONTH MonthYEAR YearTIME Time HOURS HoursMINUTES MinutesSECONDS SecondsPAGE Page numberNEXTPAGE Number of next pagreDEVICE Output deviceSPACE Blank spaceULINE UnderlineVLINE Vertical line Standard symbols Standard symbols are user defined and aremaintained in table TTDG(table is not available???). You use transaction SM30 tochange or display standard symbols. An examples of standard symbols is &MFG& fot"Yours faithfully" Standard text Standard texts is predifined texts that can be used inmore than one form. Standard texts are can be created, changed and displayed usingtransaction SO10. The text ID is used to classify texts. To include a standard text in aform, use the INCLUDE command: /: INCLUDE Z_BC460_EX4_HF OBJECT TEXT IDSDVDWhen formatting the standard text the PARAGRAPH parameter is used. To centerthe text use:/: INCLUDE <name> <Parameter> <parameter> = Object, ID, Language, ParagraphExample: /: INCLUDE Z_BC460_EX4_HF OBJECT TEXT ID SDVD LANGUAGE ENPARAGRAPH C.Name: Z_BC460_EX4_HF Object: TextText id: SDVD (Text id from SO10) Language: EN Paragraph: C (Centered) Tip: You canuse menu Insert->Text->Standard to make it easier to insert the textProgram symbols Program symbols are for contents of database fields or global programsymbols.When you print the form, data from the database tables are printed isntead of thesymbols. In the print program: TABLES: kna1. In the form: &KNA1-NAME1&Formatting &SYMBOL& No formatting&SYMBOL+4& Offset - Output begins here. Offset refers to formatted value

Page 212: SAP Interview Questions

&SYMBOL(5)& Length - Output data in the specified length&SYMBOL(I)& Suppress initial value - If the field has been initialized, nothing isoutput&SYMBOL(Z)& Suppress leading zeros&SYMBOL(C)& Compress blank spaces - Consecutice spaces are compressed intoa single space. Leading spacesare suppressed. &SYMBOL(R)& Right align output&SYMBOL(S)& Operators are suppressed&SYMBOL(*)& Dictionary length - The data length is defined by the ABAP dictionary&SYMBOL(8.2)& Decimal format. Length 8 decimals 2&'text1'SYMBOL'text2'& Text can be inserted before and after the symbol

Page 213: SAP Interview Questions

SAP Interview Questions Page 151 of 173Yogesh Mishra ([email protected])Control commands Control command are used to modify text output. Use format key /:in the formatcolumn. /: INCLUDE/: DEFINE/: ADDRESS....ENDADDRESS/: PROTECT.....ENDPROTECT /: NEW-PAGE/: IF....ENDIF/: CASE...ENDCASE Examples of control commandsINCLUDE INCLUDE name <parameter> Parameters: OBJECT E.g. TEXT, DOKU(Document), DSYS (Hypertext).ID Text ID -Text ID is a way to group texts - Se transaction SO10LANGUAGE If the parameter is not specefied, the logon language will be usedPARAGRAPH The text to be included is formatted using the style allocated. ThePARAGRAPH parameter can be used to redefine the standard paragraph for thisstyle for the current call. All *-paragraphs in the included text will then be formattedusing the paragraph specified here. ObjectIDLanguageParagraphStandard texts are maintained in transaction SO10. Example 1: You have created astandard text in SO10 Named MYTEXT and with Text Id ST /: INCLUDE MYTEXTOBJECT text ID st Example 2: You can also use a dynamic name so that you can retreivea ext depeding of thename variable: /: INCLUDE &SCUSTOM-NAME& text ID st. Depending on the name inthe variable &SCUSTOM-NAME& different texts will beshown. Note that a text with the name in the variable &SCUSTOM-NAME& namemust be created in SO10. DEFINE /: DEFINE &SYMBOL& = 'String1 String2' /: DEFINE&CUST& = '00000021'.ADDRESS-ENDDRESS The ADDRESS-ENDADDRESS command formats addressesaccording to the postalnorms of the recipient's country, as defined in thecountry parameter. /: ADDRESS DELIVERY PARAGRAPH AD/: NAME &KNA1-NAME&/: STREET &KNA1-STRAS&/: POSTCODE &KNA1-PSTLZ&/: CITY &KNA1-ORT01&/: COUNTRY &KNA1-LAND1&/: FROMCOUNTRY 'DE'/: ENDADDRESS Time Date and decimal format Examples: /: SET TIME MASK ='HH:MM'/: SET DATE MASK = 'DD.MMMM.YYYY'/: SET COUNTRY 'USA'

Page 214: SAP Interview Questions

Frames, lines and shading BOX Draws a box Syntax: /: BOX <xpos> <ypos> <width><height> <frame> <intensity> The intensity is the grey scale of the box as %. The frameparameters is thethickness of the frame. Default is 0.Each of the paramteters ypos, xpos, width, height and frame muts be followed of themeasurement unit: TW (twip)PT (point)

Page 215: SAP Interview Questions

SAP Interview Questions Page 152 of 173Yogesh Mishra ([email protected])IN (inch)MM (millimeter)CM (centimeter)LN (line)CH (character). Examples:/: BOX XPOS '11.21' MM YPOS '5.31' MM HEIGHT '10' MM WIDTH '20' MMINTENSITY 10 FRAME 0 TW /: BOX FRAME 10 TWDraws a frame around the current window with a frame thickness of 10 TW (= 0.5PT). /: BOX INTENSITY 10Fills the window background with shading having a gray scale of 10 %. /: BOX HEIGHT0 TW FRAME 10 TWDraws a horizontal line across the complete top edge of the window. /: BOX WIDTH 0TW FRAME 10 TWDraws a vertical line along the complete height of the left hand edge of the window. /:BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15 /: BOX WIDTH'17.5' CM HEIGHT '13.5' CM FRAME 10 TW/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW Draws tworectangles and two lines to construct a table of three columns with ahighlighted heading section.POSITION and SIZE You can use the POSITION and SIZE commands to set defaultparmeters for a box.This can be usefull if you have several boxes that share the same parameters. Example: /:POSITION XORIGIN '11.21' YORIGIN '5.31' MM/: SIZE HEIGHT '2' MM WIDTH '76' MM/: BOX FRAME 10 TW INTENSITY 10If you want to set the position realtively to the window use POSITION WINDOW toset the position to the top/left start of the window. Then use POSITION to set thecurrent position relatively to the start of the Window. Note thatyou uses "+" or "-" in the ORIGIN position to the set the position relatively./: POSITION WINDOW/: POSITION XORIGIN '+5' MM YORIGIN '+10' MM the position is now 5 MM from theleft and 10 MM from the top of the window. NOTE: After using the position commandyou can move the current positionrealtively to the last used position/: POSITION XORIGIN '+10' MM YORIGIN '+20' MM Now the position will be X = 15and Y = 30 Drawing a lineYou can draw a line by setting the Height or Width of a box to 0 and add a frame.E.g. a horizontal line: /: SIZE HEIGHT '0' MM WIDTH '200' MM

Page 216: SAP Interview Questions

/: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.81' MM INTENSITY 100 Window andPage WINDOW sets the values for the width and height to the values of the currentwindow (default setting). PAGE Sets the values for the width and height to the values ofthe current outputpage. Examples: /: SIZE WINDOWSets WIDTH and HEIGHT to the current window dimensions. /: SIZE WIDTH '3.5' CMHEIGHT '7.6' CMSets WIDTH to 3.5 cm and HEIGHT to 7.6 cm. /: POSITION WINDOW/: POSITION XORIGIN -20 TW YORIGIN -20 TW/: SIZE WIDTH +40 TW HEIGHT +40 TW

Page 217: SAP Interview Questions

SAP Interview Questions Page 153 of 173Yogesh Mishra ([email protected])/: BOX FRAME 10 TWA frame is added to the current window. The edges of the frame extend beyond theedges of the window itself, so as to avoid obscuring the leading and trailing textcharacters. 61. Calling a form from SapScript (*****)/:DEFINE &CUST& = '00000021'./:PERFORM GET_NAME IN PROGRAM Z_BC460_EX4_HF/: USING &CUST&/: CHANGING &NAME&/:ENDPERFORM. Dear &NAME& The ABAP routine could be defined as follows:IMPORTANT: The structure itcsy must be used for the parameters. REPORTZ_HENRIKF_SCRIPT_FORM .tables scustom.form get_name tables in_tab structure itcsy out_tab structure itcsy.read table in_tab index 1. select single * from scustomwhere id = in_tab-value.if sy-subrc = 0.read table out_tab index 1.move scustom-name to out_tab-value.modify out_tab index sy-tabix.else.read table out_tab index 1.move 'No name' to out_tab-value.modify out_tab index sy-tabix.endif. ** You could also fill the ouput parameter table this wayREAD TABLE out_par WITH KEY 'NAME1'.out_par-value = l_name1. MODIFY out_par INDEX sy-tabix.endform.Note that if you use more than one parameter you must use Using or Changingbefore every parameter ! /: PERFORM <form> IN PROGRAM <prog>/: USING &INVAR1&/: USING &INVAR2&....../: CHANGING &OUTVAR1&/: CHANGING &OUTVAR2&....../: ENDPERFORM 62. Structure of a print programThe print program is used to print forms. The program retieves the necesary data fromdatbase tables, defines the order of in which text elements are printed, chooses a formfor printing and selects an output device and print options. Open form printing - Must becalled before working with any of the other form function modules.call function 'OPEN_FORM'.....Must be ended with function module CLOSE FORM *To begin several indentical formscontaining different data within a single spoolrequest, begin each form using START_FORM, and end it using END_FORM

Page 218: SAP Interview Questions

call funtion 'START_FORM'.....Write text elements to a window of the formcall function 'WRITE_FORM'..... Ends form

Page 219: SAP Interview Questions

SAP Interview Questions Page 154 of 173Yogesh Mishra ([email protected])call funtion 'END_FORM'.....Closes form printingcall function 'CLOSE_FORM'....Examples of function calls OPEN FORM CALL FUNCTION 'OPEN_FORM'EXPORTING* APPLICATION = 'TX'* ARCHIVE_INDEX =* ARCHIVE_PARAMS =DEVICE = 'PRINTER'DIALOG = 'X'* FORM = ' '* LANGUAGE = SY-LANGUOPTIONS = OPTIONS * MAIL_SENDER =* MAIL_RECIPIENT =* MAIL_APPL_OBJECT =* RAW_DATA_INTERFACE = '*'IMPORTING* LANGUAGE =* NEW_ARCHIVE_PARAMS =* RESULT = ..START_FORM CALL FUNCTION 'START_FORM'EXPORTING* ARCHIVE_INDEX =FORM = 'MY_FORM' * LANGUAGE = ' '* STARTPAGE = ' '* PROGRAM = ' 'MAIL_APPL_OBJECT =IMPORTING* LANGUAGE = .WRITE_FORM See 'WRITE_FORM' END_FORM CALL FUNCTION 'END_FORM'IMPORTING* RESULT =EXCEPTIONS* UNOPENED = 1BAD_PAGEFORMAT_FOR_PRINT = 2OTHERS = 3 CLOSE_FORM Structure for Print options (return values) - Pages selectedfor printing, Number ofcopies etc.DATA BEGIN OF RESULT.INCLUDE STRUCTURE ITCPP.DATA END OF RESULT. CALL FUNCTION 'CLOSE_FORM'IMPORTINGRESULT = RESULT * RDI_RESULT =TABLES* OTFDATA =EXCEPTIONS

Page 220: SAP Interview Questions

* UNOPENED = 1BAD_PAGEFORMAT_FOR_PRINT = 2

Page 221: SAP Interview Questions

SAP Interview Questions Page 155 of 173Yogesh Mishra ([email protected])* SEND_ERROR = 3* OTHERS = 4.63. CONTROL_FORM - Calling Commands Using a program The function moduleCONTROL_FORM can be used to create SapScript controlstatements from within an ABAP program. Example: call function 'CONTROL_FORM'EXPORTINGCOMMAND = 'PROTECT'. call function 'WRITE_FORM'..................... call function'CONTROL_FORM'EXPORTINGCOMMAND = 'ENDPROTECT'.Styles Styles are used to predefine paragraph and character formats for forms. SAPprovides several standard styles e.g. for Address includes, on-line documentationand so on. You can define your own styles. To find styles, create styles and maintainestyles, use transaction SE72. You assign style to a text by using menu Format -> StyleYou can make temporary style changes using the control command /: STYLEUsing graphics in SapScriptUse transaction SE78 to inmport graphics to SAP. In the form painter, you can eitherinclude directly to the form using menu Edit->Graphic->Create or using the INCLUDE statement in a window. To use an INCLUDEstanment, goto into the woindow script editor and use menuInclude->Graphic. The include can look like this for a bitmap: /: BITMAP MYLOGOOBJECT GRAPHICS ID BMAP TYPE BMONModificationsConsiderations in connection with modifications The standard SAP print programshould only be changed when it is absolutely necessary. If additional data is needed,these can in many cases be retrieved using a a PERFORM statement in the form insteadof changing the print program.. There can be the following reasons to change the printprogram: Structureal changes New text eloements are needed Print program to be usedto print additional forms etermine/change which forms and printprograms that are usedfor printing The forms and print programs for a given output type and application can befound in table TNAPR Processing programs for output Use view V_TNAPR in(Transaction SE30) to change entries.Import/Export SapScript form from PC fileUse ABAP program: RSTXSCRPSD - Finding the name of the print program For SD dopcuments you can use tableTNAPR top find the name of the a

Page 222: SAP Interview Questions

PrintprogramModule Pool Transactions:A transaction is a program that conducts a dialog with the user. In a typical dialog,the system displays a screen on which the user can enter or request information. Basedon the the user input or request, the program executes the appropriate actions like, itbranches to the next screen, displays an output, or changes the database.Explain what is a transaction in SAP terminology.

Page 223: SAP Interview Questions

SAP Interview Questions Page 156 of 173Yogesh Mishra ([email protected])- In SAP terminology, a transaction is series of logically connected dialog steps. Explainhow SAP GUI handles output screen for the user.- User terminal input is accepted by SAP GUI and sent to the SAP dispatcher. Thedispatcher co-ordinates the information exchange between the SAP GUIs and the workprocesses. The dispatcher first places the processing request in request queues, which itthen processes. The dispatcher dispatches the requests to the available work process. Theactual processing takes place in the work process. When processing is complete, theresult of a work process is returned via the dispatcher to the SAP GUI. The SAP GUIinterprets the received data and generates the output screen for the user.What is LUW or Database LUW or Database Transaction ?- A "LUW" ( logical unit of work ) is the span of time during which any databaseupdates must be performed . Either they are all performed ( committed ) , orthey are all thrown away ( rolled back ).LUW ( or "database LUW" or "database transaction" )This is the set of updates terminated by a database commit. A LUW lasts, atmost, from one screen change to the next ( because the SAP system triggersdatabase commits automatically at every screen change ). LUWs help to guaranteedatabase integrity. When an LUW has been successfully concluded, the database is onceagain in a correct state. If, however, an error occurs within an LUW, all database changesmade since the beginning of the LUW are canceled and the database is then in the samestate as before the LUW started.An LUW begins- Each time you start a transaction - When the database changes of the previous LUWhave been confirmed(database commit) or - when the database changes of the previous LUW have beencancelled(database rollback)An LUW ends- When the database changes have been confirmed (database commit) or - When thedatabase changes have been canceled (database rollback)What is SAP LUW or Update Transaction ?- Update transaction ( or "SAP LUW") This is a set of updates terminated by an ABAP/4commit. A SAP LUW may last muchlonger than a database LUW, since most update processing extends over multipletransaction screens.The programmer terminates an update transaction by issuing aCOMMIT WORK statement.

Page 224: SAP Interview Questions

Does the external program run in the same SAP LUW as the caller, or in a separateone? - Transactions run with a separate SAP LUW - Reports run with a separate SAPLUW - Dialog modules run in the same SAP LUW as the caller - Function modules run inthe same SAP LUW as the callerThe only exceptions to the above rules are function modules called with INUPDATE TASK (V2 function only) or IN BACKGROUND TASK (ALEapplications). These always run in their own (separate) update transactions.What are the requirements a dialog program must fulfill ?- A dialog program must fulfill the following requirements

Page 225: SAP Interview Questions

SAP Interview Questions Page 157 of 173Yogesh Mishra ([email protected]). a user friendly user interface . format and consistency checks for the data entered by theuser . easy correction of input errors . access to data by storing it in the database. Whatare the basic components of dialog program ?- Screens (Dynpros)Each dialog in an SAP system is controlled by dynpros. A Dynpro consists of ascreen and its flow logic and controls exactly one dialog step. - ABAP/4 module poolEach dynpro refers to exactly one ABAP/4 dialog program. Such a dialogprogram is also called a module pool, since it consists of interactive modules.What is a dynpro ? What are its components ?- A dynpro (DYnamic PROgram) consists of a screen and its flow logic andcontrols exactlyone dialog step. - The different components of the dynpro are: Flow logic: Calls of theABAP/4 modules for a screenScreen layout: Positions of the texts, fields, pushbuttons, and so on for a screen Screenattributes: Number of the screen, number of the subsequent screen, and othersField attributes: Definition of the attributes of the individual fields on a screenWhat is screen flow logic? What are the selections in it? Explain PAI and PBO?Ans - Screen flow logic contains the procedural part of a screen. The screenflow logic is like an ABAP program in that it serves as a container forprocessing blocks. There are four event blocks, each of which is introducedwith the screen keyword PROCESS:PROCESS BEFORE OUTPUT. ...PROCESS AFTER INPUT. ...PROCESS ON HELP-REQUEST. ...PROCESS ON VALUE-REQUEST.Selections are performed in PAI. PROCESS BEFORE OUTPUT (PBO) is automaticallytriggered after the PAIprocessing of the previous screen and before the current screen is displayed. Youcan program the PBO processing of the screen in this block. At the end of the PBOprocessing, the screen is displayed.PROCESS AFTER INPUT (PAI) is triggered when the user chooses a function onthe screen. You can program the PAI processing of the screen in this block. At theend of the PAI.processing, the system either calls the next screen or carries on processing at thepoint from which the screen was called.PROCESS ON HELP-REQUEST (POH) and PROCESS ON VALUE-REQUEST(POV) are triggered when the user requests field help (F1) or possible values help(F4) respectively. You can program the appropriate coding in the correspondingevent blocks. At the end of processing, the system carries on processing the currentscreen. Can we use WRITE statement in screen fields ? If not how is data transferred

Page 226: SAP Interview Questions

from field data to screen fields- We cannot write field data to the screen using the WRITE statement. The systeminstead transfers data by comparing screen field names with ABAP/4 variable names. Ifboth names are the same, it transfers screen field values to ABAP/4 program fields and

Page 227: SAP Interview Questions

SAP Interview Questions Page 158 of 173Yogesh Mishra ([email protected])vice-versa. This happens immediately before and immediately after displaying thescreen. How does the interaction between the Dynpro and the ABAP/4 modules takesplace ? - A transaction is a collection of screens and ABAP/4 routines, controlled andexecuted by a Dialog processor. The Dialog processor processes screen after screen,thereby triggering the appropriate ABAP/4 processing for each screen.For each screen, the system executes the flow logic that contains thecorresponding ABAP/4 processing. The control passes from screen flow logic toABAP/4 code and back. How does the Dialog handle user requests ?- When an action is performed, the system triggers the PROCESS AFTER INPUTevent. The data passed includes field screen data entered by the user and a function code.A function code is a technical name that has been allocated in the Screen Painter orMenu Painter to a menu entry, a pushbutton, the ENTER key or a function key of ascreen. An internal work field (ok-code) in the PAI module evaluates the function code,and the appropriateaction is taken. How are the function codes handled in flow logic ?- When the user selects a function in a transaction, the system copies the functioncode into a specially designated work field called OK_CODE. This field is globalin the ABAP/4 module pool. The OK_CODE can then be evaluated in thecorresponding PAI module.The function code is always passed in exactly the same way, regardless ofwhether it comes from a screen's pushbutton, a menu option, function key orother GUI element. What controls the screen flow ?- The SET SCREEN and LEAVE SCREEN statements control screen flow.What are "field" and "chain" statements ?- The FIELD and CHAIN flow logic statements let you program your own fieldchecks. FIELD and CHAIN tell the system which fields you are checking,andwhether the system should perform checks in the flow logic or call an ABAP/4module.What is an on "*-input field" statement ?- ON *-INPUTThe ABAP/4 module is called if the user has entered a "*" in the first character ofthe field, and the field has the attribute *-entry in the Screen Painter. You can usethis option in exceptional cases where you want to check only fields with certainkinds of input. What are conditional chain statements ?- ON CHAIN-INPUT similar to ON INPUT.The ABAP/4 module is called if any one of the fields in the chain contains a valueother than its initial value (blanks or nulls). ON CHAIN-REQUEST This conditionfunctions just like ON REQUEST, but the ABAP/4 module is calledif any one of the fields in the chain changes value. What is "at exit-command" ?- The flow logic keyword AT EXIT-COMMAND is a special addition to theMODULE statement in the flow logic. AT EXIT-COMMAND lets you call a module

Page 228: SAP Interview Questions

before the system executes the automatic field checks. Which function type has to beused for using "at exit-command" ?- To use AT EXIT-COMMAND, we must assign a function type `E' to the relevantfunction in the Menu Painter or Screen Painter.What is the difference between SET SCREEN and CALL SCREEN ?With SET SCREEN, the current screen simply specifies the next screen in the chain.

Page 229: SAP Interview Questions

SAP Interview Questions Page 159 of 173Yogesh Mishra ([email protected])control branches to this next screen as soon as the current screen has beenprocessed. Return from next screen to current screen is not automatic. It does notinterrupt processing of the current screen. If we want to branch to the next screenwithout finishing the current one, use LEAVE SCREEN. With CALL SCREEN, thecurrent (calling) chain is suspended, and a next screen (or screen chain) is called in. Thecalled screen can then return to the suspended chain with the statement LEAVESCREEN TO SCREEN 0. Sometimes we might want to let an user call a popup screenfrom the main application screen to let them enter secondary information. After theyhave completed their entries, the users should beable to close the popup and return directly to the place where they left off in the mainscreen. Here comes CALL SCREEN into picture. This statement lets us insert such asequence into the current one. Can we specify the next-screen number with a variable. (Yes / No ).Yes.The field SY-DYNNR refers to ________________.Number of the current screen.What is a dialog module ?A dialog module is a callable sequence of screens that does not belong to aparticular transaction. Dialog modules have their own module pools, and can becalled by any transaction. The syntax used to call a screen as a dialog box ( popup ) is_________________.CALL SCREEN <screen number>STARTING AT <start column> <start line>ENDING AT <end column> <end line> . What is a "call mode" ?In the ABAP/4 world, each stackable sequence of screens is a "call mode". This isimportant because of the way you return from a given current sequence. Toterminate a call mode and return to a suspended chain, set the "next screen" to 0and leave to it: LEAVE TO SCREEN 0 or ( SET SCREEN 0 and LEAVE SCREEN ). Whenyou return to the suspended chain, execution resumes with the statement directlyfollowing the original CALL SCREEN statement. The original sequence of screens in atransaction is itself is acalling mode. If you LEAVE TO SCREEN 0 in this sequence ( that is, without havingstacked any additional call modes ), you return from the transaction altogether. Themaximum number of calling modes stacked at one time is ______. ::Nine.What is LUW or Database LUW or Database Transaction ?A "LUW" ( logical unit of work ) is the span of time during which any database updates

Page 230: SAP Interview Questions

must be performed in an "all or nothing" manner. Either they are all performed (committed ) , or they are all thrown away ( rolled back ). In the ABAP/4 world, LUWsand transactions can have several meanings: LUW ( or "database LUW" or "databasetransaction" ) This is the set of updates terminated by a database commit. A LUW lasts,at most, from one screen change to the next ( because the SAP system triggers databasecommits automatically at every screen change ).What is SAP LUW or Update Transaction ?Update transaction ( or "SAP LUW") This is a set of updates terminated by an ABAP/4commit. A SAP LUW may last much longer than a database LUW, since most updateprocessing extends over multiple transaction screens.The programmer terminates anupdate transaction byissuing a COMMIT WORK statement.

Page 231: SAP Interview Questions

SAP Interview Questions Page 160 of 173Yogesh Mishra ([email protected])What happens if only one of the commands SET SCREEN and LEAVE SCREEN is usedwithout using the other?If we use SET SCREEN without LEAVE SCREEN, the program finishes processing forthe current screen before branching to <scr no>. If we use LEAVE SCREEN without aSET SCREEN before it, the current screen process will be terminated and branch directlyto the screen specified as the default next-screen in the screen attributes.What is significance of the screen number `0' ?In "calling mode", the special screen number 0 (LEAVE TO SCREEN 0) causes thesystem to jump back to the previous call level. That is, if you have called a screensequence with CALL SCREEN leaving to screen 0 terminates the sequence and returns tothe calling screen. If you have not called a screen sequence, LEAVE TO SCREEN 0terminates the transaction.What does the command `SUPPRESS DIALOG' do ?Suppressing of entire screens is possible with this command. This command allowsus to perform screen processing "in the background". Suppresing screens is usefulwhen we are branching to list-mode from a transaction dialog step. What is thesignificance of the memory table `SCREEN' ?At runtime, attributes for each screen field are stored in the memory table called`SCREEN'. We need not declare this table in our program. The system maintainsthe table for us internally and updates it with every screen change. What are the fields inthe memory table `SCREEN' ?- Name Length DescriptionWhy grouping of fields is required ? What is the maximum number ofmodification groups for each field ?- If the same attributes need to be changed for several fields at the same time these fieldscan be grouped together. We can specify up to four modification groupsfor each field.What is a screen group ? How it is useful ?Screen group is a field in the Screen Attributes of a screen. Here we can define a string ofup to four characters which is available at the screen runtime in the SY-DNGR field.Rather than maintaining field selection separately for each screen of a program, we cancombine logically associated screens together in a screen group.What is a Subscreen ? How can we use a Subscreen ?A subscreen is an independent screen that is displayed in an area of another ("main")screen. To use a subscreen we must call it in the flow logic ( both PBO and PAI ) of the

Page 232: SAP Interview Questions

main screen. The CALL SUBSCREEN statement tells the system to execute the PBO andPAI events for the subscreen as part of the PBO or PAI events of the main screen. Theflow logic of your main program should look as follows:PROCESS BEFORE OUPTPUT.CALL SUBSCREEN <area> INCLUDING '<program>' '<screen>'.PROCESS AFTER INPUT.CALL SUBSCREEN <area>.Area is the name of the subscreen area you defined in your main screen. This namecan have up to ten characters. Program is the name of the program to which the

Page 233: SAP Interview Questions

SAP Interview Questions Page 161 of 173Yogesh Mishra ([email protected])subscreen belongs and screen is the subscreen's number. What are the restrictions onSubscreens ? Subscreens have several restrictions. They cannot: Set their own GUI statusHave a named OK codeCall another screenContain an AT EXIT-COMMAND moduleSupport positioning of the cursor How can we use / display table data in a screen ?ABAP/4 offers two mechanisms for displaying and using table data in a screen.These mechanisms are TABLE CONTROLS and STEP LOOPS.What are the differences between TABLE CONTROLS and STEP LOOPS ?- TABLE CONTROLS are simply enhanced STEP LOOPS that display data with the lookand feel of a table widget in a desktop application. But from a programming standpoint,TABLE CONTROLS and STEP LOOPS are almost exactly the same. One major differencebetween STEP LOOPS and TABLE CONTROLS is in STEP LOOPS their table rows canspan more than one line on the screen. By contrast the rows in a TABLE CONTROLS arealways single lines, but can be very long. ( Table control rows are scrollable ). Thestructure of table controls is different from step loops. A step loop, as a screen object, issimply a series of field rows that appear asa repeating block. A table control, as a screen object consists of : i ) table fields (displayed in the screen ) ii ) a control structure that governs the table display and whatthe user can do with it.Why do we need to code a LOOP statement in both the PBO and PAI events foreach table in the screen ?We need to code a LOOP statement in both PBO and PAI events for each table in thescreen. This is because the LOOP statement causes the screen fields to be copied backand forth between the ABAP/4 program and the screen field. For this reason, at least anempty LOOP......ENDLOOP must be there. The field SY-STEPL refers to___________________ .The index of the screen table row that is currently being processed. The systemvariable SY-STEPL only has a meaning within the confines of LOOP...ENDLOOPprocessing. Outside the loop, it has no valid value.How can we declare a table control in the ABAP/4 program ?Using the syntax controls <table control name> type tableview using screen <scrno>. Differentiate between static and dynamic step loops.Step loops fall into two classes: Static and dynamic. Static step loops have a fixed size

Page 234: SAP Interview Questions

that cannot be changed at runtime. Dynamic step loops are variable in size. If the userre-sizes the window the system automatically increases or decreases the number of steploops blocks displayed. In any given screen you can define any number of static steploops but only a single dynamic one.What are the two ways of producing a list within a transaction ?By submitting a separate report.By using leave to list-processing.What is the use of the statement Leave to list-processing ? Leave to list-processingstatement is used to produce a list from a module pool.Leave to list-processing statement allows to switch from dialog-mode to list-modewithin a dialog program.When will the current screen processing terminates ? A current screen processingterminates when control reaches either a Leave-screenor the end of PAI.

Page 235: SAP Interview Questions

SAP Interview Questions Page 162 of 173Yogesh Mishra ([email protected])How is the command Suppress-Dialog useful ? Suppressing entire screens is possibleusing this command. This command allowsus to perform screen processing "in the background". The system carries out allPBO and PAI logic, but does not display the screen to the user. Suppressingscreens is useful when we are branching to list-mode from a transaction dialog step.What happens if we use Leave to list-processing without using Suppress-Dialog ? If wedon't use Supress-Dialog the next screen will be displayed but as empty.when the user presses ENTER, the standard list output is displayed.How the transactions that are programmed by the user can be protected ? Byimplementing an authority check.What are the modes in which any update tasks work ? Synchronous and Asynchronous.What is the difference between Synchronous and Asynchronous updates ? A programasks the system to perform a certain task, and then either waits or doesn't wait for thetask to finish. In synchronous processing, the program waits: control returns to theprogram only when the task has been completed. In asynchronous processing, theprogram does not wait: the system returns control after merely logging the request forexecution.What is the difference between Leave Transaction and Call Transaction ? - In contrast toLEAVE TO TRANSACTION, the CALL TRANSACTION statementcauses the system to start a new SAP LUW . This second SAP LUW runs parallelto the SAP LUW for the calling transaction.Overall how do you write transaction program in SAP?Create the transaction using object browser (SE80)Define the objects e.g. screen, Transactions. Modules PBO, PAI.And you can create a transaction from SE93 also. Does SAP has a GUI screen painter? Ifyes What operating systems is it available on? What is the other type of screen paintercalled? YesOn what OS is it available Window based? Other type of screen painter alpha numericscreen painter. What are step loops? How do you program page down page up in steploop?Step loops: Method of displaying a set of records.Page down & Page up: decrement / increment base counterIndex = base + sy-step1 1 Normally how many and what files get created when atransaction program iswritten? What is top XXXXXXTOP program?Main program with A Includes

Page 236: SAP Interview Questions

I ) TOP INCLUDE GLOBAL DATAII ) Include for PBOIII) Include for PAIIV) include for Forms Where is processing logic located in an on-line program?Ans :- ABAP/4 program (module pool) Describe the online processor. What is itsfunction?Ans :- Controls the flow of online program. How are screen names defined? Do youcreate a screen first or define your

Page 237: SAP Interview Questions

SAP Interview Questions Page 163 of 173Yogesh Mishra ([email protected])program first?Ans :- Define the program first and then create a screen. What does PBO stands for?When is the PBO logic performed?Ans :- PROCESS BEFORE OUTPUT Processed before the screen is displayed.What does PAI stands for? When is the PAI logic performed?Ans :- PROCESS AFTER INPUT Processed after the user has pressed ENTER. How isdata passed from the screen fields to the ABAP/4 program?Ans :- Through the flow logic. What does the TOP Include do for you as a programmer?Ans: For global declarations.What are the steps in creating screen?Where are the module statement declared? Where is the logic within eachmodule? Ans :- 1. Go to SE41 ( Screen Painter )Enter the program name and screen number . Press Enter. 2. Design the screen and save,check and activate it. Module statements are in the flow logic within each module is inthe ABAP/4 module pool Program.What is the significance of the word `OUTPUT' in the declaration MODULETEST_KNOWLEDGE OUTPUT ENDMODULE. Ans :- Then we know that it is part ofthe PBO, therefore is processed before the screen is presented.Describe the fields on the screen ? Ans :- Attributes screen , Screen types ,follow upscreens , cursor position etc. After you have entered the screen number, the screenbranches to the screen attribute maintenance. Enter a short description , select the typeNORMAL and specify thenumber of the follow-up screen.What are the three components of ON-LINE program? Ans :- Screen , ABAP/4 programand transaction code.What is gained by using the Dictionary Fields menu option when creating yourscreen? Ans :- The fields you have created inherits the same attributes as those in theDataDictionary.How to Create a checkbox , frame, pushbuttons and radio buttons on a screen? Ans :-Just type a name and go to graphic element push button.How do you assign an OK_CODE for a push button? How it is used in your ABAP? Ans :-In the field list ,name the element and give it the value that it will representwhen pushed You must make sure that you clear the field that represents thepushbutton after every check.What automatic checks does the screen perform? (should be four)Describe all four and how they are used? Ans :- The field format, required input, a

Page 238: SAP Interview Questions

foreign key table ,parameters.What are the two methods to declare input field as mandatory? If you set required fieldas program attribute, the user must enter a value in the field.Required fields appear on the screen containing a question mark (?).How does foreign key work? What you have to put in your screen to identifythe foreign key? No? Then where is the foreign key identified? Ans :- You have defined ascreen field by referring to a Data Dictionary, which has a

Page 239: SAP Interview Questions

SAP Interview Questions Page 164 of 173Yogesh Mishra ([email protected])check table. When the foreign key is checked the system compares the values of thefields to be checked with the contents of the key fields of the corresponding table.What are the two effects of the foreign key from a user standpoint? Ans :- Possibleentries & a check against the key field contents.What is user defined validation checks in the flow logic? Ans :- FIELD...SELECTFIELD...VALUES or in the module pool FIELD...MODULE.Does the value command in the flow logic go in the PAI or the PBO event? Ans :- PAI.If an error occurs in the module pool, which fields are available for entry andwhich are display only fields?Ans :- Only those fields defined with the FIELD statement before MODULE &relevant checks in a chain.When is the chain command used in the PBO event? Ans :- If you want to make morethan one field ready for input after an error.What table stores the online messages? What is the message class and what is itssignificance? Ans :- Table T100. The message class is a specific class of messages for agroup oftransactions.What are the 5 different message types and how are they handled by thesystem? What is then difference between the Warning and Error messages?Ans :-A : Abend Message displayed on the current screen and subsequent taskterminatedI : Information Message displayed on the current screen , but user can continueprogram by pressing ENTERE: Error Message displayed on the current screen. With FIELD statements , thefields concerned become ready again for input and user is required to make the entry/entries againW : Warning As E message , but correcting input is optionalS: Success Message displayed on the follow-up screen as an I message.What does WITH statement add to a message? Ans :- In the place of the & or $ the fieldsor values are placed in the error message.What effect does the FIELD statement have within the flow logic? Ans :- The fieldstatement resets the fields so those fields are ready for input again.Where are the messages displayed on the screen? Ans :- At the bottom.Is the SET PARAMETER statement to be issued in PBO or PAI module? Why? Ans :-PAI, the value must be input into the fields first before it can be placed in thebuffer.Where does the GET PARAMETER statement get its values? Which field getspopulated with the new value?Ans :- From the buffer.Where can the SET CURSOR command be executed? What is its effect? Ans :- In PBO,

Page 240: SAP Interview Questions

To position the CURSOR in a particular field after the screen isdisplayed.What are the matchcodes and how do they affect the screen field? Where arethey specified in the online program?Ans :- In the Properties window of the Field.

Page 241: SAP Interview Questions

SAP Interview Questions Page 165 of 173Yogesh Mishra ([email protected])What is the effect of an ON CHAIN-REQUEST command in your flow logic? Ans :- Whenvalue of any of the fields between CHAIN.....ENDCHAIN is attemptedto change.What commands are used to change database table entries? Ans :-How can you check if the changes to the database were successful? Ans :-What is the difference between the Long form and the short form of makingdatabase changes? Ans :- Long Form: Update MARA and set brgew = 0 where matnr =`MAT!'.This is a standard Oracle Statement to modify the entry in the Database.Short Form: MARA-MATNR = `MAT1'. MARA-BRGEW = 0. Modify MARA. This is anSAP defined statement to modify the table. It is more secure and consistent. What is theadvantages using the SAP long form over the short form of databasechanges? Ans :- May be Fast Effect.Can `where' clause be used when updating database entries? Ans :- Yes.Describe array operations and their advantages? Ans :-What is logical unit of work? How is it defined? Ans :- Logical Unit of work is a block ofmemory area where database contents arestored and manipulated. For every SAP application LUW is automatically created fordatabasecommunication. Besides this we have SAP LUW s also there. What function is performedby the commit work command? Ans :- When you perform Commit , all the LUW s workwill be reflected to thedatabase.Why is it so important for a programmer to check the lock entries? Ans :- To find out ifrecord is locked and also to maintain data integrity.How can you find a lock entry for a database table? Ans :- The function module`ENQUEUE <lock object>' checks whether a lock wastriggered for the same object. Otherwise an exception FOREIGN_LOCK is carriedout. If the object is not locked the function module sets the lock.What steps are necessary to set a lock on a record within a database table? Ans :- ExecuteCALL FUNCTION statementCALL FUNCTION "ENQUEUE <lock object'> EXPORTING...EXCEPTIONS... CASE SY-SUBRC...ENDCASE. How do you unlock the entry? Why is this necessary? Ans :- Execute theCALL FUNCTION statementCALL FUNCTION `DEQUEUE <lock object>'

Page 242: SAP Interview Questions

EXPORTING...It is important to unlock the entry so others can update it. What is the differencebetween `CALL SCREEN # # # ` and `SET SCREEN ### '... LEAVE SCREEN?Ans :-SET SCRREN statement sets or overwrites the follow-up screen.LEAVE SCREEN executes the screen number currently in the follow-screen fieldCALL SCREEN interrupts the processing of the current screen to call a new screenor a chain of screens, processing of the current screen is resumed directly after thecall.After a CALL SCREEN command where does the processing return after the

Page 243: SAP Interview Questions

SAP Interview Questions Page 166 of 173Yogesh Mishra ([email protected])screen has been executed?Ans :- It returns the processing to the calling screen.Which is the more similar to a call with return, the SET SCREEN or the CALLSCREEN? Ans :- The CALL SCREEN command.What function is performed by the SET SCREEN 0 command? Ans :- Returns to theoriginal screen.What are the main differences between the repot status and screen status? Ans :-Where must you place the SET PF-STATUS command in your online program? Ans :-Place it in the PBO module of the screen.Why is it good idea to clear OK_CODE field after deciding which action to take? Ans :-You need to clear the OK code to avoid sending a screen that already has afunction code.How do you specify that a function is an exit type command? Ans :- By specifyingfunction type E for the pushbuttons or menu options in thescreen painter or menu painter. What is the purpose of the `AT EXIT-COMMAND'? Ans:- Usually there are many ways to leave a screen (back,exit,cancel) .Thiscommand will perform termination logic for all functions of type E.What are screen groups? Ans :- A group of screen fields such as radio buttons orcheckboxes.What is the correct syntax for dynamically modifying a large number of screenfields? Ans :- MODULE MODIFY _SCREEN_OUTPUT...LOOP AT SCREENIF SCREEN GROUP = 3D `GR1' SCREEN-INPUT=3D 1 ENDIF.IF SCREEN-NAME = 3D `TAB-FIELD'SCREEN-ACTIVE=3D 0.ENDIF.MODIFY SCREEN. ENDLOOP. What is the name of the internal table that stores thescreen information? Ans :- SCREEN.What is the purpose of the MODIFY command when performing the dynamicscreen modifications? Ans :- after you activate or deactivate the field attributes byassigning them 1 or 0,you save the modifications via MODIFY SCREEN command.Direction for the use of check box and radio buttons in screen painter? Ans :- CreatingRadio Button and Check Boxes on the screen Go to the full screen editor.Place an underscore at the point where you want to place the field.Define the name of the field using <Field Attributes>Place the cursor on the field and press <Graphic element>Then press <Radio Buttons> or <Check boxes> depending on which graphicelement you want Then you group related check boxes and radio boxes.

Page 244: SAP Interview Questions

What are user Exits and transactions? Ans :- Generally, user exits are the forms definedwithin SAP standard code (usuallystarting with user exit). These predefined areas in the code allow programmers toinsert custom defined code into the standard processing of a transaction (e.g. allowresorting of the batch sequence in VA01 batch processing). There are many specificexamples if you are interested, but usually user exits are searched for when aspecific use is being analyzed.

Page 245: SAP Interview Questions

SAP Interview Questions Page 167 of 173Yogesh Mishra ([email protected])What happens if you enter 0 in NEXT Screen attribute? Ans :- It does not go to any otherscreen and it moves back one level. However youcan control this in run-time using SET SCREEN command.How to modify the attributes of screen fields at run time ?.We loop through the fields of the screen. When you find the name of a screen fieldyou want tomodify, set attributes for the field and use MODIFY SCREEN to update theattribtes. You can find the attributes in the internal table SCREEN.This loop makes some of the screen fields invisible ind a selection screen:AT SELECTION-SCREEN OUTPUT. LOOP AT SCREEN.IF screen-name = 'P_VERAB' OR screen-name = 'P_STXT1' ORscreen-name = 'P_STXT2' ORscreen-name = '%_P_VERAB_%_APP_%-TEXT' ORscreen-name = '%_P_STXT1_%_APP_%-TEXT' ORscreen-name = '%_P_STXT2_%_APP_%-TEXT'. screen-active = '0'.MODIFY SCREEN. ENDIF.ENDLOOP. How to leave dynpro allthough required entry not made ?In the menu painter - Function attributes for the button, set Functionaltype to E (Exit command) PROCESS AFTER INPUT. Call module that leaves screenbefore User_Command_xxxx isexecuted MODULE ReturnExit AT EXIT-COMMAND.MODULE user_command_1000. MODULE returnexit. CASE sy-ucomm.WHEN 'CANC'. "Or whatever you want to call it Clear w_screen.LEAVE TO SCREEN 0. ENDCASE. ENDMODULE.Calling a report from a dynproThere are to ways to do this: Use leave to list-processing if you want to do it in yourmodule pool.You will not be able to useselection-screens.Use the submit statement to start a seperate report from yourdynpro. Anyone who have idea on how to know the selected value on run-time?How can get the table control attribute selected value ? I try to read the value indebuger which is #(table_control-cols-selected). There is no difference on the other row which is notselected. The tc-cols-selected is for column selection only. For row selection you havetwoscenarios turn on the SelColumn attribute in screen painter, give it a name and declarean abap variable with the same name type C length 1. In your PAI loop atitab, when the selected row is processed the abap variable will = 'X'. At thispoint you can save the record or key. you can determine which row the cursor is on inyour table control as follows: DATA: LINE_SEL LIKE SY-STEPL, TABIX LIKE SYTABIXGET CURSOR LINE LINE_SEL. TABIX = <table control>-TOP_LINE +

Page 246: SAP Interview Questions

LINE_SEL - 1. TABIX is now the index of the selected row.F4 Help - Calling it from a program and limiting values ? To avoid the standard F4 helpto be show, insert the event PROCESS ON-VALUEREQUESTin the program and add a field statement for the field that should triggerthe F4 help. In the mdoule called from PROCESS ON-VALUE-REQUEST, call functionmodule

Page 247: SAP Interview Questions

SAP Interview Questions Page 168 of 173Yogesh Mishra ([email protected])F4IF_FIELD_VALUE_REQUEST. Example 1 - Dynpro process before output......process after input......PROCESS ON VALUE-REQUEST. FIELD it_zsd00003-prctr MODULEf4_help_for_pctr. MODULE f4_help_for_pctr INPUT. NOTE:Tabname/fieldname is the name of the table and fieldfor which F4 should be shown. * Dynprog/Dynpnr/Dynprofield are the names of theProgran/Dynpro/Fieldin which the f4 value should be returned. * Value: The value of the Dynpro fuield whencalling the F4 help.You can limit the values shown, by inseting a value in thisparametere.g '50*' to show only values beginning with 50 CALL FUNCTION'F4IF_FIELD_VALUE_REQUEST' EXPORTINGtabname = 'ZSD00003'fieldname = 'PRCTR' * SEARCHHELP = ' '* SHLPPARAM = ' ' dynpprog = 'ZSD00002_BRUGERKONV_LISTE'dynpnr = '0100'dynprofield = 'IT_ZSD00003-PRCTR' * STEPL = 0 value = '50*' * MULTIPLE_CHOICE= ' '* DISPLAY = ' ' * SUPPRESS_RECORDLIST = ' '* CALLBACK_PROGRAM = ' '* CALLBACK_FORM = ' ' TABLES * RETURN_TAB = EXCEPTIONS *FIELD_NOT_FOUND = 1* NO_HELP_FOR_FIELD = 2* INCONSISTENT_HELP = 3* NO_VALUES_FOUND = 4* OTHERS = 5 . IF sy-subrc <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBERSY-MSGNOWITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.ENDMODULE. " F4_help_for_pctr INPUT. What you can do with a transaction variantInsert default values into fields hange the ready for input status for fieldsHide various screen elements, menu functions or entire screensAdjust table control settings Note: Transaction variants can only be used with dialogtransactions. How to create a transaction variant Transaction variants are created withtransaction: SHD0In the field Transaction on SHD0 enter the transactioncode for the screen you wanttpo modify (E.g. VA03) . In the field Variant on SHD0 enter the name you want togive the transaction variant (E.g. ZVA03)Press Create

Page 248: SAP Interview Questions

Now the screen for the transaction is shown and you can enter default values in thefields of the screenPress Enter. Now a screen that enbles you to make further customizing (Hide,Output only, Invisible, Mandatory) if the screen fields is shown.After you have finished customizing the screen press Enter to go to the next screenor ave and exit to save the Transaction variantHow to find user exits Display the program where you are searching for and exit andsearch for CALLSAP Interview Questions Page 169 of 173Yogesh Mishra ([email protected])CUSTOMER-EXITIf you know the Exit name, go to transaction CMOD. Choose menu Utillities->SAPEnhancements. Enter the exit name and press enter. You will now come to a screen thatshows the function module exits for the exit.Using Project management of SAP Enhancements We want to create a project toenahance trasnaction VA01Go to transaction CMOD Create a project called ZVA01Choose the Enhancement assign radio button and press theChange buttonIn the first column enter V45A0002 Predefine sold-to party in salesdocument . Note that an enhancement can only be used i 1 project.If the enhancement is allready in use, and error message will bedisplayed Press SavePress Components. You can now see that enhancement uses user exitEXIT_SAPMV45A_002. Double click on the exit. Now the function module is displayed.Double click on include ZXVVAU04 in thefunction module Insert the following code into the include: E_KUNNR = '2155'.Activate the include program. Go back to CMOD and activate theproject.Goto transaction VA01 and craete a salesorder. Note that Sold-topartynow automatically is "2155" To run the transaction varian, you must create a newTransaction code in SE93 thatreferes to the Transaction variant. Choose Transaction with variant as Start object. Note:The transaction variant can also be called from a program that imcludes a callto function module RS_HDSYS_CALL_TC_VARIANT Can a field exit on a screen accessthe values entered by a user on that screenfor the screen fields other than the field for which the exit has been applied. ifyes then how?Maybe this function helps you: DYNP_VALUES_READ. It reads the dynpro-valuesbefore processing PAI.What are events in dialogs? Process Before Output andProcess After Input.Process On ValueProcess On Help

Page 249: SAP Interview Questions

Module output.Module input.What are significance of PBO and PAI? Before display the screen PBO is fired. This is forscreen displayAfter giving the user input PAI is fired. This is for input validationWhere you will validate entries in the fields? Entries can be validated in PAI.You can validate in Field Exits also.What is use of Chain and EndChain? For calling a particular PAI module if any one offields in a group meets a condition, we use to combine all such fields .How to change screen dynamically? By modifying the screen attributes.How to capture changes on the screen fields? Same in case of table control? We cancapture changes on the screen fields using module on input and on request.If you are validating contents of field but user want to exit from the transactionwithout validating contents; How to handle this scenario?

Page 250: SAP Interview Questions

SAP Interview Questions Page 170 of 173Yogesh Mishra ([email protected])By at exit-command we can do.How to pass field values from one screen to other screen? By using set and get parameterid statements. What is the difference in using COMMIT WORK within a calledtransaction andwithin a called dialog module in an existing module.Ans.:Transaction: It will create a new LUW and so you have to say COMMIT WORK in acalled transaction for getting any of the update statements to be fruitful inside thecalled transaction.Dialog module: Since no new LUW is created, COMMIT WORK is not necessary.Which 2 transaction codes are used to manage enhancements? Ans: SMOD and CMODWhich enhancement is local, which is global: Field ExitsScreen ExitsProgram ExitsMenu ExitsWhere can you create an enhancement to show your own F1 Help on a field? Ans: inPOHWhat enhancements can be created using Cmod? Ans: Customer Enhancements, i.e.,Field Exits.What is the code for showing a list produced in a dialog program?Ans: Leave screen.Leave to List-processing. OrSubmit <program name>.When is field Name1 transported to the program in this coding:Process After Input.Module ABC.Field Name1 Module DEF.What is the effect of SUPPRESS DIALOG in PBO? Field Name2 Module GHI.If an error message was raised in Module GHI, which fields would be ready forinput?Ans: The fields that are placed in CHAIN.........ENDCHAIN.In which 2 places could you set the GUI status and title bar for a modal dialogbox?What does CHAIN ....END CHAIN do?Sometimes you want to check several fields as a group. To do this, include the fields in aFIELD statement, and enclose everything in a CHAIN-ENDCHAIN block.Example**** Screen flow logic: ****CHAIN.FIELD: SPFLI-CARRID, SPFLI-CONNID. MODULE CHECK_FLIGHT. ENDCHAIN.When an error is found inside a chain, the screen is re-displayed, and all fields foundanywhere in the chain are input-enabled. All non-chain fields remain disabled.

Page 251: SAP Interview Questions

How can you test flow logic?Check function checks the syntax,data-consisteny and screen layout of the screen.To test the syntax, from the menu path choose screen---->check-------> syntax.

Page 252: SAP Interview Questions

SAP Interview Questions Page 171 of 173Yogesh Mishra ([email protected])To test the data consistency, from the menu path choose screen---->check------>consistency.To check the layout,from ythe menu path choose screen----->check----->layout.What happens if you choose hold data option in screen atributes?To retain data entered by a user. The system automatically displays this data if the userreturns to this screen.What happens if you enter 0 in NEXT screen attribute?In ABAP/4 each stackable sequence of screens is a "call mode". This is importantbecause of the way you return from a given current sequence. To terminate a call modeand return to a suspended chain, set the "next screen" to 0 and leave to it:When youreturn to the suspended chain, execution resumes with the statement directly followingthe original CALL SCREEN statement.The original sequence of screens in a transactionis itself a calling mode. The original sequence of screens in a transaction is itself acalling mode. If you LEAVE TO SCREEN 0 in this sequence (that is, without havingstacked any additional call modes), you return from the transaction altogether.How many menu titles you can have in a main menu?You can have six menus in a menu bar.In addition to this system provides two moremenus ie system and help. You can have only one menu bar for a status. You canmaintain 15 entries in a menu and up to three levels.What is the difference between the "change on-input" and "Change on request" inthe PAI of a screen?· ON INPUTThe ABAP/4 module is called only if the field contains a value other than its initial value.This initial value is determined by the field's data type: blanks for character fields, zeroesfor numeric.· ON REQUESTThe ABAP/4 module is called only if the user has entered a value in the field value sincethe last screen display. The value counts as changed even if the user simply types in thevalue that was already there.What are user exits? What is involved in writing them? What precautions areneeded? User defined functionality included to predefined SAP standards. Point in anSAP program where a customer's own program can be called. In contrast to customerexits, user exits allow developers to access and modify program components and dataobjects in the standard system. On upgrade, each user exit must be checked to ensurethat it conforms to the standard system. There are two types of user exit:

Page 253: SAP Interview Questions

User exits that use INCLUDEs. These are customer enhancements that are called directlyinthe program. User exits that use tables. These are used and managed using Customizing.Should find the customer enhancements belonging to particular development class.What are the different ways in which you can make changes to SAP standard software ?CustomizingEnhancements to the SAP Standard

Page 254: SAP Interview Questions

SAP Interview Questions Page 172 of 173Yogesh Mishra ([email protected])Modifications to the SAP StandardCustomer DevelopmentWhat is customizing ? Customizing is the setting of system parameters via SAP's owninterface.Why do you need enhancements ? The standard applications do not offer some of thefunctionality you need. The R/3 enchancement concept allows you to add your ownfunctionality to SAP's standard business applications.What are the different types of enhancements ?Enhancements using customer exits Customers' potential requirements which are notincluded in the standard software are incorporated in the standard as emptymodification 'shells'. Customers can then fill these with their own coding. Enhancementscan relate to programs, menus andscreens. Upward compatibility is assured. In other words, SAP guarantees that the jumpfrom the standard software to the exit and the interface which call the exit will remainvalid in future releases. Enhancements to ABAP/4 Dictionary elements These areABAP/4 Dictionary enhancements (creation of table appends), text enhancements(customer-specific key words and documentation for data elements) and field exits(creation of additional coding for data elements).What is customer development ? Creating customer-specific objects within the customername range.What is SSCR ? SSCR (SAP Software Change Registration) is a procedure, for registeringall manualchanges to SAP source coding and SAP Dictionary objects.What is the difference between modifications and enhancements ? Modifications meanmaking changes to the SAP standard functionality.Enhancements mean adding some functionality to SAP standard functionality.What are the disadvantages of modification ? Modifying standard code can lead to errorsModifications mean more work during software upgradesWhat are the advantages of enhancements ? Do not affect standard SAP source codeDo not affect software upgrades when do you opt for modification ?Customer exits are not available for all programs and screens within the R/3 standardapplications. You can only use exits if they already exist within the SAP R/3 System. Otherwise you have to opt for modifications .What are the various types of customer exits ? Menu exitsScreen exitsFunction module exits

Page 255: SAP Interview Questions

Keyword exitsWhat is a menu exit ? Adding items to the pulldown menus in standard R/3 applications. 13.What is a screen exit ?Adding fields to the screens within R/3 applications. SAP creates screen exits by placingspecial subscreen areas within a standard R/3 screen and calling a customer subscreenfrom within the standard dynpro's flow logic.What is a function module exit ? Adding functionality to R/3 applications. Functionmodule exits play a role in both menu and screen exits.

Page 256: SAP Interview Questions

SAP Interview Questions Page 173 of 173Yogesh Mishra ([email protected])What is a keyword exit ? Add documentation to the data elements of key words definedin the ABAP/4 Dictionary. The system displays this documentation whenever a userpresses F1 toget online help for a screen field.How do SAP organizes its exits ? SAP organizes its exits in packages that are called SAPenhancements. Each SAP enhancement can contain many individual exits.What is an add-on project ? To take advantage of the exits available within standard R/3applications, you need to create an add-on project. This project lets you organize theenhancement packages and exits you want to use. The add-on project also allows you tohang add-on functionality onto the exit hooks contained with SAP enhancements.


Recommended