SAP ABAP Interview Questions, Answers, and Explanations: ABAP Certification Review

SAP ABAP Interview Questions, Answers, and Explanations: ABAP Certification Review

Unit 1 Database Updates and Changing the SAP Standard

1.       What are the names of the function modules that will be generated upon activation of a lock object?

Prior to creating setting any locks in an ABAP program, a lock object must be created in the ABAP dictionary. When the lock object is created, the system will automatically generate the two function modules required for lock management.

         ENQUEUE_<Lock Object Name>. Used to generate a lock entry in the lock table. If the lock cannot be set for any reason then this would be reflected in the return code.

         DEQUEUE_<Lock Object Name>. This function module will remove a lock entry from the lock table.

         These lock function modules are executed in s specific work process with the SAP system dedicated to lock management. This work process is run on a single server that maintains the central lock table for the entire SAP system.

         There are two types of locks that can be set:

1)         Shared lock – is a read only lock that prevents data from being changed while a user is reading it.

2)         Exclusive lock – is a write lock that prevents data from being changed while a used is already modifying it.

2.       Update function modules are classified as either V1 or V2.

3.       What are authorization objects and what statement is used to perform an authorization check in an ABAP program?

AUTHORITY-CHECK, in its statement, all fields of the object must be addressed or the keyword DUMMY is used to bypass checking on a field.

There can be a maximum of 10 fields defined on an authorization object.

4.       What is the definition of a modification in an SAP system and how do they impact an upgrade?

5.       What statement will be found in an SAP application program that implements a function module exit?

Function module exits will exist in some SAP application program to allow a customer to add some functionality to the SAP program. Search the SAP application program globally looking for the following search string: “CALL CUSTOMER” to determine if an exit exists.

6.       What is a transaction variant and why are they used? (SHDO)

7.       List some of the different ways that the SAP standard functionality can be changed by a customer?

The SAP standard can be changed through personalization, customizing, modifications, enhancements and custom ABAP programs developed by the customer development team.

SSCR (SAP Software Change Registration)

8.       What are two different ways to add fields to SAP tables?

An append structure or a customizing include can be used to add fields to a table. Append structures are created by adding fields to the end of a table while Customizing includes are specified by the SAP developer in advance to allow of the customer to create new fields.

9.       What is a BADI? (SE18 BADI Maintenance)

BADI stands for Business add-in. BADI’s are a relatively new enhancement concept that make use of ABAP Object technology. This is a true object oriented approach to SAP enhancements using classes, interfaces and methods to implement the BADI.

In order to enhance a SAP application program, the BADI must first be defined. The developer will create an interface for the BADI. An adapter class is created from this that will implement the interface. Developers will then create an instance of the adapter class in the SAP application program and create method calls as required.

Unit 2 List Processing

10.   Explain the relationship between a function area, user group and query when developing queries using the SAP Query tool?

Functional areas and user groups are organizational elements used in SAP Query that must first be created in order to use the query environment.

The data that a query will be based on is defined in a functional area. A functional area is typically based on a logical database but can be any table and fields within that table.

Users are assigned to user groups. Functional areas are also assigned for the user group allowing users to create and start queries based on the data in that functional area. Multiple functional areas can be assigned to a user group and a functional area can be assigned to several different groups.

11.   What ABAP statement will trigger list generation?

The first WRITE statement encountered in an ABAP program will trigger list processing. Upon completion of the program, the list is output. The system will generate some standard headings for list output that includes the program name and a page number in the heading.

12.   What two statements are required in an ABAP program to output an icon using a write statement?

The INCLUDE <ICON> or INCLUDE <LIST> statement. The WRITE statement will have the following syntax: WRITE <Icon-Name> AS ICON.

<LIST> contains only icons that are relevant for list processing while <ICON> will contain all system defined icons.

13.   List processing in ABAP will automatically manage several system fields. What is the purpose of the SY-LINSZ, SY-LISTI and SY-LSIND systems fields?

SY-LINSZ – the line width from REPORT statement LINE-COUNT.

SY-LISTI – the index of the selected list.

SY-LSIDN – the index of the detail list.

14.   What is the format of the system generated SELECT-OPTIONS internal table?

There are some SELECT-OPTION statements:

1)       OBLIGATORY – used to make the field mandatory.

2)       NO DISPLAY – used to hide the input field.

3)       NO INTERVALS – used to restrict the display to one single field.

4)       NO-EXTENSION – used to disable multiple selections (the arrow to the right of the select option field on the screen).

5)       DEFAULT – used to specify default values for the input fields.

6)       MATCHCODE OBJECT – used to specify a matchcode for input field.

7)       MODIFID – used to assign a screen modification group to the input fields.

15.   What is a logical database?

16.   What is the difference in native SQL and open SQL?

Open SQL statements are program independent of the operating system. Native SQL statements are platform dependent. Native SQL is bound into a program using EXEC SQL statement.

17.   When is the AT LINE-SELECTION event triggered in an ABAP program?

Triggered by a user’s double clicks on a line in list.

The function code “PICK” is associated to the AT LINE-SELECTION event.

Unit 3 Internal Table & ALV Grid Control

18.   What are the types of internal tables that can be defined in ABAP?

The types of internal tables that can be defined in ABAP are STANDARD, SORTED, HASHED.

In addition to these 3 common “fully specified” table types, there are 2 generic table types that can also be used in defining internal tables. The table type INDEX can be used to define a table where index access is permitted. Therefore it can represent either a STANDARD OR SORTED table. The table type ANY can be used to represent any table type.

19.   What is the purpose of the COLLECT statement?

The COLLECT statement is used to fill an internal table with data by summarizing the entries based on key data.

COLLECT <work area> into <internal table>

The contents of the work area are inserted into the internal table by appending the entry to the end of the table if a row does not already exist with the same key data. If a row does exist with the same key data then the numeric fields from the work area are add to the row in the internal table.

20.   When looping through entries of an internal table, what would the following AT NEW … ENDAT block be used to accomplish?

AT … ENDAT statements are used to perform control break processing.

a)         AT FIRST – used to perform specific one time processing when the first record is encountered in the loop

b)         AT LAST – used to perform specific one time processing when the last record is encountered in the loop

c)         AT END OF <filed1> - used to perform specific control level processing at the end of one control level

When a control break is encountered and the code is executed within the AT…ENDAT block, the work area contents will be as follows: all character fields to the left of the control key are filled with an ‘*’ and all others to the right of the control key will contain initial values.

21.   What are two different ways for specifying field descriptions for an ALV control?

The field descriptions for the ALV control can be taken from a dictionary structure or by defining each specific field by using a field catalog.

The name of the table type used to specify the field catalog is lvc_t_fcat.

22.   Where can you find the list of events that are defined for used in an ALV Grid?

Events are defined in the global class CL_GUI_ALV_GRID. The class builder, transaction SE24, can be used to view the class and all its components.

Unit 4 Dialog Programming

23.   What is a module pool?

A module pool is an ABAP program of type “M” that requires at least one transaction code in order to be executed. The transaction code usually starts a screen and its associated flow logic.

24.   What are some of the important transaction codes to know as an ABAP developer?

SE38, SE80, SE11, BAPI, SE24, SE18, SE37, SE09, SE51.

25.   What is the purpose of a GUI status?

A GUI status is composed of a menu bar, standard toolbar, application toolbar and function key settings. An ABAP program can have multiple GUI statuses associated with it.

26.   What values does the system variable SY-UCOMM contain?

SY-UCOMM contains the currently selected function code that is normally evaluated within an AT USER-COMMAND event.

27.   After a screen is displayed and before the PAI is triggered, the system automatically checks the values that a user has entered on the screen. What automatic checks are performed and in what sequence?

The automatic input checks are performed in the following sequence:

a)         Mandatory fields are first checked to ensure the user has entered a value

b)         Field format checks are performed to ensure the values entered correspond the data type defined for the screen field

c)         Dictionary checks are triggered for fields defined with reference to a dictionary field. Fixed values of the domain and foreign key relationships are checked.

28.   What is the difference in an elementary and collective search help?

An elementary search help defines the flow of a standard input help. It is composed of a selection method that defines where to get the data that will make up the hit list, an interface consisting of search help parameters that define the exchange of data between the screen and the selection method and a dialog type that controls how the hit list will be displayed.

A collective search help is a combination of several elementary searches helps giving the user different search paths. The interface parameters of the elementary search helps are assigned to the parameters of the collective search help.

29.   How is a subscreen call implemented within the main screen?

The CALL SUBSCREEN statement is placed in both the PBO and PAI of the flow logic of the main screen.

A CALL SUBSCREEN statement cannot be placed between a LOOP … ENDLOOP or CHAIN … ENDCHAIN processing block.

30.   What is the name of the OK_CODE field for a subscreen?

A subscreen cannot have its own OK_CODE field. Function codes on a subscreen are linked to the OK_CODE field for the main screen.

31.   In order to process a table control, what code is required in the PBO and PAI events?

AT LOOP … ENDLOOP structure is required in both the PBO and PAT events when processing table controls.

The loop statement in the PBO transfers data from the ABAP program to the screen after each loop pass, the rest of the fields are filled in as normal at the end of PBO processing.

During PAI processing the contents of the table control are transported back to the ABAP program during the LOOP … ENDLOOP statement.

Unit 5 ABAP Objects

32.   What are three key concepts that a language must support in order to be a true Object Oriented Language?

There key concepts of all Object Oriented Languages are:

a)         Polymorphism refers to the ability to have multiple forms. Objects in different classed react differently to the same message.

b)         Inheritance defines the implementation relationship between classes. A subclass can inherit the structure and behavior form a super class and add its own specific behavior.

c)         The power of object oriented programming stems from the use of polymorphism and inheritance. There two techniques combine to allow for reuse of individual components.

An ABAP object does not support multiple inheritances.

33.   What is the difference in a class and an object?

A class can be considered a blueprint or template for an object that specifies the attributes and behavior that all objects of that class will have.

Objects are instances of the class that are created by an ABAP program at run time.

34.   What is the purpose of the READ-ONLY addition on a DATA statement in a class definition?

The READ-ONLY addition is used to define a public attribute with the DATA statement that can be read from outside the class but can only be changed by methods of the class itself.

35.   What is the keyword used to define static attributes?

CLASS-DATA is used to define static attributes. The data defined as CLASS-DATA will be the same for all instances of the class.

36.   When is a constructor method executed?

A constructor method is executed only once per instance and is automatically called at runtime when the CREATE OBJECT statement is executed.

37.   Multiple inheritance can be simulated using interfaces.

38.   What is a redefined method and what are some of the characteristics of this type of method?

A redefined method is a method in a subclass that provides a new definition of an inherited method from a superclass in order to provide a more specialized implementation in the subclass.

The redefined method will have the same name and interface, but will have a new implementation.

Redefined methods cannot have been defined as final methods in the superclass. Defining a method as final indicates that the method cannot be overridden or redefined.

A constructor method cannot be redefined as it is implicitly a final method.

The system checks for methods first in the current class and then ‘up the hierarchy’.

Only an inherited public or protected instance method can be redefined. Static methods cannot be redefined.

The reference to SUPER->in the redefined method is to call the original method of the superclass. This allows you to use the existing functionality in the superclass method in the subclass.

39.   What is the purpose of an interface and how is it implemented in ABAP objects?

An interface is a declaration of a set of methods with no information given about the implementation of those methods.

Interfaces are used to define common functionality that can be used by different classes. Interfaces are implemented in classes by listing the interface name in the definition part of the class.

An interface can only be implemented publicly. The methods defined in the interface are implemented in the class. All methods that are defined in the interface must be present in the implementing class.

Unlike a class, an interface never implements methods; instead, classes that implement the interface provide the implementation to the methods defined by the interface.

An interface can be accessed using an object reference as long as that objects class implements the interface. This is done using the interface resolution operator ‘~’ as follows:

<objectname>-><interfacename>~<methodname>

40.   What is an abstract class?

An abstract class cannot be instantiated. It specifies one or more abstract methods that must be implemented in a subclass. It is used as a means to enforce a uniform interface in subclasses.

Unit 6 Data Transfer

41.   Describe three standard data transfer techniques supported in the SAP system?

a)         Batch input, also known as Batch Data Communication (BDC) – This approach is used extensively in ABAP programming and remains a popular choice when no other method exists.

Once a BDC load program is created any changes to the screens through the IMG or otherwise could cause the BDC to fail. This is one of the disadvantages of the BDC technique.

b)         Direct Input, the data in an input file is transferred directly to the SAP database. No screens are involved with direct input making it more efficient than batch input. The direct input program uses function calls to lad the data. This method is not available for all data objects.

c)         Business Application Programming Interfaces (BAPIs), are standardized APIs that provide external access to SAP objects. BAPIs are defined in the business object repository as methods of an SAP object. When using a BAPI as an interface to SAP, the data to be loaded must be in an Idoc format.

42.   What is the format of the BDCDATA table?

The data is structured within the DBCDATA table according to the screens in the transaction that is being simulated.

Each screen that will be processed in the BDC session will have a separate record in BDCDATA indentified using the fields PROGRAM, DYNPRO and DYNBEGIN.

The screen record will be followed by a separate record for each field name / field value pair that can be entered on the screen. These records are identified using the FNAM and FVAL fields. The OK_CODE field for each screen will be identified as the BDC_OKCODE field in the DBCDATA table.

43.   What is LSMW?

LSMW is the legacy system migration workbench, a tool that can be used for data conversion from legacy systems into SAP. Data can be transferred using standard transfer programs, IDOCs, BAPIs or creation of a recording using the transaction recorder and generating a batch input session.

44.   What are three function modules that are used when creating batch input sessions?

a)         BDC_OPEN_GROUP – is used to create the new batch input session and will contain general data that is used for the entire session.

b)         BDC_INSERT – is used to actually insert all of the data into a session that is required for a transaction.

c)         BDC_CLOSE_GROUP – is used to close the batch input session after all of the data has been inserted and the session is ready for processing.

Unit 7 BASES

45.   T_Codes are stored in table TSTC.

Unit 8 ABAP Development

46.   What is a chained statement in the ABAP language?

The system considers each individual part of a chained statement to be a complete and independent statement.

47.   During each loop pass of a SELECT loop, what system field will contain the number of records read?

SY-DBCNT

48.   When does data transport take from an ABAP program to a screen and from the screen back to the ABAP program?

The first data transport occurs after all PBO modules have been executed and prior to a screen being displayed. The system will transport the contents of the ABAP work area in the program into the corresponding screen fields.

The second data transport trigger is once all data entry is completed by the user and before the first PAI module is executed. The system will copy the contents of the screen fields back to the corresponding ABAP work area in the program.

49.   What is a function group?

A function group is an ABAP program of type ‘F’ that contains function modules. Function modules that work with the same data objects can be combined to form the function group.

Each function group can contain data objects, subroutines and screens which can be used by the function modules.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值