Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Save binary file on backend corrupted ( NUL char )

Former Member
0 Kudos

Hi all

I am having some problem while saving data from GOS.I retrieve Gos file info with BDS_GOS_CONNECTIONS_GET. Then I have succesfully saved data in frontend (SO_OBJECT_READ + SO_OBJECT_DOWNLOAD) but having problem cannot understand in background (saving on backend).

For backend, I used SO_DOCUMENT_READ_API1 and then tried to save file with " OPEN DATASET loc_path FOR OUTPUT IN BINARY MODE. ... TRANSFER line TO loc_path".

I tried as working area Char, string, Xstring, Field-symbols... without luck ..

The file generated on server is corrupted, but is almost identical to the original. Here follows a shot of text-editor of same piece of file.

This is the correct file:

/Type /FontDescriptor

/Ascent 718

/CapHeight 718

/Descent -207

/Flags 35

/FontBBox [-166 -225 1000 931]

/FontName /Helvetica

/ItalicAngle 0

/StemV 105

>>

endobj

9 0 obj

/WinAnsiEncoding

endobj

10 0 obj

<<

/Type /Font

/Subtype /Type1

/BaseFont /Helvetica

This is the corrputed one:

/Type /FontDescNULriptor

/Ascent 718

/CapHeight 718

/Descent -207

/Flags 35

/FontBBox [-166 -225 1000 931]

/FontName /Helvetica

/ItalicAngle 0

/StemV 105

>>

endobj

9 0 obj

/WinAnsiEncoding

endobj

10 0 obj

<<

/Type /Font

/Subtype /Type1

/BaseFont /HelveticNULa

The ediroe (notepad++) show NUL characters.. that corrupt the file. Any idea of how to remove them?

Any hint is welcome

Regards

Gabriele

1 ACCEPTED SOLUTION

DavidLY
Advisor
Advisor
0 Kudos

Hello,

This is a same issue with thread: http://scn.sap.com/thread/3323333 .

Please check the recommendation in it.

Regards,

David

2 REPLIES 2

DavidLY
Advisor
Advisor
0 Kudos

Hello,

This is a same issue with thread: http://scn.sap.com/thread/3323333 .

Please check the recommendation in it.

Regards,

David

Former Member
0 Kudos

Yes .. sorry for mistake. It was the first time I logged after moderator approvement and when I tried posting the first time, I get a "unauthorized" message I didn't understand. (in the link above there is the answer)