Skip to Content

Retrieve edited tableview in OnInputProcessing

Hi,

Is there a tutorial or an example on how to retrieve the edited contents of a tableview in the OnInputProcessing event? I have a table which is a mixture of checkboxes and input fields, and would like to retrieve the contents after the user has made modifications.

Using the CL_HTNLB_MANAGER=>get_data method I can retrieve the tableview. Then, I can find the edited contents of the fields by creating a loop with my_tv_data->get_cell_value. However, I have to dynamically construct the field names, and keep track of columns and rows...

I'd like to retrieve the modified table contents straight back into the same internal table I used for the tableview display in the first place. Is there a simple way of doing this?

Trond

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Mar 08, 2004 at 12:08 PM

    I'll try posting a reply to myself just to see my topic at the top of the list...

    In short, does anyone know how to easily retrieve the edited contents of a tableview in OnInputProcessing?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Trond,

      > I'll try posting a reply to myself just to see my topic at the top of the list...

      I did the same with one of my topics 😉

      It didn't find a solution either where the modified data is automatically transfered to the underlying table...

      Here is my solution for your problem:

      DATA: lh_data TYPE REF TO CL_HTMLB_TABLEVIEW,

      lh_event TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW,

      ls_entry LIKE LINE OF mh_model_create->mt_node_data.

      • get request data from htmlb manager

      lh_data ?= CL_HTMLB_MANAGER=>GET_DATA(

      request = runtime->server->request

      name = 'tableview'

      id = 'create_table' ).

      lh_event ?= lh_data->data.

      • mh_model has two attribute:

      • mt_node_data: table used for the tableview

      • mh_entry_count: nr of entries (lines in the table)

      • loop over all entries

      DO mh_model->m_entry_count TIMES.

      • read the modified data of the second column

      ls_entry-value = lh_event->GET_CELL_VALUE(

      row_index = sy-index

      column_index = 2 ).

      • ...read the data of other columns if you want

      • modify the data in the table

      MODIFY mh_model->mt_node_data FROM ls_entry

      INDEX sy-index TRANSPORTING value.

      ENDDO.

      Don't know if this is easier as your approach...

      Best regards, Thomas

  • author's profile photo Former Member
    Former Member
    Posted on Apr 06, 2004 at 08:40 PM

    Hello,

    I am trying to go the same thing but still no luck. At the moment I am looking into the table attribute of the CL_HTMLB_TABLEVIEW class. I see this filled with the structure of my itab when the tableview is being created but on the postback when I try to retrieve what has changed this is blank.

    I am now experimenting with recreating my itab with the changed value similar to Thomas Koch post but trying to use field symbols so I can dynamically do this for other itabs.

    I wonder of other solutions to this topic or a recommended way.

    Matt

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.