0% found this document useful (0 votes)
11 views

Classical reports with events

The document outlines an ABAP report program that handles user input for order selection based on date, payment mode, and currency. It includes initialization, selection screen modifications, and data retrieval from a database table, followed by displaying the results. The program also manages page headers and footers during output display.

Uploaded by

gurulakshminallu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Classical reports with events

The document outlines an ABAP report program that handles user input for order selection based on date, payment mode, and currency. It includes initialization, selection screen modifications, and data retrieval from a database table, followed by displaying the results. The program also manages page headers and footers during output display.

Uploaded by

gurulakshminallu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

Initialization
2. At selection screen output
3. At selection screen on value
4. At selection screen
5. Start of selection
6. Top of page
7. End of page

REPORT zreport_classical_events LINE-COUNT 8(2).

TYPES: BEGIN OF lty_str,


order_num TYPE zde_ono,
order_date TYPE zde_odate,
pay_mode TYPE zde_paym,
curr TYPE zdele_curr,
END OF lty_str.

DATA : lv_odate TYPE zde_odate,


lv_pm TYPE zde_paym,
lv_curr TYPE zdele_curr.
DATA : lt_tab TYPE TABLE OF lty_str,
wa_tab TYPE lty_str.

SELECT-OPTIONS : s_odate FOR lv_odate NO-EXTENSION.


SELECT-OPTIONS : s_pm FOR lv_pm NO INTERVALS.
SELECT-OPTIONS : s_curr FOR lv_curr NO INTERVALS MODIF ID CUR.
PARAMETERS : p_chk TYPE c AS CHECKBOX USER-COMMAND click. "function code

INITIALIZATION. " calls before displaying input


screen/selection screen. assign default values
s_odate-sign = 'I'.
s_odate-option = 'BT'.
s_odate-low = sy-datum - 100.
s_odate-high = sy-datum.

AT SELECTION-SCREEN OUTPUT. " calls before displaying input screen. modify


sthe selection screen
IF p_chk = ' '.
LOOP AT SCREEN.
IF screen-group1 = 'CUR'.
screen-active = 0.
MODIFY SCREEN.
endif.
ENDLOOP.
ENDIF.
* IF p_chk = ' '.
* LOOP AT SCREEN.
* IF screen-name = '%_S_CURR_%_APP_%-TEXT' OR screen-name = 'S_CURR-LOW' OR
screen-name = '%_S_CURR_%_APP_%-VALU_PUSH'.
* screen-active = 0.
* MODIFY SCREEN.
* endif.
* ENDLOOP.
* ENDIF.
AT SELECTION-SCREEN. " user perform action on input screen/selection
screen . validate the input
IF s_pm IS NOT INITIAL.
IF s_pm-low <> 'C' AND s_pm-low <> 'D' AND s_pm <> 'N'.
MESSAGE e002(zmsg01).
ENDIF.
ENDIF.

START-OF-SELECTION. " user clicks on execute button. logic part


SELECT order_num order_date pay_mode curr
FROM zord_headr
INTO TABLE lt_tab
WHERE order_date IN s_odate AND pay_mode IN s_pm AND curr IN s_curr.

LOOP AT lt_tab INTO wa_tab.


WRITE: / wa_tab-order_num UNDER text-003, wa_tab-order_date UNDER text-004 ,
wa_tab-pay_mode UNDER text-005 , wa_tab-curr UNDER text-006 .
ENDLOOP.

END-OF-SELECTION. " selection process ends. identify the end of


records
WRITE: / text-001.

TOP-OF-PAGE. " triggers when first WRITE statement calls. give


heading at beginning of new page
WRITE:/ text-002, sy-pagno.
WRITE:/ text-003, 15 text-004, 27 text-005, 41 text-006.

END-OF-PAGE. " triggers when last WRITE statement calls of a


page. give footer at end of the page
WRITE : / text-007, sy-pagno.

You might also like