Skip to Content
avatar image
Former Member

Input table in webdynpro application

hi

I have roads tadble in my webdynpro application.

In order to insert values to the table the user has button called 'ADD ROAD' and a new line is "open" for input.

The new row is always entered under the previous, is there that when the user select row 3 (when i have 5 row with data that the user already enterd ) and press 'add road' the new row will entered between the existing rows 3 and 4 ( i want it to behave like microsoft EXCEL when u can add new rows for an existing table) ?

thanks

Elad

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 24, 2012 at 08:56 AM

    steps to do:

    1. get lead selection of node by using if_wd_context_node method get_lead_seelection_index.

    2. get table using if_wd_context_node method get_static_attribute_table.

    3 you can put all rows of table greater than lead_selation into another ( temporary ) internal table then append a new row in main internal table.

    4. put all data from temporary internal table into main table and bind main table with node using method bind_table.

    if helpful reward point

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 24, 2012 at 01:08 PM

    Hi,

    Similar question is posted in the folowing link

    http://scn.sap.com/thread/3284372

    Regards,

    Sayan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 24, 2012 at 06:45 AM

    You can use the current lead select, and accordingly append a new row.

    Hope it helps!

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 24, 2012 at 09:42 AM

    Hi,

    Get the index, and use insert operation in Internal Table, E.g. If u get index 3, then do 3 + 1 and insert it. or else 3 - 1(Based on the requirement), and then insert it. And, then bind the new values of the table.

    Regard's,

    Shivesh Ranjan.

    Add comment
    10|10000 characters needed characters exceeded