on 04-05-2017 1:27 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
Hi Shiva!
Refer to these links for deployment procedure using NWDS:
https://blogs.sap.com/2014/01/28/nwds-step-by-step-in-the-loving-memory-of-sdm/
https://help.sap.com/saphelp_nw73/helpdata/en/48/fce8f162944e88e10000000a421937/content.htm
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Regards
Pavan Kumar D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.