cancel
Showing results for 
Search instead for 
Did you mean: 

How to send back Sender System name

Former Member
0 Kudos

Hi Guru,

I have the follow scenario_

SAP R/3 -


SAP PI

SAP PI----SAP R/3.

I will send message from sap r/3 to sap pi with rfc.

sap pi will send back a number of message, was send and the name of send system.

Those information schould be save in sap table.

Please could you help me.

I will appreciate, thanks .

regards

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You can use this simple UDF to get the name of the sender system.

java.util.Map map;

map=container.getTransformationParameters();

String sender=(String)map.get(StreamTransformationConstants.SENDER_SERVICE);

return sender;

Map the output of this UDF to any node where you want the value of the sender system.

Cheers

Biswajit

Former Member
0 Kudos

Hi Guru,

thanks for your input.

Regards.

Former Member
0 Kudos

Hi,

there is also the built-in function "sender" in category "constants" which returns the name of the sender system, at least with PI 7.1. No need for an UDF here.

Regards,

Matthias

Former Member
0 Kudos

there is also the built-in function "sender" in category "constants" which returns the name of the sender system, at least with PI 7.1. No need for an UDF here.

This is just the simplest solution. The function even exist from PI 7.0.

Regards

Liang

Former Member
0 Kudos

Hi Guru,

thank you for your input. but how i kann give back the number of message

in the abap table. the scenario looking like follow.

sap r/3-----IP(Integration Process) In the Integration process i need to count all message and return the Integer

back in sap r/3.

I would appreciate it

thanks

Regards.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You need to use java mapping . Inside use StreamTransformationConstants interface to fetch it.

Folllow this link

http://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/api/StreamTransformationConstants.h...

SENDER_SYSTEM is deprecated so use SENDER_SERVICE.

implement class similar to this (code snippet)

public class retrieveInterfaceDetails implements AbstractTransformation{

private senderName="";

private Map myMap;

public void setParameter(Map param) {

myMap = param;

}

public void transform(TransformationInput arg0, TransformationOutput arg1) throws StreamTransformationException {

// Tweak your logic and pass it to output payload

senderName =(String) myMap.get(StreamTransformationConstants.SENDER_SERVICE);

}

}