cancel
Showing results for 
Search instead for 
Did you mean: 

Passthrough Scenario in SAP PI

former_member308595
Participant
0 Kudos

Hi Experts ,

I am having one requirement , just simple pass through scenario need to pick the files from application server to FTP server .

Here the actual problem is I am getting file name :

SBI<Space>Bank<space> Payment_20170316_RXEZ.sta in this file name I am having white spaces , I want to replace this white spaces with underscore and the file output should be SBI_Bank_Payment_20170316_RXEZ.sta .

Can anybody suggest how we can resolve this issue.

Thanks in advance .

Shiva.

Accepted Solutions (0)

Answers (3)

Answers (3)

iaki_vila
Active Contributor

Hi Shiva,

Why not to use a linux command on the application server before to take the file and rename it?, check this thread http://stackoverflow.com/questions/1806868/linux-replacing-spaces-in-the-file-names

Regards

former_member190293
Active Contributor
0 Kudos

In addition to Inaki's answer: you should perform this action in receiver adapter using option "Execute OS command after message processing" because OS command before message processing in sender adapter is actually executed after the source file is picked up by adapter and before it's sent to messaging system.

Regards, Evgeniy.

former_member308595
Participant
0 Kudos

Hi Inaki Vila ,

Thanks for your inputs but business department wants to do this functionality through PI.

Thanks,

Shiva

iaki_vila
Active Contributor

Hi Shiva,

The funcitionality in my recommendation or the Eugeniy one is in PI, in PI you can execute a OS command, in the PI OS.

Regards.

former_member190293
Active Contributor
0 Kudos
former_member308595
Participant
0 Kudos

Hi Evgeniy ,

Thanks for your response , I will check with my BASIS team , if it will works I will accept your suggestion.

Thanks ,

Shiva

PavanKumar
Active Contributor
0 Kudos

Hi Shiva,

Please refer below blog use change mode give the older value as SBI<Space>Bank<space> and new value as SBI_Bank_

and also make sure deploy the sda file in the server to use the dynamic attribute change bean.

https://blogs.sap.com/2015/02/05/dynamicattributechangebean-the-no-mapping-solution-to-changing-dyna...

Regards

Pavan Kumar D

former_member308595
Participant
0 Kudos

Hi Pavan ,

Thanks for your replay .

Can you tell me how to maintain SDA file in server step by step ..

Thanks

Venkatesh

PavanKumar
Active Contributor
0 Kudos

Ask your basis team to do that

Regards

pavan

former_member308595
Participant
0 Kudos

I already contacted , we have limited BASIS team members , they don't have Idea about it .

Apart from this module configuration , is any approaches are available Pavan ??

Thanks ,

Shiva

0 Kudos

Hi Shiva,

You can try to use one to one mapping with the below UDF to achieve the result. (Assuming your scenario is File to File)

UDF : (Type: Single Values, No Input parameters required, It returns the File Name as output).

Map the UDF output to header field(or any desired field) of target structure in MM.

UDF Code

String File_Name = new String();
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey object = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
File_Name = conf.get(object);
File_Name = File_Name.replaceAll(" +", "_");
conf.put(object,File_Name);

return (File_Name);

Please ensure the ASMA property in checked in the sender and receiver channels.

Regards

Baski

former_member308595
Participant
0 Kudos

Hi Baski ,

Thanks for your inputs , but this is simple file pass through scenario , no UDF preferred.

Thanks

Shiva

former_member190293
Active Contributor

Hi Shiva!

You don't need to deploy any SDA files on your server. You should only deploy module's .ear file on java server and you can do it using NWDS.

Regards, Evgeniy.

former_member308595
Participant
0 Kudos

Hi Evgeniy

Can you tell how to add this modules's .ear file on java server through NWDS , any references links for me ??

Thanks ,

Shiva