Classical Report Events With Logic 1725251430
Classical Report Events With Logic 1725251430
Initialization
At selection-screen
Start-of-selection
End-of-selection
Top-of-page
End-of-page
At selection-screen output
At selection-screen on <field>
END OF LTY_DATA.
DATA : IT_VBAK TYPE TABLE OF LTY_DATA,
LWA_VBAK TYPE LTY_DATA.
IF YOU HAVE ANY OPPORTUNITIES ON SAP ABAP AS A FRESHER REFER ME AND SEND ME ,
[email protected]
MAIL: [email protected] Lnkdin: Guravarao SAP ABAP Fresher
USER-COMMAND:
We can give any function code like SELECT that's your wish
It's means we told sap that is particular check box has this function code so whenever
we will select that check box system under stand that we are selecting that check box
because we gave the function code
INITIALIZATION
IF YOU HAVE ANY OPPORTUNITIES ON SAP ABAP AS A FRESHER REFER ME AND SEND ME ,
[email protected]
MAIL: [email protected] Lnkdin: Guravarao SAP ABAP Fresher
S_ODATE-SIGN = 'I'.
S_ODATE-OPTION = 'BT'.
S_ODATE-LOW = SY-DATUM - 9855.
S_ODATE-HIGH = SY-DATUM.
APPEND S_ODATE.
LWA_WAERK-WAERK = 'INR'.
LWA_WAERK-DESC = 'Indian Repee'.
LWA_WAERK-WAERK = 'USD'.
LWA_WAERK-DESC = 'United states dollar'.
LWA_WAERK-WAERK = 'CAD'.
LWA_WAERK-DESC = 'Canadian Dollar'.
IF YOU HAVE ANY OPPORTUNITIES ON SAP ABAP AS A FRESHER REFER ME AND SEND ME ,
[email protected]
MAIL: [email protected] Lnkdin: Guravarao SAP ABAP Fresher
LWA_VBTYP-VBTYP = 'L'.
LWA_VBTYP-DESC = 'Debit memo request'.
LWA_VBTYP-VBTYP = 'M'.
LWA_VBTYP-DESC = 'Inoice'.
LWA_VBTYP-VBTYP = 'O'.
LWA_VBTYP-DESC = 'Credit memo'.
IF YOU HAVE ANY OPPORTUNITIES ON SAP ABAP AS A FRESHER REFER ME AND SEND ME ,
[email protected]
MAIL: [email protected] Lnkdin: Guravarao SAP ABAP Fresher
NO_VALUES_FOUND = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
IF YOU HAVE ANY OPPORTUNITIES ON SAP ABAP AS A FRESHER REFER ME AND SEND ME ,
[email protected]
MAIL: [email protected] Lnkdin: Guravarao SAP ABAP Fresher
AT SELECTION-SCREEN OUTPUT
The purpose of this event is to modify the selection screen
before it is displayed
IF YOU HAVE ANY OPPORTUNITIES ON SAP ABAP AS A FRESHER REFER ME AND SEND ME ,
[email protected]
MAIL: [email protected] Lnkdin: Guravarao SAP ABAP Fresher
ENDIF.
ENDLOOP.
ENDIF.
IF P_CHK = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'CAT'.
SCREEN-ACTIVE = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
""""""""""""""""""""
AT SELECTION-SCREEN
The purpose of this event is to validate the Input.
Whenever we pass the wrong value to currency Highlited By
using SET CURSOR FIELD
AT SELECTION-SCREEN.
ENDIF.
IF LV_Cat-LOW <> 'C' AND LV_Cat-LOW <> 'D' AND LV_Cat-LOW <> 'B'.
SET CURSOR FIELD 'LV_Cat-LOW'.
IF YOU HAVE ANY OPPORTUNITIES ON SAP ABAP AS A FRESHER REFER ME AND SEND ME ,
[email protected]
MAIL: [email protected] Lnkdin: Guravarao SAP ABAP Fresher
MESSAGE E003(ZMSG_23).
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON <field>
This event is used to validate a particular input
field present on the selection screen.
AT SELECTION-SCREEN ON S_CURR.
MESSAGE E004(ZMSG_23).
ENDIF.
ENDIF.
START-OF-SELECTION.
▪ This event calls when user clicks execute button on
the selection screen.
▪ The selection logic is the part of this event.
START-OF-SELECTION.
SELECT VBELN ERDAT ERZET ERNAM VBTYP WAERK
FROM VBAK
INTO TABLE IT_VBAK
WHERE ERDAT IN S_ODATE
IF YOU HAVE ANY OPPORTUNITIES ON SAP ABAP AS A FRESHER REFER ME AND SEND ME ,
[email protected]
MAIL: [email protected] Lnkdin: Guravarao SAP ABAP Fresher
ENDLOOP.
END-OF-SELECTION
▪ This event helps to identify the end of data/records.
END-OF-SELECTION.
WRITE:/ TEXT-001.
TOP-OF-PAGE
. It is used to display the header information.
TOP-OF-PAGE.
WRITE: / TEXT-002, SY-PAGNO.
IF YOU HAVE ANY OPPORTUNITIES ON SAP ABAP AS A FRESHER REFER ME AND SEND ME ,
[email protected]
MAIL: [email protected] Lnkdin: Guravarao SAP ABAP Fresher
IF YOU HAVE ANY OPPORTUNITIES ON SAP ABAP AS A FRESHER REFER ME AND SEND ME ,
[email protected]