Skip to Content
0
Former Member
Oct 24, 2011 at 07:36 AM

Pass data from JSP to RFCEventListener

30 Views

Hi

I wish to pass the login userid value from LoginBaseAction to RFCEventListener.

EventListener is intercepting the call to the FM :ISA_SHIPTOS_OF_SOLDTO_GET

Please let me know the approach and the code I need to write.

Thanks and Regards,

Sumit

public class ReadShipTosRFCEventListener implements JCoConnectionEventListener{

/* (non-Javadoc)

  • @see com.sap.isa.core.eai.sp.jco.JCoConnectionEventListener#connectionEvent(com.sap.isa.core.eai.sp.jco.JCoConnectionEvent)

*/

private static final String ReadShipTosRFCEventListener ="ISA_SHIPTOS_OF_SOLDTO_GET";

public void connectionEvent(JCoConnectionEvent event)

{

JCO.Function function = event.getJCoFunction();

String functionName = function.getName();

if (functionName.equals(ReadShipTosRFCEventListener) && event.getId() == JCoConnectionEvent.BEFORE_JCO_FUNCTION_CALL) {

JCO.Function func = event.getJCoFunction();

JCO.ParameterList input = func.getImportParameterList();

input.setValue("sumit","SOLD_TO");

}

}

}