Skip to Content
0
Former Member
Dec 08, 2006 at 12:31 PM

Open Dataset - Invalid Argument

464 Views

Hi all,

I'm having the following issue.

I'm trying to copy a file from one network directory to another network directory.

Using gui_upload/gui_download i have no problem when the file does not contain a large amount of data but if the file contains a large amount of data, i'm using the "open dataset" sentence and there is where i'm having the problem.

I'm getting an

"Invalid Argument"

message when i try to create a file in the network directory.

Here is my code:

.............

OPEN DATASET p_filed IN TEXT MODE ENCODING UTF-8 FOR OUTPUT MESSAGE msg.
    IF sy-subrc <> 0.  "<- here Sy-subrc value is 8.
      CONCATENATE 'Error: ' msg INTO msg.
      MESSAGE e208(00) WITH msg. "<- here msg = 'Error: Invalid Argument'
    ENDIF.
    DO.
      READ DATASET p_fileo INTO line.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      TRANSFER line TO p_filed.
    ENDDO.
    CLOSE DATASET p_fileo.
    CLOSE DATASET p_filed.

.............

at the moment of the open dataset for output, p_filed = +

FsurbDataurbshareProyectoorionTermobarrancas-ConstrucciónValuaciones de Obra5300000030.xls+

Using another directory the "open dataset" works perfect.

What could be happening ? What can i do to solve this issue ?

I don't think is an authorization problem, because gui_download/gui_upload works fine ( with a file with a small amount of data )

Thanks a lot,

I really appreciate your help !