cancel
Showing results for 
Search instead for 
Did you mean: 

Fill lazy values in EVS

Former Member
0 Kudos

Hi,

I have a table which has two columns "Country" and "Region",the value helps for this is filled through a query to backend in an EVS.

I create the EVS in advance with all possible values for both Country and Region but when the ValueHelp for Region has been clicked I want to fill the values for Region again(filter out some of the values) based on the Country that is there for that Row of the table.

Is it possible to fill the values lazily for an EVS?Is there an event which I can catch which gives me the nodeElement as well(For finding out which row of the table has been currently hit).

I think we can do this using an OVS ,but with my requirement I cannot use an OVS as I dont want to show any Input field or the "GO" button that comes default with an OVS.

Thnaks and Best Regards

Sourav

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Satyajit,

Thanks for the info,but you see all the fields of my table are input fields and they have EVS value helps attached,I cannot get a lead selection if a value help in (say)cell[1,4] is clicked while the lead is selected on Row number 3.I need an event in the EVS which can return me the nodeElement and hence the row number of the cell in which the hit is made.

Thanks

Sourav

Former Member
0 Kudos

Hi Sourav,

Make the Region attribute as calculated,it will create getter & setter methods for that.Using that u can fill the values using getter method ,since it will load the values as soon as u select the values in country EVS.

regards

Sumit

Former Member
0 Kudos

Hi Sumit,

Yeah that is a solution but not a full-proof one,you see I already have the attributes as calculated,but say cell[1,1](country) is filled I get the value and fill the values for

cell[1,2](region).

But what if the user selects cell[2,2] or cell[3,2],then I have no way to know that the row number has changed.

Tnaks

Sourav

Former Member
0 Kudos

I would assume your two columns are dropdownbyKkey columns.

What you can do is when in the onSelect action of country, you reassign a new set of region into the country dropdown. Can U call this the ajax of SAP.

Regards,

siu wai yung

Former Member
0 Kudos

Hi Siu

No they are not drop down but normal EVS pop-ups,but even if we use drop down the problem remains that the chnaging of values on the region column depends on the action performed in the Country column,I cannot rely on this solution as I am using a table with multiple rows and hence cannot predict the region column of which row has been hit.I would like to have some event which can be captured when the value help of region is clicked ,with trapped event I can then refill the values for the value help based on the Country of that row,if I have the rowElement of the region attribute selected as well.

Thnaks

Sourav

Former Member
0 Kudos

Hi Saurav,

I got ur requirement now.U can try IWDtableSingleMarkableCell in this case:

Web Dynpro TableSingleMarkableCell API. A table cell variant to visualize a single marked cell in a table

This cell type can only be used in combination with the selection mode "NONE" of the table.

The property "markedData" identifies a single data enry in the context. This is expressed by an AttributeInfo. An AttributeInfo consist of the meta data of an context attribute (=AttributeInfo) and a node element. In combination with the property "markingInfo" the cell wich das to be visualized as marked can be determined. The binding of the "markedData" property have to be indentical for all TableSingleMarkableCells of a table.

The property "markingInfo" defines which AttributeInfo has to be taken into account for that TableSingleMarkableCell

I have not tried it yet but hope it should work.

regards

Sumit

Former Member
0 Kudos

Hi ,

I am doing the same thing as u r.

The row where the selection take place can be determined easily by selection node???.currentContextElement.

And I would try to avoid using EVS as popup slow things down.

But of course if you have a big list there is no other option.

Of course , in this case, you have to set you table compatibility mode to auto otherwise the leadSelection will not be changing.

Regards,

siu wai yung

Former Member
0 Kudos

Hi Siu,

I dont get it I think,you use dropDownByKey for your two columns Country and Region,now when the (say)Country[1,1] is selcted its you fill the value for the Country,now say Region[1,2] is selected you provide the values of Region only for Country[1,1],its fine then.

But now say after Country[1,1] is selected/changed,the user Selects Region[2,2] or region[3,2] that is any other row,then did you mean the lead select chnages automatically to point to contextElement 2 or 3 and you can trap the event onLeadSelect for the table.

I tried it in my table with selectionMode-Auto and selectionchangeBehaviour-Auto as well,but the lead selection doesn't change .

I have to use an EVS and hence popup as my data can be large(>30).

Thanks

Sourav

Former Member
0 Kudos

Hi Sourav,

What you see is correct.

If you select a cell on different row , the leadSelection should change. I don't know why yours didn't? I depend on it to inject a different set of selection options.

Regards,

yung siu wai

Former Member
0 Kudos

Hi,

You can find out the current selected row of a table using the "<i>leadSelection</i>" property of the context node bound to the "<i>datasource</i>" property of the table. Let's say the context value node "<i>TableData</i>" is bound to the <i>datasource</i> property, then you can use this code to get the node element that is bound to the row which has been selected:

wdContext.nodeTableData().getCurrentElement();

So in your case, declare an event handler for the <i>onLeadSelect</i> event of the table through the table properties, get the country from the currently selected row using the code above and call the RFC again.

Regards,

Satyajit.