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.

Similar Messages

  • 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

  • In ABAP, if we came in 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.

    are you calling a FM in your BSP and within the FM you want to check whether its being called by a BSP or a SAPGUI based program.
    may be you can check
    if sy-CPROG = SAPMHTTP then its called from BSP (web )

  • 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!

  • Open SAPGUI from BSP

    Hi,
    I have a requirement to open the print-preview of a smartform in the SAPGUI when a link is clicked on the BSP page in the browser. I have created a program which shows the print preview etc. Is there any way of opening up the SAPGUI from the browser with a specific transaction being called and parameters passed from BSP to the SAPGUI?
    I dont want to display as PDF unless there is a way to disable downloading or saving of the displayed PDF to the users hard disk. Also printing of the PDF needs to be disabled. This does not seem to be possible from what I have seen in the forums.
    Any help will be highly appreciated. Thanks in advance.
    Regards
    Preet

    Hi,
    Thanks for replying so quickly. The SAP version is R/3 Enterprise and I need to open the Wingui. However the issue we are facing is how to pass a dynamic parameter to the R/3 transaction. In the portal we can specify the transaction to call and can pass parameters to it but there seems to be no way of dynamically passing a value to the R/3 transaction.
    I hope this makes sense. When the user clicks say a customer number on the webpage, I need to call a Z transaction in R/3 with that customer number passed to it. Is this actually possible?
    Regards,
    Preet

  • Pass data from BSP to WebDynpro Abap

    Hi,
    Can anyone pls tell how to pass the data from BSP to WD4A Application.
    I am trying to call the WDA URL using the class CL_GUI_FRONTEND_SERVICES in BSP,but it is giving a run time error.
    How to call the WDA URL from the classes in BSP & not using iFrame ?
    Thanks,
    Krishna

    Hi Raja,
    Can u pls tell the class which the object navigation->goto_page( url ) refers to.
    My main requirement is to call the WDA URL from a class in BSP Application.
    Since there is no GUI connection i'll be not able to use class CL_GUI_FRONTEND_SERVICES.
    So i need a class which will call URL before passing data.
    Thanks for the same,
    Regards,
    Vamsi.

  • Pass value from webdynpro abap application to bsp application

    Hello,
    I want call api bsp javascript from WDA exchanging values between the two applications.
    I have a solution but it is with portal integration.
    I would like a procedure without using the portal.
    Webdynpro and BSP only.
    How can I do this ?
    Thanks for your help.

    Hi,
    Refer these threads-
    Re: Passing Object ref to Webdynpro Application while calling from BSP screen
    Both BSP and WDA has an URL associated with it.
    In the WDA, create an LinkToUrl UI element upon which triggers the BSP application and pass the parameters to this BSP application. Check for this BSP application has also parameters in it.
    Refer this link Re: Read SICF URL
    Regards,
    Lekha.

  • 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>

  • Passing table to the RFC from BSP!

    Dear friends,
    I am trying to call a RFC (on 4.6c) from a BSP page( on a 6.20 System). i am trying to pass a table from the BSP to the RFC and get the result back. This is not working as expected.
    The Function module  at R3 (4.6c) which takes a table as an input and gives string as an output.
    The code is for Function module is given below.
    <b>FUNCTION ZBHAVIN1.
    ""Local interface:
    *"  EXPORTING
    *"     VALUE(TEMP) TYPE  STRING
    *"     VALUE(TEMP1) TYPE  STRING
    *"  TABLES
    *"      ITAB STRUCTURE  ZITAB
    TEMP  = ITAB-MESSAGE.
    TEMP1 = ITAB-MESSAGE1.
    ENDFUNCTION.</b>
    To call this function module the code for the bsp page (created on a 6.20 System) is :
    <b>
    <%@page language="abap"%>
    <% TYPE-POOLS ZBSP1. %>
    <html>
      <head>
        <link rel="stylesheet" href="../../sap/public/bc/bsp/styles/sapbsp.css">
        <title> Display Page </title>
      </head>
      <body class="bspBody1">
        <%
        DATA TEMP2  TYPE STRING.
        DATA TEMP3 TYPE STRING.
        DATA ITAB1 TYPE TABLE OF ZBSP1_ITAB11.
        DATA WA LIKE LINE OF ITAB1.   
        WA-MESSAGE  = 'THIS IS FIRST ELEMENT'.
        WA-MESSAGE1 = 'THIS IS SECOND ELEMENT'.
        APPEND WA TO ITAB1.
        CALL FUNCTION 'ZBHAVIN1'
             DESTINATION 'TCLCLNT200'
               IMPORTING
                  TEMP  = TEMP2
                  TEMP1 = TEMP3
               TABLES
                  ITAB  = ITAB1
               EXCEPTIONS
                 OTHERS = 1.
        %>
        <P><%=  TEMP2  %>
        <P><%=  TEMP3 %>
      </body>
    </html></b>
    This code is not working for me as it is.
    If i remove the comments, then it works, which means that the table passed from the BSP has no Header Line.
    So , do i need to always chnage my Receving RFC to take care of this issue? or is there a way to pass the Tabkle with Header line to the RFC from BSP?

    You'll have to define a table type either in the Types tab of the BSP application or as a Dictionary object.
    Then you can define a page attribute for the table and call the code from your OnCreate event handler (just to clean up your page layout)
    You have to remember that you are working with the whole OO context and so working with the tables inside the BSP are quite different.
    Have a look at this article for some examples: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/unkown/exploring bsp development and the miniwas.htm

  • 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

  • Data come from difference data source

    In my saturation, my program's data are come from difference data source. For example, the program will retrieve PO balance, material consumption, future consumption and so on. In my program logic, i retrieve all of the material number, the retrieve the PO balance, material consumption... into internal table, then loop the internal table of material number and update this table from internal table of po balance, material consumption..., but i found that the program's running time is long. How to improve the performance or any suggestion for the program logic. Thanks.

    Hi,
    Few Guildlines:
    1. program is slow mainly because Database load is too high,  try to reduce it and that load can be shared by ABAP. gotrhough SE30-perfromance tuning.
    Also, in Se30 u will get all most important Tips and tricks, follow it,...
    2. Try to find out summary table and dont try always to get data from basic tables.
    3. Try to use perfect SELECT statemetn with porper joins, which is most important in reduction of load on DB.
    4. you can make ABAP part faster, following coding standard like use of Binary search.
    5. Use SLIN to find out which part of program is taking too much time, try to reduce it.
    Hope this will guide u.
    Jogdand M B

  • How to send/set parameter from BSP page to iview

    Dear Expert,
    Can advise me how to send or set parameter from BSP page to iview ?
    http://xxx.xxx.com/irj/portal?navigationtarget=roles://pcd:portal_content/FLD.ObjetLibrary/FLD.Iviews/FLD.CRM/ET/bsppage.htm?lv_param=xxx
    I want to view my bsp page in portal but with parameter value.
    I can open my bsp page without parameter value like link below :
    http://xxx.xxx.com/irj/portal?navigationtarget=roles://pcd:portal_content/FLD.ObjetLibrary/FLD.Iviews/FLD.CRM/ET/
    Thnx & Regards,
    Pieter

    Hi,
    your BSP page get's integrated via an iFrame. So, simply speaking, it's not possible to pass an parameter back.
    But what you can try is to use the Portal DataBag component. In the BSP page, store the information you want to pass in the browser. The iView/Portal than has to check if there is a new parameter / value stored.
    SAP Help: http://help.sap.com/saphelp_nw70/helpdata/en/68/322a9261c54e51b7965f86aac3dae2/frameset.htm
    br,
    Tobias

  • How to call a abap report in BSP

    hi all,
    Please can anybody tell me how to call abap report in BSP..
    with regards,
    Santosh.

    Also see below BSP tutorial
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/101c3a1cf1c54be10000000a114084/content.htm
    Regards.

  • Sending PDF output attachment in e-mail to external users from BSP

    Hi All,
    Please gothrough the below requirement details :
    Requirement Details:
    Need to achieve the functionality of sending a PDF attachment of invoice to an external
    e-mail address from the BSP Application.
    Implementation Details:
    The Print out Output determination is already done in the system. We are using SAP R/3 4.7 (620)
    In the Transaction VF03 in the initial screen there is a menubar "Billing document" and underneath that menu there is a menu item called "Issue". If we click the "Issue" menu item all the output that are already proposed will be visible and we can select the printout Output determination and can issue a printout.
    I had created a FM to call from BSP and that function module will take the Invoice number as input and will call the "VF03" transaction using BDC and will trigger the Sapscript Printout . I see the the sapscript in the spool after I call the Function module .
    But I don't know how I can get the Spool request number for that Function module call from BSP page ????
    I got struck in this approach...
    If I know the Spool number after calling the function module the it's very easy to call the following FM's for sending a e-mail with the Invoice PDF attachment.
    CONVERT_OTFSPOOLJOB_2_PDF
    QCE1_CONVERT
    SO_NEW_DOCUMENT_ATT_SEND_API1
    Please let me know if anyone can help me in this ...
    Please reply ASAP.
    Thanks,
    Greetson

    Check out these weblogs.
    /people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp
    /people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
    Regards
    Raja

  • Calendar appointments from BSP application

    Do you anyone have an idea on how to create Calender appointments from BSP applications?
    Any inputs would be helpfull.
    Srinivas

    Hello,
    calendar items are specially formatted mail items. They do not have textual body, only an attachment with extension
    .ics
    Here is an example how it should look like:
    BEGIN:VCALENDAR
    PRODID:-//COMPANY//R/3-640//D
    VERSION:2.0
    METHOD:REQUEST
    BEGIN:VEVENT
    ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;ROLE=CHAIR;CN="aaa.bb@ccc.
    com":MAILTO:[email protected]
    ATTENDEE;PARTSTAT=ACCEPTED;RSVP=TRUE;ROLE=CHAIR;CN=""Sender, aaa"":MAILTO:sender.
    [email protected]
    ORGANIZER:MAILTO:[email protected]
    DTSTART:20060308T090000Z
    DTEND:20060308T093000Z
    LOCATION:
    UID:[email protected]
    STATUS:CONFIRMED
    DTSTAMP:20060310T122435Z
    SUMMARY:test4
    CATEGORIES:Keine Terminart ausgewählt
    CREATED:20060310T122435Z
    SEQUENCE:0
    TRANSP:OPAQUE
    PRIORITY:5
    CLASS:PUBLIC
    DESCRIPTION:test 4
    END:VEVENT
    END:VCALENDAR
    I hope it helps you to create your own calendar items.
    Regards,
    Dezso

Maybe you are looking for

  • Error while turning on the layers of map

    hi I am using flex 3 with arcgis server 10 with the help of flex api. i am getting Error 1009 : cannot access a property or method of a null object reference at mx.controls::Datagrid/mouseDownHandler() while using datagrid with checkboxes to turn on/

  • Cant save in SQL SERVER.

    Hi all. i have a BMP that save data in a SQL Server Table from a XML document. the BMP finish perfect but  when i check in SQL there no any data. I am using the next estructure: <?xml version="1.0" encoding="UTF-8"?> <sp_jdbc_MT>    <dbTableName acti

  • Drawing API

    I am creating a car driving game in Flash 8. Im using the Drawing API to make the car leave tracks as it moves using the following method: lines = {} _root.createEmptyMovieClip("pen", 10) pen.lineStyle(10, 000000, 6) pen.moveTo(this.car._x, this.car.

  • How to pass command line parameters in calling ant file

    Hi All, I m using a Build file which calls another build file. That build file is run from the command prompt by give ant -lib <path of jars it needs for executing>. Now i m calling this file from main build file but it does not work as i m not able

  • Iview problem

    Hi Experts, I have created a transaction iview (SAP GUI for HTML). When I click on preview it was opened in a separate window with buttons Menu, Save, Back, Execute etc.. If I click on button u2018Backu2019 it was going to SAP Easy Access screen. I w