Skip to Content
author's profile photo Former Member
Former Member

Transfer to Unix file

It gives me trash in the output file.

Table Zzz has data types, and decimals..and it gives me trash in that types.

Output file:

SNSNNEDE00 {{{{{{

Example:

DATA itab LIKE Zzz OCCURS 0 WITH HEADER LINE.

...

OPEN DATASET fich_out FOR OUTPUT IN TEXT MODE.

ENDIF.

LOOP AT itab.

TRANSFER itab TO fich_out.

ENDLOOP.

CLOSE DATASET fich_out.

How can i resolve this.

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Feb 02, 2005 at 06:56 PM

    Hi,

    If you are opening the file in text mode, your itab fields have to be character type fields. So define another itab with fields of character type with lengths defined as per your output requirements.

    You have understand that if you have floating, decimal fields, currency or quantity fields in your itab, they are know to SAP only, once you try to download such records, converting them into character form needs to happen.

    Did you try the binary mode with your 'open dataset' statement?

    Srinivas

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.