cancel
Showing results for 
Search instead for 
Did you mean: 

WD Java , adaptive RFC beginnes question

former_member193202
Participant
0 Kudos

hi folks,

i am new to WD Java and have a very simple question.

after getting data back from a RFC-Call to R/3 backend i call

wdContext.nodeOutput().invalidate();

to have my result in the context node, but i never see the result in my context node after this call.

the funny thing is i have the result in my internal tables but when i try to get the data with a call like:

if (wdContext.nodeEs_Visibility().currentEs_VisibilityElement().getHead_V() == "01")

- where my node in Output is ES_Visibility and the Element is Head_V -

i don't get a result?

whats my fault behind that?

best regards oliver

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

check this link

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0019b1a-775f-2910-beb8-d81f27d0d...

, you can find sample code for calling rfc and invalidations .

and also check the size of the output node for the RFC it is 0 , then is some problem with your code .

If possible porvide the code you have written for calling RFC .

former_member193202
Participant
0 Kudos

Hi,

i put the field which value i want to check into a text-field on the screen and i can see the value is set correctly by my bapi call, my only problem ist to chekc againt this values which i do with the following coding, here comes the total coding:

as you see below , the statement

if (wdContext.nodeEs_Visibility().currentEs_VisibilityElement().getHead_V() == "01")

does not work but when i bind this element to a text view i can see thet the field has 01 as value????

in wd abap these things are that easier gg.

best regards so far !!!!

public void read( java.lang.String kunnr )

{

//@@begin read()

IPrivateOrview.IVisElement element;

// element = wdContext.currentVisElement();

orview = new Z_Sd_Orview_Wd_0001_Input();

orview_out = new Z_Sd_Orview_Wd_0001_Output();

orview.setIv_Kunnr(kunnr);

wdContext.nodeOrview().bind(orview);

try {

wdContext

.nodeOrview()

.currentOrviewElement()

.modelObject()

.execute();

} catch (Exception ex) {

}

wdContext.nodeOutput().invalidate();

wdContext.nodeEs_Visibility().invalidate();

if (wdContext.nodeEs_Visibility().currentEs_VisibilityElement().getHead_V() == "01")

{

wdContext.currentContextElement().setHead_v(WDVisibility.NONE);

} else {

wdContext.currentContextElement().setHead_v(WDVisibility.VISIBLE);

}

//@@end

}

former_member193202
Participant
0 Kudos

sorry solved, first i should learn better java g

best regards oliver

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Oliver,

After you make a request to the R/3 system, you need to invalidate the response node and not the output node.

Pls chk.

Regards,

Pappala.

former_member193202
Participant
0 Kudos

Hi,

i'm not sure what you mean with response node, in my example

ES_Visibility is part of the Ouptut_Node.

my context of the rfc is like

Context

Output

ES_Head

ES_visibility

etc.

i tried to invalidate nodeEsVisiblity but the same effect?

wdContext.nodeEs_Visibility().invalidate();