Note that this report uses tables without headerlines
REPORT
ZRAPTEMP.
* NO STANDARD PAGE HEADING
* LINE-SIZE
<XX> LINE-COUNT <YY>
* MESSAGE-ID <ZC>.
**********************************************************************
*
*
Description:
*
* Log:
*
* Date Init Description of change
*
------------------ -----
-----------------------------------------------------
* dd-mm-yyyy
xxxx
*
**********************************************************************
*----------------------------------------------------------------------
*
T A B L E
S
*----------------------------------------------------------------------
TABLES:
*----------------------------------------------------------------------
*
C O N S T A N T
S
*----------------------------------------------------------------------
constants:
xxx type i value 1.
*----------------------------------------------------------------------
*
S T A N D A R D T Y P E
S
*----------------------------------------------------------------------
TYPES:
begin
of st_xyz,
end of st_xyz.
*----------------------------------------------------------------------
*
T A B L E T Y P E
S
*----------------------------------------------------------------------
TYPES:
tt_xyz
type standard table of st_xyz.
*----------------------------------------------------------------------
*
I N T E R N A L T A B L E
S
*----------------------------------------------------------------------
DATA:
gi_xyz
type tt_xyz.
*----------------------------------------------------------------------
*
G L O B A L V A R I A B L E
S
*----------------------------------------------------------------------
DATA:
*
Working area for for table gi_xyz
g_xyz type
st_xyz.
***************************************************************
*
S E L E C T I O N S C R E E
N
***************************************************************
*SELECTION-SCREEN
BEGIN OF BLOCK 1
* WITH FRAME TITLE TEXT-XXX.
*
* SELECT-OPTIONS:
<SELFIELD1> FOR <TABLE1-FILED1>
* OBLIGATORY
* DEFAULT
<XXX>.
* PARAMETER: <P_RB01> RADIOBUTTON GROUP <G1> DEFAULT
'X',
* <P_RB02> RADIOBUTTON GROUP <G1>,
* <CHK_BOX1> AS
CHECKBOX DEFAULT 'X'.
*
*SELECTION-SCREEN END OF BLOCK
1.
***************************************************************
*
E V E N T
S
***************************************************************
*--------------------------------------------------------------
*
A T S E L E C T I O N - S C R E E N O U T P U
T
*--------------------------------------------------------------
AT
SELECTION-SCREEN OUTPUT.
PERFORM ATSELOUT_MODIFY_SCREEN.
*--------------------------------------------------------------
*
I N I T I A L I Z A T I O N
* Executed before the selection screen is
displayed.
* Initialize fields on the selection screen,
* variables and
internal tables
*--------------------------------------------------------------
INITIALIZATION.
PERFORM
INIT_VARIABLES.
*---------------------------------------------------------------
*
This event is assigned to the selection screen fields
* corresponding to the
report parameter or selection criterion selfield1.
* If the report starts an
error dialog at this point, precisely this field
* become ready for input.
*---------------------------------------------------------------
*at
selection-screen on selfield1.
* if selfield1 <logical
expression>.
* message E002 with text-003.
*
endif.
*--------------------------------------------------------------
*
S T A R T - O F - S E L E C T I O
N
*--------------------------------------------------------------
START-OF-SELECTION.
*
SET PF-STATUS <'XXXX'>.
* <AUTHORITY-CHECK OBJECT OBJECT
NAME>
* CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
* EXPORTING
*
TEXT = T2
* EXCEPTIONS
* OTHERS = 1.
PERFORM
READ_DATA.
*--------------------------------------------------------------
*
E N D - O F - S E L E C T I O
N
*--------------------------------------------------------------
END-OF-SELECTION.
PERFORM
WRITE_REPORT.
* CLEAR <ITAB1-FIELD1>. "Used by interactive reports when
drilling down
*--------------------------------------------------------------
*
T O P - O F - P A G
E
*--------------------------------------------------------------
TOP-OF-PAGE.
PERFORM
WRITE_REPORT_HEADER.
*--------------------------------------------------------------
*
E N D - O F - P A G
E
*--------------------------------------------------------------
END-OF-PAGE.
PERFORM
WRITE_REPORT_FOOTER.
*--------------------------------------------------------------
*
A T U S E R - C O M M A N D
* Fires when the user pushes a
pushbutton
*--------------------------------------------------------------
*
AT USER-COMMAND.
* CASE SY-UCOMM.
* WHEN 'XXX'.
* PERFORM
<XXX>.
* WHEN 'YYY'.
* PERFORM <YYY>.
*
ENDCASE.
*--------------------------------------------------------------
*
A T L I N E - S E L E C T I O N
* Fires when user click on a line
* in the
report
*--------------------------------------------------------------
AT
LINE-SELECTION.
* CHECK NOT <ITAB1-FIELD1> IS INITIAL.
* PERFORM
<ZZZZ>.
* CLEAR <ITAB1-FIELD1>.
***************************************************************
*
F O R M
S
***************************************************************
*--------------------------------------------------------------
*
F O R M A T S E L O U T _ M O D I F Y _ S C R E E N
* Modification of the
selection
screen
*--------------------------------------------------------------
FORM
ATSELOUT_MODIFY_SCREEN.
ENDFORM.
*--------------------------------------------------------------
*
F O R M I N I T _ V A R I A B L E S
* Initialisation of
variables
*--------------------------------------------------------------
FORM
INIT_VARIABLES.
*Initialization of selection screen fields ( Select
options fields )
*DATA: year(4) TYPE c,
* month(2) TYPE c,
*
day(2) TYPE c.
* MOVE sy-datum+0(4) TO year.
* MOVE sy-datum+4(2) TO
month.
* MOVE: 'I' TO s_year-sign,
* 'EQ' TO s_year-option,
*
year TO s_year-low.
* APPEND s_year.
* MOVE: 'I' TO
s_month-sign,
* 'EQ' TO s_month-option,
* month TO s_month-low.
*APPEND s_md.
* Initialization of internal tables and variables
*
REFRESH gi_xyz.
* CLEAR g_xyz.
ENDFORM.
*--------------------------------------------------------------
*
F O R M R E A D _ D A T A
* Read data from datbase table into
* internal
table
*--------------------------------------------------------------
FORM
READ_DATA.
* SELECT zzz yyy
* FROM databasetable1
* INTO table
gi_xyz
* WHERE zzz in zselfield1>.
ENDFORM.
*--------------------------------------------------------------
*
F O R M W R I T E _ R E P O R T _ H E A D E
R
*--------------------------------------------------------------
FORM
WRITE_REPORT_HEADER.
* FORMAT COLOR COL_HEADING.
* WRITE AT (10)
<TEXT1>.
* WRITE AT (25) <TEXT2>.
*
ULINE.
ENDFORM.
*--------------------------------------------------------------
*
F O R M W R I T E _ R E P O R T _ F O O T E
R
*--------------------------------------------------------------
FORM
WRITE_REPORT_FOOTER.
* WRITE: / <TEXT4>.
ENDFORM.
*--------------------------------------------------------------
*
F O R M W R I T E _ R A P P O R T
* Udskrift af
rapport
*--------------------------------------------------------------
FORM
WRITE_RAPPORT.
* LOOP at gi_xyz into g_xyz.
* WRITE : / AT 10
<ITAB1-FIELD1> COLOR COL_KEY INTENSIFIED.
* FORMAT RESET.
* FORMAT
COLOR COL_NORMAL.
* WRITE : / AT 25 gi_xyz-field1.
* WRITE : / AT 40
gi_xyz_filed2.
* HIDE <ITAB1-FIELD1>. "USed for interactive
reporting
* NEW-LINE.
* ENDLOOP.
ENDFORM.
Saturday, July 26, 2014
5
ABAP Tips: Report Template
Note that this report uses tables without headerlines REPORT ZRAPTEMP. * NO STANDARD PAGE HEADING * LINE-SIZE <XX> LINE-COUNT <YY...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment