‎2007 Jul 17 12:41 PM
Hi,
This is my program.
I had written the events top of page , end of page. is there any specific format that these should be present after start of selection or like that.
REPORT ZAC_TAB18.
T Y P E S
TYPES:
BEGIN OF TYVBAK,
VBELN TYPE VBAK-VBELN,
AUART TYPE VBAK-AUART,
AUDAT TYPE VBAK-AUDAT,
KUNNR TYPE VBAK-KUNNR,
NETWR TYPE VBAK-NETWR,
END OF TYVBAK.
D A T A D E C L A R A T I O N S
DATA:
STVBAK TYPE TYVBAK,
ITVBAK TYPE TABLE OF TYVBAK.
S E L E C T I O N S C R E E N
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:
SKUNNR FOR STVBAK-KUNNR.
SELECTION-SCREEN END OF BLOCK B1.
I N I T I A L I Z A T I O N
INITIALIZATION.
FILLING SELECT OPTIONS WITH DEFAULTS
SKUNNR-SIGN = 'I'.
SKUNNR-OPTION = 'BT'.
SKUNNR-LOW = '1'.
SKUNNR-HIGH = '4000000'.
APPEND SKUNNR.
T O P O F P A G E
TOP-OF-PAGE.
WRITE:/1'SALES DOC',12 'DOC TYPE',20 'SALES DATE',32 'NETWORTH',60 'CUSTOMER'.
E N D O F P A G E
END-OF-PAGE.
WRITE:/1 SY-DATUM,30 SY-PAGNO, 55 SY-UNAME.
S T A R T O F S E L E C T I O N
START-OF-SELECTION.
PERFORM GETDATA.
&----
*& Form GETDATA
&----
text
----
FORM GETDATA.
SELECT VBELN "SALES DOCUMENT NUMBER
AUART "DOCUMENT TYPE
AUDAT "SALES DOCUMENT DATE
KUNNR "SOLD TO PARTY
NETWR "NETWORTH
FROM VBAK
INTO TABLE ITVBAK
WHERE KUNNR IN SKUNNR.
IF SY-SUBRC EQ 0.
SORT ITVBAK BY KUNNR VBELN.
PERFORM DISPLAY.
ENDIF.
ENDFORM. "GETDATA
&----
*& Form display
&----
text
----
FORM DISPLAY.
LOOP AT ITVBAK INTO STVBAK.
WRITE:/1 STVBAK-VBELN,12 STVBAK-AUART,20 STVBAK-AUDAT,35 STVBAK-NETWR,60 STVBAK-KUNNR.
ENDLOOP.
ENDFORM. "display
‎2007 Jul 17 12:48 PM
hi
There is no specific sequence.
<b>Top-of-Page.</b>
-Triggered by the first write statement in the program
-It is used to have a standard header in the program for all the pages.
TOP-OF-PAGE is only executed before outputting the first line on a new page
<b>New-Page.</b>
-Can be used when one wants to display different data on different pages
-Terminates the current page and continues output on a new page.
-Will not trigger the Top-of-Page or End-of-Page.
<b>End-of-Page.</b>
-It is used to have a standard footer for all the pages.
-Triggered by the program if the number of records exceed the line-count of the program.
<b>Reward points for useful ans.</b>
Regards
Aarti
‎2007 Jul 17 12:43 PM
‎2007 Jul 17 12:45 PM
No it's not like that.
It doesn't depend on the sequence you defined.It will trigger in their original sequence .Top-of-page always triggr after seeing first write statement.
‎2007 Jul 17 12:48 PM
hi
There is no specific sequence.
<b>Top-of-Page.</b>
-Triggered by the first write statement in the program
-It is used to have a standard header in the program for all the pages.
TOP-OF-PAGE is only executed before outputting the first line on a new page
<b>New-Page.</b>
-Can be used when one wants to display different data on different pages
-Terminates the current page and continues output on a new page.
-Will not trigger the Top-of-Page or End-of-Page.
<b>End-of-Page.</b>
-It is used to have a standard footer for all the pages.
-Triggered by the program if the number of records exceed the line-count of the program.
<b>Reward points for useful ans.</b>
Regards
Aarti
‎2007 Jul 17 12:49 PM
hi ,
the top-of-page event shd be after the end-of-selection event.
reward if helpful.