Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8451

Re: Using OPEN DATASET...WINDOWS LINEFEED can't open file on server

$
0
0

Hi,

 

I just did a similar thing with your code with just minor changes and it worked. Check the block below:

 

 

*test
   lv_flp = '/migration/unit/ztest_encoding.txt'.

OPEN DATASET lv_flp FOR OUTPUT IN TEXT MODE
ENCODING DEFAULT WITH WINDOWS LINEFEED.

   IF sy-subrc EQ 0.

*    CLEAR lwa_line.
     LOOP AT gt_tnro INTO wa_tnro.
       CONCATENATE
       wa_tnro-object
       wa_tnro-dtelsobj
       wa_tnro-nrtab
       wa_tnro-nrintfld
       wa_tnro-nrextfld
       wa_tnro-nrfld
       wa_tnro-nrsobjfld
       wa_tnro-nrelefld
       wa_tnro-yearind
       INTO lv_line SEPARATED BY ','.
       TRANSFER lv_line TO lv_flp. "String
     ENDLOOP.

   ENDIF.

* Close file
   CLOSE DATASET lv_flp.
*test

 

I used String for lv_flp and a different table for a table data(that does not matter ). It worked fine. Text file attached. Open in Notepad++ and see CRLF at the end.

 

Cheers,

Arindam


Viewing all articles
Browse latest Browse all 8451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>