Hierarchy download using bsp

I have a requirement where I have to display all hierarchies on an infoobject to a user. The user should be able to select a particular hierarchy and download it as a flat file to a location. Can this be done using bsp?

Hi,
You can list the hierarchies of an InfoObject using table RSHIEDIR.
When the user clicks on a hierarchy name, you can get its content in an internal table using Function Module RSSH_HIERARCHY_READ.
Finally, you will have to process the internal table to send it as a flat file in HTTP response at the BSP level, so that the user can download it.
Regards,
Tanguy

Similar Messages

  • Accessing BSP File Download using HTTPS URL

    Hi,
    I'm struggling with a problem of downloading a file from a https url. I wrote a BSP App for downloading a file from a unix server.. It works fine when I use a http URL with port 8080 and does not work when I use https.!!
    Example:
    https://comms.gmsanet.co.za/supplier [ download does not work ]
    http://comms.gmsanet.co.za:8080/supplier [ download works ]
    When I try to download using https.. it does not pull the file name and path
    see code  below and suggest me if anything to be chnaged.
    In the Form Initialization method:
    event handler fr data retrieval
    DATA: i_file        type string,
          s_fields      TYPE tihttpnvp,
          s_fields_line TYPE ihttpnvp,
          multipart_form type ref to if_http_entity,
          file_upload    type xstring,
          lv_backend     type string,
          success        type string,
          entity         type ref to if_http_entity,
          file           type xstring,
          content_type   type string,
          content_filename type string,
          content_length type string,
          content_disposition type string,
          num_multiparts type i,
          i              type i value 1,
          doEcho         type string value 'X',
          value          type string,
          filename       type ZFILETAB-fileinfo,
          ext1           type string,
          ext2           type string,
          dsn            type string,
          bptype         like sy-uname,
          itab           TYPE ZFILETAB,
          itab_line      TYPE ZFILETABLINE,
          file_ext       type ZFILETABLINE,
          fileinfo       type c,
          zcount         type i.
        filename = '/NewMessge.doc'.
        content_filename = filename.
    Check the extension and assign the content type
        split filename at '.' into ext1 ext2.
        case ext2.
          when 'zip'.
            content_type = 'application/x-zip-compressed'.
          when 'doc'.
            content_type = 'application/msword'.
          when 'txt'.
            content_type = 'text/plain'.
          when 'ppt' or 'pps'.
            content_type = 'application/vnd.ms-powerpoint'.
          when 'xls' or 'exe'.
            content_type = 'application/octet-stream'.
          when 'gif'.
            content_type = 'image/gif'.
          when 'jpg' or 'jpeg'.
            content_type = 'image/pjpeg'.
          when 'htm' or 'html'.
            content_type = 'text/html'.
        endcase.
        dsn = filename.
        OPEN DATASET dsn FOR INPUT IN BINARY MODE.
        IF sy-subrc NE 0.
          zmessage = 'Error opening file'.
          navigation->set_parameter( name = 'zmessage' value = zmessage ).
          navigation->goto_page( 'downloaderror.htm' ).
          exit.
        ENDIF.
        DO.
          READ DATASET dsn INTO <b>file</b>.
          EXIT.
        ENDDO.
        CLOSE DATASET dsn.
    set response data to be the file content
      runtime->server->response->set_data( <b>file</b> ).
      runtime->server->response->set_header_field(
                                    name  = 'Content-Type'
                                    value = content_type ).
      concatenate 'attachment; filename=' filename into content_disposition.
      runtime->server->response->set_header_field(
                                    name = 'Content-Disposition'
                                    value = content_disposition ).
    set the file size in the response
      content_length = xstrlen( file ).
      runtime->server->response->set_header_field(
                                name  = 'Content-Length'
                                value = content_length ).
      runtime->server->response->delete_header_field(
                                name = 'Cache-Control' ).
      runtime->server->response->delete_header_field(
                                name = 'Expires' ).
      navigation->response_complete( ).
    Thanks
    Ajay

    Hi Brian,
    I have the same problem as Ajay Yeluguri. In http mode I can generate a download of an Excel document but when we use the portal in https it doesn't work.
    When I try to download using https it does not pull the file name and path and when I choose download I have a error message : "Internet Explorer cannot download from ..."
    I've test the point 3.2 "... including file up/download" of the BSP application IT00 and it works fine in http and https mode. My problem is not the upload but the download. And in this application the uploaded document is opened in the Internet Explorer window but I want to generate a Save as... window to download the file.
    Have you an idea what i can do to solve my problem.
    Thanks
    Yann

  • How to Download displayed output to Excel Using Bsp Application

    Hi Experts,
    please give me some idea because I am New In BSP.
    How to Download displayed output to Excel Using Bsp Application.
    If any sample code please do send me.
    In my condition I am getting data in  2-3 table view formats on one page and i want download that in Excel.
    please help me.
    Regards & Thanks,
    Yogesh

    Hi,
    This is more a question for the BSP forum.
    Anyway, as such it's realy easy since you can use HTML in order to import to Excel. All you need to do is add
    runtime->server->response->set_header_field( name = 'Contnet-Type'
    value = 'application/vnd.ms-excel' ).
    runtime->server->response->delete_header_field( name = 'Cache-Control' ).
    runtime->server->response->delete_header_field( name = 'Expires' ).
    runtime->server->response->delete_header_field( name = 'Pragma' ).
    Also check threads like
    Download BSP data into Excel
    export bsp-table to excel
    Export BSP Table to Excel
    Eddy
    PS. Reward useful answers and earn points yourself

  • Customer Hierarchy download in CRM7.0 Web UI

    Hi Experts
    Need your expert advice on the below issue:
    We are using customer hierarchy from ECC to SAP CRM7.0 for one of our client. I have performed the below steps to bring ECC customer hierarchy to CRM.
    SAP ECC System:
    1.Hierarchy node is created thru tcode- v-12
    2.Customer hierarchy is created thru tcode- VDH1N
    Replication steps in CRM:
    1.Replicate Customer Hierarchy Customizing thru TCode- R3AS, download object DNL_CUST_THIT .
    2.Assign ERP Customer Hier. to CRM hierarchy category in SPRO .
    3.Replicate Customer Hier thru Tcode u2013R3AS , download object DNL_BUPA_KNVH.
    4.Create account hierarchy thru Tcode- BPH_DNL , we need to create the hierarchy only for the sales area 0001,01,01.  So I have selected sales the required sales area only.
    5.I checked in web ui  and found the result for account hierarchies.
    Current Result:
    a.ECC hierarchy downloaded, however descriptions for the hierarchy nodes are missing in CRM web ui.
    b.Customer assigned to ECC hierarchy can be seen in the u201CAccount Hierarchy Detailsu201D assignment block , however I could not see the customers in u201C Assigned Accountsu201D assignment block.
    6.Expected Result :
    a.ECC hierarchy display with description in u201C Account Hierarchy Detailsu201D assignment block.
    b.Display customeru2019s information in u201C Assigned Accountsu201D assignment block.
    Can anybody support and provide the information if we are missing any configuration step ? or the result is the correct behavior of standard system ?
    I would really appreciate your help on this.
    Regards
    Satish Rikhi

    Hi Tanya
    My issue is got sovled with SAP note 1398619 .However, for the second issue there is no finding.
    I am assuming ,that is standard SAP CRM behaviour , if we assign any account in crm , that will be shown in the assignment block.
    Regards
    Satish

  • MIME object download by BSP  with 'Save as' box

    hello ,
      i am trying to download a Excel file which is in MIME objects in my BSP application. From portal i want to download this with 'Save as' box . Currently excel file is opening and i have to save it manually on local drive.
       can u suggest me any solution to open 'Save as ' dialogue box to download the MIME object on my local hard-disk drive by using BSP application.
    Regards

    Hi there,
    I'm getting the same issue with the following code:
    header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Cache-Control: private",false);
    header("Content-Type: application/force-download");
    header("Content-Disposition: attachment; filename=\"$newFileName\";");
    header("Content-Transfer-Encoding: binary");
    header("Content-Length: ". filesize($fileName) );
    echo $fileData;
    The only issue seems to be with the filename being set to that of the php script. The contents of the file are correct. Have you had any luck with this issue?
    Cheers,
    Jeremy

  • Download total BSP

    how to download the BSP page? i would like to download total BSP page contents.

    Well the only thing you are able to is exporting the data you have to Excel.
    The formatting of the BSP cannot be transported to Excel.
    How to transfer data from a controller to excel via a HTTP response is show within this blogs.
    /people/thomas.jung3/blog/2005/02/14/bsp-and-microsoft-excel--learning-to-live-together
    /people/thomas.jung3/blog/2005/02/23/bsp-and-microsoft-excel--learning-to-live-together-part-2
    The blogs themselves show how an excel export from an internal table works.
    But I can recommend to extend this by using a cached response. This means an additional response, that might be called via an iFrame within your BSP View.

  • Download a BSP application

    Hi,
    stupid question : is there a way to download a bsp application into a .txt file for instance and upload it in another system like for Abap programs?
    Regards & Happy new year,
    Huy

    Hallo Huy,
    In R/3 systems, the transport system is the best way to move stuff between systems. You can place all the objects you wish onto a transport of copies, export it, and import the transport into the new system. The starting point is transaction SE09. You might need the help/approval of a system administrator, depending on your rights, etc. This is the simplest and best way to do it.
    If you should wish to develop your solution, look at CL_BSP_API_GENERATE. It is an API to create BSP applications.
    You can also look at our own report BSP_EXPORT_CLASSES (transaction SE38) that we use to dump BSP applications into text files. We use it for checking that our SP systems are in sync with our development system.
    brian

  • Hierarchy popup in BSP ?

    Hi all,
    I'm looking for a easy way to create a popup of a existing hierarchy which also allows to select a node/item.
    SAP queries in BeX and Web format which use hierarchies offer a popup to select a node/item automatically.
    I would like to offer such a functionality also in a MVC BSP application.
    My questions:
    Is there already a HowTo available which describes a task like this ?
    Is it possible to use the existing hierarchy in a BSP directly (with HTMLB etc.) in a easy way to avoid greater effort  ?
    I'm looking forward to your help
    Best regards
    Pascal

    Hi,
    In BSP, you have a tree component that may fit your needs.
    Yet, I don't think you will find the numerous options that are available in BEx.
    In the past, I had to code radio-button in front of each node with a Javascript mecanism to select children recursively...
    Check this tip from Durairaj : Enhancement of BSP Tree
    Best regards,
    Guillaume

  • Picture uopload in the solution manager using BSP

    Hi Everybody I am trying to upload a employee pictures for the each user in the Solution manager using BSP. I have got some coding form the help but its not working. Kindly direct me the way I can go for the upload.
    Please help me out.
    With best regards,
    Suneetha

    Hi Thank you very much for your answer.
    I am using for the file upload code  is
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page title = " ">
        <htmlb:form>
    <html>
      <body>
    <h2> Form with File Upload and Download </h2>
    Choose a file for upload. The file will be echoed to your browser if you
         select the checkbox below.
    <form method="POST" enctype="multipart/form-data">
      <table border=1 width="100%">
        <tr>
          <td> <input type=checkbox name="doEcho"&gt; </td>
          <td> <input type=checkbox name="doEcho" value="X"> (select for echo)
    </tr>
        <tr>
          <td> <input type=file name="echoFile"> </td>
        </tr>
        <tr>
             height = "45".
              width = "45".
          <td> <input type=submit name="onInputProcessing(upload)" value="Submit"> </td>
        </tr>
      </table>
    </form>
      </body>
    </html>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Can I use this along with oninput processing that u have given.
    With Best regards,
    Suneetha

  • Downloads used to open after download. NOw they just end up in the download folder and I have to go to the folder to find it and open it. I did not change seettings, maybe an update changed it? I cannot find a way to change this in settings.

    Downloads used to open after download. NOw they just end up in the download folder and I have to go to the folder to find it and open it. I did not change seettings, maybe an update changed it? I cannot find a way to change this in settings.
    == This happened ==
    Every time Firefox opened
    == A week or two ago. Not sure if result of most recent update.

    Downloads used to open after download. NOw they just end up in the download folder and I have to go to the folder to find it and open it. I did not change seettings, maybe an update changed it? I cannot find a way to change this in settings.
    == This happened ==
    Every time Firefox opened
    == A week or two ago. Not sure if result of most recent update.

  • I have two apple id accounts ,when i used to update application it used to prompt a default id and if the application was downloaded using the other id i would cancel and it would prompt the other id but not any more .

    i have two apple id accounts ,when i used to update application it used to prompt a default id (the old one) and if the application was downloaded using the other id i would cancel and it would prompt the other id but not any more .
    it just prompt the old id which im not signed in with im signed in using the new id and when i cancel nothing happens and when i try to update applications separately  i have the same problem .
    im signed in using the new id
    the old one is my wife's so i can't delete it
    the problem happens  when i update all or  each application by its own
    using ios 5.0.1 on a iphone 3gs
    the applications are downloaded using both the new and old id's
    any help will be greatly appreciatedِ

    These are user-to-user forums, you are not talking to Apple here and they don't monitor these forums - I've asked the hosts to remove yout account ids from your post.
    In terms of combining accounts it's not currently possible to do so, nor to copy/transfer content from account to another.

  • HT4914 Will iTunes match match songs that have been downloaded using a different audible account?

    Will iTunes match match songs that have been downloaded using a different audible account?

    Hey there Chriskir,
    It sounds like you would like to delete all the songs from your iPad but still be able to access them in iTunes Match. You can delete all the songs from the Music section of your Usage in Settings by swiping your music left:
    Settings > General > Usage
    iPhone, iPad, and iPod: Understanding capacity
    http://support.apple.com/kb/ht1867
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • I forgot my Apple ID password and security question. Also the email I'd is not accessible as the organisation has stopped their email service. How can I now update my applications which I downloaded using this Apple ID. Please help

    I forgot the password of my Apple ID that I used for downloading apps when I newly bought my mac book back in 2011 October.
    Now I forgot the password and also the security question.
    Also the email service provider has stopped their email service and hence m not able to use email authentication as well.
    Now I am lost, how will i update the applications that I downloaded using this Apple ID.
    Please help

    Saunakhvshg,
    contact Apple directly.

  • I have Lightroom 4 on disc which is installed on my Mac desktop. I want to use it on a new MacBook with no disc drive. Can I install it by download using the serial number? How?

    I have Lightroom 4 on disc which is installed on my Mac desktop. I want to use it on a new MacBook with no disc drive. Can I install it by download using the serial number? If so< how?

    1. Go to the following website and download the last version of Lightroom 4:Adobe - Lightroom : For Macintosh : Adobe Photoshop Lightroom 4.4.1
    2. Run the installation package to install Lightroom.
    3. Use your existing serial number to activate the program.

  • What is the best app for following of the download? I mean how much I downloaded using WIFI and how much 3D download.

    I would like to follow the amount of MB I downloaded and to know how much data was downloaded using WIFI and how much using 3G (internet connection by phone network provider as AT&T and so...).
    Thank you very much for any suggestions.

    Personally I have tried LogMeIn Ignition, Splashtop, and AlwaysOnPC, as well as TeamViewer. Although LogMeIn Ignition is expensive I would also have to say that it is the best one I've tried. Apart from viewing the computer's screen, you can access the files and folders in a standalone file browser interface without seeing the computer's screen, this speeds things up a lot.
    As for security, I'm not too sure, as the website for LogMeIn does not seem to list the details. But as with any other internet based service, like email and social networking sites, an additional account of any sort will increase your vulnerability, even if it's just by that small amount. You can try accessing the computer through a VPN when on a public wifi network for added security. However about the virus, I don't think that is possible... No need to worry about your iPad getting a virus.

Maybe you are looking for

  • USB adapter for PB3400/OS8.1

    I have a PB3400 running OS8.1. I'd like to be able to connect a (PC compatible) USB memory stick to it, so I'm looking a for a USB adapter. The PB3400 has a slot for PCMCIA card. I've found a plenty of PCMCIA USB adapter cards but none will work with

  • How to create portal user and integrate with external appl login

    How to create portal user and integrate the user with external application for single sign-on ? I want to access my external application thru portal user ..? Shyam

  • Hardware Architecture of Real Application Cluster (RAC)

    I'll implement Oracle 9i with Real Application Cluster (RAC). I now have two Sun SF280R servers. Can I use ONE common storage to build RAC? SF280R - Storage - SF280R OR is it necessary to have TWO storages? SF280R SF280R |..........\/..........| Stor

  • Add additional elements to a Custom BO

    Hey, I´m facing the following problem in my Custom BO. I want to add other elements to my existing Custom BO. In order to achieve this, I defined two elements in the Custom BO and activated the Custom BO. Then I add the two elements to my existing We

  • MacbookPro is running too much ram idle (16GB installed)

    Hello, my computer seems to be using an excessive amount of ram while sitting idle (3.35GB currently). I did a complete OS re-install as directed by apple but the problem doesn't seem to be fixed. I haven't used a time machine backup so my computer i