Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us | ||
SAP Virtual/Onsite TrainingsDocument Categories:
What's New?
Contribute?Sample SpecsWhat's Hot? |
Assistance class in Web Dynpro ABAPBy Archana Pawar, Infosys Scenario: ·
Generally in Web Dynpro ABAP, we write
all the required logic within the component itself but we can write the
necessary logic outside the component that is in a class and we can use that
class as the assistance class in our Web Dynpro component. ·
So, in this BOK we demonstrate how to
create assistance class for Web Dynpro application and use it to get the desired
details. We will
take example of displaying the flights available and bookings displayed in ALV
where Departure and Destination City and country are input. Procedure: A.
Creating
class and coding the desired logic 1.
Go
to transaction se24 and create a class named as ‘ZCL_WDABAP_FLIGHT_MODEL’. 2.
Give
Instantiation as ‘Public’ and class type as ‘Usual ABAP Class’. And save
it. 3.
Class
will be created as shown in the below screenshot. 4.
Create
a public method ‘GET_BOOKINGS’ and press ENTER. 5.
Go
to parameters and give IM_CARRID, IM_CONNID and IM_FLDATE as importing
parameters. These are the details that we get from
the 1st ALV in the Web Dynpro application where we display the
flights available for the provided departure and destination city/country. 6.
Give
LT_BOOKINGS as Exporting parameter. 7.
Now,
go to code editor and we need to write the logic to fetch the desired details
from table SBOOK. 8.
Select
all values from table SBOOK where CARRID, CONNID and FLDATE are from the flight
details. Result will be stored in exporting parameter ‘LT_BOOKING’. 9.
Activate
the class. |
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
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 |
||
![]() |
![]() |