cancel
Showing results for 
Search instead for 
Did you mean: 

Using dictionary in Webdynpro for Java

Former Member
0 Kudos

Hello, I'm very newbie in Webdynpro in Java and I have an issue,

I need that a function returns me 2 fields in 2 variables, but this is not possible in Java, for that reason I have thought to create a structure in the dictionary with 2 fields in order to return one only parameter.

My problem is that I don't know to declare a strucutre in the implementantion, something like :

structure TypeData Name{}

or

struc{}

or something like that.

Do anyone know how to declare structure from the Dictionary in my implementantion's method or any good idea to solve this?

Thanks in advance

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks to all the replies.

I think I'm going to use Abhilash Gampa's method.

Kind Regards!!

Former Member
0 Kudos

Thanks to all the replies.

I think I'm going to use Abhilash Gampa's method.

Kind Regards!!

Former Member
0 Kudos

Hi Jorge,

Can you explain more about your requirement?

Regards,

Leena

Former Member
0 Kudos

It's a method in the controller component. I want to pass an OrganisationID and return 2 fields: ContactID ContactName.

In my actual code only one field is possible,

return ContactID;

return ContactID,ContacName; is not possible for that reason I thougt to use an structure with 2 fields

former_member182294
Active Contributor
0 Kudos

Hi Jorge,

What you want to do with the two attributes? If these attributes attached to any UI fields then create two context attributes and assign the values to these attributes in the function. Otherwise, if you want to simply use the values then

- You can concatinate two values into one string with some special character

( ContactID"#"ContacName) and return the string

- You can return a String array with size 2.

- Add two values to a ArrayList and return the ArrayList.

Regards

Abhilash

Former Member
0 Kudos

What kind of function is this, a controller method? What should it return?

Armin

Former Member
0 Kudos

HI Armin,

can u tell me that

how to write a code for adding two variable or i want to just make a simple GUI calculator in WDjava. I dont know the java coding. but have a good knowledge of C++. Can u tell me the code or basics how we write..????