R/3 report to be  displayed via  BSP application

Hi,
  Can anyone tell me  how to develop a  BSP application in SRM system which will diplay a  report developed in R/3?
thanks.

hi !!
refer to link ->
http://www.sapdevelopment.co.uk/webapps/bsp/bsp_exereport.htm
i am giving the extract from same website below :
Please follow following steps - >
Creating a BSP which executes an ABAP report to retrieve data
Step 1 - Create ABAP report to retrieve data
Using SE80 create program ZBSP_GETDATA.
Step 2 - Create new BSP Application
Using SE80 create BSP Application (I.e. ZBSP_GRANTS).
Step 3 - Create new page (initial.htm)
Right click on BSP object name and select create->page (with flow logic).
Step 4 – Populate ‘Layout’ tab
Insert the following code into initial.htm layout section.
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<html>
  <head>
    <link rel="stylesheet" href="../../sap/public/bc/bsp/styles/sapbsp.css">
    <title> Intial page of BSP application </title>
  </head>
  <body class="bspBody1">
  <h1><img src="sap_logo.gif">  Transaction Display(TSTC)</h1>
   <% submit ZBSP_GETDATA and return with p_bsp = 'X'.%>
   <% import it_tstc to it_tstc from memory id sy-uname.%>
   <table width="80%" cellspacing="0" cellpadding="0" border="0">
     <tr>
       <td><b>T Code </b></td>
       <td><b>Program</b></td>
     </tr>
     <% data wa_tsts2 like line of it_tstc.
     Loop at it_tstc into wa_tstc. %>
     <tr>
       <td><%=wa_tstc-tcode%></td>
       <td><%=wa_tstc-PGMNA%></td>
     </tr>
     <% Endloop. %>
   </table>
</body>
</html>
Step 5 – Setup ‘Type Definitions’ (TYPE declarations)
TYPES: BEGIN OF t_tstc,
  TCODE type tstc-tcode,
  PGMNA type tstc-pgmna,
END OF t_tstc.
types: tt_tstc type standard table of t_tstc.
Step 6 – Setup ‘Page Attributes’ (Data declarations)
it_tstc
wa_tstc
TT_TSTC
T_TSTC
Step 7 – Activate and test
Save everything and press the activate button, if all is ok press the test button which should open up a browser window and
display your newly created BSP.
*-- the code for BSP porgrams is
*& Report  ZBSP_GETDATA                                                *
*& Example of a simple data retrieval                                  *
*& Used to demonstrate executing a report via a BSP application and    *
*& using the data retrieved as the basis for the BSP app.              *
*& If report is executed via a BSP then data is extracted to memory    *
*& and then retrievd by the BSP....                                    *
REPORT  zbsp_getdata                 .
TABLES:     tstc.
type-pools: slis.                                 "ALV Declarations
parameters: p_bsp(1) type c no-display.
*Data Declaration
TYPES: BEGIN OF t_tstc,
  TCODE type tstc-tcode,
  PGMNA type tstc-pgmna,
END OF t_tstc.
DATA: it_tstc TYPE STANDARD TABLE OF t_tstc INITIAL SIZE 0,
      wa_tstc TYPE t_tstc.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
      gd_tab_group type slis_t_sp_group_alv,
      gd_layout    type slis_layout_alv,
      gd_repid     like sy-repid.
*Start-of-selection.
START-OF-SELECTION.
  perform data_retrieval.
  perform build_fieldcatalog.
  perform build_layout.
  perform display_alv_report.
*&      Form  BUILD_FIELDCATALOG
      Build Fieldcatalog for ALV Report
form build_fieldcatalog.
  fieldcatalog-fieldname   = 'TCODE'.
  fieldcatalog-seltext_m   = 'Trans code'.
  fieldcatalog-col_pos     = 0.
  fieldcatalog-emphasize   = 'X'.
  fieldcatalog-key         = 'X'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'PGMNA'.
  fieldcatalog-seltext_m   = 'Program'.
  fieldcatalog-col_pos     = 1.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
endform.                    " BUILD_FIELDCATALOG
*&      Form  BUILD_LAYOUT
      Build layout for ALV grid report
form build_layout.
  gd_layout-no_input          = 'X'.
  gd_layout-colwidth_optimize = 'X'.
  gd_layout-totals_text       = 'Totals'(201).
endform.                    " BUILD_LAYOUT
*&      Form  DISPLAY_ALV_REPORT
      Display report using ALV grid
form display_alv_report.
  if p_bsp EQ 'X'. "If report run from BSP application
    export it_tstc to memory id sy-uname.
  else.
    gd_repid = sy-repid.
    call function 'REUSE_ALV_GRID_DISPLAY'
         exporting
              i_callback_program      = gd_repid
              is_layout               = gd_layout
              it_fieldcat             = fieldcatalog[]
              i_save                  = 'X'
         tables
              t_outtab                = it_tstc
         exceptions
              program_error           = 1
              others                  = 2.
endif.
endform.                    " DISPLAY_ALV_REPORT
*&      Form  DATA_RETRIEVAL
      Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
data: r_tcode type range of tstc-tcode with header line.
r_tcode-sign   = 'I'.
r_tcode-option = 'CP'.
r_tcode-low    = 'SE*'.
append r_tcode.
  select tcode pgmna
   up to 10 rows
    from tstc
    into table it_tstc
   where tcode in r_tcode.
endform.                    " DATA_RETRIEVAL
*-- Dont foget to give points if it helps ...

Similar Messages

  • AL11 DIR excess Issue via BSP application link.

    Hi Folks,
    I am struggling with a ERROR while Accessing path of AL11 via BSP program.
    BASIS POV :
    Created a DIR and configure for Instance type ALL.
    The User who is accessing have full access for AL11 with Auth_Obj. S_DATASET (full access)
    RFC user has full access in S_RFC and S_RFCACL.
    Full access (777) given to the Dir created in AL11.
    PROBLEM :
    Abaper done coding and tested in DEV system program and codding working fine. while accessing via BSP application it should create a file in AL11 created path. and it's working in Development server.
    when they change the path of AL11 in the program as per production server and transported to Production and working with the BSP application it's throughing ERROR.
    Please find attachment of bmp file for the ERROR.
    NOTE : when application connect via Instance 00, everything working fine, but when application connect via Instance 01 we are getting this ERROR.
    QUERY : is there any workaround, can we redirect this to only instance 00 by any hard coding/ or by calling any Background JOB or any.
    Regards,
    Sandeep Meher

    You are welcome. I'm glad you got it back up.
    (1) You say you did the symbolic link. I will assume this is set correctly; it's very important that it is.
    (2) I don't know what you mean by "Been feeding the [email protected] for several weeks now, 700 emails each day at least." After the initial training period, SpamAssassin doesn't learn from mail it has already processed correctly. At this point, you only need to teach SpamAssassin when it is wrong. [email protected] should only be getting spam that is being passed as clean. Likewise, [email protected] should only be getting legitimate mail that is being flagged as junk. You are redirecting mail to both [email protected] and [email protected] ... right? SpamAssassin needs both.
    (3) Next, as I said before, you need to implement those "Frontline spam defense for Mac OS X Server." Once you have that done and issue "postfix reload" you can look at your SMTP log in Server Admin and watch as Postfix blocks one piece of junk mail after another. It's kind of cool.
    (4) Add some SARE rules:
    Visit http://www.rulesemporium.com/rules.htm and download the following rules:
    70sareadult.cf
    70saregenlsubj0.cf
    70sareheader0.cf
    70sarehtml0.cf
    70sareobfu0.cf
    70sareoem.cf
    70sarespoof.cf
    70sarestocks.cf
    70sareunsub.cf
    72sare_redirectpost
    Visit http://www.rulesemporium.com/other-rules.htm and download the following rules:
    backhair.cf
    bogus-virus-warnings.cf
    chickenpox.cf
    weeds.cf
    Copy these rules to /etc/mail/spamassassin/
    Then stop and restart mail services.
    There are other things you can do, and you'll find differing opinions about such things. In general, I think implementing the "Frontline spam defense for Mac OS X Server" and adding the SARE rules will help a lot. Good luck!

  • Crystal Reports 8.5 & 9 Via Web Application

    Post Author: bearie
    CA Forum: Older Products
    I have inherited an issue with a proprietary web based
    application and Crystal Reports 8.5 & 9. Someone a few years ago wrote a .dll file that would that a
    requested Crystal Report, via the web application, and the report would be
    displayed in edible Word Rich Text format.
    The Crystal Report contained parameters that were passed to the reports
    via .asp or SQL.
    Both the person who wrote the .dll and the source code of
    the .dll are long gone.
    This process worked great until about a month ago.  Now when a report is edited with Crystal
    Reports or a new report created and accessed using the same methods the report
    will not launch or launches with out updating the data in the report. 
    We believe the issue has to do with one of the many
    Microsoft updates and patches that were coming out about a month ago.
    Up to now I have been a report developer, creating the SQL
    and reports and turning them over to the u201Cprogrammers".  To make a long story short u2013 the u201Cweu201D is now
    me, and I do not have a clue the best route to take to resolving the issue.
    Please any ideas and / or suggestions will be greatly
    appreciated. 
    --if there is a better forum to post this, please let me
    know.
    Thanx!

    Post Author: bearie
    CA Forum: Older Products
    Since there have been no replies - I am guessing what we need to have done cannot work with the versions of Crystal we are currently using. If we were to update to the latest Crystal - can this be done.  Need to find out before I try to convince my company to upgrade. Thanx

  • Convert ABAP Spool to PDF and display in BSP

    Hello SDNers,
    I have a requirement to display an R/3 report in Portal as PDF. I have chosen the route of creating a BSP which will show the report as PDF.
    I will then create a BSP iView in Portal pointing to this application.
    I am following the weblog /people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp
    and few SDN forums:
    Display result of standard report RPTEDT00 within BSP
    Re: PDF Output
    I am new to BSP development and I am not able to put all the pieces of code together.
    I would really appreciate if you can help me put the pieces together and help me out with this.
    More details:
    This custom report displays the summary of Benefits Cost Accounting (by PERNR and current year).
    Once the report is run, I would like to get hold of the spool and convert the spool to PDF.
    In my BSP I would like to get the spool (or the binary of the PDF) and display the report as PDF in the BSP application.
    I have created the BSP application using the code given in the above weblog.
    I am not sure how to proceed further with the requirement.
    Looking forward for your suggestions and help.
    Thanks,
    Kalyan

    Hi kalyan,
    go thru this wiki and you will have what you need all at one place. the piece you might want to look at is ABAP spool to PDF. It even contains complete code.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bsp/pdf
    hope this helps.

  • BSP Application on click of a button in WebDynpro ABAP

    Hello All,
    We have a requirement to display a BSP application in a POP-UP on click of a button in WD ABAP application. Then, passing some paramters from WD to BSP (in POP-UP) and vice versa. Please let me know of how this can be acheived. Thanks.
    Regards,
    Gopal.

    To call a wd abap application from BSP use the method CL_WD_UTILITIES=>CONSTRUCT_WD_URL then just create a link in bsp with the url returned like this:
    <a href="url">Link</a>
    To pass data from wd abap to bsp or vice versa that a look at this blog: /people/koen.labie2/blog/2006/11/29/eating-cookies-with-webdynpro-and-bsp
    regards,
    Fabio Louzada Saito

  • Run BSP application with IE9

    Hi,
    I want to display my BSP application in different IE9 windows each one with a different log account.
    Who can I do it?
    Regards

    Hello,
    As far as I know, only IE8 and IE9 share the same session if you open 2 different windows.
    And both versions of the browser have the "new session" functionality.
    So if you are using IE7, opening a new window should open the BSP in a new session already.
    However, you can try with URL parameter sap-sessioncmd=open as you mentionned, maybe this would work.
    Hope it helps,
    Tanguy

  • How to create downloadable pdf report as hyperlink within BSP application

    Hi,
    I'm developing a BSP application using MVC and htmlb extensions on a WAS 6.40. One of the requirements of my webapplication is:
    - the ability to generate a report in pdf format at runtime, using data retrieved from a backend SAP CRM 3.0 system
    and
    - make this report available/downloadable via a hyperlink in the application.
    I am aware of tools like Smartforms and Adobe interactive forms but need some help to get started and choose the right tool.
    regards, Roelof Jan

    Hi,
    we've done that by firstly building a RFC which prints the report to sap-spool:
    call function 'GET_PRINT_PARAMETERS'
          exporting
            expiration     = 1
            immediately    = ' '
            new_list_id    = 'X'
            line_count     = 65
            line_size      = 132
            report         = sy-repid
            no_dialog      = 'X'
          importing
            out_parameters = wf_params
            valid          = valid_flag.
        if sy-subrc ne 0 or valid_flag eq false.
        endif.
        new-page no-heading no-title print on parameters wf_params
                          no dialog .
    ... list processing ...
    new-page print off.
      concatenate programname sy-uname+0(3) into lc_rq2name separated by '_'.
      select * from tsp01 into tsp01_wa
                          where rq2name = lc_rq2name
                          and rqowner   = sy-uname
                          order by rqcretime descending.
        wf_spono = tsp01_wa-rqident.
        exit.
      endselect.
      if sy-subrc ne 0.
        clear wf_spono.
      endif.
    Then convert the spooljob:
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        exporting
          src_spoolid              = wf_spono
          no_dialog                = 'X'
        tables
          pdf                      = witab
        exceptions
          err_no_abap_spooljob     = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_destdevice       = 5
          user_cancelled           = 6
          err_spoolerror           = 7
          err_temseerror           = 8
          err_btcjob_open_failed   = 8
          err_btcjob_submit_failed = 9
          err_btcjob_close_failed  = 10
          others                   = 11.
      if sy-subrc ne 0.
        return.
      endif.
    Delete Spooljob and generate cached response:
      data del_spono type  tsp01_sp0r-rqid_char.
      del_spono = wf_spono.
      call function 'RSPO_R_RDELETE_SPOOLREQ'
        exporting
          spoolid = del_spono.
      if witab is not initial.
        loop at witab into itab .
          translate itab using ' ~'.
          concatenate output itab into output in character mode.
        endloop.
        translate output using '~ ' .
        create object cached_response
               type cl_http_response
               exporting add_c_msg = 1.
        l_pdf_len = strlen( output ).
        cached_response->set_cdata( data   = output
                                    length = l_pdf_len ).
        cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                           value = 'application/pdf' ).
        cached_response->set_status( code = 200 reason = 'OK' ).
        cached_response->server_cache_expire_rel( expires_rel = 180 ).
        data: guid type guid_32,
              display_url type string.
        call function 'GUID_CREATE'
          importing
            ev_guid_32 = guid.
        concatenate runtime->application_url '/' guid '.pdf'
                    into display_url.
        cl_http_server=>server_cache_upload( url      = display_url
                                             response = cached_response ).
        app ?= application.
        app->print_url = display_url.
      endif .
    The display_url has to be used in the normal response-view:
    <script type="text/javascript">
    var param = 'width=700'
          + ',height=550'
          + ',left=0'
          + ',top=0'
          + ',menubar=no'
          + ',location=no'
          + ',resizable=yes'
          + ',status=no';
      window.open('<%= application->print_url%>', 'DRUCK', param ).focus();
    </script>

  • Conversion of the ABAP Report (ALV based) into BSP Application

    Hello Friends,
    I tried to convert the abap report into a bsp application. I have followed all the steps mentoined in the previous threads regarding this topic.
    I have created a simple Z report in CRM, that displays the business partner details from the table BUT000 based on the partner entered. Partner is the input given to this report. I have defined the partner field in PARAMETERS.
    Now I have written all the code in the onInitialization of the BSP Page looking at the previous threads and also in the layout of the page.
    submit ZTEST_PARTNER
    exporting list to memory and return
    with p_part = 'HR10079430'.
    and also the rest of the code.
    It is working fine. The BSP page is displayed with all the Business Partner details.
    Now the problem is I have another Z report that displays the result in the ALV grid. The report uses the Function Module REUSE_ALV_GRID_DISPLAY to display the output.
    If I use the same method above this is giving a dump, I mean it says the page cannot be displayed.
    So, how should I use the above method to convert the ALV Grid based Z report into a BSP Application.
    Please give your suggestions.
    Thanks & Regards,
    Raju.

    you cannot .
    even if you use a normal report to
    submit the alv grid report
    exporting list to memory and return
    it will show the alv on screen and will nt just export the list to memory.

  • Report does not display data

    I have a crystal XI report that when run will not display data; if the report should be six pages that is the number of pages that will be generated.  The problem is that the pages show up as blank.  If the blank pages are exported the exported file will contain data, if the report is sent to a printer the report will contain data, but no data is ever displayed on the screen.  This report has been loaded on 15 other computer and runs perfectly. Any help would be greatly appreciated.  By the way if this user logs in remotely and runs this report it will display data.

    A few ideas;
    1) Make sure you are working with [SP 6|https://smpdl.sap-ag.de/~sapidp/012002523100015859952009E/crxir2win_sp6.exe].
    You are on SP 2...
    [SP6 msm|https://smpdl.sap-ag.de/~sapidp/012002523100000634032010E/crxir2sp6_rdc_mm.zip]
    2) Try different resolutions
    3) Try to see if there is an updated video driver
    4) Make sure there is a default printer driver installed.
    5) Run [Modules|https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip] see if there are any differences in dlls loading on a box that works and the one that does not (CR and non CR dlls).
    Ludek
    Edited by: Ludek Uher on Feb 22, 2010 10:32 AM

  • Report that would display difference against BOM and Final Prod Orders

    Hello SAP Gurus,
    Is there a report that would display BOM and Final Materials that are used in production orders?
    Thanks in advance.

    Nanz,
    You can use COOIS as well as CO28 for this.
    In COOIS, select 'Components' in the 'List'.
    Give desired selection input & execute.
    In CO28, select 'Components in the initial screen.
    In the next screen give input as required & execute.
    Hope this helps you.
    SmanS

  • BW Report execution from BSP application

    Hi,
    I am developing a web interface using BSP. One of the application in that is exposing BW reports in web through BSP. Using "How-To NetWeaver '04", I constructed the URL in the format -
    http://<BW Server>:<Web AS port>/sapbw/bw/BEx?sap-language=EN&bsplanguage=EN&CMD=LDOC&TEMPLATE_ID=<Template>
    This URL gives me the output and I am able to call this from my BSP application.
    But while executing this report, I am getting popup to enter user id and password. In actual scenario, user will be logging in using one of the BSP application in R3and from there there will be a link to get this report. All my other application are in R/3 (like sales order / R3 reports) and only this report is from BW. What I did is I created a BSP application in BW and provided the report link there and I called this BW BSP application from R3 BSP application. In SICF for BSP application, I have provided my user id and password.
    Everything works fine except for the popup box. This popup appears even if I try to execute directly in BW server. BSP Webpage in BW is appearing with out any issues(so my SICF for BSP is working fine) and once I click the link to my report, the popup is coming. Kindly suggest how to suppress it.
    Note:  I posted this in Portal Development also
    Thanks,
    Krish

    I solved this by creating an Alias and also by changing the SICF for Mime object under BW. 
    Thanks,
    Krish

  • Error when saving Crystal Report  to SAP BW (via SAP toolbar)

    Dear Experts -
    Our landscape is:
    Backend - SAP BW7.4 with Service pack 5
    Crystal Version - Crystal Reports 2013 SP1 Patch 6
    Business Objects - SAP BI 4.1 SP1 Patch 6
    I'm trying to save a crystal report to SAP BW via the toolbar option, but the attached error is being returned.
    Also, if I try to create a new report from BW, an error is thrown.  'An error occurred while generating a new report template; No error'.
    Any feedback/pointers would be valuable.
    Regards,
    Tarun.

    I realize this post is a few months old, but did S. B. O. Shell Business One get this issue cleared up by installing the BW transports mentioned in Josh's reply?  I'm interested in knowing whether this was resolved as we are receiving the same error as the one shown in the initial post.
    Regards,
    Chris

  • Report is not displayed on the browser

    We have a 9iAs Oracle application(built in developer6i(forms and reports) patch12).The database version is Oracle 9.2.0.6.0.My problem is I have a report that is called from the form. If the print_receipt = 'Y', display the report.I have also an afterreport trigger that updates this print_receipt to 'N'.Somehow the afterreport trigger fires before the report is display thus giving a blank pdf output on the browser.My user has new pc and new operating system, Windows XP but they're still using Novell Netware for signing on to the network. Before she does not have any problem displaying the report, she was using Windows NT4 and Novell Netware for signing on to the network.Is there any limitations in Windows XP that interferes with the report? Is this known problem in report's afterreport triggers?Is there a workaround here so the report can be displayed?Thanks for the help.

    Hi,
    Try this may be it will help.
    Go to Iexplorer property - settings - Change (Check for newer version of stored pages to Automatically.
    This error is coming because the report runs twice, so the after report trigger is fired before anything is displyed & hance your report is not displayed.
    Thanks,
    Awadh

  • Call a ABAP Web-Dynpro-application via a BSP-Application

    We have a BSP-Framework, that call several applications among other things other BSP-Applications, ITS-Application and other systems. Now I want to integrate a ABAP Web Dynpro-Application.
    For the moment I can call the ABAP Web Dynpro-Application from our application.
    This application runs in the same session as the Framework (verify in transaction sm04).
    When I want to call another application in the Framework, the session will be killed (no more sessions in sm04). This happens also, when I want to call the ABAP Web Dynpro-Application a second time.
    I guess, that the ABAP-Framework thinks I want to go outside the system (for example www.google.de) and close the session. I found out, that this wouldn't happen, if the application were suspended. But I found no way to tell the application via a url-parameter to suspend.
    Can someone help me?

    Thx for the tip,
    but I can't firea suspend plug. Because I'm in BSP. I understand the docu so, that you have the option to call a other apllication like BSP from a ABAP Web Dynpro.
    I want to call the ABAP Web Dynpro form BSP like this way.
    1. Start BSP-Framework
    2. Call ABAP Web-Dynpro-Application from BSP
    3. Call another Application from BSP without automatically logout by unload ABAP Web Dynpro. (I have a chance to call the ABAP Web Dynpro again via url to suspend before I call the other app.)
    Regards Stefanie

  • Eliminating logon when calling R/3 transaction via BSP

    Is it possible to eliminate logon when calling SAP R/3 tcode via BSP. I run
    http://<FQDN>:<port>/sap/bc/gui/sap/its/webgui/!?client=%3c100%3e&transaction=SE80
    but have to login each time. I could embed my username/pwd on the url string, but is there another method?
    I also thought about using the URL iView parameters (Mapped User, Mapped Password) within Property Editor, but content admins will be able to see username and password when opening the iview. Any suggestions?
    Regards,
    James

    I figured this one out.
    Regards,
    James

Maybe you are looking for