Skip to Content
avatar image
Former Member

File name creation requirement

.

Hi I have a requirement to get one sender field value in file name.

Sender                                 Receiver

A                                X

B                                -

But there is no field in receiver side to map ‘B’ but getting a value in source field.

I hope I cannot use variable mapping and Dynamic configuration for it.

Regards

Raju

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Jul 01, 2016 at 09:28 AM

    Hi Raju,

    If you use File Content conversion in the receiver file adapter then check my blog to save the value in the additional structure of receiver and ignore it in FCC.

    Multi Mapping with Dynamic FileName and Dynamic Folder using Variable Substitution

    Regards,

    Praveen.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 01, 2016 at 10:00 AM

    Yes indeed, you may use DynamicConfiguration.

    If multi mapping is in play, Praveen and his blog are definitely a extremely interesting approach and one that would work!

    Any reason for the question though as this seems to be a pretty normal requirement?

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 01, 2016 at 12:37 PM

    Hi Raju,

                   You can use dynamic configuration in UDF even if there is no target field where you can map a sender field value. In the UDF put the field value from sender as input and map output of UDF to root node of target message.

    pls check this blog SAPTechnical.COM - Dynamic File name using ASMA (Adapter Specific Message Attributes) in XI / PI

    Regards

    Anupam

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 03, 2016 at 02:17 PM

    Hello Raju,

    Why do you need a corresponding field in your receiver structure to send the source field data in the file name?

    You can directly map it to the Message type name, that is the root node as suggested by Anupam.

    Regards,

    Nitin

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 03, 2016 at 08:24 PM

    Hello

    You ca use a UDF with a parameter for your filed B.

    Then you need not to map B

    sometihing like this:

    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");

    string filename="";

    filename="nameFieldB";

    conf.put(key,filename);

    Add comment
    10|10000 characters needed characters exceeded