I have a file received via the FTP Adapter which a pipeline decrypts. It is a pipe delimited flat file with a Header Record and numerous Detail
Records – each record is terminated with a CR/LF. Using the File Adapter it is dropped into a UNIX directory, where an SAP process picks it up and processes it.
The SAP process fails because the CR/LF in the header record (and only the header record) generates an undefined character to SAP when dropped in the UNIX directory. The only way to get around this error is to pad "manually" the header record with 200+ spaces (using notepad, Excel, etc.). The Detail Records each have 255 fields, which I guess explains why these don't have the problem.
The Flat File Wizard was used with both UTF-8 and again with ASCII to get XSD files to use in the mapper.
The proposed 'kluge' is to pad the header record (or its final field) with 255 trailing blank spaces, but this is tougher than I thought. using the 'string concatenate' functoid with the constant filled with blank spaces does not work (the resulting xml strips any leading or trailing blanks). So how
do you get some trailing blank spaces in a field using the mapper? Or is there another way to do this?
Does anyone have any suggestions that may be more direct? Like how to strip the Carriage Return and Line Feed characters from that record? My gut tells me this is not a solution as the basic structure of the file is then messed up.
If you are an SAP guru, do you know why this is happening and if it is an issue that should be handled on the SAP side?