File download via BSP using different SAP versions

Hi Everyone,
I have been using code based on Brian McKellar's excellent Blog (/people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents). The code works great in the following system:
SAP_BASIS     620     0038     SAPKB62038     SAP Basis Component
SAP_ABA     620     0038     SAPKA62038     Cross-Application Component
However i am now trying the same code in our new 7.00 SAP system which is a
SAP_ABA     700     0013     SAPKA70013     Cross-Application Component
SAP_BASIS     700     0013     SAPKB70013     SAP Basis Component
When I try it in our 7.00 system, the download does not work. It tells me that the document is incomplete or corrupted.
Specifically the code that is being used is as follows:
data: cached_response type ref to if_http_response,
       lv_xlen type i,
       lv_guid type guid_32.
create object cached_response
       type cl_http_response exporting add_c_msg = 1.
lv_xlen = xstrlen( lv_xstring ).
cached_response->set_data( data   = lv_xstring
                    length = lv_xlen ).
cached_response->set_header_field(
      name  = if_http_header_fields=>content_type
      value = lv_mtype_string ).
cached_response->set_status( code = 200 reason = 'OK' ).
cached_response->server_cache_expire_rel( expires_rel = 120 ).
call function 'GUID_CREATE'
  importing
    ev_guid_32 = lv_guid.
concatenate runtime->application_url '/' lv_guid '.'
            lv_doc_hdr-obj_type
            into lv_cached_url.
cl_http_server=>server_cache_upload( url      = lv_cached_url
                                     response = cached_response ).
call method runtime->server->response->redirect( url = lv_cached_url ).
navigation->response_complete( ). " signal that response is complete
So now I have a choice: I can log an OSS but I doubt SAP will help as this is 'custom code'. It is in our Z BSP.
Can anyone suggest how I can even begin to debug this issue?
Regards,
Alon

i tried the following code on a WAS 7.00 SP14 and it works as expected.
create object cached_response type cl_http_response exporting
  add_c_msg = 1.
    cached_response->set_data( file_content ).
    cached_response->set_header_field( name  =
  if_http_header_fields=>content_type
                                       value = file_mime_type ).
    cached_response->set_status( code = 200 reason = 'OK' ).
    cached_response->server_cache_expire_rel( expires_rel = 180 ).
    call function 'GUID_CREATE'
      importing
        ev_guid_32 = guid.
    concatenate runtime->application_url '/' guid into display_url.
    cl_http_server=>server_cache_upload( url      = display_url
                                         response = cached_response ).
call method runtime->server->response->redirect( url = display_url ).
navigation->response_complete( ).

Similar Messages

  • Device type file compatability with different SAP versions

    Hi All,
             I need to know whether there is any difference in Device type file (.PRI) for different SAP versions [ SAP 4.6b , 4.6c, 4.7, mySAP ERP 2005.,]
             Is there any change in .pri file required when upgrading/degrading SAP versions?
            Pls let me know abt this. very urgent..

    i tried the following code on a WAS 7.00 SP14 and it works as expected.
    create object cached_response type cl_http_response exporting
      add_c_msg = 1.
        cached_response->set_data( file_content ).
        cached_response->set_header_field( name  =
      if_http_header_fields=>content_type
                                           value = file_mime_type ).
        cached_response->set_status( code = 200 reason = 'OK' ).
        cached_response->server_cache_expire_rel( expires_rel = 180 ).
        call function 'GUID_CREATE'
          importing
            ev_guid_32 = guid.
        concatenate runtime->application_url '/' guid into display_url.
        cl_http_server=>server_cache_upload( url      = display_url
                                             response = cached_response ).
    call method runtime->server->response->redirect( url = display_url ).
    navigation->response_complete( ).

  • Installing oracle on Linux using the SAP version of oracle software

    Hello All,
    I am trying to install 32bit oracle software on Linux 32 bit os using the SAP version of Oracle Install Software downloaded from marketplace. I have downloaded the required exe and rar files and unpacked them on my PC. The unpacked folder is uploaded in bin mode to the respective server under a common mountpoint. In the folder i have 4 .SAR files with other label files etc.  I want to unarchive these .SAR files to get the runInstaller but running in to issues.
    Here are the steps I tried:
    1. I copied the SAPCAR exe from exe directory and tried to unpack the 4 .SAR files but got permission error. All these 4 .SAR files are owned by ora<sid> user id. I tried to do all these under root user still it fails.
    ora<sid>@xxxyysapdbXX:/sapdata//Oracle32/51031674> SAPCAR -xvf OR110232.SAR
    -bash: ./SAPCAR: cannot execute binary file
    what am i missing?
    Any help is greatly appreciated.

    If you have a 32bit OS then you need to use the 32bit binaries of SAPCAR - yes.
    And:
    Usually those SAR files are unpacked by the installation program sapinst, why do you unpack them manually?
    Markus

  • Open dataset statement in different SAP versions

    Hi ,
    I have to write a program which is for extracting data from application server. I have to run this program on different sap versions like, 4.6b, 4.6c, 4.7, 5.0 . I am using 'OPEN DATASET' statement in my program. But the problem is, in versions below 4.6c, this statement is written as "OPEN DATASET filename FOR READING IN TEXT MODE".
    And in versions above 4.7 it is written as "OPEN DATASET filename FOR READING IN TEXT MODE DEFAULT ENCODING".
    So when this statement will be executed in versions below 4.6c, it will give syntax errors.
    Can you let me know how to solve this problem.
    Thanks.

    Hi,
    differ btw. syst-SAPRL
    -> if you get syntax-error create a subroutine-pool
    with abap command generate subroutine...
    A.

  • Is it possible to execute same eCATT  script in different SAP versions

    is it possible to execute same eCATT  script in different SAP versions?
    Regards,
    Sunil sankar B.
    [email protected]

    Yes. In the ecatt script you have the option under ATTRIBUTES --> VERISONING DATA you can restrict it to different software components and different releases.

  • Problems unzipping files downloaded from Firefox using Windows built-in extractor tool

    Hi,
    I am running Firefox v26 on a Windows 7 (64-bit) PC. I work for a library that is able to reproduce digital audio books that we can download from the Library of Congress's National Library Service (NLS) for the Blind and Physically Handicapped. I use Firefox to download a lot of zipped audio books for my job. The file formats found in one book's zipped folder often include the following file types: .3gp (they're like a more compressed MP3 audio file), .mp3, .ncx, .opf, .pncx, .ppf, .smil, .md5, .dtd, .ent, and .ao.
    If I use Windows' built-in extraction tool to unzip an audio book I have downloaded via Firefox the extraction process ends prematurely and acts as if it was successful, but in reality some files are were never extracted. For example, I downloaded a zipped audio book that contained 21 files and weighed in at 87.6MB. The built-in Windows extraction tool only unzipped 2 files weighing in at 30.3MB.
    I have downloaded this same zipped audio book using Google's Chrome v31 and IE 11. Both downloads unzipped successfully using Windows' extractor. To make things even more bizarre, I *was* able to successfully unzip my audio book that I downloaded using Firefox using a 3rd party extraction tool called Extract Now. Because I tend to use this 3rd party program to extract my audio files I don't know at which version of Firefox this problem started. All I know if that this hasn't always been the case.
    Please help.
    Thanks,
    -Dan M.

    Boot the computer in Windows Safe Mode with network support (press F8 on the boot screen) as a test to see if that helps with extracting files.

  • Use different JRE versions in Oracle Discoverer 10g(10.1.2.0)

    Hello.
    We have a Oracle Forms application which also uses Discoverer Plus and Reports.
    Problem is we have some user clients who uses XP/IE 6.0 while otheres has Vista IE 8.0.
    Based on here
    http://www.oracle.com/technetwork/middleware/ias/downloads/as-certification-r2-101202-095871.html#BABGCBHA
    depending on OS/browser different plugin versions are required. If we
    Can we have different JRE versions in separate clients? Kinda confused with the matrix.

    Hi;
    Please check below which could be helpful for your issue:
    Overview of Using Java with Oracle E-Business Suite Release 12 [ID 418664.1]
    Deploying Sun JRE (Native Plug-in) for Windows Clients in Oracle E-Business Suite Release 12 [ID 393931.1]
    Oracle Jinitiator and Sun JRE/JPI Support for Oracle Forms Applications [ID 555720.1]
    Regard
    Helios

  • Use different java versions to start weblogic and run application.

    Hi All,
    I'm currently using weblogic707 which need java 1.4.1 to start up. However, i have this application that run only on java version 1.3.1. Is there any possibility to configure the weblogic to run my application on different java version?
    Thanks.
    wls

    Hi HMLunger,
    Did you install the SQL Server instance successfully? If not, please help to post the summary and detail logs for analysis. By default, the logs can be found in: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log.
    However, if you fail to start SQL Server Express service after successfully installing SQL Server,
    you might have to change the paths of the files by running the following scripts from the command prompt. For more details, please review this similar
    thread.
    NET START MSSQL$SQLEXPRESS /f /T3608
    SQLCMD -S .\SQLEXPRESS
    ALTER DATABASE model MODIFY FILE (NAME = logical_name , FILENAME = 'new_path\os_file_name');
    ALTER DATABASE model MODIFY FILE (NAME = logical_name , FILENAME = 'new_path\os_file_name');
    go
    exit;
    ALTER DATABASE msdb MODIFY FILE (NAME = logical_name , FILENAME = 'new_path\os_file_name');
    ALTER DATABASE msdb MODIFY FILE (NAME = logical_name , FILENAME = 'new_path\os_file_name');
    NET STOP MSSQL$SQLEXPRESS
    In addition, you can follow the steps in this KB article to uninstall SQL Server.
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • File download and Upload using SOAP in Oracle ADF

    Hi Gurus,
    I have a requirement of Uploading and downloading a file on a location. It is for uploading and downloading an Attachments for a user. I have a table in my jspx page for showing the current attachments and an option to upload a new attachment. When I click on attachment name, the file should be downloaded.
    The current implementation does this using SOAP web service. Now, i need to do it with ADF now.
    For Uploading and downloading, i have used FileDownloadActionListner on my page. I am not able to figure out how to use SOAP service in ADF to download or upload a file. what i have done is
    1. Create WebService Data Control with the exposed wsdl.
    2. Created .jspx page and binded the fuctions to the button.
    3. In managed bean class, i have written code to get reference to that web service and invoke it. I am assuming of making the currect call as the response object is not coming as null.
    Now i need to know:
    1. How to verify for the success response from a SOAP web service in the managed bean code.
    2. how to go ahead with the implementation.
    For Upload: I have filename, content and mimetype in the managed bean code function. but how to use those to make a soap call and upload a file at the location.
    For Download: I have DocumentId in the managed bean code function, and how to use it to download a file. How to get the SOAP response in managed bean code and how to handle it.
    Thanks in Advance,
    regards,
    Rajan

    Hi,
    don't have an example, but I suggest to use a JAX-WS proxy client and access it from the POJO DC (instead the WS DC) so you have access to the service responses
    Frank

  • Cannot read PDF files downloaded via acsm

    The app does not allow copying and reading the PDF downloaded via acsm delivery mechanism as it reports to be protected.  Is this known issue or needs to be treated like a feature request. On PC, you read this document via Adobe Digital Editions.
    Thanks, soujanna

    That is definitely a very old Reader version!  Uninstall it, then install the latest Reader for Vista, which is 10.1.9

  • Jad and jar files downloaded via nokia suite. When...

    Hi,   I have downloaded battery accelerator using nokia suite ,but when i click on it , it asks me to go to nokiappwiz site reference. Then if i further clicks it is going......and going. When i browsed, i found jar and jad file for this application. Is there any solution, how to apply this app.

    Hi,
    first,you must add the following two lines to Apache mime types:
    text/vnd.sun.j2me.app-descriptor jad
    application/java-archive           jar
    second,you must specify the absolute address of your jar file in the MIDlet-Jar-URL which in the jad file,such as:
    MIDlet-Jar-URL: IP/game.jar

  • File download via servlet doesn't work with IE via https

    I have a URL from a jsp page which points to a struts action servlet. This works with firefox via http and https. With IE it works via http but it doesn't work via https. The error message I get is "Internet Explorer cannot download ...File_name.doc from Server_name.
    Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."
    Here is my code.
    public ActionForward execute(ActionMapping mapping, ActionForm form,
                   HttpServletRequest request, HttpServletResponse response)
                   throws Exception {
              String attachmentURL = AppSettings.get("EAIAttachmentURL");
              String encodingScheme = AppSettings.get("EAI_encoding");
              String filename = request.getParameter("URL");
              String fileStr = URLEncoder.encode(filename, encodingScheme);
              fileStr = fileStr.replaceAll("\\+","%20");
              URL targetURL = new URL(attachmentURL + "/" + fileStr);
              URLConnection connection = targetURL.openConnection();
              connection.setDoInput(true);
              connection.setDoOutput(false);
              connection.setAllowUserInteraction(false);
              BufferedInputStream attachmentStream = new BufferedInputStream(
                        connection.getInputStream());
              * Setting the content disposition filename, so that the
              * attachment preserves the original filename
              response.setHeader("Content-Disposition",
                        " attachment; filename=" + filename);
              if (connection.getContentType() != null) {
                   response.setContentType(connection.getContentType());
              else {
                   response.setContentType("application/octet-stream");
              response.setContentLength(connection.getContentLength());
              response.setHeader("Pragma", "public");
              response.setHeader("Cache-Control", "public, max-age=-1, must-revalidate");
              if ( connection.getContentEncoding() != null ) {
                   response.setHeader("Content-Encoding",
                             connection.getContentEncoding());
              BufferedOutputStream responseStream = new BufferedOutputStream(
                        response.getOutputStream());
              byte[] buffer = new byte[4096];
              int bytesRead;
              try {
                   while ((bytesRead = attachmentStream.read(buffer)) != -1) {
                        responseStream.write(buffer, 0, bytesRead);
              } catch (Exception e) {
                   log.error("AttachmentProxy error: " + e.getMessage());
              } finally {
                   if (attachmentStream != null) {
                        attachmentStream.close();
                   if (responseStream != null) {
                        responseStream.flush();
                        responseStream.close();
              return null;
    There is a bug with IE when downloading via https according to Microsoft support site. Refer to http://support.microsoft.com/default.aspx?scid=kb;en-us;812935
    According to this bug, I have set the response header - "pragma" to public and "cache-control" to public. I've also unchecked the Do not save encrypted pages to disk setting in IE Options, Advanced tab.
    Has anyone come across this problem or a similar problem. Any help is appreciated. Thanks.

    I have a URL from a jsp page which points to a struts action servlet. This works with firefox via http and https. With IE it works via http but it doesn't work via https. The error message I get is "Internet Explorer cannot download ...File_name.doc from Server_name.
    Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."
    Here is my code.
    public ActionForward execute(ActionMapping mapping, ActionForm form,
                   HttpServletRequest request, HttpServletResponse response)
                   throws Exception {
              String attachmentURL = AppSettings.get("EAIAttachmentURL");
              String encodingScheme = AppSettings.get("EAI_encoding");
              String filename = request.getParameter("URL");
              String fileStr = URLEncoder.encode(filename, encodingScheme);
              fileStr = fileStr.replaceAll("\\+","%20");
              URL targetURL = new URL(attachmentURL + "/" + fileStr);
              URLConnection connection = targetURL.openConnection();
              connection.setDoInput(true);
              connection.setDoOutput(false);
              connection.setAllowUserInteraction(false);
              BufferedInputStream attachmentStream = new BufferedInputStream(
                        connection.getInputStream());
              * Setting the content disposition filename, so that the
              * attachment preserves the original filename
              response.setHeader("Content-Disposition",
                        " attachment; filename=" + filename);
              if (connection.getContentType() != null) {
                   response.setContentType(connection.getContentType());
              else {
                   response.setContentType("application/octet-stream");
              response.setContentLength(connection.getContentLength());
              response.setHeader("Pragma", "public");
              response.setHeader("Cache-Control", "public, max-age=-1, must-revalidate");
              if ( connection.getContentEncoding() != null ) {
                   response.setHeader("Content-Encoding",
                             connection.getContentEncoding());
              BufferedOutputStream responseStream = new BufferedOutputStream(
                        response.getOutputStream());
              byte[] buffer = new byte[4096];
              int bytesRead;
              try {
                   while ((bytesRead = attachmentStream.read(buffer)) != -1) {
                        responseStream.write(buffer, 0, bytesRead);
              } catch (Exception e) {
                   log.error("AttachmentProxy error: " + e.getMessage());
              } finally {
                   if (attachmentStream != null) {
                        attachmentStream.close();
                   if (responseStream != null) {
                        responseStream.flush();
                        responseStream.close();
              return null;
    There is a bug with IE when downloading via https according to Microsoft support site. Refer to http://support.microsoft.com/default.aspx?scid=kb;en-us;812935
    According to this bug, I have set the response header - "pragma" to public and "cache-control" to public. I've also unchecked the Do not save encrypted pages to disk setting in IE Options, Advanced tab.
    Has anyone come across this problem or a similar problem. Any help is appreciated. Thanks.

  • Webgui file download via iisproxy

    Hello everyone.
    Please tell me your knowledge.
    I'd like to download files when I use webgui.
    I can connect ITS server not directly but via iisproxy.
    PC <-> PROXY(iisiisproxy) <-> ITS(wgateagate)
    In an above environment, we tested.
    But we couldn't download.
    Have you ever download in this environment?

    Hello Masahide,
    Please provide the exact ITS version you use. Have you searched for SAP Notes regarding your problem?
    Best regards,
    Henning.
    Message was edited by: Henning Pingel

  • Reports excuting in different sap version

    Hi All,
    I am downloading Reports from 3.1G to SAP R/3 Enterprise version and executing. Many reports not giving me the output even data is available. Can anyone tell me what could be the main reasons, if anyone  already come across.

    Hi!
    So if your programs are correct, is your data still <i>exactly</i> the same? Maybe some user-exits had filled additional fields - which are now empty and your selects don't find anymore something.
    Also some standard tables are filled in a different way - or just simply some customizing has changed and document types / line types / ... are different now.
    Check, if your data is really same as in 3.1G system.
    Regards,
    Christian

  • Download InDesign CC in different language version

    Hello,
    I am a complete creative member in the UK. Can I download and use InDesign CC Japanese version?

    Hi nilam,
    Welcome to Adobe Forum,
    By default the Creative Cloud application will utilize the language settings for your operating system.  You can find information on what your current language setting is by review the following documentation:
    Mac OS: OS X: Changing the language shown in menus and dialogs
    Windows 7 and 8: Install or change a display language
    If you wish to install the software included in your Creative Cloud Membership to a different language then you will need to make this adjustment in the Creative Cloud application.  Full details on how this can be accomplished can be found at Adjust the install language | Creative Cloud applications | CCM.
    If after adjusting the language and installing the Adobe Creative applications you discover them to be in trial mode then it is possible your subscription may not include the requested language.  You can find more details at Creative Cloud products launch in trial mode on non-English operating systems | CCM, CS6.
    Finally you can check if you have an English only or Multi-language membership under you account at http://www.adobe.com/.  For more information on how to manage your membership please see Manage your membership | Creative Cloud.
    This should help out: http://helpx.adobe.com/creative-cloud/kb/change-installed-language.htm l
    Regards,
    Rajshree

Maybe you are looking for

  • A video clip import for a new project keeps showing up as a clip from an older project.

    So here's the issue, I succesfully imported and trimmed 95% of the video clips from my GoPro today. However, when I upload the piece de resistance, it shows up as a clip from an older project that I've already deleted. Despite showing me the older cl

  • Field EBELN into table EQUP

    Hi gurus, I need some help: Is it possible, via user exit or something similar, to add the field EKKO-EBELN into table EQUP? It should be useful just right to LIFNR column. THe idea is to have the doc. number into quota arrangement. Thanks, G

  • Gtalk for nokia 5800 is available now...

    Hello friends.... Gtalk for nokia 5800 is available now you can download it from following link.... http://www.talkonaut.com/download.shtml Enjoy Thanks  SRK

  • MacBook Pro fan running constantly with no utilization

    Just got my boss's MacBook Pro (Retina, Mid 2012) model back from Apple after a GPU related repair (which appears resolved).  They replaced logic board amongst other things. As soon as I turn it on I hear the fan, quietly running.  If I close the lid

  • SwingUtilities.findFocusOwner() is really deprecated?

    J2SE 1.4 javadoc says that SwingUtilities.findFocusOwner() is deprecated as of 1.4 and it is replaced by KeyboardFocusManager.getFocusOwner(). But, when I look into the source code of SwingUtilities.findFocusOwner(), it calls KeyboardFocusManager.get