cancel
Showing results for 
Search instead for 
Did you mean: 

BSP with Table View

Former Member
0 Kudos

Dear All,

my application contains two pages. in first page there is a ticket number field and the tableview.

when i enter the ticket number and click on search, the related data is displayed in tableview.

from the tableview iam selecting some of the lineitems. can any one tel me how to read the tableview data and transfer to the next page.

thanks in advance.

regards,

shiva

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Shiva,

To read the tableview data and transfer to the next page.

First Page

In EventHandler->OninputProcessing

Eg:-
if  w_event->id eq 'get'.
  navigation->set_parameter( 'vbeln1' ).
  navigation->next_page( 'NEXT' ).
endif

Next page

In EventHandler->Oninitialization

You need to fetch the data using the class manger => get data


Eg:-
call method cl_htmlb_manager=>get_data
    exporting
      request = runtime->server->request
      name    = 'inputfield'
      id      = 'vbeln1'
    receiving
      data    = w_obj.

  w_sales ?= w_obj.
  w_vbeln = w_sales->value.
  w_input1 = w_vbeln.

Then fetch the Record with select Statement
Eg:
select * from dtable into table t_table.

Hope this will be Helpful

Thanks

kalyan

Former Member
0 Kudos

Hi

You can declare two pages and in one page you are displaying the data in table-view. When you click on line items and clcik on button.

To display for selected items on second page write Select statement in on initialization,

Wite Display data in layout.

Regards,

Rajani

Former Member
0 Kudos

Dear Shiva,

By using the below code you have to fetch the selected data from the tabeview.

data:  loc_table_event type ref to cl_htmlb_event_tableview,
	     cnt type i.
 
   call method cl_hrrcf_iterator=>get_tv_attr
        EXPORTING
          p_tv_id        = 'your tablename'
          p_component_id = me->component_id
          po_request     = me->request
        IMPORTING
          po_tv_event    = loc_table_event.
 
      if loc_table_event->SELECTEDROWINDEX is INITIAL.
        date_msg = 'Display your error message'.
        return.
      else.
        cnt = loc_table_event->SELECTEDROWINDEX.
      endif.
 
      if loc_table_event is not INITIAL.
        read table <your tabletype> index cnt into <your structure> .

Now, your selected datas are in the structure. Then, transfer the tableview selected data by using the cookies concept.

For this you can verify the following thread.

[;

Appreciate if its Helpful.

Regards,

Anita Vizhi Arasi B