Tools in Smartforms:: SE78 (Administration of Form Graphics)
Tools in Smartforms:: SE78 (Administration of Form Graphics)
Form Painter
Table Painter
PC Editor
Navigation Tree
Error List
When we check the smart forms and if any error occurs, it will be
displayed at the bottom of the maintenance screen
SE78 (Administration of Form Graphics).
Select-Options: Sign, option, high and Low
SFTRACE- tracing smartfomrs.
Using 'COMMAND' to achieve page break
In some cases user will ask only specific number of records should be displayed per
page, but based on space availability of main window data will populate. To restrict
manually the number of records displayed per page we can use COMMAND.
Page Protection is used to avoid displaying the broken contents of the page and
allow it to display in the new page from the beginning after the previous page. E.g. I
have two texts available and i want to display them in two different pages without
any break in any of the page contents. But here if we don't use Page Protection
then first text will be displayed in first page and if some space is available in the
first page then second text also will get started after the first text contents (few
lines) in the first page itself, it will break the second text contents and the rest of
the lines of the second text it will display in the second page. If we use Page
Protection then First text contents will be displayed in the first page and without any
break of the second text contents, it will be displayed in a new page i.e. in the
second page.
Page protection:
1.Create a Folder in the table ,
2.Go to Output Options,
3.Initially Page Protectinon Checkbox is disable.
4.Drag the line type into folder and give the line type name in the folder.
5.now the page protection check box will enable .
6. check the page protection checkbox .
7.now the table is page protected.
Or
For the Page protect in tables, there is option in table itself.
Just double click on the table, then select table tab and click on details, then there
is check box in every line type for the page break, select this check box.
1. Main window.
It is for the continues output like table output.
2. Secondary window.
For output with a fixed length.
3. Final window.
This is also a special type of secondary window for the details
that has to be processed only at the end of the form processing .
4. Copies window.
This is a special type of secondary window for making pages as copy or
original.
Exits:
To find a BAdI for any SAP transaction do the following:
Click on System->Status
Double click on the program name
Once inside the program search for CL_EXITHANDLER=>GET_INSTANCE.
Make sure the radiobutton In main program is checked
A list of all the programs with call to the BAdIs will be listed.
The export parameter EXIT_NAME for the method GET_INSTANCE of class
CL_EXITHANDLER will have the user exit assigned to it.
The changing parameter INSTANCE will have the interface assigned to it.
menu exit.
5.User exits are Basically designed For SD module.
Customer exits Are available for MM,SD,FI,HR..Basically
designed for all modules
We can find out the entire possible Customer exits based Call customer
ENHANCEMENT-POINT
ENHANCEMENT-SECTION
One which can be provided at a specific place - called Enhancement Point, and
another which can
be used to replace a set of statements called Enhancement Section.
When the Enhancement-Section is implemented, only the implementation gets
executed and the original code doesnt get executed
and no default implementation exists for a BAdi dedefinition with the current filter
restrictions.
Report Programs:
1. Reports are stand alone programs.
2. We use reports to read data base tables & represent results in Lists
3. Reports are collection of processing blocks, controlled by System calls depending on events.
4. Reports can use LDBs or SELECT STATEMENTS
defined by DEVELOPER.
5.Reports can call Dialogue programs and vice versa.
Dialog Programming
1.Dialogue programs are not stand alone programs. (we
have to link the dialogue programs to at least one or
more SCREENS & TRANSACTION CODES)
2. We use Dialogue Programs to read & change
Database tables.
3.Dialogue programs are controlled by Screen flow logic.
4.Dialogue program is also called as Module pool program
or TRANSACTION.
Report Program:
A report is a program that typically reads and analyzes data in database tables without changing
the database.
Dialog Program:
A dialog program allows you to work interactively with the system and to change the contents of
the database tables. Each dialog program has a certain sequence of screens that are processed by
the system one after the other.
Screen Flow Logic
Screen Flow logic is primarily divided into four components.
Process Before Output (PBO) event: which is processed before the screen is displayed
Process After Input (PAI) event: which is processed after a user action on the screen
Dynpro
A screen together with its Flow logic is called a Dynpro (Dynamic Program since the
screen flow logic influences the program flow)
Each dynpro controls exactly one step of your Dialog Program.
The screens belonging to a program are numbered. The screen flow sequence can be
either linear or cyclic. From within a screen chain, you can even call another screen chain
and, after processing it, return to the original chain. You can also override the staticallydefined next screen from within the dialog modules of the ABAP program.
REPORT ztest_at_exit.
DATA:
var1(10),
var2(10),
var3(10).
CALL SCREEN 100.
&---*&
Module STATUS_0100 OUTPUT
&---text
---MODULE status_0100 OUTPUT.
SET PF-STATUS 'ZTEST_AT_EXIT'.
SET TITLEBAR 'ZTEST_AT_EXIT'.
ENDMODULE.
&----
*&
Module USER_COMMAND_0100 INPUT
&---text
---MODULE user_command_0100 INPUT.
DATA:
w_ucomm LIKE sy-ucomm.
w_ucomm = sy-ucomm.
CASE w_ucomm.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
WHEN 'ADD'.
var3 = var1 + var2.
ENDCASE.
ENDMODULE.
" USER_COMMAND_0100 INPUT
&---*&
Module EXIT_100 INPUT
&---text
---MODULE exit_100 INPUT.
DATA:
answer.
w_ucomm = sy-ucomm.
CASE w_ucomm.
WHEN 'EXIT2'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
text_question = 'Do you want to save this ?'
IMPORTING
answer
= answer.
exception
text_not_found
=1
OTHERS
= 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
IF NOT answer EQ '1'.
LEAVE TO SCREEN 0.
ENDIF.
ENDIF.
ENDCASE.
ENDMODULE.
Or
When the user chooses a function with type E, the screen flow logic jumps directly to the following
statement:
MODULE <mod> AT EXIT-COMMAND.
Logical DB->PNPCE:
A report that wants to use the PNPCE must enter this in its report attributes under Logical
database.
In addition, the PERNR structure must be declared in the report using the 'TABLES PERNR'
statement. You can only use the PERNR structure again in certain circumstances. The use of the
'GET PERNR' event is therefore forbidden. Instead, use the 'GET PERAS' event. Except for the
PERNR-PERNR component, all other components of the PERNR structure are no longer filled
and have initial values. This kind of programming (with the exception of PERNR-PERNR)
therefore not permitted.
In addition to the 'GET PERAS' event, you can also use the GET PERSON' and 'GET GROUP'
events. To be able to use these events, you must declare them using the NODES statement
(NODES PERSON', 'NODES GROUP', or. NODES PERAS').
Explanation of Terms
If the 'GET PERSON' and 'GET GROUP events and the 'AS PERSON TABLE' addition for the
INFOTYPES statement are not used, the report indicates that it does not require the functionality
for evaluating Concurrent Employment. In this case, the report runs in a PNP-compatible
session. This is referred to as PNP mode in the following documentation. On the other hand, if
the report uses the functionality for evaluating Concurrent Employment we refer to CE mode.
Features
Process of an Evaluation
The PNPCE selection screen offers you as standard a range of functions that you can use to
restrict the personnel number and person selection. These are discussed in more detail in the
following sections. The process is initially as follows regardless of whether the report runs in CE
or PNP mode. All available functions and selection conditions leads to the selection of personnel
numbers. If you use the sorting function, this set of personnel numbers is then sorted according
to the sort criteria you selected. In PNP mode, the GET PERAS event is triggered as a result for
each personnel number.
In CE mode, the persons belonging to the personnel numbers are determined first for all
personnel numbers selected. The GET PERSON event is then triggered for each person. The
person ID is specified in the OBJID component of the PERSON structure. PERNR_NUM
contains the total number of personnel assignments (= personnel numbers) that this person has
and the ALL_PERNRS table, which contains a list of these personnel numbers regardless of
whether they were actually selected or not. The SELECTED flag is set to X for the personnel
numbers selected. The flag is initial for all personnel numbers that are not selected. The
PROCESS flag specifies whether the personnel number should be processed in the rest of the
process. This flag is set to X by default for the personnel numbers selected. However, the report
can set or delete this flag at the GET PERSON event for all personnel numbers. In this way,
report and logical database communicate with each other which enables the report to control the
rest of the process.
GET PERSON Structure:
Get Employee HR Connection group mail id and all HR Connections from HR Country
unit:
* Get the position of employee from HRP1001
SELECT SINGLE sobid FROM hrp1001
INTO lv_position
WHERE otype = 'P'
AND
objid = emp_no
AND
plvar = '01'
AND
rsign = 'B'
AND
sclas = 'S'
AND
relat = '008'
AND
begda LE sy-datum
AND
endda GE sy-datum.
* Get the Org unit from positon (S-A-003)
SELECT SINGLE sobid FROM hrp1001
INTO lv_org_unit
WHERE otype = 'S'
AND
objid = lv_position
AND
plvar = '01'
AND
rsign = 'A'
AND
relat = '003'
AND
begda LE sy-datum
AND
endda GE sy-datum
AND
sclas = 'O'.
* Get the HR country unit from the org unit (O-A-O01)
SELECT SINGLE sobid FROM hrp1001
INTO lv_country_unit
WHERE otype = 'O'
AND
objid = lv_org_unit
AND
plvar = '01'
AND
rsign = 'A'
AND
relat = 'O01'
AND
begda LE sy-datum
AND
endda GE sy-datum
AND
sclas = '1O' .
"#EC *
"#EC *
"#EC *
*
Get all the HR Connections (positions) from the HR Country Unit
* (10-B-O01-S)
REFRESH lt_hrp1001.
SELECT sobid FROM hrp1001
INTO TABLE lt_hrp1001
WHERE otype = '1O'
AND
objid = lv_country_unit
AND
plvar = '01'
AND
rsign = 'B'
AND
relat = 'O01'
AND
begda LE sy-datum
AND
endda GE sy-datum
AND
sclas = 'S'.
* Get the PERNRs from the positions