cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Value Selector source

MauricioMiao
Contributor
0 Kudos

Hi,

I want to use a SVS for a country field. I do no want to fix the values in a JAVA Dictionary Simple Type, instead I will read the values using a BAPI call.

Is there a way to change the possible keys of a SVS during runtime as we can do in EVS?

Regards,

Mauricio

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mião,

Yes. Therez a way to do that. You can do it using the simplevalueservices in webDynpro.

A pointer code wil look something like this.

ISimpleTypeModifiable buildType = 
wdThis.wdGetAPI().getContext().getModifiableTypeOf(<your attribute>);
			
IModifiableSimpleValueSet simpleValueSet = 
buildType.getSVServices().getModifiableSimpleValueSet();

/*** Iterate thru the Bapi output node which returns you the value*/

for(int i = 0 ; i < wdContext.nodeGetUserList(); i++) {     

/*** Set the value to the simple value selector **/
			
simpleValueSet.put(
wdContext.nodeGetUserList().getUsername(),
wdContext.nodeGetUserList().getUsername()
                  );
}

Bala

Please reward appropriate points

Answers (0)