cancel
Showing results for 
Search instead for 
Did you mean: 

The lead selection defaults to the first line when the ALV-node is updated.

0 Kudos

I have an ALV-grid with material data. Below the ALV-grid I have a detail area with the information of the line selected in the ALV-grid. This detail area can be updated. If the detail area is updated, changes are written back to the ALV-grid.

Problem is now that the lead_selection always goes back to the first line when something is changed to the context node of the ALV-grid. When I change nothing and press enter, everything is o.k.. It looks like updating the context node of the ALV overwrites the lead selection. Even when I do a SET_LEAD_SELECTION_INDEX in the method WDDOMODIFYVIEW.

Please help.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>If the detail area is updated, changes are written back to the ALV-grid.

How are you making these changes? Are you doing a BIND_TABLE on the source context node? If so, the invalidation of the context would always cause the leadSelection to be lost. You could read the data keys for the current selected item before re-setting the data and then set the leadSelection back manually via Context APIs after the BIND_TABLE.

Answers (2)

Answers (2)

0 Kudos

I finally got a reply from SAP. It was a known problem which could be fixed with OSS message 1137854. After implementing the lead-selection acts normally again.

Former Member
0 Kudos

check if you have set 'initialize lead selection' property in your node bound to ALV, if yes then just uncheck it.

Regards

Manas Dua

0 Kudos

I tried a lot of things. Also the initialize lead selection on the context node. If I uncheck the initialize lead selection, there are no rows selected after update. Even if I do a SET_LEAD_SELECTION_INDEX.

I also tried to update the conplete context with BIND_TABLE and update one individual line with 'SET_STATIC_ATTRIBUTES'. This also has not the expected result.

Former Member
0 Kudos

Dear Thomas.....

I have a doubt here ..

Lead selection defaults to first record of ALV/table.... and if this node is having singleton property it always goes to first record i guess.

mean to say that i GUESS this issue is beacuse of Singleton ad Leadselection combination ...

Thomas can u pl validate my thought???

Regards,

Kranthi/

Edited by: kranthi9121 on Apr 15, 2010 10:16 AM

Former Member
0 Kudos

Dear Thomous.....

I have a doubt here ..

Lead selection defaults to first record of ALV/table.... and if this node is having singleton property it always goes to first record i guess.

mean to say that i GUESS this issue is beacuse of Singleton ad Leadselection combination ...

Thomous can u pl validate my thought???

Regards,

Kranthi/

0 Kudos

We have a CRM and R/3 environment. We are on a higher release level in R/3. I created the same program in both environments. It appears that it works in R/3. What I did was correct, but SAP was behaving wrong. I hope that I get a message soon. I will update this message with the reply from SAP.