BSP page result in ABAP

Hi,
I have developed the BSP page and calling it from the custome control in module pool
data: html_control TYPE REF TO cl_gui_html_viewer.
I have to store the result obtained from BSP page into Z table. The result appears in html control but i am unable to capture rersponse codes in abap program.
http://sap.laldv1.com:8000/sap/bc/bsp/sap/ztest/test.htm?sap-client=210&sap-language=EN&x_login=fdsf&x_tran_key=fdsfs&x_card_num=4
      DATA : appname      TYPE string VALUE 'ZTEST',
             ls_page_name TYPE string VALUE 'test.htm',
             cb_true      TYPE boolean,
             cb_false     TYPE boolean,
             url          TYPE string,
             c_url(2054)  TYPE c.
      MOVE : 'X' TO cb_true,
             '-' TO cb_false.
      CALL FUNCTION 'UPWB_GET_APPLICATION_URL'
        EXPORTING
          application          = appname
          page                 = ls_page_name
          ib_additional_params = cb_true
          ib_in_subgui         = cb_false
          ic_preview_type      = 'B'
        IMPORTING
          url                  = url.
      c_url = url.
      CONCATENATE c_url '&x_login=' log_id
                        '&x_tran_key=' pws
                        '&x_card_num=' wa_zcreddata-cc_no
                        '&x_exp_date=' wa_zcreddata-exp_date
                        '&x_amount=' wa_zcreddata-so_amt
                        '&sap-user=abap2'
                        '&sap-password=abap2'
                        INTO c_url.
*break abap2.
      CALL METHOD html_control->show_url
        EXPORTING
          url                  = c_url
        EXCEPTIONS
          cnht_error_parameter = 1
          OTHERS               = 2.
      IF sy-subrc GE 2.
        RAISE cntl_error.
      ENDIF.
****the result appears after runing  html_control->show_url which has to be captured in abap program.
Thanks
Ganesh

Hi,
I have developed the BSP page and calling it from the custome control in module pool
data: html_control TYPE REF TO cl_gui_html_viewer.
I have to store the result obtained from BSP page into Z table. The result appears in html control but i am unable to capture rersponse codes in abap program.
http://sap.laldv1.com:8000/sap/bc/bsp/sap/ztest/test.htm?sap-client=210&sap-language=EN&x_login=fdsf&x_tran_key=fdsfs&x_card_num=4
      DATA : appname      TYPE string VALUE 'ZTEST',
             ls_page_name TYPE string VALUE 'test.htm',
             cb_true      TYPE boolean,
             cb_false     TYPE boolean,
             url          TYPE string,
             c_url(2054)  TYPE c.
      MOVE : 'X' TO cb_true,
             '-' TO cb_false.
      CALL FUNCTION 'UPWB_GET_APPLICATION_URL'
        EXPORTING
          application          = appname
          page                 = ls_page_name
          ib_additional_params = cb_true
          ib_in_subgui         = cb_false
          ic_preview_type      = 'B'
        IMPORTING
          url                  = url.
      c_url = url.
      CONCATENATE c_url '&x_login=' log_id
                        '&x_tran_key=' pws
                        '&x_card_num=' wa_zcreddata-cc_no
                        '&x_exp_date=' wa_zcreddata-exp_date
                        '&x_amount=' wa_zcreddata-so_amt
                        '&sap-user=abap2'
                        '&sap-password=abap2'
                        INTO c_url.
*break abap2.
      CALL METHOD html_control->show_url
        EXPORTING
          url                  = c_url
        EXCEPTIONS
          cnht_error_parameter = 1
          OTHERS               = 2.
      IF sy-subrc GE 2.
        RAISE cntl_error.
      ENDIF.
****the result appears after runing  html_control->show_url which has to be captured in abap program.
Thanks
Ganesh

Similar Messages

  • How to call BSP page from Webdynpro ABAP ?

    Hi All,
         I have a BSP page which has a page attibute . I need to pass a parameter from Webdynpro ALV table to the BSP page attibute and also need to display that BSP Page . Can any one help me out , how to proceed in this ?
    Regards,
    Kalpana A .

    hi kalpana,
    Use Exit Plug and pass data as URL Parameter.
    http://help.sap.com/saphelp_nw04s/helpdata/en/45/1bc575ba064574e10000000a114a6b/content.htm
    for how to pass url please check this
    http://help.sap.com/saphelp_nw70/helpdata/EN/7b/fb57412df8091de10000000a155106/frameset.htm
    Yogesh N

  • BSP Page validation through ABAP in EventHandler

    Hello Experts,
    I am new in BSP Application.Kindly help me.
    I have created a page through HTML code, now I have to validate input fields through ABAP code instead of JAVASCRIPT.
    Can I do it in EventHandler.
    If yes then please let me know with some examples.
    Regards,
    Ankur.

    Hi anukur,
    Ok, Let me show you one example which i have done ok,may be that may help you out.
    layout  page is
    on input processing
    event handler for checking and processing user input and
    for defining navigation
    DATA:
    w_event TYPE REF TO cl_htmlb_event,
      w_obj TYPE REF TO object,
      w_carrid TYPE REF TO cl_htmlb_inputfield,
      r_carrid TYPE RANGE OF sflight-carrid,
      r_id LIKE LINE OF  r_carrid.
    CALL METHOD cl_htmlb_manager=>get_event
      EXPORTING
        request = runtime->server->request
      RECEIVING
        event   = w_event.
    CASE w_event->id.
      WHEN 'get'.
        CALL METHOD cl_htmlb_manager=>get_data
          EXPORTING
            request = runtime->server->request
            name    = 'inputfield'
            id      = 'carrid'
          RECEIVING
            data    = w_obj.
        w_carrid ?= w_obj.
        w_scarrid = w_carrid->value.
        w_input = w_scarrid.
        CLEAR: w_obj.
        IF w_scarrid IS INITIAL.
          page->messages->add_message(
      condition = 'w_id1'
      message = 'Enter carrid value'
      severity = page->messages->co_severity_error ).
        ENDIF.
        IF w_scarrid CA '0123456789~!@#$%^&*()_-+='.
          page->messages->add_message(
            condition = 'w_id2'
            message = 'Enter a valid carrid'
            severity = page->messages->co_severity_error ).
          exit.
        ENDIF.
        IF w_scarrid IS NOT INITIAL.
          TRANSLATE w_scarrid TO UPPER CASE.
          IF w_scarrid IS NOT INITIAL.
            r_id-low = w_scarrid.
            r_id-sign = 'I'.
            r_id-option = 'CP'.
            APPEND r_id TO r_carrid.
          ENDIF.
          SELECT carrid connid fldate price seatsmax seatsocc FROM sflight
    INTO TABLE t_flight WHERE
      carrid IN r_carrid.
          IF sy-subrc = 0.
            fl_flag = 1.
            EXIT.
          ELSE.
            page->messages->add_message(
            condition = 'w_id'
            message = 'No record exist '
            severity = page->messages->co_severity_error ).
          ENDIF.
        ENDIF.
    ENDCASE.
    Edited by: Bhavana Amar on Mar 19, 2010 8:35 AM

  • 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

  • Call an ABAP Function module on click of Button in BSP page

    Hello ,
    i would like to run a ABAP function module on click of a button in BSP page.
    or in other words i want a Funtion module ex: 'test1' to run after clicking this button ex: 'button1'
    and how to pass the values for a function module after clicking the button.
    i an new to bsp application .
    Can anyone help me on this .

    Hi Shalaxy,
    Triggering a URL to WDJ:
    I suppose the URL of WDJ app. is also a portal URL. I assume that from a BSP application inside portal you need to trigger the WDJ url.
    But the catch is that you cannot hotcode this URL, since it varies for a development, quality and production systems(diff. portal environments).
    To solve this issue, ABAP provides a system variable named sy-sysid, which says want system your ABAP system is, normally a development R/3 system will be associated to development portal system and quality R/3 to quality portal ans so forth.
    So you could have a internal table/db table/ variable for dev, quality or prod portal urls and from the bsp on button click based on the value in the sy-sysid you can trigger the url accordingly.
    Creating a URL in WDJ
    The above is about triggering a WDJ from BSP. But if you dynamically want to create a link in WDJ on a button click, then apparently you could not do that from BSP, since the applications are different. All you could do is to pass some URL parameters to WDJ application from BSP app. Then based on the URL parameters the WDJ application has to dynamically create a link and add it to its application.
    Hope it helps.
    Regards,
    Maheswaran
    Edited by: Maheswaran B on Mar 1, 2010 4:17 PM

  • 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

  • Trash in BSP-Pages for ABAP-reports

    Hi,
    it´s strange that I´m getting trash in the BSP-Pages that represent an ABAP report. I just can´t identify how it is produced and shows up between Titel and real list. I use
              SUBMIT (progr_name)
                 WITH SELECTION-TABLE sel_table
                 EXPORTING LIST TO MEMORY AND RETURN.
    and then CALL FUNCTION 'LIST_FROM_MEMORY'
    later    CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
    I make a loop with the output and save all in a variable of type string, which is later used in the layout page.
    After execution, I get something like:
         Title       page Nr.      User name
         trash
         more trash
         even more trash
         list
    the data that I describe as trash is information from the list, but it also appears where it must.
    Has anyone experience with it ?? Thanks

    I am also getting some "trash" at the beginning of my report in some cases. The report list I am sending the FM contains Material Descriptions and our descriptions (can) contain a combination of slashes (/), colons ( and commas (,) (eg. SPARES:DISPLAY/GASKET,MONO,GEMINI) - I find that if I remove the commas from the descriptions during the reporting, that I do not have this problem. However this is not a viable solution. Any ideas would be very helpful.

  • Assign a value from dropdownlist to input field value on BSP page

    Hi,
    I'm new to SAP and ABAP. We have a CRM project in which I have to maintain BSP pages.
    Now, coming to my problem: I have a input field with
    value = "//BTAdminH/HeaderInfo"
    This field is normally maintainable. The required function is now to set this field as not maintainable/readonly. Then, the value should be set automatically to an value, which will be selected from a dropdownListBox. After saving, the value HeaderInfo should have the same value like the selected value from the dropdownListBox.
    How can I now set the field as readonly (this should be the easier part) and
    how can I set the value for the HeaderInfo to the value of the selected value from the dropdownListBox?
    If I set it directly like this
    value = "//BTActivity/Priority"
    it is shown on the BSP page correclty, but it is not saved as HeaderInfo.
    Please help me.
    Enja

    Hello Gokul,
    test was only for test purposes! I am using as a separator the plus sign!
    But this is not the problem!
    In debugging, the local variable has the concatenated value! So, this is working!
    oncatenate ls_ddlb1-value ls_ddlb2-value ls_ddlb3-value into lv_headerinfo SEPARATED BY ' + '.
    But when I assign the value of my set_headerinfo to the local variable, then it is returning only the separator sign!!!
    if BTAdminH->GET_HEADERINFO( 'HEADERINFO' ) is initial.
        BTAdminH->SET_HEADERINFO( attribute_path = 'HEADERINFO' value = lv_headerinfo ).
      endif.
    If I declare the local variable as one of the dropdown values, then it is getting populated also for set_headerinfo
    lv_headerinfo  =ls_ddlb1-value.
    So, the assigning is also working! But it is not working, when the local variable equals more than one value! I hope that I could explained it in the right way for you!!!!
    So. why is the value for set_headerinfo not the same as the one for the local variable! The local variable has the correct value after the concatination.
    Regards
    Enja

  • Display image in BSP page,images are on a web server outside of SAP

    Hi,
    I am creating a BSP page for employee profile.The page needs to show an emp picture along with other info.The images are not in the MIME repository,they are stored in a separate web server.I am able to display the page using
    <img border="0"                     src="http://.com/xyz/xyz.bmp" >
    However this is a non secured test server. If the images are on a secured server,I am assuming,an id ,pswd authentication will be required.Can I get the authentication done automatically so that the page is rendered seamlessly for the end user?
    Would SSO help if this web server is a portal server?what if the web server is not a portal server?

    Hi Manidipa,
    The Http class in SAP can also be used in passing the required authentication information to the non-SAP portal system.
    http://searchsap.techtarget.com/whitepaperPage/0,293857,sid21_gci1084087,00.html
    There is an article written by Angeli Axel which does the same. The article has got ABAP HTTP classes and methods to get and post the parameters to the non-SAP portal system.
    The same solution can be done by passing the credentials in the url. The custom solution would be to pass the required credentials in the url and the receiving application should grab those information from the url and confirm the authentication. After that it should be able to provide you the image. After getting the image it can be simply displayed in your BSP using iframe tag.
    For eg if the receiving side is in java, then the following code can be used to receive the username and password. Once you get this you can verify the validity depending on the datasource whether LDAP(MS-ADS, Sun one, Novell edirectory) or ordinary database(Oracle, MS SQL Server .. etc) is used for storing the credentials.
    try {
              String userName = request.getParameter("username");
              String password = request.getParameter("password");
              if (validateUser(userName, password)) {
                 response.sendRedirect("mainpage.jsp");
    The main page here you display the image
    } catch (Throwable t) {
    The above code should be considered as pseudo code for any server side language.
    Please let me know if this helps.
    With regards,
    Rajesh Khanna Venkatesan.

  • 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

  • To Intigrate Google Map in BSP page

    Hello Experts,
        My requirement is to show the google map in my BSP page. I have generated API key for that also. the following code works in .html extension but it wont work if i create a view in IC webclient and paste in its .htm page
    But same code with BSP tags. wont work. It will just gives you a blank screen.
    Bsp tags added are as follows
    <%@page language="abap" %>
    <%@extension name="thtmlb" prefix="thtmlb" %>
    <%@extension name="chtmlb" prefix="chtmlb" %>
    <%@extension name="bsp" prefix="bsp" %>
    <%@extension name="htmlb" prefix="htmlb"%>
    http://code.google.com/apis/maps/documentation/examples/event-argumentsl   
    You People can have a look at source code which i have used.right-click view source code
    i found the follwing blog. I tried the same in system still the view is grayed out . I cant see any thing
    Geocode Business Partner with Google Maps
    suggest me What else should be done .
    Thanks in advance
    SRiNi

    Put the below code in your layout of the page/view.
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page title = "FIRST PAGE ">
        <htmlb:form>
         <iframe src="URL OF GOOGLE MAPS" width="100%" height="500px">
         </iframe>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>

  • Step by Step Debugging in BSP page

    Hi,
      Can any one tell me How to do the Step by step debugging? In ABAP application we are doing through /h command.Like this any command is there in BSP page for debugging? And where actually we need to place the break point means in Controller or in View?
    Thanks in advance,
    Regards,
    Anu.

    HI
    GOOD
    GO THROUGH THESE LINKS
    http://www.sappro.com/downloads/technical_guides/WebAppDevTOC.pdf
    http://www.sap.com/solutions/netweaver/pdf/50052038.pdf
    THANKS
    MRUTYUN

  • 'form' is not useable in bsp page?

    HI.
    here is only simple example in oninitialization bsp page.
    data:      disp_alv  type as4flag value 'X' .
    perform test using  disp_alv.
    form test  using   disp_alv  type as4flag   .
    endform.                 
    but it shows error 'statement endmethod missing'
    why this error occur? did I missing something?
    Regards
    Lee.

    Check the below thread..
    Re: Calling a subroutine from BSP application
    Re: ABAP style FORM..ENDFORM in BSP ...?
    <i>* Reward each useful answers</i>
    Raja T

  • Displaying document flow in a BSP Page

    In my BSP for a service notificaiton, I have the need to add a object that will display the document flow from the notificaiton. In addition the requirment is to be able to retrieve the sales order number from the flow and use it to callup the sales order as a BSP page.  We modified the Service Notificaiton so that we can create different sales order types by using the action box, so we could have multipy sales order and quotations number we have to display.  I checked on the ABAP form to see if there was anything there and I did find a few BAPI's that might work, but I also saw reference to tables that could store the data.
    Has anybody here had to do this for a BSP page and if so what did you do.
    Thanks again for all the help.

    hi,
    i used that code in scriplets. Actually my problem is I got one pdf file from session and i stored that file in a File object. the code is ..
    File pdfDocument = (File) session.getAttribute(CommonConstants.EBILL_PDF_DOCUMENT);
    now i have to display this pdf file in jsp..

  • Bsp page can't be displayed

    Hello,
    I am learning bsp, using sap Sap tutorials. Problem I have is that I can't display
    the BSP pages. The first exercise is very simple and I was working at my place  on mini sap system. In the office on system 6.4, and internet explorer version 6.2, SP2
    I have always the info that page cannot be displayed due to web site problems or browser has to be adjusted. To be sure I tried to test BSP pages done by someone else, and result is the same .
    Please advice
    Christo

    Hi Christo....
    You probably need to uopdate your host files...!
    Check out this thread....I had earlier replied on how to update <b>Host Files...</b>
    Re: The page cannot be displayed error
    <i>Do reward each useful answer..!</i>
    Thanks,
    Tatvagna.

Maybe you are looking for

  • Can 2 websites share the same cookie?

    Hi, Can two different websites share the same cookie? For example, Blah-Forums.com and Blah-Store.com are interlinked and share the same audience. When a person signs on at Blah-Forums.com, I want to make it so that he/she can move to Blah-Store.com

  • Reflecting updates to a ListCell that contains a mutable object

    Hi, I've seen many variants of this question, but unfortunately have not found the desired answer, so I thought to ask here. Apologies if missing something obvious! Objective: I start individual Tasks in batches. A ListCell reflects each Task, from i

  • How to add set attribute method in webdynpro abap using code wizard.

    Hi developer, I am new to webdynpro abap , i have developed a small component from sap technical abap but i am not able to add the set attribute method using read context node /attribute in wizard code ,pleae guide me in solution. thanks, ravi.

  • Ituens error

    i am tring to sync my iphoto liberary with my iphone but the itune shown the below message "The iphone cannot be synced. An unknown error occurred (-50)" can anybody help me please

  • Where can I find little arrows and objects to display using an alerter?

    I need a little arrow to turn red or green depending on a value.  I can make the alerter work but not find a convenient way to put the find little arrow to put in the cell to display.