Skip to Content
0
Jun 08, 2018 at 02:01 PM

SAP PO 7.5: get RFC Destination in Java mapping?

238 Views Last edit Jun 08, 2018 at 02:03 PM 2 rev

Dear experts,

I have a scenario RFC --> PO --> FTP. Due to the RFC sender I have to route the messages appropriately. I have a java mapping in place to do so. I have to migrate this mapping from PO 7.31 to PO 7.50. I have the following parts in my map to get the RFC sender:

public class SetFileNameAccordingToRFCSender extends AbstractTransformation {
.....

private static final DynamicConfigurationKey KEY_RFC = DynamicConfigurationKey.create("http://sap.com/xi/XI/System",
            "RfcDestination");

@Override
public void transform(TransformationInput transformationInput, TransformationOutput transformationOutput)
            throws StreamTransformationException {

InputStream inputStream = transformationInput.getInputPayload().getInputStream();
//we need a map for the DynamicConfiguration
        Map mapParameters = (Map) transformationInput.getInputHeader().getAll();

// access dynamic configuration
DynamicConfiguration conf = (DynamicConfiguration) mapParameters
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

// read value
String fntemp = conf.get(KEY_RFC);
  if (fntemp == null) {
       throw new StreamTransformationException(
             "RFC sender is missing.");
    }

....
}
}

Every time I test the operation mapping I get the exception I am throwing: RFC sender is missing. Same when I do an end to end test.

But when I check the "Dynamic Configuration" in the message monitor I can see there is a value:

My Java map used to work in PO 7.31. Why does it now work anymore?

Please help. Thank you.

Best regards, Peter

Attachments

dynamic-conf.png (34.1 kB)