You are on page 1of 2

Prepared by Vijayendar Reddy( OASIS Technologies ) hyderabad

--------------------------------------------------------------Fetching data from database to WEbDynpro Component:
data ttab type table of ttab.
select * from zemp into table ttab.
lo_nd_itab->bind_table( ttab ).
-------------------------------------------------------------Delete the selected record:
To capture hte selected record from webdynpro Table:
code wizard
get_static_attributes( importing static_attributes = ls_itab ).
workarea
if ls_itab-id is not initial.
delete from zemp where id = ls_itab-id.

----->database

lo_nd_itab->remove_element( lo_el_itab ).

------>node level/webdynpro

endif.
-----------------------------------------------------------To update the record:
To capture hte modified record from webdynpro form/ITAB:
get_static_attributes( importing static_attributes = ls_itab ).
workarea
Update zemp set name = ls_itab-name
salpm = ls_itab-salpm
permarks = ls_itab-permarks
where id = ls_itab-id.
-------------------------------------------------------------To save multiple records or to update multiple records
We need to capture the Modified records from node itab
data ttab type table of zemp.
get_static_attributes_table( importing table = ttab ).
modify zemp from table ttab.
------------------------------------------------------------------TO insert the record into database:
Capture the input record from node input

clear ls_input. workarea if ls_inputid is not initial. set_static_attributes( exporting static_attributes = ls_input ). set_static_attributes( exporting static_attributes = ls_input ). ----------------------------------------------------------------------clear the values from FORM in webdynpro. endif. insert into zemp values ls_input. ls_nput-name = 'VijayendarReddy'. ls_input-permarks = 56. wd_comp_contoller->executmed( ). ------------------------------------------------------------------- .get_static_attributes( importing static_attributes = ls_input ). ls_input-salpm = 200000. --------------------------------------------------------------------To intialize the default values in a FORM: ( WDDOINIT( ) ) WDDOINIT( ) is a standard method to initialize the values : ls_input-id = '1001'.