Module Pool
Module Pool
Module Pool
23.To call sub screen we use CALL SUBSCREEN statement in the PBO of
main screen and also in PAI.
In PBO:
Call Subscreen including sy-repid .
In PAI:
Call Subscreen .
24. For search help on a screen we can use a predefined search help on
the search tab of dictionary attribute of the field.
25. For select options, create sub-screen area in your screen layout
where you want to create the select options. In the top include of your
module pool program declare a selection screen as a sub-screen
e.g.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
Select-options s_matnr for mara-matnr.
SELECTION-SCREEN END OF SCREEN.
In the PBO and PAI of the main screen where the select options needs
to be created do a
call subscreen of the above screen (100).
CALL SUBCREEN sub_area INCLUDING.
This call subscreen statement is necessary for transport of values
between screen and
program. All validations of the selection screen fields e.g. the s_matnr
field created above should be done in selection screen events like AT
SELECTION-SCREEN etc. and not in PAI. These selection screen
validations etc. should be done in the top include only .
What is a transaction?
- Format and consistence checks for the data entered by the user.
- Screens (Dynpros)
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.
PBO- Process Before Output-It determines the flow logic before displaying the
screen.
PAI-Process After Input-It determines the flow logic after the display of the screen
and after receiving inputs from the User.
- A dynpro (Dynamic Program) consists of a screen and its flow logic and
controls exactly one dialog steps.
Screen layout: Positions of the text, fields, push-buttons and so on for a screen
Screen Attributes: Number of the screen, number of the subsequent screen, and
others
Fields attributes: Definition of the attributes of the individual fields on a screen.
-Each dynpro refers to exactly one ABAP/4 dialog program.Such a dialog program is
also called
7..Can we use WRITE statements in screen fields?if not how is data transferred from
field data to screen fields?
transfers screen fields values to ABAP/4 programs fields and Vice Versa.This happens
immediately after displaying the screen.
8.Can we use flow logic control key words in ABAP/4 and vice-verse?
-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.
-Mneu 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?
ABAP/4 processing of each screen .For each screen,the system executes the flow
logic that contains the corresponding ABAP/4
processing.The controls passes from screen flow logic to ABAP/4 code and back.
- A function code has to be defined in the screen attributes for the push
buttons in a screen.
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 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
screens pushbutton,a menu option ,function key or other GUI element.
- The SET SCREEN and LEAVE SCREEN statements controls screen flow.
- By SY-UCOMM Variable.
- ON INPUT
The ABAP/4 module is called only if a field contains the Value other than the initial
Value.This initial Value is determined by the
fileds Dta Type: blanks for character Fields
,Zeroes for numerics. If the user changes the Fields Value back t o its initial
value,ON INPUT does not trigger a call.
- ON REQUEST
The ABAP/4 Module is called only if the user has entered the 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
ON *-INPUT
The ABAP/4 module is called if any one of the fields in the chain contains a value
other than its initial value(blank 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:?
- E: ERROR
- W-WARNING
- I INFORMATION
- A-ABNORMAL TERMINATION.
- S-SUCCESS
Of the two next screen attributes the attributes that has more priority is
-.
Dynamic.
TRUE.
27. The commands through Which an ABAP/4 Module can branch to or call the
next screen are
1.,2,3,4.
- Yes
32. The Syntex used to call a screen as dialog box (pop up)is
- NINE
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).
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 <scr
no>. 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 the 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.
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.
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.
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 group4
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 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 max no of modification groups
for each field?
If the same attribute 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?
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.
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 subscreens
number.
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 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 time 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 control 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.
FIELD, MODULE, SELECT, VALUES and CHAIN are the dynapro 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.
Using the syntax controls <table control name> type tableview using screen <scr
no>.
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 loop
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?
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.
If we dont use Suppress-Dialog to next screen will be displayed but as empty, when
the user presses ENTER, the standard list output
is displayed.
59. How the transaction that are programmed by the user can be protected?
60. What are the modes in which any update tasks work?
A program asks the system to perform a certain task, and then either waits or
doesnt 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.
Semantic Integrity.
Relational Integrity.
Operational integrity.
The tables.
The lock argument.
Shared lock
Exclusive lock.
72. What are the events by which we can program help texts and display
possible value lists?
74. In what ways we can get the context sensitive F1 help on a field?
A roll area contains the programs 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?
77. 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.
Function modules are general-purpose library routines that are available system-
wide.
- TABLES: for passing internal tables only, by reference (that is, by address).
There are three options for passing selection and parameter data to the report.
- Using SUBMITWITH
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 diplaying it on the screen. To do this,
use the keywords TO SAP-SPOOL:
SPA/GPA parameters are field values saved globally in memory. There are two ways
to use SPA/GPA parmeters:
Posted by Make online money sitting at home at 04:28 No comments:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
2) Now when you go to SE73 if you enter SBP00 for you device it will add the newly
created Prefix
Create a character format C1.Assign a barcode to the character format.Check the check
box for the barcode.
The place where you are using the field value use like this
The way SMARTFORM is developed and the way in which SCRIPT is developed is
entirely different. Not listing down those here. That would be too much.
Question 19: A system has two clients 100 and 500 on the same application server. If you
make changes to a SAPSCRIPT on client 100, will the changes be available in client
500?
No. SAPSCRIPT is client dependent. You will have to transport changes from client 100
to client 500. However, for SMARTFORMS, Changes will be made both for client 100
and client 500.
Smartforms interview questions
Forcing a page break within table loop
Create a loop around the table. Put a Command node before the table in the
loop that forces a NEWPAGE on whatever condition you want. Then only loop
through a subset of the internal table (based on the conditions in the Command
node) of the elements in the Table node.
Font style and Font size
Goto Transaction SMARTSTYLES.
There you can create Paragraph formats etc just like in sapscript.
Then in your window under OUTPUT OPTIONS you include this SMARTSTYLE and
use the Paragraph and character formats.
Line in Smartform
Either you can use a window that takes up the width of your page and only has
a height of 1 mm.
Then you put a frame around it (in window output options).
Thus you have drawn a box but it looks like a line.
Or you can just draw "__" accross the page and play with the fonts so that it
joins each UNDER_SCORE.
Difference between 'forminterface' and 'global definitions' in global settings
of smart forms
The Difference is as follows.
To put it very simply:
Form Interface is where you declare what must be passed in and out of the
smartform (in from the print program to the smartform and out from the
smartform to the print program).
Global defs. is where you declare data to be used within the smartform on a
global scope.
ie: anything you declare here can be used in any other node in the form.
Smartforms function module name
Once you have activated the smartform, go to the environment -> function
module name. There you can get the name of funtion module name.
The key thing is the program that calls it. for instance, the invoice SMARTFORM
LB_BIL_INVOICE is ran by the program RLB_INVOICE.
This program uses another FM to determine the name of the FM to use itself.
The key thing is that when it calls this FM (using a variable to store the actual
name), that the parameters match the paramters in your smartform.
Another thing to note is that the FM name will change wherever the SF is
transported to.
So you need to use the FM to determine the name of the SF.
Here is the code that can be use to determine the internal name of the
function module:
Code:
if sf_label(1) <> '/'. " need to resolve by name
move sf_label to externalname.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = externalname
importing
fm_name = internalname
exceptions
no_form = 1
no_function_module = 2
others = 3.
if sy-subrc <> 0.
message 'e427'.
endif.
move internalname to sf_label.
endif.
It checks to see if the sf_label starts with a '/', which is how the internal names
start. if it does, the name has already been converted. If not, it calls the FM
and converts the name.
You would then CALL FUNCTION sf_label.
Smartforms output difference
2.Styles and Forms - Define and print the style and layout of SAPscript
form.
why scripts are client dependent and smart forms are client
independent.?
In Sapscript ,
For example : I want to define font in Arial?
And that font is not available in my system ? how can i get
this font into my sapscript?
eg: