Skip to Content
avatar image
Former Member

CarriageReturn and lineFeed in the File

Hello,

This is my scenario. I am using the standard program RSEINB00 to convert a idoc flat file to xml and then passing it through the Interface. When the flat file is converted to XML, the End of line of the file is going as a special character into the XML. There is no File sender adapter in this case..The Program in XI picks up the file and converts to XML..and that xml is mapped to the target structure..In that target structure, this special character is causing the problem.

I cannot remove this special character in the mesage mapping between idoc xml to target structure bcz there are lots of fields and this problem occurs for similar interfaces.

I am thinkin of a universal solution for this..I have an idea in mind..but want to know if anyone has come across this problem and could find a solution in XI. Please let me know..Thank you..Any help is greatly appreciated..

THankyou

Thanujja..

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 30, 2008 at 05:13 PM

    Dear Thanuja,

    As you are getting flat IDOC and you are not using any adapter to pick this flat IDOC. Is there any specific reason behind that?

    I agree the program RSEINB00 is doing adapter job. so that we can skip content conversion.

    normally the files generated on the unix system has LF (Line feed) as end of the line in hexa decimal we can see this as OA.

    the files generated on the windows system has CRLF (Carriage return Line feed) in heaxa decimal (ODOA).

    So your flat IDoc contains CRLF after end of the every segment.

    if the program is converting flat idoc into xml successfully and added with special characater after end of the every segment.

    It means last xml tag of the segment contains this special character. As you are mapping this to the tatget field. so your target field contains this extra special character.

    so we write a small function as follows and use this for every last field of the segment which is used in the target field mapping.

    suppose if special character is *

    int index = a.indexOf("*");

    if (index !=-1){

    return a.replaceAll("*", "");

    }

    return a;

    Give me a shout if i didn't understand your problem correctly..

    Cheers,

    /Hidayat.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 30, 2008 at 05:34 PM

    Hi Hidayat,

    Thanks for your response. As I didnt know what is the character coming in. I did a trim before mapping to the target field. Just a trim from standard functions has solved the issue. What do you think of the trim? DO you think there would be problems with this?

    Let me know your thoughts..Thank you..

    THanujja

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      I am facing same kind of problem.When the report hits the line feed(special character) in the file ,its stop processing the file futher.Please let me know the FM to skip the linefeed to process the file.

      Thanks,

      Manju

      Edited by: ManjuRamani on Aug 4, 2009 8:51 AM