Calling DLL from BSP

hi,
Can anyone suggest me how to call a dll in a bsp. if you can help me with a sample code it'll be helpful.
Thnx in Advance
Vinodh

What exactly do you mean by calling a DLL?  Do you want to host an ActiveX Control?  Do you want to call a DCom Object or a .Net Object?  Or perhaps you are wanting to call a WebService writting in .Net?
For a Native DCom Object or .Net Object your would need the SAP DCom Connector or .Net Connector respectively.  For an ActiveX control, BSP is no different than any other Web environment - Client Side JavaScript or VBScript should do the trick.  I'm sure you can google many an example from the Web. 
If I am off base here, just let me know.  Also this question might be better suited to the BSP forum instead of the ABAP one.

Similar Messages

  • Call ITS from BSP Application

    i have created a ITS screen which in turn calls a Abap report
    I want to call this ITS screen from a BSP application .
    Could you please provide some sample code which is used to call ITS from BSP application..
    Useful answers will be rewarded
    Thanks

    Since it is related to both ITS and BSP i thought i can post it in both. and also i didnt get answers for the queries..... for a long time. Anyhow i will take your suggestion for my future query.
    i hv done using iframe to call my ITS application.
    I can able to call the Bsp application whichin turn calls its screen abap program.
    while executing ,  the selecting the directory from the file browse pop up doesnt work for downloading the file
    becos the client , they will not change the settings related to applet in the internet browser for security reasons.
    I hav to make it some how to make it work in the portal which calls this BSP application..
    at the moment i mapped this BSP application to the user role in the SUS Portal . but it appears in the SUS portal . but i m not able to click the application and also handsymbol is not seen while bringing the mouse to that area.
    Could you please tell me , how to use Action_id for that particular application, Authorisation profile settings.
    Kindly  give your suggestions asap.

  • Call dll from my dll

    I Have a dll file for my attendance machine
    and every thing are ok when I call dll from my exe application
    I want to create my own dll which my dll connect to attendance dll and get data from it and then insert data to tables
    a second question
    is there a method for calling my dll through windows batch file or I must create an exe application calling from it

    Let me explain a bit what a VFP DLL is for:
    You can only build one type of DLL, an OLE COM Server DLL. It'll mainly contain OLEPUBLIC class definitions, which are then usable in other programming languages. In any programming language capable to make use of OLE COM Server classes.
    If your project is named mydll.pjx and a prg or vcx contains a class myclass, the final DLL will have the OLE class "mydll.myclass" in it.
    This is overhead, if you use this in VFP. If you want to modularize your application, then create several EXE or build as APP. You can DO some.prg IN some.APP or you can create an object o = NEWOBJECT("myclass","myclasslib.vcx","myapp.app")
    to refer to a class inside a vcx compiled and build together with other project files into an app file.
    But any separation you do complicates the code use. A DLL is only needed, if some other programming language needs to use your VFP code. And that other programming language has to be able to instanciate classes.
    You don't need this, even if other programming languages would be involved. You can compile an EXE and that can be run. If needed with parameters. That's typically much simpler and could even be used by DOS batch files either using the DOS start command
    or directly your.EXE as man DOS commands also are merely EXE files.
    Bye, Olaf.
    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

  • Call DLL from PL-SQL block

    Hello all,
    I want to call a function located in an external DLL from a PL-SQL block. I execute the followin steps :
    1. Create a database library pointing to the external DLL :
    create or replace library libstk as 'C:\SUMMIT\libstkdte_s_trade1.dll'
    2. Create the definition and the body package :
    CREATE OR REPLACE PACKAGE dllcall IS
         FUNCTION s_trade (
              s_in VARCHAR2 )
    RETURN VARCHAR2;
    PRAGMA RESTRICT_REFERENCES(s_trade, WNDS);
    end dllcall;
    show errors
    CREATE OR REPLACE PACKAGE BODY dllcall IS
    FUNCTION s_trade (s_in IN VARCHAR2) RETURN VARCHAR2
    IS EXTERNAL
    NAME "s_trade"
    LIBRARY libstk
    PARAMETERS (s_in           STRING,
    RETURN STRING);
    END dllcall;
    show errors
    set serveroutput on
    3. Start the PL-SQL block calling the external function. And I got the foolowing error :
    1 begin
    2 dbms_output.put_line ( dllcall.s_trade ( '<Request> ' ||
    3 '<CurveId>MYCURVE</CurveId> ' ||
    4 '<Mode>02</Mode> ' ||
    5 '<ExpCcy>GBP</ExpCcy> ' ||
    6 '<AsOfDate>20001023</AsOfDate> ' ||
    7 '<Entity>***SUMMIT-XML***</Entity> ' ||
    8 '</Request>') );
    9* end;
    10
    11 /
    begin
    ERROR à la ligne 1 :
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: Unable to load DLL
    ORA-06512: at "V31.DLLCALL", line 0
    ORA-06512: at line 2
    The "Read - Execute permissions" of the DLL file was given to "Authentified users" .
    What's wrong ?
    TIA
    PS : NT2K environment, DB 8.1.7
    R. Charles Emile

    Yes, a RPC was set up.
    Listner.ora
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Server1)(PORT = 1521))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = NMP)(SERVER = Server1)(PIPE = ORAPIPE))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = E:\Oracle\Ora81)
    (PROGRAM = extproc)
    tnsnames.ora
    extproc_connection_data =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA = (SID = PLSExtProc))
    Thanks
    RCE

  • How to call DLL in BSP

    hi,
    1. Can anyone suggest me how to call a dll in a bsp. if you can help me with a sample code it'll be helpful.
    2. Is it possible to call VBScript in BSP
    Thnx in Advance
    Vinodh

    It is done the same way you do in normal HTML.
    A BSP is only an HTML page which ABAP is compiled into during runtime just like a JSP page or ASP page.
    <htmlb:content design="design2003">
      <htmlb:page title = "Test submit ">
        <htmlb:form id="myform" method="POST" enctype="multipart/form-data">
        <htmlb:inputField id="myFile"
                    visible="true"
                    width="300px" /><br>
        <htmlb:listBox id="filelist"
                    width="300px" />
        <script>
        function selectFolder(){
          var myText = "Browse for file";
          var objShell = new ActiveXObject("Shell.Application");
          var ssfWINDOWS = 0;
          var objFolder;
          objFolder = objShell.BrowseForFolder(0, myText, 0, ssfWINDOWS);
          if (objFolder != null) {
             document.forms.myform.myFile.value=objFolder.Items().Item().Path;
             getFileList(objFolder.Items().Item().Path);
        function getFileList(id) {
          var FSO = new ActiveXObject("Scripting.FileSystemObject");
          var myStartingFolder = id;
          if ( myStartingFolder != null || myStartingFolder != "" ) {
            var myFolder = FSO.GetFolder( myStartingFolder );
            var myFileList = new Enumerator(myFolder.files);
          // First clear all entries
            document.forms.myform.filelist.options.length = 0;
          for (; !myFileList.atEnd(); myFileList.moveNext()) {
              document.forms.myform.filelist.options[document.forms.myform.filelist.options.length] = new Option(myFileList.item().name,FSO.GetFileName(myFileList.item()));
         } // start folder found
        } // getFileList
        </script>
        <htmlb:button id="myButton"
                onClientClick="selectFolder()"
                text="Browse" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Just remember with ActiveX you have security issues to keep in mind!

  • CNTR_ERROR While calling BDC from BSP

    Hi ALL
    I am calling a RFC from BSP which in turn call a BDC for the transaction TP04.
    When i run the BSP in debugging mode its posting data and  working fine.
    But otherwise also it doesn't throw any error on browser. but when i check ST22 it throws exception CNTL_ERROR.
    My function is remote enabled and i am using destination 'NONE' as well.
    I have also checked the Blog by Brian.
    suggestions are welcome
    Naresh

    Hi
    Browser is not giving any error,Friendly HTTP is turned off.
    I am calling my own fucntion module like this
    CALL FUNCTION 'ZTM_FM_TP04' destination 'NONE'
              EXPORTING
                emplno  = employeeno
                STARTDATE   = strtripbegin
                STARTTIME   = strstarttime
                ENDDATE     = strtripend
                ENDTIME     = strendtime
                FIRSTDEST   = strfirstdest
                COUNTRY     = strcountry1
                REASON      = strreason
                CASHADVANCE = strcashadvance
                CASHCURR    = strcashcurr
                BANKADVANCE = strbankadvance
                BANKCURR    = strbankcurr
              TABLES
                ADDDEST     = adddest.
    and within the function module i am calling Call Transaction like this
    CALL TRANSACTION 'TP04' USING BDCDATA
                         MODE   'N'.
    But its not posting any data and while checking thru ST22 its giving following error
                                                                                    A RAISE statement in the program "CL_GUI_CUSTOM_CONTAINER=======CP " raised th 
    exception                                                                     
    condition "CNTL_ERROR".                                                        
    Since the exception was not intercepted by a superior program                  
    in the hierarchy, processing was terminated.

  • Calling Dlls from LabVIEW

    LabVIEW Gurus:
    I am working with some software engineers who have no experience in LabVIEW. Unfortunately I have little experience in C/C++ to make sense of their inquiry.  
    Basically we are dealing with “Data Marshalling”. I will call a DLL and issue a command (string) and get back a 2-D array and an integer. So far so good.
    The C/C++ programmer requested that I provide them with a pointer/memory address in which they will store data, so I can read it once the dll returns the array and integer. I browsed through the example online http://decibel.ni.com/content/docs/DOC-1690 and thought that if I wanted to read from the dll, the process is a simple as calling the appropriate function and configure the parameter (no pointers needed).
    So, is there a specific way that they need to write the C/C++ code to be used in LabVIEW? Or what else to I have to take into consideration?
    Thank you,
    Santiago 

    That example is pretty simplistic as it only deals with integers. In this case no pointers are required since everything is returned by value. When you're dealing with arrays, however, you need to deal with pointers. If you open the Example Finder (Help -> Find Examples) and search for "dll" you will see the "Call DLL" example. That contains many examples of how to call DLL functions with a wide variety of datatypes. I strongly suggest looking at that example. There is also a chapter in the LabVIEW Help on calling DLLs (Fundamentals -> Calling Code Written in Text-Based Progamming Language).
    You have 2 things to consider:
    You're dealing with arrays - this means you typically need to pre-allocate the memory in LabVIEW, and it sounds like that's what the DLL expects you to do. This amounts to using the Initialize Array function to create your 2D array of the appropriate size and datatype.
    You may be dealing with a C++ DLL. LabVIEW can only interface to C DLLs. This doesn't mean that you can't create a DLL in C++, but it does mean that the C++ programmers need to add an extern "C" modifier to the function calls, otherwise you get name mangling, and LabVIEW won't be able to call the DLL. The DLL programmers should know what that means.

  • Call dll from javascript

    hai,
    i have a dll(VB) in client m/c. i need to call a method in a dll from javascript.
    if possible please give some sample code.

    http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=calling+a+dll+from+javascript

  • Call DLL from pl/sql

    Hi Every one
    I have to call one microssoft dll from the pl/sql using form .
    How can I do it.
    Prashant

    That likely means that the DLL call failed.
    Some basics.
    A DLL exposes an interface where it lists the names of the proc/func exposed (together with a number/ordinal for each).
    The Win32 LoadLibrary() call is used to load a DLL. This returns a handle that is then used by subsequent calls to the DLL.
    In order to make the actual call, the caller needs to know the address of the procedure/function in the DLL. The GetProcAddress() is the Win32 call I remember using to get the address to call (but I think it has been deprecated since).
    Anyway, for the caller to call that proc/func in the DLL, it needs these steps:
    - load that library
    - get the "address" of that proc/func in the DLL
    - make the call
    The DLL is then executed - in the address space of the caller. Yes, the DLL's code segment is loaded once and shared amongst how ever many executables are using that DLL. But the DLL has no data segment - the data segment of the DLL lives in the address space of the caller.
    Should the DLL do something dirty/wrong, it can crash the caller by corrupting its address space. Or the DLL call could simply fail, throw an exception and terminate unexpectedly.
    This is the basics of the a DLL call - and also why Oracle wants to run that DLL call externally using the EXTPROC interface, so as not to risk that DLL compromising the memory space of the Oracle server process.
    This makes it a tad more complex now as the Oracle server process makes a call to EXTPROC (an IPC/RPC call) - and the EXTPROC process makes the DLL call (as described above).
    If that EXTPROC process crashes, the call that the Oracle server process made also terminates unexpectedly.
    Why can the EXTPROC process crash? Well, there are more meaningful errors returned when the DLL fails to load in my experience. So I expect that your DLL was found and that the EXTPROC process did a successful LoadLibrary() call - and even made a successful GetProcAdress() (or whatever call).
    But when the actual call to the DLL func/proc was made, an error resulted (incorrect parameter passing, invalid data types being passed, invalid memory being referenced, etc).
    This error caused a fatal error and terminated the EXTPROC process. No meaningful error was therefore returned to the Oracle server process - so it throws the exception "lost RPC connection to external process".
    Hope this was not too technical and you got the gist of it.

  • Calling WDA from BSP

    Hi all,
    Is it possible to call WDA from a BSP via a hyperlink and pass parameters that the WDA would need? How could I go about doing this?

    Hi Alexander,
       You can't pass the information(Context Data) from WDA to BSP directly so you just store the information in some variables or internal tables use the normal user paramenters like EXPORT & IMPORT or SET and GET parameters. Thgoruhg this way only you can communicate the data between these 2 technologies otherwise you need to save the data in some ztable and use the same table in both technoloes.
    you can also use Server Side Cookies.
    Perhaps take a look into this blog from Koen Labie:
    /people/koen.labie2/blog/2006/11/29/eating-cookies-with-webdynpro-and-bsp
    The blog shows how to pass the data from BSP to WD.
    Transfering data between WD and BSP via Server side Cookies can also be used for your requirement.
    For that you have to set the Data Cookie in the WD and then get the Cookie in the BSP.
    Please keep in mind that if you mix two different technologies you will have to deal with integration. WD and BSP will run in two different sessions at the server. Handling data exchange, login, logoff, data transfer at the server and client, etc can be challenging. You might end up with recreating enterprise portal-like software. So depending on the scope of the project, it might be more advisable to stay within the BSP environment or to reuse the SAP enterprise portal to integrate these two technologies at the client.
    Hope this will help you.
    Cheers,
    Darshna.

  • Calling DLL from forms6i

    Hi,
    I would like to use the fuctionality of a DLL, developed in VB. How I can call the existing methods of a DLL from forms6i.
    Thanks.....
    Bye
    vhareesh
    null

    Hi,
    I would like to use the fuctionality of a DLL, developed in VB. How I can call the existing methods of a DLL from forms6i.
    Thanks.....
    Bye
    vhareesh
    null

  • Call dll from plsql

    Hi
    I am trying to connect an external program(DLL) from pl/sql.
    for the practice i trying to call "GetComputerName" from kernel32.dll.
    i made the following step
    1. Creating a library .
    2. Creating a package .
    3. Set the listener.ora
    4. Set the tnsnames.ora.
    After solving the problame with the settings of the listener.ora
    I testing the function , it run with no error but return 'null' .
    I thing the problems is with the "parameter"
    I do not know of haw to send them .
    ----my pak-------------------------------
    CREATE OR REPLACE Package Body K32 As
    Function GetComputerNameK(lpBuffer out varchar2,nSize in out long )Return long Is
    External
    Library Sys.Kernel32 Name "GetComputerNameW"
    Language c
              WITH CONTEXT
    PARAMETERS (
    CONTEXT,
    --lpBuffer STRING,
              lpBuffer BY REFERENCE,
              nSize BY REFERENCE,
              --nSize INDICATOR short,*/
              RETURN INDICATOR--,
         /*     RETURN short */);
    End K32;

    Let me explain a bit what a VFP DLL is for:
    You can only build one type of DLL, an OLE COM Server DLL. It'll mainly contain OLEPUBLIC class definitions, which are then usable in other programming languages. In any programming language capable to make use of OLE COM Server classes.
    If your project is named mydll.pjx and a prg or vcx contains a class myclass, the final DLL will have the OLE class "mydll.myclass" in it.
    This is overhead, if you use this in VFP. If you want to modularize your application, then create several EXE or build as APP. You can DO some.prg IN some.APP or you can create an object o = NEWOBJECT("myclass","myclasslib.vcx","myapp.app")
    to refer to a class inside a vcx compiled and build together with other project files into an app file.
    But any separation you do complicates the code use. A DLL is only needed, if some other programming language needs to use your VFP code. And that other programming language has to be able to instanciate classes.
    You don't need this, even if other programming languages would be involved. You can compile an EXE and that can be run. If needed with parameters. That's typically much simpler and could even be used by DOS batch files either using the DOS start command
    or directly your.EXE as man DOS commands also are merely EXE files.
    Bye, Olaf.
    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

  • How to call dll from Java

    Hi everybody,
    I am trying to call a dll from my java application. Pls tell me how to do it, I seached and found JNI. Is it true
    pls help me and send me some examples
    Thank you and have a nice day

    java_and_me wrote:
    I am trying to call a dll from my java application. Pls tell me how to do it, I seached and found JNI. Is it trueYes, it is true. JNI is the way to go. You'll probably have to write some C code on your own as well, as the DLL is unlikely to be in the format expected by Java already.
    pls help me and send me some examplesOf course. [Here you are|http://www.lmgtfy.com/?q=JNI+tutorial].

  • Call webdynpro from BSP (MVC)

    Hi, gurus!
    I have simple bsp created using MVC. I have my own component which includes MainWindow with controller class by default and a view with controller class and model class. Everything was created using Wizard.
    I need to call webdynpro app from this BSP in WEB UI. I have a code that get WD url, then I'm trying to use navigation in DO_REQUEST method whih I redefine for a view controller class:
      data: l_wd_url type string.
      call method cl_wd_utilities=>construct_wd_url
        exporting application_name = 'Z_XR_BP_COURCES'
        importing out_absolute_url = l_wd_url .
        navigation->goto_page( l_wd_url ).
    In test mode it's working fine, but when I call this BSP through WEB UI I recieve an error message:
    "Business Server Page (BSP) error
    What happened?
    Calling the BSP page was terminated due to an error."
    Sorry, if my question a little bit stupid =), but i'm new in BSP.
    Could anyone help me?

    Hi,
    Please check in SDN before posting the questions.
    Check with the following link [Webdynpro from BSP (MVC)|Call Webdynpro Application from BSP Application;
    Hope this helps you.
    Regards,
    Rajani

  • The problem about call dll from VB....

    Dear All.
    I have a device and  VB dll file.I want to use labview to call  dll.But Labview show "An Exception occurred within the external code ..."
    Below is  to call this dll details.
    1、FindHardware:
    Call it at beginning when load program first, it can let program auto detect printer port address and model of dso scope.
    parament
    winversion:
    winversion = 2  "Windows NT,XP"
    UIP: open UIP(2048) array
    UCP:open  UCP(1023, 1023 + 11, 6)  array
    return:
    board_model:
    dso2902_128 = 27
    Then is my program
    Could somebody tell me what's wrong?
    Attachment file is this dll.
    http://us.f1.yahoofs.com/bc/500cf3ac/bc/dll/dll.ra​r?bfd1QSDBkHPgKI9c
    Thanks.
    由 Samyang 在 10-09-2005 07:14 AM 上編輯的訊息

    I can't say I understand the documentation snippet you provides, and I also can't access the DLL, but here are a couple things...
    1. I doubt very highly that a VB DLL is built with the C calling convension. I believe you should try the stdcall instead.
    2. You have the winversion being passed by pointer, but the docs make it look like a regular integer. Is that correct?
    3. Your board model is being passed by value, but it is listed as a return value in the docs. That would indicate an actual return value or a parameter passed by reference.
    My guess is that one or more of the above is causing the stack to get corrupted or an invalid pointer to be accessed and that is generating the error. Is there anyway to see the document (pdf or webpage)?
    Brian Tyler
    http://detritus.blogs.com/lycangeek

Maybe you are looking for

  • Retina Display MacBook Pro eye problem and strain

    Hi, the name is Ben Recently, I boought a retina display and have since been having noticeable eye problem. (strain, fatigue, oversensativity to computer monitor/screen ligthing) My question was, has anyone been experiencing the same. I use my comput

  • What is the next step?

    Hi all, this is my brief: Im using a MBP 13", model A1278, non removable battery. Late 2009. It cant start it up (not turning on) Ive tried resetting the SMC and PRAM, still nothing I took it to my nearest apple support guys... the found my Rams were

  • Selecting the content of XML element CS3(JS)

    Hi I am trying to select the whole content of XML Element. I am trying like this app.activeDocument.xmlElements[i].select(); But it is not working. Regards Suresh

  • Reinstall Acrobat 8 Professional, Macintosh

    Acrobat 8 Professional, Macintosh I have my license and I need to reintall due to a hard drive failaure. (I am reinstalling all my software.) I can not find a link to download. Thanks

  • Combining clips in Events

    Hi, I´ve captured several VHS tapes onto iMovie´09, and now have long Events of nearly 180 minutes. As I take out bad parts in the evens (I use "Reject selection") I end up having many, many clips in my Events. Then when I want to crop them I all I h