OBJECT : TO DISPLAY THE CUSTOMER DATA BY USING CLASSICAL REPORT EVENTS , at selection-screen , start-of-selection, end-of-selection , top-of-page, end-of-page.
ABAP CODE:
REPORT ZSASQ_CREPORT-EVENTS LINE-COUNT 10(2) NO STANDARD PAGE HEADING.
TABLES KNA1.
SELECTION-SCREEN BEGIN OF BLOCK A WITH FRAME.
SELECT-OPTIONS S_KUNNR FOR KNA1-KUNNR.
SELECTION-SCREEN END OF BLOCK A.
TYPES : BEGIN OF TY_KNA1,
KUNNR TYPE KNA1-KUNNR,
NAME1 TYPE KNA1-NAME1,
ORT01 TYPE KNA1-ORT01,
END OF TY_KNA1 .
DATA : WA_KNA1 TYPE TY_KNA1,
IT_KNA1 TYPE TABLE OF OF TY_KNA1 .
DATA V1 TYPE KNA1-KUNNR.
AT SELECTION-SCREEN.
SELECT SINGLE KUNNR FROM KNA1 INTO V1 WHERE KUNNR IN S_KUNNR.
IF SY-SUBRC <> 0.
MESSAGE E000 (ZSASQ_MSG) WITH 'INVALID CUST-NO'.
ENDIF.
START-OF-SELECTION.
SELECT KUNNR NAME1 ORT01 FROM KNA1 INTO TABLE IT_KNA1 WHERE KUNNR IN S_KUNNR.
END-OF-SELECTION.
LOOP AT IT-KNA1 INTO WA-KNA1.
WRITE : / WA_KNA1-KUNNR,
WA_KNA1-NAME1,
WA_KNA1-ORT01.
ENDLOOP.
TOP-OF-PAGE.
WRITE : ' SASQ TECHNOLOGIES'.
END-OF-PAGE.
WRITE : 'SR NAGAR , HYDERABAD'.
No comments:
Post a Comment