cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching Sender Business sevice in UDF, returns null

Former Member
0 Kudos

Hi,

I have written a UDF to extract sender service. Here is the code snippet

map = container.getTransformationParameters();
String senderService = (String) map.get("SenderService"); // Sender Business Service
//  some logic depending on sender service

As I could see the trace, senderService contains value null and hence UDF fails.

My scenario is Multiple IDocs to File

N:1 and thus using BPM

Any clue?

Thank you

Mugdha Kulkarni

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Why not use the Standard function Sender in Message mapping

http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm

Thanks

Aamir

Former Member
0 Kudos

Hi Aamir,

I tried that also, returns null

Former Member
0 Kudos

Hi

Imports: java.util.Map;

public String GetService(Container container){
  //write your code here
 String headerField;
java.util.Map map;
map = container.getTransformationParameters();
headerField = (String) map.get(StreamTransformationConstants.SENDER_SERVICE);
return headerField;
}

Srini

former_member200962
Active Contributor
0 Kudos

The UDF is not proper....you should have:

java.util.Map map = container.getTransformationParameters();
String senderService = (String) map.get(StreamTransformationConstants.SENDER_SERVICE); 

Regards,

Abhishek.

Former Member
0 Kudos

Thanks Abhishek,

Both the statements serve same purpose.

I had tried writing it the alternate way also.

Any other input?

former_member200962
Active Contributor
0 Kudos

I am successfully using this UDF in my project.....the only thing that i doubt is that you are using the UDF in the Transformation step of your BPM.....the UDF has to be outside the BPM.....in the Interface Determination.....

Regards,

Abhishek.

Edited by: abhishek salvi on Jul 2, 2009 4:24 PM

Former Member
0 Kudos

To bring it to the top