on 06-18-2008 7:43 AM
Hi Experts,
i have the requirement
I need to extract some records from Database (Scenario is Database to file) and we need to put it into file.
then i need to change the file name based on certain conditions and send it to relevent file server which are globally located across the world.
My Doubts are :-
1- After extracting the records from Database From where i can get file name?? Can i get the file name from SXMB_MONI. If yes then How??
2- Now I got the file name then i need to change this file name into different file names (Dynamically) based on some conditions to send it to different file servers. Can i do it in my mapping Or i need to write a module for it.??
Thanks in Advance
Regards Prajwal
Hi,
/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
Give the File name at Runtime.
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
What ever the file name given in the sender you will get that name in the target side.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naluvala,
Based upon your condition you can directly set the file name using this UDF:
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(
u201Chttp://sap.com/xi/XI/System/Fileu201D,
u201CFileNameu201D);
String valueOld = conf.get(key);
if (valueOld != null) {
String valueNew = valueOld.replaceAll(u201Cinputu201D,u201Doutputu201D);
conf.put(key, valueNew);
Instead of using get function to populate the valueOld, you can use your own logic.
Regards,
Sanjeev.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can write file it in mapping
Refer
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
modify UDF as per your requirement
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.