Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Using Dynamic EVS in table inputField

Hello all.

We are having problems displaying different EVS in a column for each row of the table. We followed the following post [Other Post|; but always shows the same.

Almacenes (node, card=0:N, singleton=true)

+--Centro (attribute)

TableNode (node, card=0:N, singleton=true)

+--Name (attribute)

+-- EVSNode (node, card=0:N, non-singleton)

+----- Almacen (attribute)

We fill the node table_nodeA before displayed to the user, and for each element node table_node, modify the attribute "Almacen" evs unique for each element.

//All possible values EVS
IPrivateArticuloP6Comp.IAlmacenesNode almacenes = wdContext.nodeAlmacenes();

IPrivateArticuloP6Comp.IAlmacenesElement almacenElement = almacenes.createAndAddAlmacenesElement();

IPrivateArticuloP6Comp.IAlmacenesElement almacenElement = almacenes.createAndAddAlmacenesElement();

//We create an element of the parent node "TableNode" for each cycle.

for (i=0;i<2;i++){

	IPrivateArticuloP6Comp.ITableNodeElement aux = wdContext.createAndAddTableNodeElement();
	//For each dependent child of the parent element node, we modify it to do evs.
	IPrivateArticuloP6Comp.IEVSNodeElement EVSNodeElement = aux.nodeTableNode().createAndAddEVSNodeElement();
	IWDNodeInfo NodeInfo = aux.nodeEVSNode().getNodeInfo();
	IWDAttributeInfo attrInfo = NodeInfo.getAttribute(IPrivateArticuloP6Comp.ITableNodeElement.ALMACEN);
	ISimpleTypeModifiable subType = attrInfo.getModifiableSimpleType();
	IModifiableSimpleValueSet valueSet = subType.getSVServices().getModifiableSimpleValueSet();		  
	//We read the node with all possible EVS. If the "Name" attribute coincides with the "Centro" attribute we will valueSet.put
	for (int j=0; j<almacenes.size(); j++){
		if (aux.getName().equals(almacenes.getAlmacenesElementAt(j).getCentro())){
	  	valueSet.put(aux.getName(), aux.getName());

In this way we would see:

- Row 0 of the table "TableNode" (Name = 1, EVS = 1) Only

- Row 1 of table "TableNode" (Name = 2, Values EVS = 2) Only

This does not work, always show the same if you select another row.

If so, how can i do it?

I hope somebody can helps me. Its very important please.



Not what you were looking for? View more on this topic or Ask a question