cancel
Showing results for 
Search instead for 
Did you mean: 

How to read file path from Proxy and assign it to channel

Former Member
0 Kudos

Hi Experts,

I am working on PO single stack Proxy( SOAP) to File (SFTP) scenario. My requirement is ABAP proxy will push the data to PI with Attachment.

By using UDF i was able to set the file name dynamically.

Now the challenge is ECC will send both the File name and File path with proxy structure. I should able to assign the file path dynamically to channel

"File path" parameter and as well as setting dynamic file name.

I am using ICO scenario. Please help me with the solution ASAP.

Appreciated the quick reply

Thanks,

Gayathri.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186851
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Raghu,

I refered the same blog. But in my scenario PGP module is also there.

Unfortunately Variable substitution and PGP did not worked together. So I have used ASMA parameters and UDF in mapping.

If I check Directory in ASMA parameters will it be sufficient for my requirement, what needs to be add in UDF code and what I have to keep in "File Path " in channel parameters.

Thanks,

Gayathri.

Former Member
0 Kudos

Assign the directory in your UDF as below and check the ASM parameter in configuration.. Left the directory as blank


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

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

String dir = var1 ;

conf.put(key, dir);

former_member186851
Active Contributor
0 Kudos

Gayathri in the same link ASMA is mentioned as well.

same like Filename just add file directory in the UDF and enable the same in channel.

Former Member
0 Kudos

Hi Ram,

Below is my code for dynamic file name. Could you please let me know where to add for dynamic path. And Also le me know the file parameter values ASMA settings.

try

{

String MyFileName= "";

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

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

                                                                               

MyFileName =   conf1.get(key1);

MyFileName =fname;

conf1.put(key1, MyFileName);

       return MyFileName;

}

catch(Exception e) {

     String exception = e.toString();

      return exception;

}

Thanks,

Gayathri.