1. What is a transaction ?
A transaction is a dialog program that changes database objects in a consistent way.

2. 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.

3. What are the basic components of dialog program ?
Screens (Dynpros)
Each dialog in an SAP system is controlled by dynpros. A Dynpro consists of a screen and its flow logic and controls exactly one dialog step.
ABAP/4 module pool
Each dynpro refers to exactly one ABAP/4 dialog program. Such a dialog program is also called a module pool, since it consists of interactive modules.

4. What are PBO and PAI events ?
PBO – Process Before Output – It determines the flow logic before displaying the screen
PAI – Process After Input – It determines the flowlogic after the display of the screen and after receiving inputs from the user.

5. What is a dynpro ? What are its components ?
dynpro (DYnamic PROgram) consists of a screen and its flow logic and controls exactly one dialog step.
The different components of the dynpro are:
Flow logic: Calls of the ABAP/4 modules for a screen
Screen layout: Positions of the texts, fields, pushbuttons, and so on for a screen
Screen attributes: Number of the screen, number of the subsequent screen, and others
Field attributes: Definition of the attributes of the individual fields on a screen

6. What is a ABAP/4 module pool ?
Each dynpro refers to exactly one ABAP/4 dialog program. Such a dialog program is also called a module pool, since it consists of interactive modules.

7. Can we use WRITE statement in screen fields ? If not how is data transferred from field data to screen fields ?
We cannot write field data to the screen using the WRITE statement. The system instead transfers data by comparing screen field names with ABAP/4 variable names. If both names are the same, it transfers screen field values to ABAP/4 program fields and vice-versa. This happens immediately before and immediately after displaying the screen.

8. Can we use flow logic control key words in ABAP/4 and vice versa ?
- The flow control code of a dynpro consists of a few statements that syntactically ressemble ABAP/4 statements. However, We cannot use flow control keywords in ABAP/4 and vice versa.

9. What is a GUI status ? How to create/edit GUI status ?
- A GUI status is a subset of the interface elements used for a certain screen. The status comprises those elements that are currently needed by the transaction. The GUI status for a transaction may be composed of the following elements:

- Title bar
- Menu bar
- Application tool bar
- Push buttons.

To create and edit GUI status and GUI title, we use the Menu Painter.

10. How does the interaction between the Dynpro and the ABAP/4 modules takes place ?
- A transaction is a collection of screens and ABAP/4 routines, controlled and executed 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 the corresponding ABAP/4 processing. The control passes from screen flow logic to ABAP/4 code and back.

11. How does the Dialog handle user requests ?
- When an action is performed, the system triggers the PROCESS AFTER INPUT event. 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 or Menu Painter to a menu entry, a pushbutton, the ENTER key or a function key of a screen. An internal work field (ok-code) in the PAI module evaluates the function code, and the appropriate action is taken.

12. What is to be defined for a pushbutton field in the screen attributes ?
- A function code has to be defined in the screen attributes for the pushbuttons in a screen.

13. How are the function codes handled in flow logic ?
- When the user selects a function in a transaction, the system copies the function code into a specially designated work field called OK_CODE. This field is global in the ABAP/4 module pool. The OK_CODE can then be evaluated in the corresponding PAI module.
The function code is always passed in exactly the same way, regardless of whether it comes from a screen's pushbutton, a menu option, function key or other GUI element.

14. What controls the screen flow ?
- The SET SCREEN and LEAVE SCREEN statements control screen flow.

15. The function code currently active is ascertained by what variable ?
- The function code currently active in a program can be ascertained from the SY-UCOMM variable.

16. What are “field” and “chain” statements ?
- The FIELD and CHAIN flow logic statements let you program your own field checks. FIELD and CHAIN tell the system which fields you are checking,and whether the system should perform checks in the flow logic or call an ABAP/4 module.

17. What is an “on input field” statement ?
The 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, zeroes for numerics. If the user changes a field value back to its initial value, ON INPUT does not trigger a call.

18. What is an “on request field” statement ?
The ABAP/4 module is called only if the user has entered a value in the field value since the last screen display. The value counts as changed even if the user simply types in the value that was already there. In general, the ON REQUEST condition is triggered through any form of "manual input".

19. What is an on “*-input field” statement ?
The ABAP/4 module is called if the user has entered a "*" in the first character of the field, and the field has the attribute *-entry in the Screen Painter. You can use this option in exceptional cases where you want to check only fields with certain kinds of input.

20. What are conditional chain statements ?
The ABAP/4 module is called if any one of the fields in the chain contains a value other than its initial value (blanks or nulls).
This condition functions just like ON REQUEST, but the ABAP/4 module is called if any one of the fields in the chain changes value.

21. What is “at exit-command” ?
- The flow logic keyword AT EXIT-COMMAND is a special addition to the MODULE statement in the flow logic. AT EXIT-COMMAND lets you call a module before the system executes the automatic field checks.

22. 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 relevant function in the Menu Painter or Screen Painter.

23. What are the different message types available in the ABAP/4 ?
- There are altogether 5 types of message types available.
- E – Error
- W – Warning
- I – Information
- A – Abnormal termination
- S – Success

24. Navigation to a subsequent screen can be specified statically / dynamically.
- True

25. Of the two “next screen” attributes the attribute that has more priority is _____.
- Dynamic.

26. Dynamic screen sequence for a screen can be set using ___ and ____ commands.
- Set screen , Call screen.

27. The commands through which an ABAP/4 module can “branch to” or “call” the next screen are 1.___________ , 2.___________ , 3.____________ , 4.____________.
Set screen ,Call screen , Leave screen , Leave to screen .

28. 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 been processed. Return from next screen to current screen is not automatic. It does not interrupt processing of the current screen. If we want to branch to the next screen without finishing the current one, use LEAVE SCREEN.

With CALL SCREEN, the current (calling) chain is suspended, and a next screen (or screen chain) is called in. The called screen can then return to the suspended chain with the statement LEAVE SCREEN TO SCREEN 0. Sometimes we might want to let an user call a popup screen from the main application screen to let them enter secondary information. After they have completed their entries, the users should be able to close the popup and return directly to the place where they left off in the main screen. Here comes CALL SCREEN into picture. This statement lets us insert such a sequence into the current one.

29. Can we specify the next-screen number with a variable. ( Yes / No ).
- Yes.

30. The field SY-DYNNR refers to ___Number of the current screen___.

31. What is a dialog module ?
- A dialog module is a callable sequence of screens that does not belong to a particular transaction. Dialog modules have their own module pools, and can be called by any transaction.

32. The syntax used to call a screen as a dialog box ( popup ) is _________________.

33. What is a “call mode” ?
- In the ABAP/4 world, each stackable sequence of screens is a "call mode". This is important because of the way you return from a given current sequence. To terminate a call mode and return to a suspended chain, set the "next screen" to 0 and leave to it:
LEAVE TO SCREEN 0 or ( SET SCREEN 0 and LEAVE SCREEN ). When you return to the suspended chain, execution resumes with the statement directly following the original CALL SCREEN statement. The original sequence of screens in a transaction is itself is a calling mode. If you LEAVE TO SCREEN 0 in this sequence ( that is, without having stacked any additional call modes ), you return from the transaction altogether.

34. The maximum number of calling modes stacked at one time is _Nine_____.

35. 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 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, 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 database commits automatically at every screen change ).

36. 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 much longer than a database LUW, since most update processing extends over multiple transaction screens.The programmer terminates an update transaction by issuing a COMMIT WORK statement.

37. What happens if only one of the commands SET SCREEN and LEAVE SCREEN is used without using the other?
- If we use SET SCREEN without LEAVE SCREEN, the program finishes processing for the current screen before branching to . If we use LEAVE SCREEN without a SET SCREEN before it, the current screen process will be terminated and branch directly to the screen specified as the default next-screen in the screen attributes.

38. What is significance of the screen number ‘0’ ?
- In "calling mode", the special screen number 0 (LEAVE TO SCREEN 0) causes the system to jump back to the previous call level. That is, if you have called a screen sequence with CALL SCREEN leaving to screen 0 terminates the sequence and returns to the calling screen. If you have not called a screen sequence, LEAVE TO SCREEN 0 terminates the transaction.

39. What does the command ‘SUPPRESS DIALOG’ do ?
- Suppressing of entire screens is possible with this command. This command allows us to perform screen processing “in the background”. Suppresing screens is useful when we are branching to list-mode from a transaction dialog step.

40. 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 the table for us internally and updates it with every screen change.

41. What are the fields in the memory table ‘SCREEN’ ?
- Name Length Description

NAME 30 Name of the screen field
GROUP1 3 Field belongs to field group 1
GROUP2 3 Field belongs to field group 2
GROUP3 3 Field belongs to field group 3
GROUP4 3 Field belongs to field group 4
ACTIVE 1 Field is visible and ready for input
REQUIRED 1 Field input is mandatory
INPUT 1 Field is ready for input
OUTPUT 1 Field is for display only
INTENSIFIED 1 Field is highlighted
INVISIBLE 1 Field is suppressed
LENGTH 1 Field output length is reduced
DISPLAY_3D 1 Field is displayed with 3D frames
VALUE_HELP 1 Field is displayed with value help.

42. Why grouping of fields is required ? What is the maximum number of modification groups for each field ?
- If the same attributes need to be changed for several fields at the same time these fields can be grouped together. We can specify up to four modification groups for each field.

43. What are the attributes of a field that can be activated or deactivated during runtime ?
- Input , Output , Mandatory , Active , Highlighted , Invisible .

44. 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 of up 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 can combine logically associated screens together in a screen group.

45. 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 main screen. The CALL SUBSCREEN statement tells the system to execute the PBO and PAI events for the subscreen as part of the PBO or PAI events of the main screen. The flow logic of your main program should look as follows:
Area is the name of the subscreen area you defined in your main screen. This name can have up to ten characters. Program is the name of the program to which the subscreen belongs and screen is the subscreen's number.

46. What are the restrictions on Subscreens ?
- Subscreens have several restrictions. They cannot:
 Set their own GUI status
 Have a named OK code
 Call another screen
 Contain an AT EXIT-COMMAND module
 Support positioning of the cursor

47. 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.

48. What are the differences between TABLE CONTROLS and STEP LOOPS ?
- TABLE CONTROLS are simply enhanced STEP LOOPS that display data with the look and 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 difference between STEP LOOPS and TABLE CONTROLS is in STEP LOOPS their table rows can span more than one line on the screen. By contrast the rows in a TABLE CONTROLS are always single lines, but can be very long. ( Table control rows are scrollable ). The structure of table controls is different from step loops. A step loop, as a screen object, is simply a series of field rows that appear as a 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 what the user can do with it.

49. What are the dynpro keywords ?
- FIELD, MODULE, SELECT, VALUES and CHAIN are the dynpro keywords.

50. Why do we need to code a LOOP statement in both the PBO and PAI events for each table in the screen ?
- We need to code a LOOP statement in both PBO and PAI events for each table in the screen. This is because the LOOP statement causes the screen fields to be copied back and forth between the ABAP/4 program and the screen field. For this reason, at least an empty LOOP......ENDLOOP must be there.

51. The field SY-STEPL refers to ___________________ .
- The index of the screen table row that is currently being processed. The system variable SY-STEPL only has a meaning within the confines of LOOP...ENDLOOP processing. Outside the loop, it has no valid value.

52. How can we declare a table control in the ABAP/4 program ?
- Using the syntax controls type tableview using screen .

53. Differentiate between static and dynamic step loops.
- Step loops fall into two classes: Static and dynamic. Static step loops have a fixed size that cannot be changed at runtime. Dynamic step loops are variable in size. If the user re-sizes the window the system automatically increases or decreases the number of step loops blocks displayed. In any given screen you can define any number of static step loops but only a single dynamic one.

54. What are the two ways of producing a list within a transaction ?
- By submitting a separate report.
- By using leave to list-processing.

55. 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 list-mode within a dialog program.

56. When will the current screen processing terminates ?
A current screen processing terminates when control reaches either a Leave-screen or the end of PAI.

57. How is the command Suppress-Dialog useful ?
- Suppressing entire screens is possible using this command. This command allows us to perform screen processing “in the background”. The system carries out all PBO and PAI logic, but does not display the screen to the user. Suppressing screens is useful when we are branching to list-mode from a transaction dialog step.

58. 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.

59. How the transactions that are programmed by the user can be protected ?
- By implementing an authority check.

60. What are the modes in which any update tasks work ?
- Synchronous and Asynchronous.

61. 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'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. In asynchronous processing, the program does not wait: the system returns control after merely logging the request for execution.

62. SAP system configuration includes _______ tasks and ________ tasks.
- Dialog , Update.

63. Dialog-task updates are ___________ updates.
- Synchronous

64. Update-task updates are ___________ updates.
- Asynchronous

65. What is the difference between Commit-Work and Rollback-Work tasks ?
- Commit-Work statement “performs” many functions relevant to synchronized execution of tasks. Rollback-Work statement “cancels” all requests relevant to synchronized execution of tasks.

66. What are the different database integrities ?
- Semantic integrity
- Relational integrity
- Primary key integrity
- Value set integrity
- Foreign key integrity and
- Operational integrity.

67. All SAP Databases are __________ Databases.
- Relational

68. What is SAP locking ?
- It is a mechanism for defining and applying logical locks to database objects.

69. What does a lock object involve ?
- The tables
- The lock argument.

70. What are the different kinds of lock modes ?
- Shared lock
- Exclusive lock
- Extended exclusive list.

71. How can a lock object be called in the transaction ?
- By calling Enqueue and Dequeue in the transaction.

72. What are the events by which we can program “help texts” and display “possible values lists” ?

73. What is a matchcode ?
- A matchcode is an aid to finding records stored in the system whenever an object key is required in an input field but the user only knows other (non-key) information about the object.

74. In what ways we can get the context sensitive F1 help on a field ?
- Data element documentation
- Data element additional text in screen painter
- Using the process on help request event

75. What is roll area ?
- A roll area contains the program's runtime context. In addition to the runtime stack and other structures, all local variables and any data known to the program are stored here.

76. How does the system handle roll areas for external program components ?
- Transactions run in their own roll areas
- Reports run in their own roll areas
- Dialog modules run in their own roll areas
- Function modules run in the roll areas of their callers

77. Does the external program run in the same SAP LUW as the caller, or in a separate 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 caller
The only exceptions to the above rules are function modules called with IN UPDATE TASK (V2 function only) or IN BACKGROUND TASK (ALE applications). These always run in their own (separate) update transactions.

78. What are function modules ?
- Function modules are general-purpose library routines that are available system-wide.

79. What are the types of paramaters in the function modules ?
- 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 function

80. What is the difference between Leave Transaction and Call Transaction ?
- In contrast to LEAVE TO TRANSACTION, the CALL TRANSACTION statement causes the system to start a new SAP LUW . This second SAP LUW runs parallel to the SAP LUW for the calling transaction.

81. How 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 table

82. How to send a report to the printer instead of displaying it on the screen ?
- We can send a report to the printer instead of displaying it on the screen. To do this, use the keywords TO SAP-SPOOL:

83. How can we send data to external programs ?
- Using SPA/GPA parameters (SAP memory)
- Using EXPORT/IMPORT data (ABAP/4 memory)

84. What are SPA/GPA parameters and how can we use them ?
SPA/GPA parameters are field values saved globally in memory.
There are two ways to use SPA/GPA parameters:
by setting field attributes in the Screen Painter
by using the SET PARAMETER or GET PARAMETER statements

No comments: