Screen Painter
Screen Painter
Ans
Step loops as structures in a screen do not have individual names. The screen can contain
more than one step-loop, but if so, you must program the LOOP...ENDLOOPs in the flow
logic accordingly. The ordering of the LOOP...ENDLOOPs must exactly parallel the
order of the step loops in the screen. The ordering tells the system which loop processing
to apply to which loop. Step loops in a screen are ordered primarily by screen row, and
secondarily by screen column.
Transaction TZ61 (development class SDWA) implements a step loop version of the table
you saw in transaction TZ60.
Static and Dynamic Step Loops
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 resizes the window, the system automatically increases or decreases the number of step
loop blocks displayed. In any given screen, you can define any number of static step
loops, but only a single dynamic one.
You specify the class for a step loop in the Screen Painter. Each loop in a screen has the
attributes Looptype (fixed=static, variable=dynamic) and Loopcount. If a loop is fixed,
the Loopcount tells the number of loop-blocks displayed for the loop. This number can
never change.
Programming with static and dynamic step loops is essentially the same. You can use
both the LOOP and LOOP AT statements for both types.
Looping in a Step Loop
When you use LOOP AT <internal-table> with a step loop, the system automatically
displays the step loop with vertical scroll bars. The scroll bars, and the updated (scrolled)
table display, are managed by the system.
Use the following additional parameters if desired:
CURSOR <scroll-var>
1. PBO (Process Before Output) Before the screen is displayed, the PBO event
is processed.
2. PAI (Process After Input) When the user interacts with the screen, the PAI
event is processed.
3. POH (Process On Help) - are triggered when the user requests field help (F1).
You can program the appropriate coding in the corresponding event blocks. At
the end of processing, the system carries on processing the current screen.
4. POV (Process On Value) - are triggered when the user requests possible
values help (F4). You can program the appropriate coding in the
corresponding event blocks. At the end of processing, the system carries on
processing the current screen.
On which event we can validate the input fields in module programs?
Ans
In PAI (Write field statement on field you want to validate, if you want to
validate group of fields put in chain and End chain statement.)
In selection screen, I have three fields, plant material number and material group. If
I input plant how do I get the material number and material group based on
plant dynamically?
Ans
What is screen flow logic? What are the sections in it? Explain PAI and PBO.
)
Normally how many and what files get created when a transaction program is
written?
What is the XXXXXTOP program?
Ans
What must you code in the flow logic to prevent a module from being called unless a field contains a noninitial value (as determined by its data type)?== # ON INPUT
In regard to SET PF-STATUS, you can deactivate unwanted function codes by using ____.== #
EXCLUDING
In regard to data transported in PAI when the FIELD statement is used, which of the following is NOT a
true statement?==Fields that are defined in FIELD statements are transported when their corresponding
module is called
1.
2.
3.
4.
How do you change the text (description which normally appears as non-editable on
the screen) of the Table field?
Ans :-You can change the text for Data element. For data element you have three
different description text (short, medium and long). You can use any one of the
texts.
Ans :- Message is used to INFORM, WARN, EXIT with MSG, or CANCEL with MSG in a
transaction. Message is displayed using:MESSAGE xnnn
Where x is Type and nnn is the number of message. In addition Message class is set at
Program name line, e.g., PROGRAM xyz MESSAGE-ID cc where cc is message class.
What are various message types?
Ans :- I-Info, W-Warning, E-Error, A-Abend, S-Success.
How do you create Message class?
Ans :- Tools Case Development Program maintenance Messages
Enter name and go to next screen to enter messages.
What has to be done to the packed fields before submitting to a BDC session?
Did you use full graphical user interface in SAP R/3?
What is At-Exit and User-Exit?
ANS - it is used as exit button in Module pool.
1.
Syntax
GET PARAMETER ID <pid> FIELD <f>.
Module 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. Based on the the user input
or request, the program executes the appropriate actions like, it branches to the next screen,
displays an output, or changes the database.
Explain how SAP GUI handles output screen for the user.
User terminal input is accepted by SAP GUI and sent to the SAP dispatcher. The
dispatcher co-ordinates the information exchange between the SAP GUIs and the work processes.
The dispatcher first places the processing request in request queues, which it then processes.
The dispatcher dispatches the requests to the 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 the dispatcher to the SAP GUI. The SAP GUI interprets the received data and
generates the output screen for the user.
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 ).
LUWs help to guarantee database integrity. When an LUW has been successfully concluded, the
database is once again in a correct state. If, however, an error occurs within an LUW, all database
changes made since the beginning of the LUW are canceled and the database is then in the same
state as before the LUW started.
An LUW begins
-
or
When the database changes of the previous LUW have been confirmed (database commit)
when the database changes of the previous LUW have been cancelled (database rollback)
An LUW ends
-
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.
Does the external program run in the same SAP LUW as the caller, or in a separate one?
-
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.
format and consistency checks for the data entered by the user
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.
-
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.
A dynpro (DYnamic PROgram) consists of a screen and its flow logic and controls exactly
What 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 screen flow logic is like an
ABAP program in that it serves as a container for processing blocks. There are four event blocks,
each of which is introduced with the screen keyword PROCESS:
PROCESS BEFORE OUTPUT.
...
PROCESS AFTER INPUT.
...
PROCESS ON HELP-REQUEST.
...
PROCESS ON VALUE-REQUEST.
PROCESS BEFORE OUTPUT (PBO) is automatically triggered after the PAI processing of the
previous screen and before the current screen is displayed. You can program the PBO processing
of the screen in this block. At the end of the PBO processing, the screen is displayed.
PROCESS AFTER INPUT (PAI) is triggered when the user chooses a function on the screen. You
can program the PAI processing of the screen in this block. At the end of the PAI.
processing, the system either calls the next screen or carries on processing at the point 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 corresponding event blocks. At the end of processing, the system
carries on processing the current screen.
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.
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.
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.
The SET SCREEN and LEAVE SCREEN statements control screen flow.
ON *-INPUT
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.
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).
ON CHAIN-REQUEST
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.
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.
left off in the main screen. Here comes CALL SCREEN into picture. This statement lets us insert
such a sequence into the current one.
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.
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.
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.
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.
The field SY-STEPL refers to ___________________ .
The index of the screen table row that is currently being processed. The system variable SYSTEPL only has a meaning within the confines of LOOP...ENDLOOP processing. Outside the loop,
it has no valid value.
How the transactions that are programmed by the user can be protected ?
By implementing an authority check.
Does SAP has a GUI screen painter? If yes What operating systems is it available on? What is the
other type of screen painter called?
Yes
On 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 step loop?
Step loops: Method of displaying a set of records.
Page down & Page up: decrement / increment base counter
Index = base + sy-step1 1
Normally how many and what files get created when a transaction program is written? What is top
XXXXXXTOP program?
Main program with A Includes
I ) TOP INCLUDE GLOBAL DATA
II ) Include for PBO
III) Include for PAI
IV) include for Forms
How are screen names defined? Do you create a screen first or define your program first?
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.
Where are the module statement declared? Where is the logic within each module?
Ans :1.
2.
Program.
What is gained by using the Dictionary Fields menu option when creating your screen?
Ans :- The fields you have created inherits the same attributes as those in the Data Dictionary.
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 represent when pushed
You must make sure that you clear the field that represents the pushbutton after every check.
How does foreign key work? What you have to put in your screen to identify the foreign key?
What are the two effects of the foreign key from a user standpoint?
Ans :- Possible entries & a check against the key field contents.
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 and which are display
only fields?
Ans :- Only those fields defined with the FIELD statement before MODULE & relevant checks in a
chain.
What table stores the online messages? What is the message class and what is its significance?
Ans :- Table T100. The message class is a specific class of messages for a group of transactions.
What are the 5 different message types and how are they handled by the system? What is then
difference between the Warning and Error messages?
Ans :A : Abend Message displayed on the current screen and subsequent task terminated
I : Information Message displayed on the current screen , but user can continue program by
pressing ENTER
E: Error Message displayed on the current screen. With FIELD statements , the fields concerned
become ready again for input and user is required to make the entry /entries again
W : Warning As E message , but correcting input is optional
S: Success Message displayed on the follow-up screen as an I 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 does the GET PARAMETER statement get its values? Which field gets 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 is displayed.
What are the matchcodes and how do they affect the screen field? Where are they specified in the
online program?
Ans :- In the Properties window of the Field.
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 making database changes?
What is the advantages using the SAP long form over the short form of database changes?
Ans :- May be Fast Effect.
What steps are necessary to set a lock on a record within a database table?
Ans :Execute CALL FUNCTION statement
CALL FUNCTION ENQUEUE <lock object>
EXPORTING
EXCEPTIONS
CASE SY-SUBRC.
.
.
ENDCASE.
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 field
CALL SCREEN interrupts the processing of the current screen to call a new screen or a chain of
screens, processing of the current screen is resumed directly after the call.
After a CALL SCREEN command where does the processing return after the 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 CALL SCREEN?
Ans :- The CALL SCREEN command.
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 a function code.
What is the correct syntax for dynamically modifying a large number of screen fields?
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 the dynamic 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.
Direction for the use of check box and radio buttons in screen painter?
Ans :Creating Radio 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 graphic element you want
Then you group related check boxes and radio boxes.
In the menu painter - Function attributes for the button, set Functional
type to E (Exit command)
PROCESS AFTER INPUT.
Call module that leaves screen before User_Command_xxxx is executed
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 dynpro
There 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 use
selection-screens.
Use the submit statement to start a seperate report from your dynpro.
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 in debuger which
is #
(table_control-cols-selected). There is no difference on the other row which is not selected.
The tc-cols-selected is for column selection only. For row selection you have two scenarios
turn on the SelColumn attribute in screen painter, give it a name and declare an abap variable with
the same name type C length 1. In your PAI loop at itab, when the selected row is processed the
abap variable will = 'X'. At this point 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-TABIX
GET 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 ?
To avoid the standard F4 help to be show, insert the event PROCESS ON-VALUE-REQUEST in the
program and add a field statement for the field that should trigger the F4 help. In the mdoule
called from
PROCESS ON-VALUE-REQUEST, call function module
F4IF_FIELD_VALUE_REQUEST.
Example 1 - Dynpro
process before output.
.....
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 field
for which F4 should be shown.
*
Dynprog/Dynpnr/Dynprofield are the names of the Progran/Dynpro/Field
in 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 parameter
e.g '50*' to show only values beginning with 50
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname
= 'ZSD00003'
fieldname
= 'PRCTR'
* SEARCHHELP
=''
* SHLPPARAM
dynpprog
dynpnr
dynprofield
* STEPL
value
=''
= 'ZSD00002_BRUGERKONV_LISTE'
= '0100'
= 'IT_ZSD00003-PRCTR'
=0
= '50*'
* MULTIPLE_CHOICE
* DISPLAY
=''
=''
* SUPPRESS_RECORDLIST
* CALLBACK_PROGRAM
* CALLBACK_FORM
=''
=''
=''
TABLES
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 the transaction without validating
contents;
How to handle this scenario?
By at exit-command we can do.
What is the difference in using COMMIT WORK within a called transaction 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 a called
transaction for getting any of the update statements to be fruitful inside the called transaction.
Dialog module: Since no new LUW is created, COMMIT WORK is not necessary.
Screen Exits
Program Exits
Menu Exits
Where can you create an enhancement to show your own F1 Help on a field?
Ans: in POH
If an error message was raised in Module GHI, which fields would be ready for input?
Ans: The fields that are placed in CHAINENDCHAIN.
In which 2 places could you set the GUI status and title bar for a modal dialog box?
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 is the difference between the "change on-input" and "Change on request" in the PAI of a
screen?
ON INPUT
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.
ON REQUEST
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.
What are user exits? What is involved in writing them? What precautions are needed?
User defined functionality included to predefined SAP standards. Point in an SAP program where
a customer's own program can be called. In contrast to customer exits, user exits allow
developers to access and modify program components and data objects in the standard system.
On upgrade, each user exit must be checked to ensure that it conforms to the standard system.
There are two types of user exit:
User exits that use INCLUDEs.
These are customer enhancements that are called directly in the 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 ?
Customizing
Enhancements to the SAP Standard
Modifications to the SAP Standard
Customer Development
What is customizing ?
Customizing is the setting of system parameters via SAP's own interface.
What is SSCR ?
SSCR (SAP Software Change Registration) is a procedure, for registering all manual changes to
SAP source coding and SAP Dictionary objects.
Menu exits
Screen exits
Function module exits
Keyword exits
SAP organizes its exits in packages that are called SAP enhancements. Each SAP enhancement
can contain many individual exits.
1)
What are the various events available in MPP, explain with example?
2)
3)
4)
5)
SE93
6)
What is the system variable where FCT code is stored in SAP ABAP?
SY-UCOMM
7)
8)
9)
10)
What is the exact diff b/w single field& multiple fields validation?
11)
12)
13)
What is the use of loop at itab into PBO and PAI in SAP ABAP?
14)
15)
16)
17)
USING ATTRIBUTES->INPUT->REQUIRED.
18)
How do you exit an MPP screen without entering the mandatory fields?
19)
USING ATTRIBUTES
20)
21)
22)
23)
24)
25)
26)
27)
Difference between the normal report / program and Module pool program?
28)
SY-UCOMM.
29)
30)
31)
YES
32)
If we do not have / give menu bar than what will menu bar have by default?
33)
34)
Can we use WRITE statements in screen fields? If not how is data transferred from
35)
Can we use flow logic control key words in ABAP/4 and vice-versa?
36)
37)
How does the interaction between the Dynpro and the ABAP/4 Modules take
place?
38)
39)
40)
How are the function codes handled in Flow Logic in SAP ABAP?
81)
82)
83)
84)
85)
What is gained by using the Dictionary Fields menu option when creating your
screen?
86)
Describe all four and how they are used in SAP ABAP?
DATATYPE
INPUT CHECK(FK)
DEFAULT VALUES
87)
88)
How does foreign key work? What you have to put in your screen to identify the
foreign key?
89)
What are the two effects of the foreign key from a user standpoint in SAP ABAP?
90)
What is user defined validation checks in the flow logic in SAP ABAP?
91)
Does the value command in the flow logic go in the PAI or the PBO event in SAP ABAP?
pai
92)
If an error occurs in the module pool, which fields are available for entry and which
93)
When is the chain command used in the PBO event in SAP ABAP?
94)
What are the 5 different message types and how are they handled by the system?
95)
What table stores the online messages? What is the message class and what is its
significance?
96)
TYPE OF ERROR
97)
What effect does the FIELD statement have within the flow logic?
98)
99)
Where does the GET PARAMETER statement get its values? Which field gets
100) Where can the SET CURSOR command be executed? What is its effect?
101) What function is performed by the commit work command in SAP ABAP?
102) After a CALL SCREEN command where does the processing return after the screen
has been executed?
103) Which is the more similar to a call with return, the SET SCREEN or the CALL
SCREEN in SAP ABAP?
104) What happens if only one of the commands SET SCREEN and LEAVE SCREEN is used
without using the other?
108) What does the TOP Include do for you as a programmer in SAP ABAP?
109) What is the purpose of the MODIFY command when performing the dynamic screen
modifications?
110) What happens if you enter 0 in NEXT Screen attribute in SAP ABAP?
111) How many menu titles you can have in a main menu in SAP ABAP?
117) Processing table controls in the flow logic takes place with the technique in SAP ABAP?
119) What is the screen type in the screen painter (SE 51)?
121) What is then difference between the Warning and Error messages in SAP ABAP?