on 08-24-2006 1:26 PM
Hi All,
Functional specs of a file to file scenario require to create an aditional log file containing the file name, creation date and a list with the lines were a problem occurred with an error description and then send it to R3 via FTP.
Does anyone know if it's possible or not? and if it's possible, how could I do that?
Thanks in advance.
Cheers.
Daniel,
This is possible.
1. To get the Source File name and and appned the date to it, you can use Adapter Specific Identtifers -- File Name in the Sender and receiver file adapter and in the message mapping, set the file name using this code,
2. Rest of error handling can error record creation for the error file can be handled via the mapping itself.
String newfilename="";
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
// Get Sourcefilename
String oldfilename=conf.get(key);
//get the date
java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMdd" );
dateformat.format( new java.util.Date() );
//append source+date+L
String nwfilename=oldfilename+dateformat;
conf.put(key, newfilename);
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes it is possible, you can use the code given by Bhavesh for getting the file details. To do this you need to use BPM and here are the steps
1. Receive
2. Transformation (Split valid and Error records)
3. Send the valid records to the target
4. Send the error detail like record number, error description thru FTP (Get the file details as Bhavesh said)
Thanks,
Prakash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.