cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro ALV Component - Adding row in between the rows; positioning the cursor to cell of newly added row

Former Member
0 Kudos

Hi All,

Thanks for reading the post. We have requirement of ALV usage in web Dynpro with following requirements:

a) Let us say there are 5 rows; if user selects second row and clicks Add Row; new row has to be added at second row and other rows have to be pushed down.

b) When new row is added; cursor should be positioned at the first cell of newly added row

Requirement a: we are planning to achieve as following:

> On click of Add Row button, identify row index which is selected.

> Insert element to context node at specified index

> This will reflect in UI

Please help us to understand if above approach works or there is better approach

Requirement b: we dont have idea how to go about.

Regards,

Ganga

  

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

For requirement A you are following a correct way. Add the new row and bind the table to context.

Requirement B: There are methods that you can use to set the focus in ALV.

Check this thread: http://scn.sap.com/thread/3258741

-Manish

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

Ya u r right  ,,,,,

  • Inside the button action find out the index (via lead selection)
  • And insert the empty record to the table
  • And rebind the UI element(call bind method )

This will work correctly but i don't know that Hoe to place cursor in the field

If u come to know kindly post it........

Former Member
0 Kudos

i think your approach is correct