|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
Enhancement to a Standard Class
create a report with the below logic to display an ALV output using DISPLAY
method of class CL_SALV_TABLE.
When we execute the report
with above logic, a pop up window gets displayed. This information message
appears because of new method (MY_METHOD) which we have added to class
CL_SALV_TABLE. Press enter to process further.
New pop up will appear due
to logic that has been implemented in Pre-Exit method of display. Press enter to
Now ALV output will get
displayed. This is the normal case when we call DISPLAY method of class
CL_SALV_TABLE. Now press back button
present at the top of the ALV screen.
When we press the back
button from ALV screen another pop up will appear and this comes due to logic we
have implemented in post-exit method.
In next step delete the
pre/post exit implementations. This is required to implement the over write exit
for display method.
Now add over write exit
for display method and implement its logic.
Add logic to display an
information message in over write exit method of display. It should be noted
here that code in the upper part of the below screen shot got generated
automatically. We just added the message logic in it.
Now execute the below
logic and see the results.
Only a pop up window will
appear and there will not be any ALV display. This happened because when we
called the display( ) method from our report it calls the implemented over write
exit method in place of standard display method.
To enhance logic of a standard method
of a global class we can opt for the available exit:
Pre-Method exit: Called
before the standard method.
Post-Method exit: Called
after the standard method.
Overwrite Method exit: Replaces
the standard method.
Create a report with below logic:
DATA: lt_sflight TYPE STANDARD TABLE OF sflight.
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM
©2006-2007 SAPTechnical.COM. All rights reserved.
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG.
Graphic Design by Round the Bend Wizards