Executing BW Queries in BSP Page

Hi,
  Can someone provide source code taking one query and accessing it through the BSP event handler page?
  Will the BSP Page can replicate the same functionality of the BEX web application?
  Can i have drilldown,graphics everything in BSP application?
Thank you
arun

Hi,
Answer to Arun:
<i>Can someone provide source code taking one query and accessing it through the BSP event handler page?</i>
You have to use CL_RSR_REQUEST/CL_RSR_DATA_SET classes (other option is OLAP BAPIs where u have to use MDX stts.)to execute BW queries thru ABAP. (sample code is available in ABAP forum)
<i>Will the BSP Page can replicate the same functionality of the BEX web application?</i>
No, you have to code everything yourself. but will be a tedious job.
<i>Can i have drilldown,graphics everything in BSP application?</i>
Yes you can, but again as i said you have to code everything , it dosent come easy as in the case of WAD.
Answer to LUCA:
One of the possible ways is to use redirect url (url poinintg to the BW query url) in the BSP page.
you can also pass query variable values via URL.
example:
TEMPLATEID=<template name>&var_name_1=<variable name>&var_value_ext_1=<var value>&var_name_2=<var name 2>&var_value_ext_2=<variable value 2>
Hope it helps.
Regards
Raja
Note: Better place for this question would be BSP forum
Message was edited by: Durairaj Athavan Raja

Similar Messages

  • ADF how to display a processing page when executing large queries

    ADF how to display a processing page when executing large queries
    The ADF application that I have written currently has the following structure:
    DataPage (search.jsp) that contains a form that the user enters their search criteria --> forward action (doSearch) --> DataAction (validate) that validates the inputted values --> forward action (success) --> DataAction (performSearch) that has a refresh method dragged on it, and an action that manually sets the itterator for the collection to -1 --> forward action (success) --> DataPage (results.jsp) that displays the results of the then (hopefully) populated collection.
    I am not using a database, I am using a java collection to hold the data and the refresh method executes a query against an Autonomy Server that retrieves results in XML format.
    The problem that I am experiencing is that sometimes a user may submit a query that is very large and this creates problems because the browser times out whilst waiting for results to be displayed, and as a result a JBO-29000 null pointer error is displayed.
    I have previously got round this using Java Servlets where by when a processing servlet is called, it automatically redirects the browser to a processing page with an animation on it so that the user knows something is being processed. The processing page then recalls the servlet every 3seconds to see if the processing has been completed and if it has the forward to the appropriate results page.
    Unfortunately I can not stop users entering large queries as the system requires users to be able to search in excess of 5 million documents on a regular basis.
    I'd appreciate any help/suggestions that you may have regarding this matter as soon as possible so I can make the necessary amendments to the application prior to its pilot in a few weeks time.

    Hi Steve,
    After a few attempts - yes I have a hit a few snags.
    I'll send you a copy of the example application that I am working on but this is what I have done so far.
    I've taken a standard application that populates a simple java collection (not database driven) with the following structure:
    DataPage --> DataAction (refresh Collection) -->DataPage
    I have then added this code to the (refreshCollectionAction) DataAction
    protected void invokeCustomMethod(DataActionContext ctx)
    super.invokeCustomMethod(ctx);
    HttpSession session = ctx.getHttpServletRequest().getSession();
    Thread nominalSearch = (Thread)session.getAttribute("nominalSearch") ;
    if (nominalSearch == null)
    synchronized(this)
    //create new instance of the thread
    nominalSearch = new ns(ctx);
    } //end of sychronized wrapper
    session.setAttribute("nominalSearch", nominalSearch);
    session.setAttribute("action", "nominalSearch");
    nominalSearch.start();
    System.err.println("started thread calling loading page");
    ctx.setActionForward("loading.jsp");
    else
    if (nominalSearch.isAlive())
    System.err.println("trying to call loading page");
    ctx.setActionForward("loading.jsp");
    else
    System.err.println("trying to call results page");
    ctx.setActionForward("success");
    Created another class called ns.java:
    package view;
    import oracle.adf.controller.struts.actions.DataActionContext;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.model.generic.DCRowSetIteratorImpl;
    public class ns extends Thread
    private DataActionContext ctx;
    public ns(DataActionContext ctx)
    this.ctx = ctx;
    public void run()
    System.err.println("START");
    DCIteratorBinding b = ctx.getBindingContainer().findIteratorBinding("currentNominalCollectionIterator");
    ((DCRowSetIteratorImpl)b.getRowSetIterator()).rebuildIteratorUpto(-1);
    //b.executeQuery();
    System.err.println("END");
    and added a loading.jsp page that calls a new dataAction called processing every second. The processing dataAction has the following code within it:
    package view;
    import javax.servlet.http.HttpSession;
    import oracle.adf.controller.struts.actions.DataForwardAction;
    import oracle.adf.controller.struts.actions.DataActionContext;
    public class ProcessingAction extends DataForwardAction
    protected void invokeCustomMethod(DataActionContext actionContext)
    // TODO: Override this oracle.adf.controller.struts.actions.DataAction method
    super.invokeCustomMethod(actionContext);
    HttpSession session = actionContext.getHttpServletRequest().getSession();
    String action = (String)session.getAttribute("action");
    if (action.equalsIgnoreCase("nominalSearch"))
    actionContext.setActionForward("refreshCollection.do");
    I'd appreciate any help or guidance that you may have on this as I really need to implement a generic loading page that can be called by a number of actions within my application as soon as possible.
    Thanks in advance for your help
    David.

  • How to create empty BSP page and execute it

    Hi,
    Please give me the steps for creating an empty bsp page and executing it using transaction SE80.
    I have created a package and a BSP application.
    I need to get a url for this page that points to a document/image. I need help with this urgently and would appreciate a quick response.
    Regards,
    Meenakshi

    Hi,
    Please have a look at
    http://help.sap.com/saphelp_nw04/helpdata/en/46/bb181aab4811d4968100a0c94260a5/content.htm
    regards
    Mark

  • Reg: Executing BSP Pages

    Hi,
    I am working on SAP R/3 4.7. In the web application builder (SE80), the preview tab is not present. How to enable it.?. Also not able to execute the pages. I tried by copying the url from the properties tab. How to execute the BSP page..?
    Thanks in advance.
    G.Natarajan

    The preview tab was removed (since it really only worked with static HTML anyway) by SAP in recent support packages.  That has been discussed on the forum in the past if you want all the details.
    What kind of problems are you having testing your application?  Do you get any error messages?
    I'd bet the answer to your problem is in one of the following weblogs. 
    /people/mark.finnern/blog/2003/09/18/bsp-trouble-shooting-browser-settings
    /people/brian.mckellar/blog/2003/09/25/bsp-in-depth-fully-qualified-domain-names
    /people/brian.mckellar/blog/2004/06/11/bsp-trouble-shooting-getting-help

  • Exception CX_SY_OPEN_SQL_DB while executing a BSP page

    Hi,
    I have created a BSP app'n with 2 pages. In one page i am using a class interface within that one method. In that method im firing a select query.
    If i run the BSP page, im getting the CX_SY_OPEN_SQL_DB exception with DBIF_RSQL_INVALID_RSQL error.
    I am not able to understand this issue. If any one had any idea, please reply me. I am very thankful if you do this.
    Thanks,
    Kumar

    Nitin,
    First , check if the Query is correct , then check the backed DB for any additional details , and also you might get more help if you post the same question in the BSP forums.
    How are you calling the query , do you have any internal tables or resultset where you store the values ?
    Arun

  • Remotely Executing BW Queries

    Hello,
    Trying to execute BW Queries against BW Cube data via BAPI calls over SAPJCO.  I use the BAPIs BAPI_MDDATASET_CREATE_OBJECT (to construct the MDX-based query) and BAPI_MDDATASET_GET_DATA_XMLA to return query results in XML.
    the XML in BAPI_MDDATASET_GET_DATA_XMLA is being returned in a non-english character set.  Appears to be mandarin chinese.  I don't set the characterset to use, and no other BAPI call returns results in this characterset.  Is this a known issue?  What to do about it?

    Hi,
    Answer to Arun:
    <i>Can someone provide source code taking one query and accessing it through the BSP event handler page?</i>
    You have to use CL_RSR_REQUEST/CL_RSR_DATA_SET classes (other option is OLAP BAPIs where u have to use MDX stts.)to execute BW queries thru ABAP. (sample code is available in ABAP forum)
    <i>Will the BSP Page can replicate the same functionality of the BEX web application?</i>
    No, you have to code everything yourself. but will be a tedious job.
    <i>Can i have drilldown,graphics everything in BSP application?</i>
    Yes you can, but again as i said you have to code everything , it dosent come easy as in the case of WAD.
    Answer to LUCA:
    One of the possible ways is to use redirect url (url poinintg to the BW query url) in the BSP page.
    you can also pass query variable values via URL.
    example:
    TEMPLATEID=<template name>&var_name_1=<variable name>&var_value_ext_1=<var value>&var_name_2=<var name 2>&var_value_ext_2=<variable value 2>
    Hope it helps.
    Regards
    Raja
    Note: Better place for this question would be BSP forum
    Message was edited by: Durairaj Athavan Raja

  • Open new BSP page

    Hi all,
    i am in ABAP report and i want to open new BSP page from the ABAP report
    becuse some time it is open the BSP page in the same session of SAP system.
    and also how i can maximize it automatically in the same way of (F11 key).
    is there any documents that describe and explain the signature of this method.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
    EXPORTING
           DOCUMENT      = 'XXXXXX .......'
         APPLICATION            = 'X'
         PARAMETER              =
         DEFAULT_DIRECTORY      =
         MAXIMIZED              =
         MINIMIZED              =
         SYNCHRONOUS            =
           OPERATION              = 'OPEN'
    EXCEPTIONS
            CNTL_ERROR             = 1.

    If you want to open the BSP in Browsers, you can call the FM CALL_BROWSER & pass your BSP appl URL. This will open the BSP from R/3.
    OR you can use the HTML viewer to call URL..
    Look at the below blog for the same.
    /people/thomas.jung3/blog/2004/08/26/updated-calling-a-bsp-application-from-a-sapgui-transaction
    Hope this will help you.
    <b>*Reward each useful answer</b>
    Raja T

  • Download to excel in different tabs from bsp page

    Hi all,
    I have a requirement in which I have to download to xl-sheet in different tabs based on some conditions from a bsp page.
    I am successful in downloading data into different tabs.
    Now I had written the piece of code required to download to xl in a function module
    and I am calling that function module when pressing a button in bsp page.
    When I run the fm seperately its working but when I run it from bsp page its not working.But while debugging I found that the fm is being called and executed perfectly without any errors.
    But the xl is not being created on our side.
    Can anyone suggest me how to proceed on this.
    Helpful answers will be rewarded.
    Thanks,
    Uga

    Hi Raja,
    Yes I am using ole objects.
    For more clarity I am alos pasting my code.
    If this is not possible then please guide how to achieve this in BSP.
    *******************CODE*****************************************
    include ole2incl.
    data: w_cell1 type ole2_object,
    w_cell2 type ole2_object.
    *--- Ole data Declarations
    data: h_excel type ole2_object, " Excel object
    h_mapl type ole2_object, " list of workbooks
    h_map type ole2_object, " workbook
    h_zl type ole2_object, " cell
    h_f type ole2_object, " font
    gs_interior type ole2_object, " Pattern
    worksheet type ole2_object,
    h_cell type ole2_object,
    h_cell1 type ole2_object,
    range type ole2_object,
    h_sheet2 type ole2_object,
    h_sheet3 type ole2_object,
    gs_font type ole2_object,
    flg_stop(1) type c.
    Internal table Declaration
    data:gt_kna1 type standard table of kna1,
         gt_knvv type standard table of knvv,
         wa_kna1 type kna1,
         wa_knvv type knvv.
    types: data1(1500) type c,
    ty type table of data1.
    data: it type ty with header line,
    it_2 type ty with header line,
    it_3 type ty with header line,
    rec type sy-tfill,
    deli(1) type c,
    l_amt(18) type c.
    data: begin of hex,
    tab type x,
    end of hex.
    field-symbols: <fs> .
         constants cns_09(2) type n value 09.
    assign deli to <fs> type 'X'.
    hex-tab = cns_09.
    <fs> = hex-tab.
    data gv_sheet_name(20) type c .
    SELECT kunnr name1
      INTO corresponding fields of table gt_kna1
      FROM kna1
    UP TO 1000 ROWS.
    SELECT kunnr vkorg
      INTO corresponding fields of table gt_knvv
      FROM knvv
    UP TO 3 ROWS.
    loop at gt_kna1 into wa_kna1.
    concatenate  wa_kna1-kunnr  wa_kna1-name1 into it separated by deli.
    append it.
    clear it.
    endloop.
    loop at gt_knvv into wa_knvv.
    concatenate wa_knvv-kunnr wa_knvv-vkorg into it_2 separated by deli.
    append it_2.
    clear it_2.
    endloop.
    if h_excel-header = space or h_excel-handle = -1.
    *start Excel
    create object h_excel 'EXCEL.APPLICATION'.
    endif.
    call method of h_excel 'Workbooks' = h_mapl.
    set property of h_excel 'Visible' = 1.
    *add a new workbook
    call method of h_mapl 'Add' = h_map.
    gv_sheet_name = 'KNA1'.
    get property of h_excel 'ACTIVESHEET' = worksheet.
    set property of worksheet 'Name' = gv_sheet_name .
    *--Formatting the area of additional data 1 and doing the BOLD
    call method of h_excel 'Cells' = w_cell1
    exporting
    #1 = 1
    #2 = 1.
    call method of h_excel 'Cells' = w_cell2
    exporting
    #1 = 1
    #2 = 50.
    call method of h_excel 'Range' = h_cell
    exporting
    #1 = w_cell1
    #2 = w_cell2.
    *CALL METHOD OF gs_cells 'Select' .
    get property of h_cell 'Font' = gs_font .
    set property of gs_font 'Bold' = 1 .
    data l_rc type i.
    call method cl_gui_frontend_services=>clipboard_export
    importing
    data = it[]
    changing
    rc = l_rc
    exceptions
    cntl_error = 1
    error_no_gui = 2
    not_supported_by_gui = 3
    others = 4.
    call method of h_excel 'Cells' = w_cell1
    exporting
    #1 = 1
    #2 = 1.
    call method of h_excel 'Cells' = w_cell2
    exporting
    #1 = 1
    #2 = 1.
    PERFORM err_hdl.
    call method of h_excel 'Range' = range
    exporting
    #1 = w_cell1
    #2 = w_cell2.
    call method of range 'Select'.
    *PERFORM err_hdl.
    call method of worksheet 'Paste'.
    ****for second sheet**********
    GV_SHEET_NAME = '2ND SHEET'.
    gv_sheet_name = 'Knvv'.
    get property of h_excel 'Sheets' = h_sheet2 .
    call method of h_sheet2 'Add' = h_map.
    set property of h_map 'Name' = gv_sheet_name .
    get property of h_excel 'ACTIVESHEET' = worksheet.
    *--Formatting the area of additional data 1 and doing the BOLD
    call method of h_excel 'Cells' = w_cell1
    exporting
    #1 = 1
    #2 = 1.
    call method of h_excel 'Cells' = w_cell2
    exporting
    #1 = 1
    #2 = 50.
    call method of h_excel 'Range' = h_cell
    exporting
    #1 = w_cell1
    #2 = w_cell2.
    get property of h_cell 'Font' = gs_font .
    set property of gs_font 'Bold' = 1 .
    call method cl_gui_frontend_services=>clipboard_export
    importing
    data = it_2[]
    changing
    rc = l_rc
    exceptions
    cntl_error = 1
    error_no_gui = 2
    not_supported_by_gui = 3
    others = 4.
    call method of h_excel 'Cells' = w_cell1
    exporting
    #1 = 1
    #2 = 1.
    call method of h_excel 'Cells' = w_cell2
    exporting
    #1 = 1
    #2 = 1.
    PERFORM err_hdl.
    call method of h_excel 'Range' = range
    exporting
    #1 = w_cell1
    #2 = w_cell2.
    call method of range 'Select'.
    PERFORM err_hdl.
    call method of worksheet 'Paste'.
    Can you people give me inputs so that I can proceed further.
    Thanks,
    Uga

  • How to call function module in R/3 from an BSP Page

    Hi Experts,
    I am new to ABAP and BSP as well.
    I am creating an BSP page through which I want to call an function module in R/3 which will fetch a file from the application server and place into an internal table.
    I have identified the function module.
    My questions are:
    Since I am going to have an web interface where on a button click the file should be uploaded to the intrernal table.So how do I call the function module.
    Can I use JSP and ABAP together in an BSP page.
    Thanks
    Ankit

    Hello Ankit,
    Please check the following link:
    http://help.sap.com/saphelp_47x200/helpdata/en/bd/ac1e3a0088e042e10000000a11402f/frameset.htm
    I think it will answer all your queries.
    Regards,
    Siddhesh

  • Calling a BSP page from ABAP programme

    Dear Friends...
            I am cslling a BSP... from an ABAP program... for that I have used this class and also a function module to ckeck.. actually from the abap program it invoks the BSP page very nicely and as my logic for invoking the BSP is a part of the Business Object and it is associated with the Enterprise portal so... when i reach the ep and trigger that business object to instantiate the BSP page from my calling logic of abap... it goes to the ITS and port 80 or something and didnt produce the BSP.. and only the blank screen was there...kindly help me how i am supposed to instantiate the BSP from properly from ABAP by interfacing the EP... my code is given below...
    data :
        lv_url type string.
      concatenate
        'http://sapdevbp.sbic.co.za:8041/sap(bD1lbiZjPTIwMA==)'
        '/bc/bsp/sap/z_updatemng/bp.htm?bpid=' object-key-businesspartnerid
        into lv_url.
    call method cl_gui_frontend_services=>execute
      exporting
        document = lv_url
      exceptions
        others   = 1.
    please help....
    me...
    regards
    Naim

    Instead of hard coding the URL try to get the URL of the BSP application with the below code
    CALL METHOD cl_http_ext_webapp=>create_url_for_bsp_application
    EXPORTING
    bsp_application = '<BSP application name'
    bsp_start_page = <start page e.g default.htm>
    bsp_start_parameters = params " any parameter you want to pass along with url
    IMPORTING
    local_url = url.
    Then try out passing the URL to the execute function

  • Call function module from BSP page

    Hi Experts,
    I am new to ABAP and BSP as well.
    I am creating an BSP page through which I want to call an function module in R/3 which will fetch a file from the application server and place into an internal table.
    I have identified the function module.
    My questions are:
    Since I am going to have an web interface where on a button click the file should be uploaded to the intrernal table.So how do I call the function module.
    Can I use JSP and ABAP together in an BSP page.
    Thanks
    Ankit

    Hello Ankit,
    Please check the following link:
    http://help.sap.com/saphelp_47x200/helpdata/en/bd/ac1e3a0088e042e10000000a11402f/frameset.htm
    I think it will answer all your queries.
    Regards,
    Siddhesh

  • BSP Page Error on ECC 6.0

    Hi Friends,
    I am facing strange error between BSP page to page interaction on ECC 6.0 Version and also we are using SAP provided bsp application i.e " HTMLB_samples ". This is first time we are executing the bsp application after system migrated to ECC 6.0 Version.
    The BSP page error behavior is as follows.
    When a call is made to other bsp page and corresponding page is able to identify as well displaying, however I am getting a javascript  error message which is notified on the status bar of the browser stating that error on page. If I double click the same error message then I can see the following error messsage.
    Line 22
    Char 23
    Error Object Expected
    Code 0
    http://<host name>:9000/sap(bD1lbiZjPTQwMg==)/bc/bsp/sap/htmlb_samples/breadcrumbSample.htm.htm?
    FYI - All other standard BSP application are facing same error after system is migrated to ECC 6.0.
    Can anyone please let me know the reason as to why a java script error is being thrown ?
    Thanks in advance..
    Best Regards,
    Suresh

    Hi,
    Check once the javascript,there might be error in the script.
    I too faced the same problem while doing BSP application.there was problem in the script.
    Regards,
    jaya

  • Flat file Upload BSP page

    Hi Marc,
    I am following the July version of how-to. When generating the BSP page, I am told checkbrowser.htm and js.htm are not available. When I create a checkbrowser.htm and point the include to js3.htm, which is one of the page fragment available, there are a few other errors coming out. What am I missing?

    Do you already know if the flat file upload is possible from a multi planning area? Because I get the error message that my multi planning area does not exist when executing the function.
    Thnx.

  • Custome theme to custom applications and BSP pages

    Hi all,
    I would like to know how I can apply the same custom theme thats coming up with the standard applications.. to be applied to the custom ABAP WDP applications.
    And also want to apply the same theme to the EREC and LSO BSP pages.
    We have already created our own theme and applied that, we are able to see the modified theme in our standard ESS applications. But its not reflecting the same to the custome ABAP WDP applications.
    Do let me know where i am going wrong ...
    Thanks,
    NR

    NR,
    If you are displaying WDA from portal you need to follow the below mentioned steps to assign portal theme to WDA
    1.for assigning custom theme to the WDA pages you need to create configuration
    2.go to the webdynpro component-right click on the webdynpro application for that componet and create/change configuration.
    3.give some name and click on create
    4.go to properties tab and select external portal style sheet and save it
    5.go to iview properties for that WDA in portal and fill the configuration name with the name u created above
    6.stylesheet value to controls and select yes for support portal stylesheet.
    if you are executing WDA from backend itself then you need to pass a parameter to the application like sap-wd-configid=<name of the theme>
    for BSP applications change the iview properties
    stylesheet value to controls and select yes for support portal stylesheet.
    reward points if helpful

  • Internal table to BSP Page

    how do I fill up the internal table on BSP page.

    I have the following code in a view
    <htmlb:textView text   = "PO # "
                    design = "EMPHASIZED" />
    <htmlb:inputField invalid  = "false"
                      value    = "po number"
                      required = "true" />
    v_po_num type ref to my_model
    but when I execute the BSP, i'm getting "po number" displayed in the PO number field.  Couldn't figure out
    why it is not displaying the value retrieved from the model method.

Maybe you are looking for

  • Adding a window to container error

    I have this table that I want to add to a my main program. The table works but when I add the table module to the main program I get an error. Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: adding a window to a container T

  • I can play music from my ipod on my computer but now i cant hear anything from headphones

    i can play music from my ipod on my computer but now i cant hear anything from headphones

  • Greek entries in Contacts

    I have several contacts entered in Greek on my contacts app.They all appear at the bottom of the list of contacts I would like them to appear either on their own alphabetized list or within the english alphabet. Is there a way to add a Greek alphabet

  • New shuffle will play 2 or 3 songs then quit

    Brand new shuffle will play 2 or 3 songs then go dead.  battery has a full charge.  nothing seems to work

  • Lumia 800 Can's set up to Works Exchange Server

    Hi There. Just bought the new Lumia 800, and find it kind of cool. Uses loooots of battery though. I have a problem setting it up to connect with my works exchange server. - I put in the email and the password, it wont connect -I then key in my usern