cancel
Showing results for 
Search instead for 
Did you mean: 

Change LF ( Unix) to CR/LF ( Windows)

Former Member
0 Kudos

Hello all

I tried using the adapter moudle localejbs/SAP XI Sample/ConvertCRLFfromToLF

to change the EOF charchter in my Reciever file adapter

My configuration as follows :

Module Name: localejbs/SAP XI Sample/ConvertCRLFfromToLF

Type: Local Enterprise Bean

Module Key: convert

In the module configuration, add:

Module Key: convert

Parameter Name: mode

Parameter Value: LFtoCRLF

XI adapter module ignores the conversion

did any1 succeded duing it ? or have another idea how to transform LF (Unix format) to CR/LF(Windows Format).

thx,Shai

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member190681
Active Participant
0 Kudos

i am facing same challenge to convert CRLF to LF, i am unable to convert in SFTP Receiver channel i have maintained paramaters as same but file is not converted.

Could you suggest how to do this?

Thanks & Regards,

Kiran Polani

anilwesley94
Member
0 Kudos

Hi Kiran,

Please let me know Is your issue has resolved, I am also facing same issue.

Thanks,

Anil K

Former Member
0 Kudos

Hi Kiran,


Please let me know Is your issue has resolved, I am also facing same issue.

Thanks,

Anil K

sunilkumar7984
Discoverer
0 Kudos

You can simply use Transfer mode as Text instead of binary and File Type as Text with File Unicode as UTF-8 in receiver channel which will convert LF to CRLF without any module.

0 Kudos

Hi Sunil,

fast solution and it works perfect with ftp target on windows environment.

Thank you

Thomas

Former Member
0 Kudos

Hi Shai,

We have done a scenario like this.

All your configurations are correct except for the Module Name,it should be

--->SAP XI Sample/ConvertCRLFfromToLF but not

--->localejbs/SAP XI Sample/ConvertCRLFfromToLF

Please remove the localejbs and test it this would work.

Please let me know if u need any furthur information.

Thanks,

Bhargav

Note:Award points if found useful

Former Member
0 Kudos

I tried both

it still doesnt work

any other idea?

Former Member
0 Kudos

Hi,

Refer to the link for the screenshot of the modules we used in our communication channel:

http://www.flickr.com/photos/24531098@N08/

for information on the module refer to the following module

http://help.sap.com/saphelp_nw04/helpdata/en/32/43d84072378031e10000000a1550b0/content.htm

Please check if it is in the same order.

Thanks,

Bhargav.

Note:Award points if found useful.

Edited by: Bhargav Srinadh Gundabolu on Mar 9, 2008 2:18 PM

Former Member
0 Kudos

Yes I put it first in the module tab

its really weird

because when I use the

CRLFtoLF

parameter value instead of :LFtoCRLF

it does work but

it removes all the LF and all the lines are concatrated to each other

I want to transform the LF to CRLF

did u succed duing it?

I forgot to ask you

do you use content conversion?

my content conversion is

TAR.fieldSeparator 'nl'

GOOD_EDI.fieldSeparator 'nl'

my xml file look like

<?xml version="1.0" encoding="windows-1252"?>

<Tar>

<GOOD_ZIM>HGRPIETPILOAD0712301513Z1.0JRU231W

LCLHU21536120712292359LOADEXPF020103GRPIE+GRSKG+ZIMULAX125084+ZMZM++DV20^^^^^^^^^^^^^^

LCLHU80749480712292359LOADEXPF151317GRPIE+GRSKG+ZIMUQIN963269+ZMZM++HC40^^^^^^^^^^^^^^

LFSCU68414780712292359LOADEXPFD145118GRPIE+GRSKG+ZIMUHKG1021417+ZMZM++HC40^^^^^^^^^^^^^^

LFSCU73776120712292359LOADEXPFD323998GRPIE+GRSKG+ZIMUXIA9022003+ZMZM++DV20^^^^^^^^^^^^^^

LTEXU54898300712292359LOADEXPFD100950GRPIE+GRSKG+ZIMUHKG1021418+ZMZM++HC40^^^^^^^^^^^^^^

LZCSU26563850712292359LOADEXPF166613GRPIE+GRSKG+ZIMUPUS7903824+ZMZM++DV40^^^^^^^^^^^^^^

LZCSU58791240712292359LOADEXPFZZZS420394 SIF0GRPIE+GRSKG+ZIMUPGU2162+ZMZM++RH40^^^^^^^^^^^^^^

LZCSU59769680712292359LOADEXPF145858GRPIE+GRSKG+ZIMUQIN834061+ZMZM++RH40^^^^^^^^^^^^^^

LZCSU81444260712292359LOADEXPFD145108GRPIE+GRSKG+ZIMUHKG1021418+ZMZM++HC40^^^^^^^^^^^^^^

LZCSU81525660712292359LOADEXPFD177875GRPIE+GRSKG+ZIMUHKG1021417+ZMZM++HC40^^^^^^^^^^^^^^

LZCSU82166970712292359LOADEXPF176056GRPIE+GRSKG+ZIMUSEL7903827+ZMZM++HC40^^^^^^^^^^^^^^

LZCSU84788710712292359LOADEXPFD145106GRPIE+GRSKG+ZIMUHKG1021418+ZMZM++HC40^^^^^^^^^^^^^^

LZCSU86382500712292359LOADEXPFD145103GRPIE+GRSKG+ZIMUHKG1021418+ZMZM++HC40^^^^^^^^^^^^^^

LZCSU86924820712292359LOADEXPF010589GRPIE+GRSKG+ZIMUXIA9021951+ZMZM++HC40^^^^^^^^^^^^^^

LZCSU88268320712292359LOADEXPF151307GRPIE+GRSKG+ZIMUQIN963269+ZMZM++HC40^^^^^^^^^^^^^^

LZIMU10553050712292359LOADEXPFD355827GRPIE+GRSKG+ZIMUNGB722575+ZMZM++DV20^^^^^^^^^^^^^^

LZIMU22597670712292359LOADEXPF0117203GRPIE+GRSKG+GOSUSYD31942+ZMZM++DV20^^^^^^^^^^^^^^

LZIMU22696780712292359LOADEXPF383298GRPIE+GRSKG+ZIMUFUZ807865+ZMZM++DV20^^^^^^^^^^^^^^

LZIMU25671210712292359LOADEXPF068362GRPIE+GRSKG+ZIMUFUZ807857+ZMZM++DV20^^^^^^^^^^^^^^

LZIMU25929680712292359LOADEXPF121435GRPIE+GRSKG+ZIMUSNH5651376+ZMZM++DV20^^^^^^^^^^^^^^

</GOOD_ZIM>

</Tar>

Edited by: Shai Rosenzweig on Mar 9, 2008 3:39 PM

Former Member
0 Kudos

Hi Shai,

we did succed in transforming from LF to CRLF.I dont know why its creating a problem.just check the input file format.

Thanks,

Bhargav.

Note:Award points if found useful

Former Member
0 Kudos

Can it be realted to encoding?

stefan_grube
Active Contributor
0 Kudos

Do the content conversion with the StrictXml2PlainBean

http://help.sap.com/saphelp_nw04/helpdata/en/44/748d595dab6fb5e10000000a155369/frameset.htm

Put this module before the sample module in the module chain.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan

How would you configure the following xml file,

that the module will transform to a txt file which contains all the data in the between the GOOD_ZIM tags

and a CR/LF between each of the records

( the header record start with H , the other with L)

<?xml version="1.0" encoding="windows-1252"?>

<Tar>

<GOOD_ZIM>HGRPIETPILOAD0712301513Z1.0JRU231W

LCLHU21536120712292359LOADEXPF020103GRPIE+GRSKG+ZIMULAX125084+ZMZM++DV20^^^^^^^^^^^^^^

LCLHU80749480712292359LOADEXPF151317GRPIE+GRSKG+ZIMUQIN963269+ZMZM++HC40^^^^^^^^^^^^^^

LFSCU68414780712292359LOADEXPFD145118GRPIE+GRSKG+ZIMUHKG1021417+ZMZM++HC40^^^^^^^^^^^^^^

LFSCU73776120712292359LOADEXPFD323998GRPIE+GRSKG+ZIMUXIA9022003+ZMZM++DV20^^^^^^^^^^^^^^

LTEXU54898300712292359LOADEXPFD100950GRPIE+GRSKG+ZIMUHKG1021418+ZMZM++HC40^^^^^^^^^^^^^^

LZCSU26563850712292359LOADEXPF166613GRPIE+GRSKG+ZIMUPUS7903824+ZMZM++DV40^^^^^^^^^^^^^^

LZCSU58791240712292359LOADEXPFZZZS420394 SIF0GRPIE+GRSKG+ZIMUPGU2162+ZMZM++RH40^^^^^^^^^^^^^^

LZCSU59769680712292359LOADEXPF145858GRPIE+GRSKG+ZIMUQIN834061+ZMZM++RH40^^^^^^^^^^^^^^

LZCSU81444260712292359LOADEXPFD145108GRPIE+GRSKG+ZIMUHKG1021418+ZMZM++HC40^^^^^^^^^^^^^^

LZCSU81525660712292359LOADEXPFD177875GRPIE+GRSKG+ZIMUHKG1021417+ZMZM++HC40^^^^^^^^^^^^^^

LZCSU82166970712292359LOADEXPF176056GRPIE+GRSKG+ZIMUSEL7903827+ZMZM++HC40^^^^^^^^^^^^^^

LZCSU84788710712292359LOADEXPFD145106GRPIE+GRSKG+ZIMUHKG1021418+ZMZM++HC40^^^^^^^^^^^^^^

LZCSU86382500712292359LOADEXPFD145103GRPIE+GRSKG+ZIMUHKG1021418+ZMZM++HC40^^^^^^^^^^^^^^

LZCSU86924820712292359LOADEXPF010589GRPIE+GRSKG+ZIMUXIA9021951+ZMZM++HC40^^^^^^^^^^^^^^

LZCSU88268320712292359LOADEXPF151307GRPIE+GRSKG+ZIMUQIN963269+ZMZM++HC40^^^^^^^^^^^^^^

LZIMU10553050712292359LOADEXPFD355827GRPIE+GRSKG+ZIMUNGB722575+ZMZM++DV20^^^^^^^^^^^^^^

LZIMU22597670712292359LOADEXPF0117203GRPIE+GRSKG+GOSUSYD31942+ZMZM++DV20^^^^^^^^^^^^^^

LZIMU22696780712292359LOADEXPF383298GRPIE+GRSKG+ZIMUFUZ807865+ZMZM++DV20^^^^^^^^^^^^^^

LZIMU25671210712292359LOADEXPF068362GRPIE+GRSKG+ZIMUFUZ807857+ZMZM++DV20^^^^^^^^^^^^^^

LZIMU25929680712292359LOADEXPF121435GRPIE+GRSKG+ZIMUSNH5651376+ZMZM++DV20^^^^^^^^^^^^^^

</GOOD_ZIM>

</Tar>

thx , Shai

stefan_grube
Active Contributor
0 Kudos

Hello Shai,

I am sorry, I did not find a solution so far and now I am busy with other stuff.

Maybe you repost the question, anyone else could find a solution.

Regards

Stefan

ranjit_deshmukh
Active Participant
0 Kudos

Hi Shai,

I hope you can produce the target message like this:

<?xml version="1.0" encoding="windows-1252"?>

<Tar>

<GOOD_ZIM>HGRPIETPILOAD0712301513Z1.0JRU231W</GOOD_ZIM>

<GOOD_ZIM>LCLHU21536120712292359LOADEXPF020103GRPIE+++..</GOOD_ZIM>

.

.

.

.

</Tar>

Then in that case if you are using FCC at the receiver end

please use following:

Tar.endSeparator='0x0D''0x0A'

PS. 0x0D-Hex representation for CR (0-zero)

0x0A- Hex representation for LF

Ranjit

ranjit_deshmukh
Active Participant
0 Kudos

Hi,

is your problem solved?

if so can you please close this thread?

Ranjit