cancel
Showing results for 
Search instead for 
Did you mean: 

Do I have to use "current" or "node" ?

diegohs
Active Participant
0 Kudos

Hi everyone,

I can't comprehend at all how it works the prefixes in webdynpro.

I mean, sometimes we refer to: wdContext.nodeBapi... and sometimes to: wdContext.currentBapi...

What's exactly the difference between that ?

Thanks for your help ! and regards from Monterrey,Mexico.

Diego

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

wdContext.node<Something> refer to node, <b>collection of elements</b>, on lead selection path, wdContext.current<Something>Element refer to <b>single element</b> on lead selection path.

To understand lead selection path imagine path in tree hierarchy of WD context traversing back from any given element / node to selected element of its immediate parent node, then to selected element of grand parent etc till (always) selected element of root node (wdContext.currentContextElement).

VS

diegohs
Active Participant
0 Kudos

Hi Valery,

It seems that you're the one in the webdynpro forum.. je.je

I asked this because I'm having problems trying to execute a FM. I can't set the input parameters! =(

Almost all bapis have single input parameters.. but this FM has a Structure as Input Parameter. I have tried almost everything.

FM example: Hriq_FM

FM import parameters(structure): Hriq_FM->Is_Student

Is_Student parameters: field1, field2, field3.

wdContext.currentIs_Student.setfield1("x");

wdContext.nodeIs_Student.currentIs_StudentElement.setfield1("x");

wdContext.nodeHriq_FM.nodeIs_Student.currentIs_StudentElement.setfield1("x");

But anything works.. =( Do you have any idea what should I check ?

Thaaaaanks a lot for your help, I have spend the last 2 days trying to do this.. =(

Regards,

Diego

sid-desh
Advisor
Advisor
0 Kudos

Hi Diego,

Before you can set values in the fields of the structure you will have to create an element for that node because that node has a cardinality of 0:1 (from model binding).

Hence for the node corresponding to the structure create an element using the method wdContext.create<Structure Name>Element() method and then add using the set<Structure Name method>. This method has to be called on the node<Structure Name>() object.

Then you can set the values in the fields.

Hope this helps.

regards

Sidharth

diegohs
Active Participant
0 Kudos

eeeh.. Thanks a lot 😃 Now its working fine. 😃

I'll try to assign some points to both of you,

Regards,

Diego

diegohs
Active Participant
0 Kudos

eeeh.. Thanks a lot 😃 Now its working fine. 😃

I'll try to assign some points to both of you,

Regards,

Diego

Answers (0)