cancel
Showing results for 
Search instead for 
Did you mean: 

issue in content conversion

Former Member
0 Kudos

Hi,

Am trying to convert Big-Endian content format (file to file scenario with content conversion in both adapters) with sender file adapter to utf-8 format file which is going to upload into SAP.

but am getting an issue while converting Big-Endian content...if you see input file...its converting in wrong format as the content is generating with blanks and so...fixedfiledlengths are showing wrong data.

anybody please help me what is going wrong...

-Kishore

Accepted Solutions (0)

Answers (3)

Answers (3)

nabendu_sen
Active Contributor
0 Kudos

Hi Kishore,

Have you checked the below blog and the reply of Deepak:

http://scn.sap.com/thread/1644363

In your sender file channel Specify the File Type Text.

Once  you have selected Text, specify a code page under File Encoding. The default setting is to use the system code page that is specific to the configuration of the installed operating system. The file content is converted to the UTF-8 code page before it is sent.

Following are the values you can use. I think in ur case use UTF-16.

○       US-ASCII

Seven-bit ASCII, also known as ISO646-US, or Basic Latin block of the Unicode character set

○       ISO-8859-1

ISO character set for Western European languages (Latin Alphabet No. 1), also known as ISO-LATIN-1

○       UTF-8

UTF-8 (BC-ABA)

○       UTF-16BE

16-bit Unicode character format, big-endian byte order

○       UTF-16LE

16-bit Unicode character format, little-endian byte order

○       UTF-16

UTF-16 (BC-ABA), byte order

Regards,

Nabendu.

zameerf
Contributor
0 Kudos

Hi,

>>file to file scenario with content conversion in both adapters

is there any mapping or other run time requirements for this interface?

if not, just go for only ID objects and do a pass through file transfer.

Regards,

Zameer

Former Member
0 Kudos

Zameer,

there is no mapping involved...i can even pass through with file protocol but while placing in SAP, file content is again showing junk characters and hence am trying through content conversion...

zameerf
Contributor
0 Kudos

Hi,

once you place the file in target directory, how is the file processed by SAP? where you able to see the same file as in source once you place in target directory? or you see junk characters there?

Former Member
0 Kudos

Zameer, once i place file in SAP, am not able to process the file and i see junk characters...but if i exctract the same file through filezilla to my local directory, i can see the data...not sure how can handle this...

zameerf
Contributor
0 Kudos

normally in pass through scenario, the file content will not be altered.

can you share a sample output file which has the junk chars?

Former Member
0 Kudos
Former Member
0 Kudos

can anybody help me on this...

zameerf
Contributor
0 Kudos

Do you see this junk char only in al11 transaction?

when you open the file directly from file system how is the content?

Former Member
0 Kudos

I see this junk char in al11 tcode...if i download the same from system...file is OK and no issues...

zameerf
Contributor
0 Kudos

in receiver file adapter, do you have file type as Binary in processing parameters?

can you try changing this to Text?

may be you can try setting the encoding as UTF-8 as well and see if that helps

this looks like unicode issue

Former Member
0 Kudos

Thats right...this is unicode issue...

I have tried to change setting to UTF-8 but then am getting parser issue during conversion in receiver adapter level...

please suggest...

zameerf
Contributor
0 Kudos

did you try with only file type as text? without any encoding..

also please confirm if your are using any FCC here, i assume you are using pass through scenario?

Former Member
0 Kudos

here 2 things...i can simply pass through file but since am getting encoding issue am trying to sort out through FCC in which also am getting similar error.

let me try only file type as text without encoding...will update you. thanks...

Former Member
0 Kudos

Hi,

I am not sure but can you please try with encoding as UTF-16BE in sender File adapter?

http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm

■       UTF-16BE

16-bit Unicode character format, big-endian byte order

Thanks,

Beena

Former Member
0 Kudos

I have tried this...but am getting error as "Transform: failed to execute the transformation: com.sap.aii.af.sdk.xi.adapter.trans.TransformException: Error converting Message: java.lang.Exception: Exception in XML Parser (format problem?):org.xml.sax.SAXParseException: Content is not allowed in prolog.'; nested exception caused by: java.lang.Exception: Exception in XML Parser (format problem?):org.xml.sax.SAXParseException: Content is not allowed in prolog"

Former Member
0 Kudos

This message was moderated.

Ryan-Crosby
Active Contributor
0 Kudos

Hi Kishore,

Have you tried setting the sender encoding as text and using the TextCodepageConversionBean to convert to utf-8 without the use of FCC parameters?

Regards,

Ryan Crosby

Former Member
0 Kudos

Hello Ryan,

I have not tried that but in sender adapter, i have changed the file format to UTF-8 in sender adapter configuration parameters. let me try the way you have suggested and also please confirm if any change required in receiver file adapter properties...

Thanks

Kishore

Ryan-Crosby
Active Contributor
0 Kudos

Hi Kishore,

I have never had this requirement so I cannot be sure but I believe you only need to set your encoding as type text with 'UTF-16BE' as your codepage and then add the adapter module to specify that you want to convert it to utf-8.  Then remove all of your FCC parameters and have it drop the file where you wish for the receiver.

Regards,

Ryan Crosby

Muniyappan
Active Contributor
0 Kudos

Hi,

are you converting csv to xml?

from the xml it looks like it is converting the header?

that is why no values are not coming in the xml.

check this

http://scn.sap.com/thread/1946048

Regards,

Muniyappan.

Former Member
0 Kudos

I got you what you mean to say...but somehow am not able to see the values are in proper format due to content issue...for ex: first field am having lengh of 10 chars but if you see it is stopping with 4 if you see in XML file but when you see the source...blanks are coming in between and so it is taking only 4 chars...how to handle this...

Muniyappan
Active Contributor
0 Kudos

Hi,

Can you paste you input csv file(open it in notepad) and FCC settings here?

Regards,

Muniyappan.

Former Member
0 Kudos

Hi,

here i dont see any issue in FCC...if you see my first screenshot where "date" is the only char coming in for 10 chars and if you see the source file there are blanks which are occupying that length...which means file reading content is problem...i know source file update is useful but for the time being i could not update the same due to network issues...