on 04-09-2014 10:30 PM
Hello All,
I am reading data from SQL tables and getting in the form of XML. I need to create a xml file with the same data and store the file in network folder.The name of the file should be with timestamp.xml.
Please suggest.
Regards.
Anshul
Hi Anshul,
You can use action 'XML Saver' to save the file at the desired location. To provide timestamp you can use function 'datenow' while creating the file name.
Hope this helps!
Regards,
Saumya Govil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try it with removing the spaces between pieces of expression. For example, instead of & datenow &, it should be &datenow&. It also does not know how to interpret the special character ":". Use the dateformat function to set the string format properly instead of the raw xml result from datenow.
Message was edited by: Michael Appleby
Hi Anshul,
Try with below Condition, hope it will solve your problem.
While configuring 'Path' parameter in Link config of XML Saver action block, pass below condition
Local.FilePath & datefromxmlformat( datenow, "yyMMddhhmmss" ) & ".XML"
And here I have used transaction Local parameter to pass the file path. If not you can directly pass as below
"\\\\drive\\folder\\" & datefromxmlformat( datenow, "yyMMddhhmmss" ) & ".XML"
Regards,
Praveen Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you're able to save a file outside the Netweaver webspace, you're security settings are NOT configured right .. I'd enable the local machine FTP server in windows and use the FTP action block to save files wherever that FTP root (or directories under) is being set to.
What about someone trying to overwrite system files with MII?
Regards,
Paul Radulescu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anshul,
I hope you can make use of Write File action with the Mode CREATE
Regards,
Padma Rao
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
Thanks.
I am using XML SAVER action to create and save the file . It's working fine if in configure object file path is as "\\drive\folder\TEST.XML". In this case it's generating the file with name TEST.XML.
I configure link of same XML SAVER action and specified same "\\drive\folder\TEST.XML" for Path property. In this case it's giving me the error.
"Invalid link expression in action[XML_Saver_0]:\\drive\folder\TEST.XML"
I tried first with test file (Fixed name ) but it's not working. Once it will work i can use expression editor for date and time function.
I also need the expression to add date and time in place of TEST.
Regards.
Anshul
Hi Anshul,
dateformat(datenow, “MM-dd-yyyyThh:mm:ss”,“yyyyMMddhhmmss”)&".xml" will return a datetimestamp value for a file name which you can then substitute for TEST.xml. So your result right now (10:41:44 AM) would be 20140410104144.xml.
Regards, Mike
SAP Customer Experience Group - CEG
Message was edited by: Michael Appleby updated fromFormat of datenow for "T" between date and time.
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.