Calling ABAP Code From BSP

Hello all,
I dont have much idea of BSP ans would like to have some inputs from you all.
I would like to know that can I call ABAP transaction from BSP page ?
I have got a set of column entries just as an ALV column on my BSP page and I would like to provide hotspot or double click functionality so that for each of the entries in the table , the BSP page navigates to ABAP tcode and back to BSP page.Is this functionality possible?
any help would highly be appreciated.
Regards
Amruta

Hi Amruta ,
You can't call an R/3 transaction directly from BSP.
But you can achieve all the functionalities it does .
for ex ..if an r/3 transaction is a report , u hav to code in BSP editor .u can call function modules from BSP .
But one thing u hav to concern is ,,in BSP Apllication logic is seperatd from Business logic .
U hav to move all your results into an itab / params and display that inside HTML tables .
Start ur journey from here .......
http://help.sap.com/saphelp_erp2004/helpdata/en/e6/e23fd8c47e11d4ad320000e83539c3/frameset.htm
All the best .
Regards,
J

Similar Messages

  • Urgent: call ABAP program from BSP

    hi BSP experts,
    We just want to trigger an ABAP program to say "Hello World" in BSP and see the wording "Hello World" on web browser when running it from BSP.  One BSP expert Raj gave the answer by using the following in BSP:
    oninitialization:
    submit ('z_program_name') and return exporting list to memory.
      call function 'LIST_FROM_MEMORY'
           tables
                listobject = listobject.
      call function 'WWW_HTML_FROM_LISTOBJECT'
           exporting
                report_name = 'z_program_name'
           tables
                html        = html
                listobject  = listobject.
      clear output_str.
      loop at html into html_wa.
        concatenate output_str html_wa into output_str.
      endloop.
    layout code:
    <htmlb:content design="design2003">
    <htmlb:page title = " ">
    <htmlb:form>
    <%= output_str %>
    </htmlb:form>
    </htmlb:page>
    </htmlb:content>
    We put the above in our BSP and then activate them, but get the following error:
    Field "LISTOBJECT" is unknown. It's neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement."DATA" statement.
    And the error stopps here:
    submit ('z_program_name') and return exporting list to memory.
    call function 'LIST_FROM_MEMORY'
    tables
    listobject = listobject.
    Any idea? 
    We will give you reward points!

    hi Tanguy,
    Eventually, I have figured it out on how to make the code works by showing "Hello World!" on web browser. But actually we would like to run another ABAP program which open a new container on users' machines, download an Excel template stored on server to the opened container on users' machinese, and then dump SAP table data to the opened excel template. This program works very well through SAP GUI, but users would like to run it on web that we tried to run this program in BSP, but it doesn't work with your code! Any idea?
    Thanks alot!

  • Calling SAP Transaction from BSP

    I wonder whether it is possible to call SAP transaction from BSP application and pass to it some data; e.g., PO# when calling VA02?
    The called transaction could appear in a separate MS IE Window (like in some Portal applications) or in SAP GUI.
    Any help will be appreciated.
    Thank you in advance

    I have launched the Java SAPGui from BSP pages before.  I used SNC so that the users were logged on via Single Sign On.  I store the Java Gui in the Mime directory.  You can force the startup transaction.  Theorectically you could also Gui Scripting to try and control the Gui and force in the default value for your PO field.  I have not tried that however.  You will probably want to check the Service Marketplace for documents on the Gui Scripting.  The following is the code from my BSP page to launch the Java Gui in the Browser as an applet:
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <HTML>
    <HEAD>
      <TITLE>SAPGUI for the Java Environment</TITLE>
      <STYLE type="text/css">
          body { margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom:0px; }
      </STYLE>
    </HEAD>
    <BODY scroll="no">
    <SCRIPT language="JavaScript">
    // user configurable part starts here
    var pluginurl         = '';
    var scriptable     = 'true';
    var codebase         = '.';
    var jnlp           = 'platin.jnlp';
    var keepalive      = 'true';
    var frog           = 'true';
    var trace          = '';
    var tracefile      = '';
    var connectionData = 'conn=/M/nts163/S/3620/G/SPACE/&tran=SE80&clnt=088&fast=true&sncon=true&sncname=p:[email protected]&sncqop=9';
    // user configurable part ends here
    // verify if Java Plugin as control in Internet Explorer or Java Plugin for Netscape or native JRE of browser must be used
    var jre = 'control';
    if(navigator.platform.indexOf("Mac") > -1)
       jre = 'native';
    else if (navigator.appName.indexOf("Netscape") != -1)
       jre = 'plugin';
    document.open();
    switch (jre)
    case 'control':
        document.writeln('<OBJECT CLASSID  = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"                               ');
        document.writeln('    ID       = "PlatinGUI"                                                                    ');
        document.writeln('    CODEBASE = "j2re-1_3_1_02-win-i.exe#Version=1,3,1,0"                             ');
        document.writeln('    WIDTH    = "100%"                                                 ');
        document.writeln('    HEIGHT   = "100%"                                                 ');
        document.writeln('    BORDER   = 0>                                                      ');
        document.writeln('<PARAM NAME = "TYPE"           VALUE = "application/x-java-applet;jpi-version=1.3.1">         ');
        document.writeln('<PARAM NAME = "SCRIPTABLE"     VALUE = "', scriptable,'">                                ');
        document.writeln('<PARAM NAME = "code"           VALUE = "com.sap.platin.GuiApplet2">                   ');
        document.writeln('<PARAM NAME = "codebase"       VALUE = "', codebase,'">                             ');
        document.writeln('<PARAM NAME = "jnlp"           VALUE = "', jnlp,'">                             ');
        document.writeln('<PARAM NAME = "archive"        VALUE = "GuiStartS.jar">                             ');
        document.writeln('<PARAM NAME = "keepalive"      VALUE = "', keepalive,'">                             ');
        document.writeln('<PARAM NAME = "frog"           VALUE = "', frog,'">                             ');
        document.writeln('<PARAM NAME = "trace"          VALUE = "', trace,'">                             ');
        document.writeln('<PARAM NAME = "tracefile"      VALUE = "', tracefile,'">        ');
        document.writeln('<PARAM NAME = "connectionData" VALUE = "', connectionData,'">                               ');
        document.writeln('                                                                ');
        document.writeln('This page requires a Sun Java Plugin 1.3 and a SAPGUI for Java to view.                      ');
        document.writeln('                                                                ');
        document.writeln('</OBJECT>                                                           ');
        break;
    case 'plugin':
        document.writeln('<EMBED TYPE        = "application/x-java-applet;version=1.3"                         ');
        document.writeln('    PLUGINURL      = "', pluginurl,'"                                          ');     
        document.writeln('    WIDTH          = "100%"                                            ');                                        
        document.writeln('    HEIGHT         = "100%"                                             ');
        document.writeln('    ALIGN          = "BASELINE"                                                ');
        document.writeln('    code           = "com.sap.platin.GuiApplet2"                                      ');
        document.writeln('    codebase       = "', codebase,'"                                        ');
        document.writeln('    jnlp           = "', jnlp,'"                                                ');
        document.writeln('    archive        = "GuiStartS.jar"                                       ');
        document.writeln('    keepalive      = "', keepalive,'"                                       ');
        document.writeln('    frog           = "', frog,'"                                            ');
        document.writeln('    trace          = "', trace,'"                                            ');
        document.writeln('    tracefile      = "', tracefile,'"                                       ');
        document.writeln('    connectionData = "', connectionData,'"                                        ');
        document.writeln(' <NOEMBED>                                                      ');
        document.writeln(' </NOEMBED>                                                      ');
        document.writeln(' </EMBED>                                                              ');
        break;
    case 'native':
        document.writeln('<APPLET CODEBASE  = "', codebase,'"                                                           ');
        document.writeln('        ARCHIVE   = "GuiStartS.jar"                                                           ');
        document.writeln('        CODE      = "com.sap.platin.GuiApplet2"                                               ');
        document.writeln('        WIDTH     = "100%"                                                                    ');
        document.writeln('        HEIGHT    = "100%">                                                                   ');
        document.writeln('<PARAM NAME = "SCRIPTABLE"     VALUE = "', scriptable, '">                                    ');
        document.writeln('<PARAM NAME = "jnlp"           VALUE = "', jnlp, '">                                          ');
        document.writeln('<PARAM NAME = "keepalive"      VALUE = "', keepalive, '">                                     ');
        document.writeln('<PARAM NAME = "frog"           VALUE = "', frog, '">                                          ');
        document.writeln('<PARAM NAME = "trace"          VALUE = "', trace, '">                                         ');
        document.writeln('<PARAM NAME = "tracefile"      VALUE = "', tracefile, '">                                     ');
        document.writeln('<PARAM NAME = "connectionData" VALUE = "', connectionData, '">                                ');
        document.writeln('</APPLET>                                                                                ');
        break;
    document.close();
    </SCRIPT>
    </BODY>
    </HTML>

  • How to call Java API from BSP?

    I have a requirement to call Java API from BSP application.
    I have checked the forum and found that it is possible by using some ABAP codes.
    However there is no pointer on how this is done.
    Can someone explain the details on how to call Java API from BSP is done?
    I found class CL_EJB_JAVA_OBJECT_METHODS to call a method in EJB but can't find function or SAP class to call Java API.
    Actually is there any BSP extention which can used to call Java API?
    Thanks,
    Hendri

    check out these weblogs, it should give you an idea how to go about it.
    /people/ignacio.hernndez/blog/2006/12/04/speech-synthesis-listen-the-application-server-is-talking-to-you
    /people/puru.govind/blog/2006/12/20/let-abap-speak
    Regards
    Raja

  • Debugging ABAP Code From Within WebDynpro

    Hi experts,
    I would like to check whether i can debug ABAP code from within webdynpro if i m using a remote J2EE server.
    So netweaver development studio is on my machine
    J2ee server is on a remote machine
    R/3 is also on another remote machine
    Thanks.
    Rgds,
    Daniel

    Hi Daniel,
    One thing note here is
    "You have debugging authorization in the ABAP Workbench in the relevant system.
    Since debugging in the ABAP system via load balancing is not supported, you must reconfigure your JCO destinations so that the calls take place on a dedicated ABAP application server. For Web Dynpro, this is done in the Web Dynpro Content Administrator. In the destination maintenance, specify Single Server Connection as the Destination Type ".
    Other than that ideally it works with j2ee and abap on diff systems.
    Regards
    Ayyapparaj

  • Error: There was a failure to call cluster code from a provider. Exception message: Generic failure . Status code: 5015. SQL 2012 SP1

    Hi,
    Please help. I was trying to remove a SQL 2012 SP1 two node clustered instance using setup (Mantenance -> Remove Node)
    I started by doing this on passive node (and was successful) but when I ran setup on active node just before finishing successfully I got this error:
    TITLE: Microsoft SQL Server 2012 Service Pack 1 Setup
    The following error has occurred:
    The resource 'BCK_SG1DB' could not be moved from cluster group 'SQL Server (SG1DB)' to cluster group 'Available Storage'. 
    Error: There was a failure to call cluster code from a provider. Exception message: Generic failure . Status code: 5015.
    Description: The operation failed because either the specified cluster node is not the owner of the resource, or the node
    is not a possible owner of the resource.
    For help, click:
    http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3000.0&EvtType=0xE8049925%25400x42B4DED7
    BUTTONS:
    OK
    I noticed that SG1DB instance was removed on both nodes but on Failover Cluster Manager -> Services and Applications the SQL server instance for SG1DB is still there. So I tried to delete it but got the error:
    Failed to delete SQL Server SG1DB. An error was encountered while deleting the cluster service or
    application SQL Server SG1DB. Could not move the resource to available storage. An error occured
    while moving the resource BCK_SG1DB to the clustered service or application Available Storage
    Any ideas why it failed or how could I delete the SQL server instance from Clauster?
    Thx

    Hello,
    Please read the following resource.
    https://support.microsoft.com/en-us/kb/kbview/313882?wa=wsignin1.0
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Call ABAP RFC From mapping

    HI Guys,
    I have a requirement to call ABAP RFC from Message Mapping.
    Can any one pls share the document links or ideas with me.
    Thanks,
    MS

    Hi
    u can use RFC LoopUp
    if PI 7.0 / 3.0 -- need to write the UDF to execute
    link
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70d90a91-3cf4-2a10-d189-bfd37d9c3231
    if PI 7.1 then u have functionality in MM itself to do so
    rgds
    srini

  • Calling ABAP report from BEx query

    Good day!
    I want to call ABAP report from BEx query by right-clicking on the field and using context menu. I know that transaction RSBBS is used (sender-receiver connecting), but I don't know how to transfare data to ABAP program
    In ABAP program I want to know at least data from those cell in BEx query, that was right-clicked.

    Depending on your requirement and environment, you have the following options:
    1. Use an info spoke and make selections as you would in a query.
    2. USe FM RS_VC_GET_QUERY_VIEW_DATA_FLAT to send the data to a file and your ABAP can read this file.
    Ravi Thothadri

  • Calling Notes code from jre

    Hi All,
    I have a set of code that access the Lotus Notes database i am calling them by including the corresponding jar file inside Eclipse,but how do i perform the same operation by running JRE.
    Pls help me in this regard?
    Thanks in Advance

    Alternatively is there an easier way of calling .NET code from Oracle? Expose your .NET code as a web service. Oracle stored procedures are quite capable of invoking web services and working with XML responses.

  • Calling native code from Flex

    I was wondering, is there any way to call native code from Flex?
    Currently, we're writing browser plugins in order to call native code from a Flex application. However, it would be nice to be able to call native code directly from Flex, so that we could write it only per-platform, as opposed to currently per-platform-per-browser.

    In general, the sandbox does not allow you to access native code from Flex.
    I believe you can use Merapi, but perhaps only for AIR:
    http://www.merapiproject.net/
    You might be able to code around the Flex sandbox, but it would be a ton of work.
    If this post answers your question or helps, please mark it as such.

  • In ABAP, come from BSP or SAPGUI ?

    Hi,
    The question is when we are in ABAP code, is there a way to know if we came in from a BSP or from the SAP GUI ?
    Thank you for your help in advance.

    can you specify what is the requirement?
    if you use same piece of program for both ur BSP and non-BSP apps then the BSP app can pass a parameter via URL which u can use to differentiate between and BSP or a ABAP call.

  • Can we call standard transaction from bsp

    Hi,
    Can anyone tell me how to call a standard transaction(va01) from bsp.
    Points will be awarded,
    Ugandhar.

    Hello,
    check out this coding in a new bsp page and give it a try in your system landscape. It creates an sap short cut file with the .sap extension writes dynamically to the server cache and get the url back.
    Regards, Bernd
    Layout:
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="Start SAP GUI Transaction via BSP" >
        <htmlb:form>
          <htmlb:textView text   = "Start SAP GUI Transaction via BSP"
                          design = "header1" />
          <htmlb:textView layout = "paragraph"
                          text   = "Fill in fields and press the button to create the link." />
          <table width=200>
          <tr>
          <td>
          <htmlb:label for  = "client"
                       text = "Client" />
          </td>
          <td>
          <htmlb:inputField id    = "client"
                            value = "<%= client %>" />
          </td>
          </tr>
          <tr>
          <td>
          <htmlb:label for  = "sysid"
                       text = "SystemID" />
          </td>
          <td>
          <htmlb:inputField id    = "sysid"
                            value = "<%= sysid %>" />
          </td>
          </tr>
          <tr>
          <td>
          <htmlb:label for  = "userid"
                       text = "UserID" />
          </td>
          <td>
          <htmlb:inputField id    = "userid"
                            value = "<%= userid %>" />
          </td>
          </tr>
          <tr>
          <td>
          <htmlb:label for  = "transactioncode"
                       text = "Transaction Code" />
          </td>
          <td>
          <htmlb:inputField id    = "transactioncode"
                            value = "<%= transactioncode %>" />
          </td>
          </tr>
          <tr>
          <td colspan="2">
          <htmlb:button id      = "myButton"
                        text    = "Create Link to start SAP Transaction"
                        onClick = "create_mime" />
          </td>
          </tr>
          </table>
          <%
      if display_url is not initial.
          %>
          <htmlb:textView layout = "paragraph"
                          text   = "Click the link to start SAP GUI Transaction." />
          <htmlb:link id        = "mylink"
                      reference = "<%= display_url %>"
                      text      = "Link to Start SAP Transaction" />
          <%
      endif.
          %>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Page Atributes:
    file_content     TYPE     STRING
    guid     TYPE     GUID_32
    host     TYPE     STRING
    isolangu     TYPE     T002-LAISO
    page_name     TYPE     STRING
    parameters     TYPE     TIHTTPNVP
    port     TYPE     STRING
    sapworkdir     TYPE     SDOK_CHTRD
    sysid     TYPE     SYSYSID
    transactioncode     TYPE     TCODE
    userid     TYPE     XUBNAME
    OnInputProcessing:
    * event handler for checking and processing user input and
    * for defining navigation
    * event handler for data retrieval
      event = cl_htmlb_manager=>get_event( runtime->server->request ).
      IF event->name = 'button' AND event->event_type = 'click'.
        button_event ?= event.
        IF button_event->server_event NE 'create_mime'.
          RETURN.
        ENDIF.
    * get users workdir
        CALL FUNCTION 'IW_C_GET_SAPWORKDIR'
          IMPORTING
            sapworkdir = sapworkdir.
    * get iso language
        CALL FUNCTION 'LANGUAGE_CODE_SAP_TO_ISO'
          EXPORTING
            sap_code = sy-langu
          IMPORTING
            iso_code = isolangu.
        CONCATENATE
        '[System]'
        cl_abap_char_utilities=>cr_lf
        'Name='
        sysid
        cl_abap_char_utilities=>cr_lf
        'Description='
        cl_abap_char_utilities=>cr_lf
        'Client='
        client
        cl_abap_char_utilities=>cr_lf
        '[User]'
        cl_abap_char_utilities=>cr_lf
        'Name='
        userid
        cl_abap_char_utilities=>cr_lf
        'Language='
        isolangu
        cl_abap_char_utilities=>cr_lf
        'Password='
        cl_abap_char_utilities=>cr_lf
        '[Function]'
        cl_abap_char_utilities=>cr_lf
        'Title='
        cl_abap_char_utilities=>cr_lf
        'Command='
        transactioncode
        cl_abap_char_utilities=>cr_lf
        '[Configuration]'
        cl_abap_char_utilities=>cr_lf
        'WorkDir='
        sapworkdir
        cl_abap_char_utilities=>cr_lf
        '[Options]'
        cl_abap_char_utilities=>cr_lf
        'Reuse=1'
        INTO file_content.
        CREATE OBJECT cached_response TYPE cl_http_response EXPORTING add_c_msg = 1.
        cached_response->set_cdata( file_content ).
        cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                           value = 'application/octet-stream ' ).
        cached_response->set_status( code = 200 reason = 'OK' ).
        cached_response->server_cache_expire_rel( expires_rel = 180 ).
        CALL FUNCTION 'GUID_CREATE'
          IMPORTING
            ev_guid_32 = guid.
        CONCATENATE guid
                    '.sap'
               INTO page_name.
    * get server information
        CALL METHOD cl_http_ext_webapp=>create_url_for_bsp_application
          EXPORTING
            bsp_application      = runtime->application_url
            bsp_start_page       = page_name
            bsp_start_parameters = parameters
          IMPORTING
            abs_url              = display_url.
        cl_http_server=>server_cache_upload( url      = display_url
                                             response = cached_response ).
      ENDIF.

  • Call SAP function from BSP

    Hi BSP Gurus,
    I am new to BSP World.
    I was told that review the existing BSP module and modify the SAP function module to take care of the new business unit.
    Now my question is where to start ?....do I need to know the existing BSP module ? How would I know what SAP function is being called from BSP ?
    Please help.
    With regards,
    Pranav

    calling Function module is same in ABAP & BSP..there is no difference..Look at the layout or any one evenings (Under event Tab) for CALL FUNCTION '...'..
    Since you are new to BSP look at the below links:
    <b>some links:</b>
    http://www.sapdevelopment.co.uk/webapps/bsp/mvc_example1.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/101c3a1cf1c54be10000000a114084/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/e5/edae3b59e17646e10000000a11402f/frameset.htm
    http://www.sapdesignguild.org/resources/htmlb_guidance/
    Look at the below links.. Some of them are step by step procedures.
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/weblogs/topic/24
    http://help.sap.com/saphelp_nw04/helpdata/en/7a/b86041397211d5992200508b6b8b11/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/7a/b86041397211d5992200508b6b8b11/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/4e/ac0b94c47c11d4ad320000e83539c3/content.htm
    https://www.sdn.sap.com/irj/sdn/weblogs
    /people/durairaj.athavanraja/blog/2005/08/21/running-your-first-bsp-application-in-sap-netweaver-04-abap-edition--nsp
    www.thespot4sap.com/Articles/SAP_WAS_BSP_Apps.asp
    www.thespot4sap.com/Articles/SAP_WAS_Overview.asp
    help.sap.com/saphelp_nw04/helpdata/ en/56/e6f3409ade8631e10000000a1550b0/content.htm
    New to BSP
    New to BSP. Where do I start from?
    New to BSP's ....Please Help me.......................
    And also recommend you to go through the BSP Weblogs in the BSP forum...highly Suggested and Helpful
    ;\ New BSP Weblogs
    <b>BSP Book:</b><a href="http://www.sap-press.com/current_releases.cfm?account=">Advanced BSP Programming</a>
    <i>* Reward each helpful answer</i>
    Raja T

  • Call SAP Transaction from BSP

    Hi,
    I am new to BSP. I have to call SAP Screen on button click event on BSP and also need to pass data at runtime.
    I searched this forum but didn't find the right solution. I tried to call SAP screen from BAPI and through URL but no success.
    Anyone knows how it can be done?
    Regards,
    Usman Malik

    Thanks for your reply,
    Actually I am very new to BSP. I don't understand where to put this code?
    [System]
    Name=DEV
    Description=DEV [Development]
    Client=123
    [User]
    Name=RAJA
    Language=EN
    [Function]
    Title=
    Command=*SU01 USR02-BNAME=raja;
    Type=Transaction
    [Configuration]
    WorkDir=d:xxxxxxSapWorkDir
    [Options]
    Reuse=1
    Second thing is about shortcut. Do I have to place this shortcut on server?
    Thanks,
    Usman Malik

  • ABAP Code to BSP Conversion

    Hi ,
    I have Several Programs Created in
    ABAP (with Associated TCodes)which i am calling in Portal Using SAP Transation iView.
    Now i want to convert them in to BSP.
    Instead of Rewriting the Code , Is there
    any Tool , Program ,TCode available
    which will Convert the Existing Code
    to BSP ?
    i am on NW2004s ECC6 .
    Regards
    Rajendra

    NO, there is no such tool.
    if you dont worry about the look and feel and you want HTML view in portal for SAP Transation iView use SAPGUI for HTML option instead of WIGUI while creating the iview.
    Raja

Maybe you are looking for