cancel
Showing results for 
Search instead for 
Did you mean: 

Re: How to handle table elements?

Former Member
0 Kudos
118

I'm trying to do something similar, but want to bind the enable-property to a value return in a rfc-call to an abap rfm. But as far as I know there's no boolean-type in ABAP, is it possible to bind the enabled-property to something return from ABAP?

Regards, Mattias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use a calculated context attribute of type "boolean" that computes its value from whatever.

Armin

Former Member
0 Kudos

Hello,

The problem is since it's a model node bound to a structure, I can't add any context attribute (SP11). And if I add it to it's own value node I don't know which element I should look at in the model node when calculating the return value.

What I want to do is set a input field to enabled if if certain conditions are met in the result returned from a rfm. The easiest would be if we could simply return a boolean from the RFM, but that does not seem to be the caes (I don't know enough ABAP). Instead I somehow need to calculate the result on the java-side, maybe with the help of a calculated attribute?

If I use

wdContext.nodeZ_RFC.nodeOutput().nodeResult().currentResultElement()

it won't pick the right element, but instead it (of course) uses the current element, i.e. it changes all input-elements when I select a row in the table.

Is there any way to know which row the "table renderer" is currently rendering?

Former Member
0 Kudos

In this case, try the solution given in the following weblog:

<a href="

/people/sap.user72/blog/2005/03/15/supply-functions-in-webdynpro

">/people/sap.user72/blog/2005/03/15/supply-functions-in-webdynpro</a>

Armin

Former Member
0 Kudos

If your view contains a table which has an inputfield , and if this is what is to be enabled or disabled,parse thru the table node, and depending on the condition, you can set the enabled property to true or false.

for(int index=0;index<wdContext.<node>.size();index++)

{

if(wdContext.<>node().get<node>ElementAt(index).getattribute() = <condition>)

{

set the attribute of the same table element, responsible for enable/disable proprety to true/false resp.

}

}

Former Member
0 Kudos

Thank you for pointing me to that blog, I've been looking for ways to extend model nodes. It works like a charm.

Former Member
0 Kudos

Well, reward points should really go to the author of the weblog. In Germany, we call this an "Abstaubertor"

Armin

Answers (1)

Answers (1)

Former Member
0 Kudos

create a number field at the backend.If the enabled property is set to true, send 1, else 0.