Quantcast
Viewing all articles
Browse latest Browse all 8990

Save an excel file in a local host from RFC executed from SAP Portal

Hi experts,

 

I'm creating a NWDS application that executes a RFC. The RFC creates an excel Document and saves it atomatically in a path (like C:\documents) at the local host .If i execute the RFC from SE37 transaction, the file saves succesfully, but through the portal, the file is not saved in the path or anywhere.

Here is the code that saves the file:

 

* g_c_nomarch is the path where the file should had been saved.

 

CALL FUNCTION 'FLUSH'
    EXCEPTIONS
      cntl_system_error = 1
      cntl_error              = 2
      OTHERS              = 3.


  GET PROPERTY OF excel 'ActiveSheet' = hoja.
  FREE OBJECT hoja.
  FREE OBJECT libro.


  GET PROPERTY OF excel 'ActiveWorkbook' = libro.
  CALL METHOD OF libro 'SAVEAS'
    EXPORTING
    #1 = g_c_nomarch
    #2 = 1.

  CALL METHOD OF libro 'CLOSE'.
  CALL METHOD OF excel 'QUIT'.


  FREE OBJECT hoja.
  FREE OBJECT libro.
  FREE OBJECT excel.

 

So, can someone help me with any suggestion in order to solve this issue?

 

Thanks!!! Image may be NSFW.
Clik here to view.


Viewing all articles
Browse latest Browse all 8990

Trending Articles



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