on 2018 Aug 23 3:27 PM
Hello guys,
First of all, thanks to all of you for so many nice answers for any question in our community. Really I've read a lot of posts relevant for ASMA parameters.
My problem is following.
in UDF I'm filling 2 parameters - FileName and Directory, and it is correct, because in trace I can see both of them, and the FileName is changed correctly. There is a lot of post on that UDF, so this is probably correct.
And for my example let make FileName_New.csv is result of the UDF.
BUT ...
in communication channel I have this Target directory:
\\servername\folder1\folder2\folder3
and I have got this:
\\servername\folder1\folder2\folder3\Filename_New.csv
Now what I need to do is that bellow folder3 will be folder4 but the name will be different for different plants - it means bellow folder3 will be structure something like
...FOLDER3\PLANT1
\PLANT2
\PLANT3
For my example my target path with file will be like that
ie. \\servername\folder1\folder2\folder3\PLANT1\Filename_New.csv
Now my question: what is the correct value for Directory in UDF
just PLANT1, or with \ ( \PLANT1 or \PLANT1\) or whole path with server name
I have tried all of them but still no success. What I have in my mind -> is Directory parameter allowed for URL path?
Thanks you guys for any help or info
Petr
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi Evgeniy,
I have found workaround - in UDF I put folder name before filename - PLANT1\Filename.csv
It works now, only manual work is that folder MUST exist in the path - user has to create it for each plant.
Just for future reference - you don't need to create DIRECTORY parameter, just FileName with folder name in the front.
Thanks a lot for your help
Petr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Petr!
Just to be sure, did you set using ASMA Directory parameter in channel settings?
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 Petr!
You should provide complete path (without file name) to the target directory for your "Directory" ASMA parameter.
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 Evgeniy,
in my real case I use BR as final folder name (PLANT1 from my example)
here is my UDF - but still the same result, Filename is changed, but Directory is still PROD
Any other idea?
thanks a lot for your fast replay
Petr
String DName = new String("");
String FName = new String("");
String NameSpace = "http:/"+"/sap.com/xi/XI/System/File";
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey keyDir = DynamicConfigurationKey.create( NameSpace, "Directory");
DynamicConfigurationKey keyFile = DynamicConfigurationKey.create( NameSpace, "FileName");
DName = "\\\\servername\\folder1\\PDB\\export\\PROD\\" + varDirectory;
// PRDATA_MASTER_Timestamp.csv
FName = varFileName + "." + varFileExt;
conf1.put(keyDir,DName);
conf1.put(keyFile,FName);
return varFileName;
User | Count |
---|---|
53 | |
6 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.