How to pass a Structure as input parameter

Hello,
Anyone knows how to instanciate, populate and pass a Structure into RFCInvoke?
Thanks!

Hello,
Please take a look at the documentations of netweaver RFC programing in this blog: 
/people/ulrich.schmidt/blog/2008/11/08/new-developments-in-netweaver-rfc-communication
It contains useful information of rfcInvoke.
Kind regards, Istvan Elek

Similar Messages

  • MII BLS Trasaction calling SAP RFC call - How to pass XML document as input parameter

    Hi,
    1. I am very new to the SAP and SAP xMII workbench.
    I have a webpage with iGrid applet embedded on it. We have multiple rows in the iGrid applet that can be selected by user.
    After selecting single or multiple grid rows user clicking a 'button' on the web page.
    We are using iCommand applet (ExacuteQuery] to call the BLS transaction.
    Using iCommand applet on the webpage we are passing parameters to BLS Transaction.
    Would like to pass on the single/ multiple selected grid row values as a XML document to BLS Transaction variable which is an Input parameter for SAP RFC call.
    I am using SAP JCo Session to make the RFC call. 
    Any pointers will be helpful.
    2. Which is a best track in SAP training courses to get formal training.
    Thanks,
    Senthil

    Hi Senthil,
    What version of MII (or xMII) are you working with?  There are some examples of this type of transaction in the wiki which you may want to download and take a look at.
    Regards, Mike
    SAP Customer Experience Group - CEG

  • How to pass a structure/array of structure as input parameter in a webservice

    Hi Team,
    I am trying to create a webservice in powerbuilder .net( pb 12.5.1) . As this webservice will be used by external world to access some of data on basis of some input paarameter.
    So can i use array of structure as input parameter to a webservice ? If no, then how can i pass a result set ( mora then 1 row with more than one column)
    as an argument to the webservice.
    Regards
    Subrat

    I am assuming this is the same for .Net but in Classic you can create NVO's with Instance Variables and then reference them in the NVO that will be used as the parameter for the Public WebService.
    WS NVO's:
    Children
         String             Child[]
    Customer
         String             FirstName
         String             LastName
         String             DOB
         Children          Children
    Public Interface uses Customer
    Calling Code Example:
    integer    rc, liNdx
    string     lsReturn
    SoapConnection lSoapConnect
    proxy_testing  px_Testing
    lSoapConnect = CREATE SoapConnection
    if IsValid(lSoapConnect) then
    TRY
      rc = lSoapConnect.CreateInstance(px_Testing, 'proxy_testing')
      CHOOSE CASE rc
       CASE 100
        lsReturn = "Invalid proxy name"
       CASE 101
        lsReturn = "Failed to create proxy"
       CASE 0
        Proxy_Customer lNewCustomer
        lNewCustomer = CREATE Proxy_Customer
        lNewCustomer.FirstName = 'Chris'
        lNewCustomer.LastName = 'Craft'
        lNewCustomer.DOB = 'Getting Older'
        Proxy_Children lChildren
        lChildren = CREATE Proxy_Children
        lChildren.Child[1] = 'Madeline'
        lChildren.Child[2] = 'Hayden'
        lNewCustomer.Children = lChildren
        lsReturn = px_Testing.NewCustomer(lNewCustomer)
       CASE ELSE
        lsReturn = "Unknown error (" + String(rc) + ")"
      END CHOOSE
      if rc <> 0 then MessageBox("Invocation Error", lsReturn, Exclamation!)
    CATCH (RuntimeError rte)
      rc = -1
      MessageBox("Runtime Error", rte.text, Exclamation!)
    END TRY
    end if
    Chris Craft

  • How to invoke adobe life cycle webservice using c++ (how to pass blob structure as argument)

    We already wrote sample code (.NET C#) to access livecycle webservice(this convert the input file into pdf file) using below link from adobe
    http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/wwhelp/wwhimpl/common/ht ml/wwhelp.htm?context=sdkHelp&file=000088.html
    We want to write c++ client to invoke adobe life cycle webservice. I have sample code to invoke the given webservice using plain c++ but I am stuck up with 'how to pass BLOB structure as argument to CreatePDF() method' and
    plus 'how to get ouput as mapItem[]' . Is the code to convert to pdf works fine with .NET and java only? Not with c++ or VB?

    In this case the LiveCycle services are exposed as web services that can be consumed by any application language that can interact with web services. While the sample published are for c# and Java there is no reason that other web service aware languages (C++, Perl, etc) wouldn't work.
    I'm not a Microsoft C++ expert, but as far as I understand all you need to do is create a web reference and then have your C++ classes interact via the generated proxy classes. The syntax will be different, but the concept is the same

  • How to pass  internal table values to parameter

    hi,
             how to pass  internal table values to parameter in selection screen.if is it possible means please sent codeings.
    thanks.
      stalin.

    hi,
    tables : mara.
    data :  begin of itab_mara occurs 0,
              matnr like mara-matnr,
              ernam like mara-ernam,
              end of itab_mara.
    selection-screen : begin of block blk1 with frame title text-001.
    parameters : p_matnr like mara-matnr.
    selection-screen : end of block blk1.
    select matnr ernam from mara into corresponding fields of itab_mara
                                                                    where matnr = p_matnr.
    loop at itab_mara.
    write :/ itab_mara-matnr,
               itab_mara-ernam.
    endloop.
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

  • Pass list of structure as input parameter to visual composer iview

    Hi
    In my application, I need to create an iview which has a table view. Start point has same structure as table columns. Now I deployed this iview and assign to every user core role. Now i am using in in my GP. It is getting a list of structure as input but it is showing only one row in the table.
    Anyone has idea about this.
    Regards
    Saurabh Garg

    Hi Saurabh,
    How did you do for passing at least one row ?
    Can you explain that ?
    Thanks a lot
    btw, Did you succeed to pass several rows ?

  • How do I properly pass values into an input parameter form and app module?

    Using JDeveloper 11.1.1.4
    I created an application module that calls a PL/SQL procedure that uses input parameters. I exposed this to the data control and dropped the object on a jsff as a input parameter form. I need to set some of the input parameters on this form from values gathered and stored in a pageFlowScope bean. What is the proper way so that the values will: 1. show on the form, and 2. get to the java code in the application module that calls my procedure? An example field from my form is:
            <af:inputText value="#{bindings.pPayerId.inputValue}" label="Payer ID"
                          required="#{bindings.pPayerId.hints.mandatory}"
                          columns="#{bindings.pPayerId.hints.displayWidth}"
                          maximumLength="#{bindings.pPayerId.hints.precision}"
                          shortDesc="#{bindings.pPayerId.hints.tooltip}" id="it8">
              <f:validator binding="#{bindings.pPayerId.validator}"/>
              <af:convertNumber groupingUsed="false" pattern="#{bindings.pPayerId.format}"/>
            </af:inputText>Thanks,
    Troy

    Thanks Shay for pointing me in that direction.
    I didn't find the NDValue in the bindings, so I went to the pagedef xml and found it there. Changing the NDValue successfully delivered the value to the app module when the method was executed, but didn't show the value on the form. I had to add the same #{pageFlowScope.paramsBean.fileFormatParam} to the value of the input field and it now is working as needed.

  • How to pass class object  as in parameter in call to pl/sql procedure ?

    hi,
    i have to call pl/sql proecedure through java. In pl/sql procedure as "In" parameter i have created "user defined record type" and i am passing class object as "In" parameter in call to pl/sql procedure. but it is giving error.
    so, anyone can please tell me how i can pass class object as "In" parameter in call to pl/sql procedure ?
    its urgent ...
    pls help me...

    793059 wrote:
    I want to pass a cursor to a procedure as IN parameter.You can use the PL/SQL type called sys_refcursor - and open a ref cursor and pass that to the procedure as input parameter.
    Note that the SQL projection of the cursor is unknown at compilation time - and thus cannot be checked. As this checking only happens at run-time, you may get errors attempting to fetch columns from the ref cursor that does not exist in its projection.
    You also need to ask yourself whether this approach is a logical and robust one - it usually is not. The typical cursor processing template in PL/SQL looks as follows:
    begin
      open cursorVariable;
      loop
        fetch cursorVariable bulk collect into bufferVariable limit MAX_ROWS_FETCH;
        for i in 1..bufferVariable.Count
        loop
          MyProcedure( buffer(i) );   --// <-- Pass a row structure to your procedure and not a cursor
        end loop;
        ..etc..
        exit when cursorVariable%not_found;
      end loop;
      close cursorVariable;
    end;

  • How to pass a cursor as IN parameter to a procedure

    Hello
    I want to pass a cursor to a procedure as IN parameter.
    See the below piece of code:
    Cursor mycur is select * from table_name;
    Procedure myproc(mycur IN ...)
    begin
    fetch mycur into v_rec;
    {want to do some updates here}
    end;
    Please suggest how can I pass the cursor?
    Thanks in advance !!!!

    793059 wrote:
    I want to pass a cursor to a procedure as IN parameter.You can use the PL/SQL type called sys_refcursor - and open a ref cursor and pass that to the procedure as input parameter.
    Note that the SQL projection of the cursor is unknown at compilation time - and thus cannot be checked. As this checking only happens at run-time, you may get errors attempting to fetch columns from the ref cursor that does not exist in its projection.
    You also need to ask yourself whether this approach is a logical and robust one - it usually is not. The typical cursor processing template in PL/SQL looks as follows:
    begin
      open cursorVariable;
      loop
        fetch cursorVariable bulk collect into bufferVariable limit MAX_ROWS_FETCH;
        for i in 1..bufferVariable.Count
        loop
          MyProcedure( buffer(i) );   --// <-- Pass a row structure to your procedure and not a cursor
        end loop;
        ..etc..
        exit when cursorVariable%not_found;
      end loop;
      close cursorVariable;
    end;

  • How to pass a structure in PL/SQL external proc.

    This is for educational purpose only. I am trying to implement kernel32.dll and shell32.dll in PL/SQL using external proc. Everything is working fine, except When there is a structure in OUT parameter.
    My database version.
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - ProductionI have set up the listner.ora and tnsnames.ora and written a package called dbms_kernel32sb.
    There are 9 program units.
    1. CreateFile -- working fine
    2. CloseFile -- working fine
    3. GetSize -- working fine
    4. FindFirstFile -- NOT working, because one OUT parameter has the structure type WIN32_FIND_DATA.
    5. GetFileTime -- NOT working, because one OUT parameter has the structure type FILETIME
    6. GetDiskFreeSpace -- working fine
    7. GetDriveType -- working fine.
    8. GetLastError -- working fine
    9. ExecuteCommand -- working fine.
    Here is the package specification:
    CREATE OR REPLACE PACKAGE dbms_kernel32sb AS
        Name: dbms_kernel32sb.pks
        Author: Saubhik Banerjee
        Date: 24th Jan 2011
        Version: 1.0
        Comment: This package is to implement some functionality from kernel32.dll.
                 Usng extproc
    OPEN_EXISTING_FILE CONSTANT PLS_INTEGER :=3;
    FILE_ATTRIBUTE_NORMAL CONSTANT PLS_INTEGER :=128;
    DISABLE_FILE_SHARE_MODE CONSTANT PLS_INTEGER :=0;
    NO_FILE_SECURITY_ATTRIBUTE CONSTANT PLS_INTEGER :=0;
    NO_TEMPLATE_FILE CONSTANT PLS_INTEGER :=0;
    GENERIC_FILE_ACCESS CONSTANT PLS_INTEGER :=0;
    FILE_SIZE_HIGH CONSTANT PLS_INTEGER :=400000000;
    EXECUTE_FILE CONSTANT VARCHAR2(4):='open';
    PRINT_FILE CONSTANT VARCHAR2(5):='print';
    NO_PARAMATER CONSTANT VARCHAR2(2):=' ';
    FUNCTION CreateFile(pi_FileName VARCHAR2 --1, File name
                ,pi_DesiredAccess BINARY_INTEGER --2, Type of access required (read/write ect)
                ,pi_ShareMode BINARY_INTEGER --3,  share mode
                ,pi_SecurityAttributes BINARY_INTEGER --4, securoty attribute
                ,pi_CreationDisposition BINARY_INTEGER --5, open existing, create new etc
                ,pi_FlagsAndAttributes BINARY_INTEGER --6, File attribute- normal
                ,pi_TemplateFile BINARY_INTEGER) --Not required.
        Return BINARY_INTEGER;
    FUNCTION CloseFile (pi_FileHandle BINARY_INTEGER)
                         Return BINARY_INTEGER;
    FUNCTION GetSize (pi_FileHandle BINARY_INTEGER,
                       pio_FileSizeHigh IN OUT BINARY_INTEGER)
                   RETURN BINARY_INTEGER;
    FUNCTION FindFirstFile ( pi_FileName VARCHAR2
                             ,pio_Win32_Find_data OUT 
                                 WIN32_FIND_DATA
    RETURN BINARY_INTEGER;                                             
    FUNCTION GetFileTime ( pi_FileHandle BINARY_INTEGER
                           ,pio_FileCreationTime IN OUT FILETIME
                           ,pio_LastAccessTime   IN OUT FILETIME
                           ,pio_LastWriteTime    IN OUT FILETIME
    RETURN BINARY_INTEGER;
    FUNCTION GetDiskFreeSpace ( pi_RootPathName VARCHAR2
                                ,pio_SectorsPerCluster  OUT BINARY_INTEGER
                                ,pio_BytesPerSector   OUT BINARY_INTEGER
                                ,pio_NumberOfFreeClusters  OUT BINARY_INTEGER
                                ,pio_TotalNumberOfClusters  OUT BINARY_INTEGER
    RETURN BINARY_INTEGER;    
    FUNCTION GetDriveType( pi_driveLetter VARCHAR2) RETURN VARCHAR2;
    FUNCTION GetLastError RETURN BINARY_INTEGER;   
    FUNCTION ExecuteCommand ( pi_OperationType VARCHAR2
                              ,pi_FileName VARCHAR2
                              ,pi_Parameters VARCHAR2
                              ,pi_DefaultDirectory VARCHAR2
    RETURN VARCHAR2;
    END dbms_kernel32sb;
    Here is the package body:
    CREATE OR REPLACE PACKAGE BODY dbms_kernel32sb AS
    /* Name: dbms_kernel32sb.pkb
        Author: Saubhik Banerjee
        Date: 24th Jan 2011
        Version: 1.0
        Comment: This package is to implement some functionality from kernel32.dll.
                 Usng extproc
      FUNCTION
      CreateFile( pi_FileName VARCHAR2 --1
                , pi_DesiredAccess BINARY_INTEGER --2
                , pi_ShareMode BINARY_INTEGER --3
                , pi_SecurityAttributes BINARY_INTEGER --4
                , pi_CreationDisposition BINARY_INTEGER --5
                , pi_FlagsAndAttributes BINARY_INTEGER --6
                , pi_TemplateFile BINARY_INTEGER) --7
        Return BINARY_INTEGER IS EXTERNAL LIBRARY kernel32 Name "CreateFileA"
        PARAMETERS(  pi_FileName STRING
                   , pi_DesiredAccess long
                   , pi_ShareMode long
                   , pi_SecurityAttributes long
                   , pi_CreationDisposition long
                   , pi_FlagsAndAttributes long
                   , pi_TemplateFile long
                   , return long);
    FUNCTION CloseFile (pi_FileHandle BINARY_INTEGER)
                         Return BINARY_INTEGER
         IS EXTERNAL
         LIBRARY kernel32 Name "CloseHandle"
         PARAMETERS (pi_FileHandle long, return long);
    FUNCTION GetSize (pi_FileHandle BINARY_INTEGER,
                       pio_FileSizeHigh IN OUT BINARY_INTEGER)
                   RETURN BINARY_INTEGER
         IS EXTERNAL
        LIBRARY kernel32 NAME "GetFileSize"
        PARAMETERS (pi_FileHandle long, pio_FileSizeHigh long, return long );
      FUNCTION GetFileTime ( pi_FileHandle BINARY_INTEGER
                           ,pio_FileCreationTime IN OUT FILETIME
                           ,pio_LastAccessTime   IN OUT FILETIME
                           ,pio_LastWriteTime    IN OUT FILETIME
       RETURN BINARY_INTEGER
         IS EXTERNAL
        LIBRARY kernel32 NAME "GetFileTime"
        WITH CONTEXT
        PARAMETERS ( CONTEXT,
                      pi_FileHandle long
                    , pio_FileCreationTime  OCIColl
                    , pio_FileCreationTime INDICATOR SHORT
                    , pio_LastAccessTime  OCIColl
                   , pio_LastAccessTime INDICATOR SHORT
                    , pio_LastWriteTime OCIColl
                    , pio_LastWriteTime INDICATOR SHORT
                    , return long );                  
    FUNCTION FindFirstFile ( pi_FileName VARCHAR2
                             ,pio_Win32_Find_data OUT 
                                 WIN32_FIND_DATA
    RETURN BINARY_INTEGER
    IS EXTERNAL
        LIBRARY kernel32 NAME "FindFirstFileA"
        --WITH CONTEXT
        PARAMETERS
                    ( --CONTEXT,
                     pi_FileName STRING--, pi_FileName INDICATOR SHORT
                    , pio_Win32_Find_data  BY REFERENCE OCIColl--,pio_Win32_Find_data INDICATOR long
                    , return long );
    FUNCTION GetDiskFreeSpace ( pi_RootPathName VARCHAR2
                                ,pio_SectorsPerCluster  OUT BINARY_INTEGER
                                ,pio_BytesPerSector   OUT BINARY_INTEGER
                                ,pio_NumberOfFreeClusters  OUT BINARY_INTEGER
                                ,pio_TotalNumberOfClusters  OUT BINARY_INTEGER
    RETURN BINARY_INTEGER
      IS EXTERNAL
        LIBRARY kernel32 NAME "GetDiskFreeSpaceA"
        PARAMETERS (  pi_RootPathName STRING
                    , pio_SectorsPerCluster BY REFERENCE long
                    , pio_BytesPerSector BY REFERENCE long
                    , pio_NumberOfFreeClusters BY REFERENCE long
                    , pio_TotalNumberOfClusters BY REFERENCE long
                    , return long );   
      FUNCTION GetDriveTypeA( pi_driveLetter VARCHAR2) RETURN BINARY_INTEGER   
      IS EXTERNAL
      LIBRARY kernel32 NAME "GetDriveTypeA"
      PARAMETERS (pi_driveLetter STRING, RETURN long);
    FUNCTION GetDriveType( pi_driveLetter VARCHAR2) RETURN VARCHAR2 IS
    BEGIN
      CASE  GetDriveTypeA(pi_driveLetter) 
       WHEN 2 THEN RETURN 'Removable';
       WHEN 3 THEN RETURN 'Drive Fixed';
       WHEN 4 THEN RETURN 'Remote';
       WHEN 5 THEN RETURN 'Cd-Rom';
       WHEN 6 THEN RETURN 'Ram disk';
       ELSE RETURN 'Unrecognized';
    END CASE;                              
    END;
    FUNCTION GetLastError  RETURN BINARY_INTEGER
    IS EXTERNAL
    LIBRARY kernel32 NAME "GetLastError"
    PARAMETERS (return long);
    FUNCTION ShellExecute( pi_Hwnd BINARY_INTEGER
                          ,pi_Operation VARCHAR2
                          ,pi_FileName VARCHAR2
                          ,pi_Parameters VARCHAR2
                          ,pi_DefaultDirectory  VARCHAR2
                          ,pi_ShowCmd BINARY_INTEGER
                          ) RETURN BINARY_INTEGER
    IS EXTERNAL
    LIBRARY SHELL32 NAME "ShellExecuteA"
    PARAMETERS (pi_Hwnd long,pi_Operation STRING,pi_FileName STRING
                 ,pi_Parameters STRING,pi_DefaultDirectory STRING
                 ,pi_ShowCmd long, return long
    FUNCTION ExecuteCommand ( pi_OperationType VARCHAR2
                              ,pi_FileName VARCHAR2
                              ,pi_Parameters VARCHAR2
                              ,pi_DefaultDirectory VARCHAR2
    RETURN VARCHAR2 IS
      v_return_val BINARY_INTEGER;
    BEGIN
      v_return_val:= ShellExecute(0,pi_OperationType
                                 ,pi_FileName,pi_Parameters
                                 ,pi_DefaultDirectory,0
      IF v_return_val <=32 THEN
       RETURN 'Error!';
      ELSE RETURN 'Success!';
      END IF;
    END;
    END dbms_kernel32sb;
    Now the working demos:
    SQL> SET SERVEROUT ON
    SQL> /* Demo I:- How to obtain file size */
    SQL> DECLARE
      2    v_FileSize BINARY_INTEGER;
      3    v_FileSizeHigh PLS_INTEGER;
      4    v_FileHandle BINARY_INTEGER;
      5    v_filename VARCHAR2(500) :='C:\test2.csv';
      6    v_dummy BINARY_INTEGER;
      7  BEGIN
      8    v_FileSizeHigh := DBMS_KERNEL32SB.FILE_SIZE_HIGH;
      9    v_FileHandle:=DBMS_KERNEL32SB.CreateFile(v_filename -- File name
    10                            ,DBMS_KERNEL32SB.GENERIC_FILE_ACCESS
    11                            ,DBMS_KERNEL32SB.DISABLE_FILE_SHARE_MODE
    12                            ,DBMS_KERNEL32SB.NO_FILE_SECURITY_ATTRIBUT
    13                            ,DBMS_KERNEL32SB.OPEN_EXISTING_FILE
    14                            ,DBMS_KERNEL32SB.FILE_ATTRIBUTE_NORMAL
    15                            ,DBMS_KERNEL32SB.NO_TEMPLATE_FILE);
    16   v_FileSize := DBMS_KERNEL32SB.Getsize(v_FileHandle, v_FileSizeHigh)
    17   DBMS_OUTPUT.put_line('File Size in Bytes: ' ||v_FileSize);
    18   v_dummy:=DBMS_KERNEL32SB.CloseFile(v_FileHandle);
    19  END;
    20  /
    File Size in Bytes: 61
    PL/SQL procedure successfully completed.
    SQL>
    SQL> /* Demo II:- How to find free disk space  */
    SQL> DECLARE
      2    v_rootpath VARCHAR2(500) :='C:\';
      3    v_dummy BINARY_INTEGER;
      4    v_sectorspercluster BINARY_INTEGER;
      5    v_bytespersector BINARY_INTEGER;
      6    v_numberoffreeclusters BINARY_INTEGER;
      7    v_totalnumberofclusters BINARY_INTEGER;
      8    v_freespace NUMBER;
      9    v_totalspace NUMBER;
    10  BEGIN
    11    v_dummy:=DBMS_KERNEL32SB.GetDiskFreeSpace(v_rootpath
    12                                              ,v_sectorspercluster
    13                                              ,v_bytespersector
    14                                              ,v_numberoffreeclusters
    15                                              ,v_totalnumberofclusters
    16                                              );
    17                                              
    18    DBMS_OUTPUT.put_line('Sector pre Cluster: ' ||v_sectorspercluster);
    19    DBMS_OUTPUT.put_line('Bytes per sector: ' ||v_bytespersector);
    20    DBMS_OUTPUT.put_line('Number Of Free Clusters: ' ||v_numberoffreeclusters);
    21    DBMS_OUTPUT.put_line('Total Number Of Clusters: ' ||v_totalnumberofclusters);
    22    v_freespace:=v_numberoffreeclusters/1024/1024/1024;
    23    v_freespace:=ROUND(v_freespace*v_sectorspercluster*v_bytespersector,3);
    24    v_totalspace:=v_totalnumberofclusters/1024/1024/1024;
    25    v_totalspace:=ROUND(v_totalspace*v_sectorspercluster*v_bytespersector,3);
    26    DBMS_OUTPUT.put_line('Total Space (GB):' ||v_totalspace);
    27    DBMS_OUTPUT.put_line('Total number of Free space (GB): '||v_freespace );
    28  END;
    29  /
    Sector pre Cluster: 8
    Bytes per sector: 512
    Number Of Free Clusters: 739477
    Total Number Of Clusters: 9765622
    Total Space (GB):37.253
    Total number of Free space (GB): 2.821
    PL/SQL procedure successfully completed.
    SQL>
    SQL> /* Demo IV:- How to get drive type*/
    SQL> SELECT dbms_kernel32sb.GetDriveType('C:\') FROM dual;
    DBMS_KERNEL32SB.GETDRIVETYPE('C:\')
    Drive Fixed
    SQL> SELECT dbms_kernel32sb.GetDriveType('D:\') FROM dual;
    DBMS_KERNEL32SB.GETDRIVETYPE('D:\')
    Cd-Rom
    SQL> SELECT dbms_kernel32sb.GetDriveType('E:\') FROM dual;
    DBMS_KERNEL32SB.GETDRIVETYPE('E:\')
    Unrecognized
    SQL>
    SQL> /* Demo V:- How to execute an Operating System Command*/
    SQL> DECLARE
      2   v_FileToExecute VARCHAR2(20):='test.bat';
      3   v_Parameter VARCHAR2(20):='test1.csv';--dbms_kernel32sb.NO_PARAMATER
      4   v_DefaultDirectory VARCHAR2(20):='C:\';
      5   v_ReturnValue VARCHAR2(20);
      6  BEGIN
      7    v_ReturnValue:=dbms_kernel32sb.ExecuteCommand(dbms_kernel32sb.EXECUTE_FILE
      8                                                  ,v_FileToExecute
      9                                                  ,v_Parameter
    10                                                  ,v_DefaultDirectory
    11                                                  );
    12   DBMS_OUTPUT.put_line('Status: '||v_ReturnValue);                               
    13  END;
    14  /
    Status: Success!
    PL/SQL procedure successfully completed.
    SQL> Now the sub programs with structures are NOT getting called successfully.
    SQL> /* Demo III:- How to obtain file time */
    SQL> DECLARE
      2    v_FileHandle BINARY_INTEGER;
      3    v_filename VARCHAR2(500) :='C:\test2.csv';
      4    v_dummy BINARY_INTEGER;
      5    v_filecreationtime FILETIME;
      6    v_lastaccesstime FILETIME;
      7    v_lastwritetime FILETIME;
      8    v_err BINARY_INTEGER;
      9  BEGIN
    10    v_FileHandle:=DBMS_KERNEL32SB.CreateFile(v_filename -- File name
    11                            ,DBMS_KERNEL32SB.GENERIC_FILE_ACCESS
    12                            ,DBMS_KERNEL32SB.DISABLE_FILE_SHARE_MODE
    13                            ,DBMS_KERNEL32SB.NO_FILE_SECURITY_ATTRIBUTE
    14                            ,DBMS_KERNEL32SB.OPEN_EXISTING_FILE
    15                            ,DBMS_KERNEL32SB.FILE_ATTRIBUTE_NORMAL
    16                            ,DBMS_KERNEL32SB.NO_TEMPLATE_FILE);
    17   v_dummy := DBMS_KERNEL32SB.GetFileTime( v_FileHandle
    18                                          ,v_filecreationtime
    19                                          ,v_lastaccesstime
    20                                          ,v_lastwritetime
    21                                          );
    22   v_err:=DBMS_KERNEL32SB.GetLastError;                                
    23   DBMS_OUTPUT.put_line('File Size in Bytes: ' ||v_dummy);
    24   DBMS_OUTPUT.put_line('Error:'||v_err);
    25   v_dummy:=DBMS_KERNEL32SB.CloseFile(v_FileHandle);
    26  END;
    27  /
    File Size in Bytes: 0
    Error:203
    PL/SQL procedure successfully completed.
    SQL> So, I have noticed that, Where ever a STRUCTURE is involved in external routine, there is a problem. I want to know, How to implement functions with STRUCTURE as OUT parameter.
    Forgot to mention: This is my FILETIME object which corresponds to FILETIME structure of win32.
    CREATE OR REPLACE TYPE FILETIME_rec IS OBJECT
                              ( LowDateTime NUMBER
                               ,HighDateTime NUMBER
    CREATE OR REPLACE TYPE FILETIME IS TABLE OF  FILETIME_rec;Edited by: Saubhik on Feb 1, 2011 4:15 PM

    Saubhik wrote:
    This is for educational purpose only. I am trying to implement kernel32.dll and shell32.dll in PL/SQL using external proc. Interesting. Familiar with the Wn32 API, but do not run Oracle on Windows and never looked at this aspect of integration.
    So, I have noticed that, Where ever a STRUCTURE is involved in external routine, there is a problem. I want to know, How to implement functions with STRUCTURE as OUT parameter.
    Forgot to mention: This is my FILETIME object which corresponds to FILETIME structure of win32.The problem is that this passes the parameter by reference and not value. In a vanilla C/C++/Delphi program, you will create a variable of that struct and then pass a long pointer to that variable when making the API call. That pointer will be dereferenced and the memory it points to, populated. This is not a problem as the underlying DLL you call that does this, uses your process's data segment.
    Extproc is different. In order to protect the integrity of the database server process, an external call is done by a "proxy" process. It acts as the interface between your PL/SQL code and the actual external call.
    In this case, this "proxy" process will be doing the implicit LoadLibrary() call to load kernel32.dll interface - and the DLL will expect to dereference and access this process's memory struct to populate it. This "proxy" process in turn needs to know that despite it calling the interface by reference, it needs to return that parameter to PL/SQL by value - as your PL/SQL code cannot dereference a pointer passed back by that "proxy" process and access its memory to gain access to that struct.
    In basic terms - that argument is a 32 bit number containing a pointer. That is what the "proxy" process needs to pass to the interface call. Your code is passing a struct and not a pointer, right?
    And that is the basic problem I believe. How to address this.. not sure. You can have your own DLL as interface that does not use pointers but expect arguments to be passed by value. But this will suck as you then need to include a custom DLL to deploy and have PL/SQL call that, instead of simply accessing and calling the native kernel interface.
    Doubt that many Win32 programmers with OCI (Oracle Call Interface) frequents this forum. So perhaps this is not the best place to ask. I would be hitting Metalink (support.oracle.com) search function in your sho3s though as there should be support notes dealing with this subject matter.

  • How to pass value in Table import parameter of an RFC

    Hi all,
    I have an RFC in which import parameters are in the form of a table
    so now when i imported that RFC in my webdynpro application and Apply Service Template to it, it created the structure but when i applied form template to it all the inputfields were readonly
    and also when i tried to set the input parameter of that table like:
    wdContext.currentBAPI_CREATEElement.set<field>("value");
    it shows null pointer exception
    MY Context structure created after service template is as follows:
    Model Node Zcreate_rfc, it icludes another model node
    BAPI_CREATE, and it then includes the input parameters
    Please tell me how to solve the problem

    Suppose the RFC is called ZRFC, and the table structure is called TableStruct, then this works for me (in execute method before calling execute):
    ZRFCInput input = wdContext.currentZRFCElement().modelObject();
    // these are regular import parameters
    input.setAaa(aaa);
    input.setBbb(bbb);
    if (input.getTableStruct()!=null) {
          input.getTableStruct().clear();
    // In this loop table rows are added
    for (int i=0; i<sourcList.size(); i++) {
         ZTableStruct table = new ZTableStruct();
         table.setDdd(((SomeBean) sourcList.get(i)).getDdd()); // for property ddd
         input.addTableStruct(table);
    Good luck, Roelof
    Edited by: R. Knibbe on Jan 23, 2008 3:25 PM

  • How to pass the ObjectType as input for search Criteria

    Hi All,
    I have search function that takes the input parameters and returns all the matching rows. this is straight forward only. My problem is having multiple types as a input parameter. that is the reason i am not able to pass the input value for these types.
    My Input Type table looks like this.
    CREATE OR REPLACE TYPE T_T_PARTY_REQUEST_CRITERIA
    AS TABLE OF T_O_PARTY_REQUEST_CRITERIA;
    CREATE OR REPLACE TYPE T_O_PARTY_REQUEST_CRITERIA
    AS OBJECT
    SYSTEM_IDENTIFER VARCHAR2(50),
    PROCESS_TYPE VARCHAR2(50),
    UPDATED_BY VARCHAR2(50),
    STATUS VARCHAR2(50),
    CHILD_REQUEST_INDICATOR VARCHAR2(25),
    TRACKING_REQUEST_INDICATOR VARCHAR2(25),
    REQUEST_TYPE VARCHAR2(50),
    REQUEST_TYPE_CLASS_NAME VARCHAR2(50),
    PARTY_KEY_IDENTIFIER T_T_PARTY_KEY_IDENTIFIER,
    ADDTN_IDENTIFIER_INFO T_T_ADDTN_IDENTIFIER_INFO
    Last two inputs are type again.my question here is how to pass the values for these two T_T_PARTY_KEY_IDENTIFIER and T_T_ADDTN_IDENTIFIER_INFO. I have defined the the last two types following.
    CREATE OR REPLACE TYPE T_T_PARTY_KEY_IDENTIFIER
    AS TABLE OF T_O_PARTY_KEY_IDENTIFIER;
    CREATE OR REPLACE TYPE T_T_ADDTN_IDENTIFIER_INFO
    AS TABLE OF T_O_ADDTN_IDENTIFIER_INFO;
    CREATE OR REPLACE TYPE T_T_ADDTN_IDENTIFIER_VALUES
    AS TABLE OF T_O_ADDTN_IDENTIFIER_VALUES;
    CREATE OR REPLACE TYPE T_O_PARTY_KEY_IDENTIFIER
    AS OBJECT
    PARTY_KEY_TYP_NM VARCHAR2(50),
    PARTY_KEY_VALUE VARCHAR2(50)
    CREATE OR REPLACE TYPE T_O_ADDTN_IDENTIFIER_INFO
    AS OBJECT
    ADDTN_INFO_KEY_TYP_NM VARCHAR2(50),
         ADDTN_IDENTIFIER_VALUES T_T_ADDTN_IDENTIFIER_VALUES
    CREATE OR REPLACE TYPE T_O_ADDTN_IDENTIFIER_VALUES
    AS OBJECT
    ADDTN_RQST_VALUE VARCHAR2(50),     
    ADDTN_RQST_VAL_DT TIMESTAMP(6),
    ADDTN_RQST_VAL_NUM NUMBER(19, 2)
    I have pasted the query here from my function. when i pass the null as part of input for these 2 types my query is working. otherwise it is saying invalid Identifier.First I tried with first Type.
    I am passing the value as
    (PRKYTP.PRTY_KEY_TYP_NM = ITTPRC.PARTY_KEY_IDENTIFIER.PARTY_KEY_TYP_NM OR ITTPRC.PARTY_KEY_IDENTIFIER.PARTY_KEY_TYP_NM = 'ALL' OR ITTPRC.PARTY_KEY_IDENTIFIER.PARTY_KEY_TYP_NM IS NULL);
    Error is Error(34,147): PL/SQL: ORA-00904: "ITTPRC"."PARTY_KEY_IDENTIFIER"."PARTY_KEY_TYP_NM": invalid identifier
    SELECT DISTINCT T_O_PARTY_REQUEST_IDENTIFIER(PR.PRTY_RQST_ID) BULK COLLECT INTO T_T_P_R_CRITERIA
    FROM TABLE(CAST(I_T_T_PARTY_REQUEST_CRITERIA AS T_T_PARTY_REQUEST_CRITERIA)) ITTPRC,
    PRTY_RQST PR
    JOIN BUSN_APPLC BIAP ON BIAP.BUSN_APPLC_ID = PR.BUSN_APPLC_ID
    JOIN INTN_STATS INSTS ON INSTS.INTN_STATS_ID = PR.INTN_STATS_ID
    JOIN INTN_PROCES_TYP INTPTY ON INTPTY.INTN_PROCES_TYP_ID = PR.INTN_PROCES_TYP_ID
    LEFT JOIN RQST_TYP RQSTYP ON RQSTYP.RQST_TYP_ID = PR.RQST_TYP_ID
    JOIN ADDTN_RQST_INFO ADTINF ON PR.PRTY_RQST_ID = ADTINF.PRTY_RQST_ID
    JOIN ADDTN_INFO_KEY_TYP ADDKEY ON ADTINF.ADDTN_INFO_KEY_TYP_ID = ADDKEY.ADDTN_INFO_KEY_TYP_ID
    JOIN PRTY_KEY PRTKEY ON PR.PRTY_RQST_ID = PRTKEY.PRTY_RQST_ID
    JOIN PRTY_KEY_TYP PRKYTP ON PRTKEY.PRTY_KEY_TYP_ID = PRKYTP.PRTY_KEY_TYP_ID
    WHERE (BIAP.BUSN_APPLC_NM = ITTPRC.SYSTEM_IDENTIFER OR ITTPRC.SYSTEM_IDENTIFER = 'ALL' OR ITTPRC.SYSTEM_IDENTIFER IS NULL)
    AND (INTPTY.INTN_PROCES_TYP_NM = ITTPRC.PROCESS_TYPE OR ITTPRC.PROCESS_TYPE = 'ALL' OR ITTPRC.PROCESS_TYPE IS NULL)
    AND (PR.UPDT_BY = ITTPRC.UPDATED_BY OR ITTPRC.UPDATED_BY = 'ALL' OR ITTPRC.UPDATED_BY IS NULL)
    AND (INSTS.INTN_STATS_NM = ITTPRC.STATUS OR ITTPRC.STATUS = 'ALL' OR ITTPRC.STATUS IS NULL)
    AND (PR.CHLD_RQST_IND = ITTPRC.CHILD_REQUEST_INDICATOR OR ITTPRC.CHILD_REQUEST_INDICATOR = 'ALL' OR ITTPRC.CHILD_REQUEST_INDICATOR IS NULL)
    AND (PR.TRACK_RQST_IND = ITTPRC.TRACKING_REQUEST_INDICATOR OR ITTPRC.TRACKING_REQUEST_INDICATOR = 'ALL' OR ITTPRC.TRACKING_REQUEST_INDICATOR IS NULL)
    AND (RQSTYP.RQST_TYP_NM = ITTPRC.REQUEST_TYPE OR ITTPRC.REQUEST_TYPE = 'ALL' OR ITTPRC.REQUEST_TYPE IS NULL)
    AND (RQSTYP.RQST_CLASS_NM = ITTPRC.REQUEST_TYPE_CLASS_NAME OR ITTPRC.REQUEST_TYPE_CLASS_NAME = 'ALL' OR ITTPRC.REQUEST_TYPE_CLASS_NAME IS NULL)
    -- AND (ITTPRC.PARTY_KEY_IDENTIFIER IS NULL);
    -- AND (ITTPRC.ADDTN_IDENTIFIER_INFO IS NULL);
    AND (PRKYTP.PRTY_KEY_TYP_NM = ITTPRC.PARTY_KEY_IDENTIFIER.PARTY_KEY_TYP_NM OR ITTPRC.PARTY_KEY_IDENTIFIER.PARTY_KEY_TYP_NM = 'ALL' OR ITTPRC.PARTY_KEY_IDENTIFIER.PARTY_KEY_TYP_NM IS NULL);
    can some one tell is this approach is correct. if not suggest me.

    I am passing the value as
    (PRKYTP.PRTY_KEY_TYP_NM = ITTPRC.PARTY_KEY_IDENTIFIER.PARTY_KEY_TYP_NM OR Here PART_KEY_IDENTIFIER is a Nested table. So you cant join it like that.
    Try like this
    prkytp.prty_key_typ_nm in (select party_key_typ_nm from table(ittprc.party_key_identifier)) orHere is a example based on EMP table.
    I have created following nested table.
    SQL> create or replace type my_emp_list as table of number(10)
      2  /
    Type created.
    SQL> create or replace type my_dept_obj as object(deptno number(10), emp_list my_emp_list)
      2  /
    Type created.
    SQL> create or replace type my_dept_tbl as table of my_dept_obj
      2  /
    Type created.I am going to use the below nested table data in a query to get value from emp table
    my_dept_tbl
       my_dept_obj
         10, my_emp_list(1,2,3,4,5)
       my_dept_obj
         20, my_emp_list(6,7,8,9)
    )The query would be like this
    SQL> select e.*
      2    from emp e
      3    join table
      4         (
      5           my_dept_tbl
      6           (
      7             my_dept_obj
      8             (
      9               10, my_emp_list(7839,7782)
    10             ),
    11             my_dept_obj
    12             (
    13               20, my_emp_list(7566,7369)
    14             )
    15           )
    16         ) t
    17      on e.deptno = t.deptno
    18     and e.empno in (select column_value from table(t.emp_list))
    19  /
         EMPNO ENAME  JOB              MGR HIREDATE         SAL        COM     DEPTNO
          7839 KING   PRESIDENT            17-NOV-81       5000          0         10
          7782 CLARK  MANAGER         7839 09-JUN-81       2450          0         10
          7566 JONES  MANAGER         7839 02-APR-81       2975          0         20
          7369 SMITH  CLERK           7902 02-APR-81       2975          0         20
    SQL>

  • HOW TO PASS SELECT-OPTIONS AS IMPORT PARAMETER TO A CLASS

    Hi experts,how to pass select options value as a export parameters to a zclass.
    can  give me some idea.
    Thanks
    sai

    As Sachin already said, selection options are stored in an internal table. You can reconstruct the table type without the corresponding input fields using the type addition RANGE OF.
    So - assuming you have the following in your program:
    DATA: wa TYPE sflight.
            SELECT-OPTIONS so_car FOR sflight-carrid.
    you can create a publically-visible type in your class using direct type entry and the code
    TYPES: my_selectoption TYPE RANGE OF sflight-carrid.
    and use this to define the importing parameter of the method.
    The only other thing you have to remember is that select-options generates an internal table with header line. Thereore, to pass the table to the method, you would use (in the above example) so_car[], and not just the name of the select-option.
    Hope this helps.
    Regards
    Jon.

  • Pass a datarow as input parameter in a stored procedure

    Hi everyone!
    I wonder if anyone know how to pass a datarow (better if tipized like "tablenameRow") as input parameter for a stored procedure.
    links or suggestions are welcome! (i'm newbie in .net programming, so if you can post some code i'll be really grateful!)
    Thank you!

    Hi,
    YES!! its possible you can pass a datarow to a SP from your Dot net application.
    Here below i'm going to give you an example for Desktop Application.
    For Passing a datarow as Input Parameters, your SP need to support for all these parameters.
    I mean, if a data row has 03 Columns. Then your procedure should be able to take 03 arguments/parameters.
    --Adjust code according to your need.
    --Its for C# Desktop application.
    --Visual Studio Professional, Framework (2.0)
    //Setting connections.
    OracleConnection con=new OracleConnection("Data Source=orcl9i; user id=scott; password=tiger");
    OracleComand cmd=new OracleCommand(con);
    cmd.Type=CommandType.StoredProcedure; //you are useing SP
    cmd.Text="my_stored_procedure"; //Mention SP name.
    --if DataRow has Three columns. You need three parameters.
    OracleParameter p1=new OracleParameter ();//By default parameters are input parameters.
    OracleParameter p2=new OracleParameter ();
    OracleParameter p3=new OracleParameter ();
    //We assume that Datarow already has data in it.
    p1.ParametersName="sp_var1 ";
    p1.OracleDbType=OracleDbType.Varchar;
    p1.Value=tablenameRow[1]; //Here DataRow object's Column1 is input.
    p2.ParametersName="sp_var2 ";
    p2.OracleDbType=OracleDbType.Varchar;
    p2.Value=tablenameRow[2]; //Here DataRow object's Column2 is input.
    p3.ParametersName="sp_var3 ";
    p3.OracleDbType=OracleDbType.Varchar;
    p3.Value=tablenameRow[3]; //Here DataRow object's Column3 is input.
    cmd.OracleParameter.Add(p1); //Add parameters.
    cmd.OracleParameter.Add(p2); //Add parameters.
    cmd.OracleParameter.Add(p3); //Add parameters.
    cmd.ExecuteNonQuery(); //Execute Procedure here.
    Feel free to ask if still found problem.
    ....

  • How to pass value to select-option parameter using SET PARAMETER Command

    Hi,
        Am passing values to selection-screen fields in report RV13A004 ( used in VK11, VK12 and VK13). using below statement but material number is select-option in this report. am able to pass  MATERIAL FROM using SET PARAMETER ID, can i know how to pass values MATERIAL TO range in select-options fields using SET PARAMETER Command ??
    Passing values to parameter id
    set parameter id 'VKS' field kschl.
    set parameter id 'VKO' field vkorg.
    set parameter id 'VTW' field vtweg.
    set parameter id 'KDA' field erdat.
    set parameter id 'MAT' field matnr_from.
    Change condition price.
    call transaction 'VK12' and skip first screen.
    Thanks in advance.
    Regards,
    Balamurugan.

    Hi,
    instead of using set parameters and dden call transaction use this..........
    submit RV13A004  WITH SELECTION-TABLE rspar
    Effect
    If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
    SELNAME (length 8),
    KIND (length 1),
    SIGN (length 1),
    OPTION (length 2),
    LOW (length 45),
    HIGH (length 45).
    To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
    SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
    KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
    SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
    If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
    The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
    Notes
    In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
    When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.
    Cheers
    Will.

Maybe you are looking for

  • My macbook fell and since then a white screen with question mark appears

    hey guys! i really need to know what to do, my macbook fell while it was on. it froze so i restarted it, but the white screen comes in with the apple begining sound and everything but the screen stays blank for about two minutes and then a folde with

  • Can I authorize Logic Pro on both my Laptop and Desktop Mac

    I use my Macbook Pro for mobile recording using Logic Pro and I was wondering if I can authorize my Mac Pro desktop to use Logic Pro too? I purchased Logic Pro from the iTune store, so I don't have disks to install from.  Using the Desktop at my home

  • After Effects CS6 wont open

    I've the same error when I start After Effects Configuration: Windows 7 64bit, graphic card: nvidia GeForce 6150 LE I've installed the package CS6 Production Premium

  • Pacman ignores "--ignore"

    I'm trying to install Arch Linux to an USB drive for use on a device with a Transmeta Crusoe CPU. As such, I need the kernel specially patched for Crusoe and I'm following the instructions on: http://aur.archlinux.org/packages.php?ID=38661 I've insta

  • Error when generating PDF

    When I generate a PDF, I'm getting the following message: "Cannot find 'C:\Documents and Settings\jbroggi\Applications Data\1-StepRoboPDF\Empty.pdf\Empty.htm'. Make sure the path or Internet address is correct." Then the RoboPDF window opens up, but