|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
Simple BSP application to Create, Modify and Delete the database entries
STEP 6: Choose the tab Page Attributes and define the work variables, which you are going to use in your application. Besides defining work-variables, you have to define an internal table and a field string.
To define a field-string, use types: ff_progmr. And to define an internal table, use table-type of ‘ZART_PROGRAMMER’ table. Open table using SE11, press Ctrl+Shift+F3 (Where-Used-List), or click the icon , deselect other checkboxes and select Table-Types, purse down the table-type name for the table ZART_PROGRAMMER.
Or create a new table-type, if there exists no table-type.
Call transaction SE11->Data
type->Create->Table Type->Line Type: ZART_PROGRAMMER->Save and
fl_flag TYPE INT4 fs_progmr TYPE FF_PROGMR t_progmr TYPE ZART_TT w_dob TYPE DATS w_doj TYPE DATS w_emno TYPE ZART_PROGRAMMER-EMNO w_ext_dob TYPE CHAR10 w_ext_doj TYPE CHAR10 w_index TYPE INT4 w_salary TYPE ZART_PROGRAMMER-SALARY
STEP 7: Choose the tab Layout and design a web-page that should contain a table-view and table-view-columns. Table-View chooses the internal table from which the data has to be fetched and displays it in formatted manner. Table-View-Column.
To get a table-view, choose Tag-Browser from the
left-hand pane; pull down BSP
Extensions->Transportable->HTMLB. Here you get a lot of htmlb controls, drag Table-View control and drop it in
the layout (For additional details about it, right-click the tag and go through
<htmlb:content design="design2003" >
When you activate this page and choice to view the output,
it can’t happen since internal table contains no data.
STEP 8: To populate data in internal table, choose Event Handler tab and select OnInitialization, this event is triggered no sooner the page gets refreshed or called for the first time.
SELECT * FROM zart_programmer INTO TABLE t_progmr.
Save, activate and test the page:
Selection-Mode for the table-view has been defined as ‘SINGLESELECT’, this selects desired row. Now, we need Selected-Row-Index, which eases our task to play around with any kind of manipulation we desire.
STEP 8: Choose tab Event Handler and select OnInputProcessing.
OnInputProcessing handles the events for checking and processing user input and for defining navigation.
Code the following in OnInputProcessing event;
w_eventid contains the id of button, table-view, etc.
w_index contains selected-row-index value.
To catch the event, we make use of Class cl_htmlb_manager
and method get_event.
Similarly, to catch data from input-fields, get_data method is used.
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