cancel
Showing results for 
Search instead for 
Did you mean: 

Global Container issue..

Former Member
0 Kudos

Hi

I am using JAVA Lookup API for RFC Receiver. and I want to get all the parameternames and parameterValues and assign it to two String arrays.

1. For parNames

2. For parValues

Can anyone please help me on this to write a UDF ?

Thanks

Dhanish Joseph

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

if you are using HashMap to assaign parameterName and the parameter Value then create


// Create a hash map 
HashMap hm = new HashMap(); 
// Put elements to the map 
hm.put(parameterName, parameterValue); 

make sure put method signature is proper


public Object put(Object key,
                  Object value)

you have to pass object type parameters to the put method for example


hm.put("John Doe", new Double(3434.34)); 

Answers (6)

Answers (6)

Former Member
0 Kudos

refer this thread raised the same issue

and provided some helpful solutions

Former Member
0 Kudos

Hi Rajesh

I dont have to set parameters, Instead get ALL Parameter Names and Parameter Values!!!

and assign all the parameter Names to a string Array and similarly Parameter values...

Dhanish

Former Member
0 Kudos

You can add to global container as name value pair after gertting the values from the RFC

container.getGlobalContainer().setParameter(Name,"Value");

later you can retrieve the same instead of using arrays....

if need arrays also you can use for loop on resultSet and store each value in arrays

Rajesh

Former Member
0 Kudos

I am reusing one of the existing lookups.. It is working fine..

But after all these(Means after lookup), I have to assign all parameterNames and parameterValues to string arrays.

I tried it using HashMap, but getting Nullpointerexception.

Can anyone help me on this..

Dhanish Joseph

prasannakrishna_mynam
Contributor
0 Kudos

Hope you have gone through this

[How to use RFC|http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417200)ID1361600950DB00518938541914253793End?rid=/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439&overridelayout=true]

Regards,

Pasanna

Former Member
0 Kudos

Hi,

Refer

https://wiki.sdn.sap.com/wiki/display/Snippets/User-definedMappingFunctionforRFC+Lookup

Thanks

Swarup