cancel
Showing results for 
Search instead for 
Did you mean: 

UDF - issue - weird

Former Member
0 Kudos

All,

I am trying to code an UDF.

IMPORTS:

java.lang.;javax.xml.transform.stream.StreamResult;com.sap.aii.mapping.lookup.;javax.xml.transform.dom.DOMSource;javax.xml.parsers.*;

*CODE:

//write your code here

String strAttribute = "";

Map map = container.getTransformationParameters();

strAttribute = (String)map.get ( StreamTransformationConstants.MESSAGE_ID);

return strAttribute;*

Error:

Check Result for Object MM_OPTIERROR_PI Source code has syntax error: D:/usr/sap/PID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapc22815d06bc111dda4d8005056986469/source/com/sap/xi/tf/_MM_OPTIERROR_PI_.java:3: cannot resolve symbol symbol : class lang location: package util

import com.sap.aii.mappingtool.tf3.;import com.sap.aii.mappingtool.tf3.rt.;import java.util.;import java.io.; import java.lang.reflect.;import java.util.lang;import java.lang.;import com.sap.aii.mapping.lookup.;import javax.xml.transform.stream.StreamResult;import javax.xml.transform.dom.DOMSource;import javax.xml.parsers.; ^ 1 error

I see that there are imports in the error message that are NOT in the imports section of the code

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

no need to write anything in import section.. just write this code

String messageID= null;

java.util.Map map;

map = container.getTransformationParameters();

messageID = (String) map.get(StreamTransformationConstants.MESSAGE_ID);

return messageID;

Former Member
0 Kudos

All,

I have tried every thing that you have asked me to even before posting the message.

So I had to delete the mapping and create it. It is working fine for me.

reg

rosh
Participant
0 Kudos

Hi Naveen,

I don't think any of your imports are needed for the code posted, you could just delete the UDF-imports and then save & try again.

Also - in my small colourful world - the import syntax should be

com.sap.aii.mapping.lookup.*

instead of

com.sap.aii.mapping.lookup.

and an import of

java.lang.*

should never be needed. Please correct me if I'm wrong here.

Former Member
0 Kudos

HI,

Just addition to above,, add java.lang in import section of UDF...

Thanks

Swarup

Former Member
0 Kudos

Hey

Could you please add java.util.* in the imports section and try the scenario again.

Thanx

Aamir

Edited by: Aamir Suhail on Aug 16, 2008 9:24 PM