cancel
Showing results for 
Search instead for 
Did you mean: 

See content of a Model

Former Member
0 Kudos

Hello everybody,

I wonder if someone could help me.

I have a Web Dynpro Application running fine but i need to see the content of a node of my model, to be sure of the content of all fields:

I have a model:

- Z_Rfc_Pda_Set_Item_Pl_Input

-


> I_Item

-


>Artkx

-


>Auart

-


>Aufnr

....

I have like 50 fields in my node. I would like to see the content of each field, to check that the good value is send to the Back-end.

Is there a way to do it with a loop?

Because for the moment i use

mgr.reportSucces(wdContext.currentZ_Rfc_Pda_Set_Item_Pl_InputElement().modelObject().getI_Item().getArktx());

for each field but this is so horrible to use :-s

So if anyone could help me

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ..

1)Use a Debug point either in backend of front end

use have one more option

2)create a temp context and a table..pass all the values in to that table at runtime..as this is for temporary purpose and for checking the data only.

anyways i will suggest the first option debug point

Regards

Chaitanya.A

Former Member
0 Kudos

Hi,

First thanks for your fast answer

For the debug in the back-end i'm not able to do it work.

For the debug in the front-end i'm putting a breakpoint in my java code, but how do you then see the content of a entire structure or node.

I'm able to see it for one field at a time.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

if you want to write this out into the defaulttrace in your logfile

you can use this code:


Iterator iter = [node].getNodeInfo().iterateAttributes();
			while(iter.hasNext()){	
				IWDAttributeInfo attributeInfo = (IWDAttributeInfo) iter.next();
				if(node.getCurrentElement().getAttributeAsText(attributeInfo.getName()) != null &&
				    !node.getCurrentElement().getAttributeAsText(attributeInfo.getName()).equalsIgnoreCase("")){
						System.out.println(attributeInfo.getName() + " = " + node.getCurrentElement().getAttributeAsText(attributeInfo.getName()));    	
				    }											
			}

But you have to enable System.out in the visual admin under log configurator first. Otherwise it will

not be written to the dafault trace

Regards,

Dennis

Former Member
0 Kudos

Hi

Thanks for this usefull answer.

Just 2 questions (sorry if it seems stupid)

[node] = i replace it with my node wdContext.currentZnodeZ_Rfc_Pda_Get_Next_Item_Pl_Input()?

and i don't see what i have to put in the place of node.getCurrentElement.

do i have to write

node = wdContext.nodeZ_Rfc_Pda_Get_Next_Item_Pl_Input()??

it seems to work like that, so it seems to be correct?

Another question i use it to show other childnodes containing like 50 fields but il only show some of these fields, not all the fields, why?

Thanks

Message was edited by:

Bvd-It Services

Former Member
0 Kudos

Bvd,

<i><u>Question:</u> [node] = i replace it with my node wdContext.currentZnodeZ_Rfc_Pda_Get_Next_Item_Pl_Input()?

and i don't see what i have to put in the place of node.getCurrentElement.</i>

<u>Answer:</u> Yes. <i>node</i> should be replaced by the node for which you need the log the values.

<i><u>Question:</u> Another question i use it to show other childnodes containing like 50 fields but il only show some of these fields, not all the fields, why?</i>

<u>Answer:</u> The values for those fields might be null or _blank.

Bala