Skip to Content
author's profile photo
Former Member

File download using sap .net connector

Hi,

Requirement: download a file from ABAP on clicking a linkbutton in ASPX page.

I have a RFC which when executed reads data from database table and creates a PDF file and saves in the Local E: drive.This works perfect when run seperately.

I have a link in my aspx page which when clicked calls this RFC.This should actually download the created PDF file into E: drive...But this does not work.

Any suggestions?

Thanks & Regards

J.Jayapriya

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • author's profile photo
    Former Member
    Posted on May 03, 2011 at 09:17 AM

    Hi,

    Check if your RFC is getting called on clicking the button in .ASPX page. Ensure the connectivity between the Web Server and ABAP System.

    You could take help of Basis team to check the RFC trace. Also, in the RFC, you could write some dummy code to populate an entry in a custom table (as a test to ensure the successful RFC call).

    Regards,

    Shyam

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on May 03, 2011 at 10:19 AM

    Hi,

    The RFC is getting called correctly....The only problem is that the file is not getting downloaed to my local PC...

    When i run the RFC function in SE37 , the file gets downloaded to my E drive....

    but when i run it in my aspx page via SAP .NET connector the RFC is getin executed....but the file not getting downloaded to my local PC...

    Any ideas?

    Add comment
    10|10000 characters needed characters exceeded

    • What the other poster said is correct BUT why don't you return the PDF data as an XSTRING in the RFC call? Then you can handle it as you see fit in your application (open it, download it, etc.) rather than making SAP do the work?

  • author's profile photo
    Former Member
    Posted on May 03, 2011 at 11:51 AM

    Hi Jay,

    You should write the file onto the applicaiton server using OPEN DATASET commands. RFC call would be executed on the server and would not have access to your local E: drive.

    Hope this helps.

    Regards,

    Shyam.

    Add comment
    10|10000 characters needed characters exceeded