Skip to Content
avatar image
Former Member

Saving File to a Applicatoin Server(AL11)

Hi Experts,

I tried the below code for uploading a file into the Application server(AL11) by using the statement OPEN DATASET.

* Saving it in SAP App Directory

CONSTANTS path_name TYPE LOCALFILE VALUE 'usr/sap/tmp/'.

CONCATENATE path_name

ls_n_upload-FILE_NAME

INTO l_fname.

OPEN DATASET l_fname FOR OUTPUT IN BINARY MODE MESSAGE lv_msg.

TRANSFER ls_n_upload-FILE_CONTENTS to l_fname.

CLOSE DATASET l_fname.


But am getting the error as


The application has to stop due to an error

Error message:File "usr/sap/tmp/E:\Pillar Program Criteria.pdf" is not open.Please contact system administrator for help.

I tried to analyze the error in so many ways. But couldn't. So my doubt is, whether this OPEN DATASET statement supports Web Dynpro ABAP, as it is trying to call the GUI.

Please clear this experts and let me know whether can i make the application to work perfectly.

BR,

RAM.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Sep 04, 2014 at 09:21 AM

    I think the error is in your filename i.e. "usr/sap/tmp/E:\Pillar Program Criteria.pdf" I doubt very much that "usr/sap/tmp/E:\Pillar Program Criteria.pdf" should be there.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Glen Anthony

      Hello Glen,

      Have already checked this wiki and some other stuffs. But nothing helps me still yet😔

      Also FM GUI_DOWNLOAD, as said in the WIKI will not support Web Dynpro ABAP. That is why I could not keep my step further.

      BR,

      RAM.