Logon Screen Modificatio : Using JCo for Executing a Func Module in SAP R/3

Hi all
   I am new to Portal(EP: 6.0: SP12) and JCo.
   We are customizing the Logon Screen of the Portal to include a CLIENT field.
    And  we are planning to Call a Z Function Module present in the R/3 of the specified client(in the Logon Screen) using JCO.
    But i am really new to the Environment..
    Could anyone please help in carrying out this work???
    And also i would like to know how a Fuc Module can be called with the help of JCO. Providing a sample Code would really help me a lot!!!!!!  
Thanks
Kam
Message was edited by: Kam

Hi Kam
You need to create a connection to that R/3 system for that.
Try the following code:
creating connection:
=====================
IConnectorGatewayService cgService = (IConnectorGatewayService)
     PortalRuntime.getRuntimeResources().
     getService(IConnectorGatewayService.KEY);
IConnection con = cgService.getConnection("systemalias",request);
ConnectionProperties cp = new ConnectionProperties(request.getLocale(),request.getUser());
IInteraction ix = con.createInteractionEx();
IInteractionSpec ixspec = ix.getInteractionSpec();
ixspec.setPropertyValue("inputParameter","BAPI_SALESORDER");
RecordFactory rf = ix.getRecordFactory();
MappedRecord input = rf.createMappedRecord("inputParameter");
input.put("EMPLOYEE_NUMBER",empNo);
input.put("EMPLOYEE_NAME",empName);
BAPI_SALESORDER==>calling fuction
EMPLOYEE_NUMBER,EMPLOYEE_NAME===>parameter name
empNo,empName===>parameter value
<u>To retrive the value:</u>
============================
MappedRecord output = (MappedRecord)ix.execute(ixspec,input);
object rs = null;
object result = output.get("SALES_ORDERS");
if(result instanceof IRecordSet) {
     rs = (IRecordSet)result;
con.close();
Required jar files:
====================
com.sap.portal.ivs.connectorserviceapi.jar,                                  genericconnector.jar,
                   connector.jar,
                   activation.jar
regards,
Yoga

Similar Messages

  • Changing Logon Screen WebAS ABAP: image for header

    Hallo,
    we would like to change the default logon screen of a WebAS ABAP 7.0 service (CLPBID - APO Collaborative Transportation Planning). The problem is the image for the header (SICF, service, tab error pages, tab logon erros, configuration, adjust links an images).
    When we enter - for testing purposes - the URL "/SAP/PUBLIC/BC/Webicons/w_approv.gif", the GIF is displayed correctly. When we choose the URL "/SAP/PUBLIC/BC/Icons/s_aanode.GIF", the GIF is missing. We also created a new folder (SE80, MIME repository), e.g. "/SAP/PUBLIC/TEST" with a file test.gif. But this file is also not displayed on the logon page.
    What is the difference between those folders. Are there any prerequsites for using other folders in the URL field? Security concerns? For clarity’s sake, we would like to create new folders with our own ressources...
    Thank you very much
    Sven Westenberg

    We have not found a satisfactory solution up to know. We chose the WebIcons folder....
    CU
    Sven

  • Screen exits using BAdI for promotion - tcode WAK1/WAK2

    Hi,
    We want to add a new field for search selection in screen 2140 of WAK1/WAK2. Can we do that with BAdI/exit because client doesn't want to modify the standard program? There are several BAdIs in the program but not for screen 2140, such as :
    WAKT_BADI_004 for screens 2600, 8003
    WAKT_BADI_005 for screens 8223
    WAKT_BADI_008 for screens 8231
    Thanks for your advice

    Le,
    it will lil easy if you can take access key from basis and just add one more selection in selection screen.
    Amit.

  • Possibilities of using Labview for executable DAQ software, PIC programming, etc

    We have multiply issues here.  We need to create a data logging and real time viewer for a custom Dynamometer build in which we need to bring in approx 12 sensor inputs through a DAQ card and plot their performance in a software package in house. This would likely not need to be wrote as an executable but would be nice for future expansion of business model.  This system would need to operated in closed loop where sensor data inputs will relate to a programmed output.  In a nutshell, we want to create automatic load sweeps for engines where we need to monitor rpm and such while outputting control to a load valve.  
    In another application, we need to create very simple executable software systems to edit variables wrote to a PIC.  I am hoping that Labview has the ability to output and program as needed as well as create the software in an executable for our customers to use with our products.  
    We have a good friend running LV 8 so really only plugged around with it a bit but would likely use their seat in the short term for our DAQ and programming software needs. That is of course if it can do all of that.  I would also like to askhow intuitive this program is?  I am rather concerned I will need another degree just to run it.  Learning Catia was NOT an over night deal.  I am hoping the learning curve for LV is better...

    asdfs,
    LabVIEW is certainly capable of doing what you are trying to do -- acquiring, processing and outputting data is what LabVIEW was created for.
    With regards to how easy LabVIEW is to learn it really depends on your background and knowledge.  If you've never programmed before the learning curve is obviously longer since you have to not only learn the LabVIEW tool, but also how to think in computer programming terms.  I would say that you can become productive with LabVIEW much faster than with other programming languages.
    If you're already familiar with basic programming (things like loops, arrays and boolean logic) then LabVIEW will be much quicker to pick up. 
    Feel free to get in touch with someone from NI directly -- they can help you figure out if LabVIEW will be right for your needs technically and be able to meet your expectations with regards to how much effort you will need to put in.  If learning LabVIEW isn't for you they can also recommend people in your area with the appropriate expertise if getting someone else to the work is an option for you.
    Contact NI 
    You might also attend a free LabVIEW Hands On session given by your local field engineer - this would give you chance to get your hands on LabVIEW, go through some intro exercises and ask questions to an experienced user.  After 3 hours you'll know if LabVIEW will be right for your application.
    Check for seminars in your area 
    Regards,
    SimonH 

  • How to Save Screen data using BADI for Screen Exit

    Hi All,,
    I have requirement got MIGO Transaction. Customer wants one tab besides VENDOR on header level. For that i used BADI 'MB_MIGO_BADI'. Also i created Append Structure in MKPF Table for two fields and designed sreen using SE51.
    Now i want to save this data ( with added new fields ) into Data base table MKPF. I don't know where to place code .
    Also pl confirm me that, when i copy Sample Code from
    Go to -> Sample Code -> Copy . All the code is copied from BADI. So is it necessary to keep the code for each method as it or i have to comment all the code i each methos. i am littel bit confused abt it. Please tell me in detial.
    Also tell where to put logic for saving newly added fields .
    waiting
    Thanks and Regards.
    Ulhas

    is this the one you are looking for?
    Learning Series SAP NetWeaver Process Orchestration, Business to Business Add-on 2d OFTP Adapter

  • Using SOAP for integration of salesforce and crm sap

    Hi All,
    I have to integrate CRM SAP and salesforce in order to sync the business partner data real time.
    I learnt from articles that in this process CRM XIF adapter will be used.Also I learnt integration can be brought using either IDOCS or XML messages.
    From where can i get help for developing SOAP interfaces?
    How is the process going to look like?
    I am very new to SAP.I am on my own on this assignment.I would really appreciate ur support.
    Regards
    Shilpi

    Hello Shilpi,
    You have posted your message to the wrong area.  This area is specific to Business Objects Enterprise solutions used to report of SAP datasources using such tools as Crystal Reports, Webi Intellegence etc...
    thanks
    Mike

  • How to download jco, for using in a test sap system?

    Hello,
    at the moment i am trying to program with java a connection to a sap test system (from the book abap objects).
    Normally the conenction is built up by jco. My question is, because i haven´t got a login to the service marketplace,
    is there any possibility to download and use jco for my test connection? I only try it for education.
    Thank you very much
    Bye

    Hi GLM,
    i just used the example from the jco package,
    which i downloaded from sap service marketplace.
    (I have changed the sap poperties).
    With the jco 2 it works perfect. Only with new one
    i got problems.
    import java.io.File;
    import java.io.FileOutputStream;
    import java.util.Properties;
    import java.util.concurrent.CountDownLatch;
    import com.sap.conn.jco.AbapException;
    import com.sap.conn.jco.JCoContext;
    import com.sap.conn.jco.JCoDestination;
    import com.sap.conn.jco.JCoDestinationManager;
    import com.sap.conn.jco.JCoException;
    import com.sap.conn.jco.JCoField;
    import com.sap.conn.jco.JCoFunction;
    import com.sap.conn.jco.JCoFunctionTemplate;
    import com.sap.conn.jco.JCoStructure;
    import com.sap.conn.jco.JCoTable;
    import com.sap.conn.jco.ext.DestinationDataProvider;
    public class StepByStepClient
        static String ABAP_AS = "ABAP_AS_WITHOUT_POOL";
        static String ABAP_AS_POOLED = "ABAP_AS_WITH_POOL";
        static String ABAP_MS = "ABAP_MS_WITHOUT_POOL";
        static
            Properties connectProperties = new Properties();
            connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST, "binmain");
            connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR,  "53");
            connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "000");
            connectProperties.setProperty(DestinationDataProvider.JCO_USER,   "JCOTEST");
            connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "JCOTEST");
            connectProperties.setProperty(DestinationDataProvider.JCO_LANG,   "en");
            createDataFile(ABAP_AS, "jcoDestination", connectProperties);
            connectProperties.setProperty(DestinationDataProvider.JCO_POOL_CAPACITY, "3");
            connectProperties.setProperty(DestinationDataProvider.JCO_PEAK_LIMIT,    "10");
            createDataFile(ABAP_AS_POOLED, "jcoDestination", connectProperties);
            connectProperties.clear();
            connectProperties.setProperty(DestinationDataProvider.JCO_MSHOST, "binmain");
            connectProperties.setProperty(DestinationDataProvider.JCO_R3NAME,  "BIN");
            connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "000");
            connectProperties.setProperty(DestinationDataProvider.JCO_USER,   "JCOTEST");
            connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "JCOTEST");
            connectProperties.setProperty(DestinationDataProvider.JCO_GROUP, "PUBLIC");
            connectProperties.setProperty(DestinationDataProvider.JCO_LANG,   "en");
            createDataFile(ABAP_MS, "jcoDestination", connectProperties);
        static void createDataFile(String name, String suffix, Properties properties)
            File cfg = new File(name+"."+suffix);
            if(!cfg.exists())
                try
                    FileOutputStream fos = new FileOutputStream(cfg, false);
                    properties.store(fos, "for tests only !");
                    fos.close();
                catch (Exception e)
                    throw new RuntimeException("Unable to create the destination file " + cfg.getName(), e);
        public static void step1Connect() throws JCoException
            JCoDestination destination = JCoDestinationManager.getDestination(ABAP_AS);
            System.out.println("Attributes:");
            System.out.println(destination.getAttributes());
            System.out.println();
            destination = JCoDestinationManager.getDestination(ABAP_MS);
            System.out.println("Attributes:");
            System.out.println(destination.getAttributes());
            System.out.println();
        public static void step2ConnectUsingPool() throws JCoException
            JCoDestination destination = JCoDestinationManager.getDestination(ABAP_AS_POOLED);
            destination.ping();
            System.out.println("Attributes:");
            System.out.println(destination.getAttributes());
            System.out.println();
        public static void step3SimpleCall() throws JCoException
            JCoDestination destination = JCoDestinationManager.getDestination(ABAP_AS_POOLED);
            JCoFunction function = destination.getRepository().getFunction("STFC_CONNECTION");
            if(function == null)
                throw new RuntimeException("BAPI_COMPANYCODE_GETLIST not found in SAP.");
            function.getImportParameterList().setValue("REQUTEXT", "Hello SAP");
            try
                function.execute(destination);
            catch(AbapException e)
                System.out.println(e.toString());
                return;
            System.out.println("STFC_CONNECTION finished:");
            System.out.println(" Echo: " + function.getExportParameterList().getString("ECHOTEXT"));
            System.out.println(" Response: " + function.getExportParameterList().getString("RESPTEXT"));
            System.out.println();
        public static void step3WorkWithStructure() throws JCoException
            JCoDestination destination = JCoDestinationManager.getDestination(ABAP_AS_POOLED);
            JCoFunction function = destination.getRepository().getFunction("RFC_SYSTEM_INFO");
            if(function == null)
                throw new RuntimeException("BAPI_COMPANYCODE_GETLIST not found in SAP.");
            try
                function.execute(destination);
            catch(AbapException e)
                System.out.println(e.toString());
                return;
            JCoStructure exportStructure = function.getExportParameterList().getStructure("RFCSI_EXPORT");
            System.out.println("System info for " + destination.getAttributes().getSystemID() + ":\n");
            for(int i = 0; i < exportStructure.getMetaData().getFieldCount(); i++)
                System.out.println(exportStructure.getMetaData().getName(i) + ":\t" + exportStructure.getString(i));
            System.out.println();
            //JCo still supports the JCoFields, but direct access via getXX is more efficient as field iterator
            System.out.println("The same using field iterator: \nSystem info for " + destination.getAttributes().getSystemID() + ":\n");
            for(JCoField field : exportStructure)
                System.out.println(field.getName() + ":\t" + field.getString());
            System.out.println();
        public static void step4WorkWithTable() throws JCoException
            JCoDestination destination = JCoDestinationManager.getDestination(ABAP_AS_POOLED);
            JCoFunction function = destination.getRepository().getFunction("BAPI_COMPANYCODE_GETLIST");
            if(function == null)
                throw new RuntimeException("BAPI_COMPANYCODE_GETLIST not found in SAP.");
            try
                function.execute(destination);
            catch(AbapException e)
                System.out.println(e.toString());
                return;
            JCoStructure returnStructure = function.getExportParameterList().getStructure("RETURN");
            if (! (returnStructure.getString("TYPE").equals("")||returnStructure.getString("TYPE").equals("S"))  )  
               throw new RuntimeException(returnStructure.getString("MESSAGE"));
            JCoTable codes = function.getTableParameterList().getTable("COMPANYCODE_LIST");
            for (int i = 0; i < codes.getNumRows(); i++)
                codes.setRow(i);
                System.out.println(codes.getString("COMP_CODE") + '\t' + codes.getString("COMP_NAME"));
            codes.firstRow();
            for (int i = 0; i < codes.getNumRows(); i++, codes.nextRow())
                function = destination.getRepository().getFunction("BAPI_COMPANYCODE_GETDETAIL");
                if (function == null)
                    throw new RuntimeException("BAPI_COMPANYCODE_GETDETAIL not found in SAP.");
                function.getImportParameterList().setValue("COMPANYCODEID", codes.getString("COMP_CODE"));
                function.getExportParameterList().setActive("COMPANYCODE_ADDRESS",false);
                try
                    function.execute(destination);
                catch (AbapException e)
                    System.out.println(e.toString());
                    return;
                returnStructure = function.getExportParameterList().getStructure("RETURN");
                if (! (returnStructure.getString("TYPE").equals("") ||
                       returnStructure.getString("TYPE").equals("S") ||
                       returnStructure.getString("TYPE").equals("W")) )
                    throw new RuntimeException(returnStructure.getString("MESSAGE"));
                JCoStructure detail = function.getExportParameterList().getStructure("COMPANYCODE_DETAIL");
                System.out.println(detail.getString("COMP_CODE") + '\t' +
                                   detail.getString("COUNTRY") + '\t' +
                                   detail.getString("CITY"));
            }//for
         * this example shows the "simple" stateful call sequence. Since all calls belonging to one
         * session are executed within the same thread, the application does not need
         * to take care about the SessionReferenceProvider. MultithreadedExample.java
         * illustrates the more complex scenario, where the calls belonging to one session are
         * executed from different threads.
         * Note: this example uses Z_GET_COUNTER and Z_INCREMENT_COUNTER. The most ABAP systems
         * contain function modules GET_COUNTER and INCREMENT_COUNTER, that are not remote enabled.
         * Copy these functions to Z_GET_COUNTER and Z_INCREMENT_COUNTER (or implement as wrapper)
         * and mark they remote enabled
         * @throws JCoException
        public static void step4SimpleStatefulCalls() throws JCoException
            final JCoFunctionTemplate incrementCounterTemplate, getCounterTemplate;
            JCoDestination destination = JCoDestinationManager.getDestination(ABAP_MS);
            incrementCounterTemplate = destination.getRepository().getFunctionTemplate("Z_INCREMENT_COUNTER");
            getCounterTemplate = destination.getRepository().getFunctionTemplate("Z_GET_COUNTER");
            if(incrementCounterTemplate == null || getCounterTemplate == null)
                throw new RuntimeException("This example cannot run without Z_INCREMENT_COUNTER and Z_GET_COUNTER functions");
            final int threadCount = 5;
            final int loops = 5;
            final CountDownLatch startSignal = new CountDownLatch(threadCount);
            final CountDownLatch doneSignal = new CountDownLatch(threadCount);
            Runnable worker = new Runnable()
                public void run()
                    startSignal.countDown();
                    try
                        //wait for other threads
                        startSignal.await();
                        JCoDestination dest = JCoDestinationManager.getDestination(ABAP_MS);
                        JCoContext.begin(dest);
                        try
                            for(int i=0; i < loops; i++)
                                JCoFunction incrementCounter = incrementCounterTemplate.getFunction();
                                incrementCounter.execute(dest);
                            JCoFunction getCounter = getCounterTemplate.getFunction();
                            getCounter.execute(dest);
                            int remoteCounter = getCounter.getExportParameterList().getInt("GET_VALUE");
                            System.out.println("Thread-" + Thread.currentThread().getId() +
                                    " finished. Remote counter has " + (loops==remoteCounter?"correct":"wrong") +
                                    " value [" + remoteCounter + "]");
                        finally
                            JCoContext.end(dest);                   
                    catch(Exception e)
                        System.out.println("Thread-" + Thread.currentThread().getId() + " ends with exception " + e.toString());
                    doneSignal.countDown();
            for(int i = 0; i < threadCount; i++)
                new Thread(worker).start();
            try
                doneSignal.await();
            catch(Exception e)
        public static void main(String[] args) throws JCoException
            step1Connect();
            step2ConnectUsingPool();
            step3SimpleCall();
            step4WorkWithTable();
            step4SimpleStatefulCalls();
    Edited by: Unicast on Sep 14, 2008 4:33 PM

  • Remote Logon: logon screen appears?!

    Hello,
    From System A I call a remote function module in system B. I always get a logon screen when calling the remote function module in system B.
    From System A I call the function module for many systems besides system B in a loop. So if there could appear a logon screen (calling the remote function tool in the system) I would skip it and go to the next system.
    I need something like... "If a logon screen appears during remote logon -> Skip calling that function module in that system."
    Does anybody know how to solve it?
    thx,
    holger

    You mean the function module.
    sorry but i use 4.6C. RFC_LOGIN ist not remote enabled!!!
    I can not use it!
    What I mean is. The remote function module is on System B, C, D, E, F,...
    I call this function module from system A only!
    If I call the function module in system B, from system A, a logon screen appears.
    I would not like to make any changes in system B,C,D,E,F...concerning SM59...
    What happens, If the logon screen in system B appears. Could I catch that message in my report in system A (calling the remote function module in system B)?
    So if i execute the report, I need to know whether a logon screen appears...my report has to.
    If the logon screen appears, I would skip calling the function module in that system...same for system C,D,E,F,....
    thanks a lot,
    holger
    Message was edited by: Holger Schmidt

  • Calling Remote function tool leads always to a logon screen

    Hello,
    I run an remote function tool in system A. In System B I run a report calling this function module.
    Each time, I execute the report, a remote logon screen appears. It looks the same like the one you logon the system. You have to specifiy client, user and password.
    I know one possibilty to avoid this logon screen appeaering.
    System B (holding the function module) must declare System A as a trusted system. Thus, the user does not need to logon system B, each time calling the func. module. I processed this in correspondence with the help data, but the screen still appears.
    Is there any other possibilty to avoid appearing the logon screen or does anybody know wheter I did something wring??
    thanks, holger

    Hi Holger,
    1. This has to do with tcode SM59 (Maintain RFC Connections)
    THE CALLING SYSTEM HAS NOT DEFINED
    USER ID / PASSWORD TO LOGON TO THE TARGET SYSTEM.
    HENCE, IT SHOWS BLANK LOGIN SCREEN
    2. Under the node RFC Destinations ---> R/3 Connections,
       various systems are defined for RFC Purpose.
    3. Lets say ur system(which u want to connect) is PRD.
    4. Double Click PRD and go the the details.
    5. There are 3 Tabs. Goto LOGON/SECURITY TAB.
    6. In the logon information , enter the
       USERID and password and client.
    7. Save.
    Then try your program.
    Hope this helps.
    Regards,
    Amit Mittal.

  • VB code for executing pl/sql procedure, and displaying TABLE OUT parameter

    Does anybody have any sample VB code (using OO4O) for executing a PL/SQL stored procedure, and then displaying (in Excel preferably) the following OUT parameters from the procedure:
    (1) variable(s) of TYPE PL/SQL RECORD
    (2) variable of TYPE PL/SQL TABLE defined as TABLE%ROWTYPE
    (3) n variables of TYPE PL/SQL TABLE'S defined as table.column%TYPE;
    Thanks.

    Here is what we use to bring in arrays of data from plsql. Here will be some sample vba code and plsql.
    What the plsql need to run in an array of input dates and an array of ids to lookup for the dates (also needs the number of values in the arrray.
    vba code...
    Sub Bull()
    Dim oDoc As Object
    Dim oTable As Object
    Dim oCell As Object
    Dim ArrCtr As Integer
    Dim iCount As Integer 'Counter
    Dim DataDynaset As Object 'Dynaset for retrieved values
    Dim DischDataDynaset As Object 'Dynaset for retrieved values
    Dim TWDataDynaset As Object 'Dynaset for retrieved values
    Dim PDDataDynaset As Object 'Dynaset for previous day retrieved values
    Dim MSTssCodes As Variant ' TS Codes Array
    Dim NumRows As Integer 'Number of rows in the table
    Dim NumColumns As Integer 'Number of columns in the table
    Dim NumArrayVals As Integer 'Number of array values (actual number - 1)
    OraLogin
    NumRows = 83
    NumColumns = 11
    'One less than number because we start at 0
    'NumArrayVals = 5
    NumArrayVals = 117
    ReDim DateArr(NumArrayVals)
    MSTssCodes = Array(3398, 3406, 3391, 3385, 3413, 3378, _
    2254, 2254, 2254, _
    3398, 3406, 3391, 3385, 3413, _
    3460, 3455, 3450, 3447, 3505, 3444, 2254, 2254, _
    4974, 2803, 4735, 4719, 2837)
    ****** NOW THIS WILL GET READY TO SEND TO PLSQLGetData MSTssCodes, DateArr, DataDynaset, NumArrayVals + 1
    .... more suff in the sub
    Sub GetData(Tssids, DateArray, TmpDataDynaset, NumRetVals)
    'Retrieves data from the Oracle database
    Dim I As Integer 'Counter
    Dim TssidDynaset As Object 'Temporary array for Tssids
    Dim DateDynaset As Object 'Temporary array for dates
    OraDatabase.Parameters.addTable "TSCODES", 1, 68, NumRetVals, 0
    OraDatabase.Parameters("TSCODES").ServerType = ORATYPE_UINT
    OraDatabase.Parameters.addTable "DATES", 1, 12, NumRetVals, 0
    OraDatabase.Parameters("DATES").ServerType = ORATYPE_DATE
    OraDatabase.Parameters.addTable "VALS", 3, 2, NumRetVals, 0
    OraDatabase.Parameters("VALS").ServerType = ORATYPE_NUMBER
    OraDatabase.Parameters.Add "NUM_VALS", NumRetVals, 3
    OraDatabase.Parameters("NUM_VALS").ServerType = ORATYPE_NUMBER
    OraDatabase.Parameters.Add "ERR_NUM", 0, 2
    OraDatabase.Parameters("ERR_NUM").ServerType = ORATYPE_NUMBER
    Set TssidDynaset = OraDatabase.Parameters("TSCODES")
    Set DateDynaset = OraDatabase.Parameters("DATES")
    'Fill the arrays
    For I = 0 To NumRetVals - 1
    TssidDynaset.Put_Value Tssids(I), I
    DateDynaset.Put_Value DateArray(I), I
    Next I
    OraDatabase.DbExecuteSQL ("Begin DBCALLS.SELECT_VALUES (:TSCODES, :DATES, :VALS, :NUM_VALS, :ERR_NUM); End;")
    If OraDatabase.LastServerErr <> 0 Or OraDatabase.LastServerErrText <> "" Then
    MsgBox "Error Getting Data"
    End If
    Set TmpDataDynaset = OraDatabase.Parameters("VALS")
    'MsgBox (OraDatabase.Parameters("NUM_VALS") & " " & OraDatabase.Parameters("ERR_NUM"))
    OraDatabase.Parameters.Remove "TSCODES"
    OraDatabase.Parameters.Remove "DATES"
    OraDatabase.Parameters.Remove "VALS"
    OraDatabase.Parameters.Remove "NUM_VALS"
    OraDatabase.Parameters.Remove "ERR_NUM"
    End Sub
    Now here is the plsql called from the DBCALL package......
    --Select time series values for give ts_codes.
    PROCEDURE select_values (
    ts_codes IN IntArrayTyp,
    dates IN DateArrayTyp,
    vals IN OUT NumArrayTypIB,
    --quality   IN  OUT RawArrayTyp,
    num_vals IN INTEGER,
    err_num OUT INTEGER) IS
    BEGIN
    --initialize variables
    err_num := 0;
    FOR i IN 1..num_vals LOOP
    BEGIN
    SELECT value INTO vals(i)
    FROM table_name
    WHERE ts_code = ts_codes(i)
    AND date_time = dates(i);
    EXCEPTION
    WHEN OTHERS THEN
    --dbms_output.put_line (ts_codes(i) || ' ' || SQLCODE);
    vals(i) := -1.0;
    err_num := SQLCODE;
    END;
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    --dbms_output.put_line (tssid || ' ' || SQLCODE);
    err_num := SQLCODE;
    END select_values;

  • Need sample code to connect MDM using JCO

    hi friends,
    I want to connect MDM server using JCO,
    can you please provide me the sample code for that.
    Regards,
    Venki.

    Hello Venki,
    why do you want to use JCo for connecting to MDM? MDM has its own specific Java API for this task. There's no need for using JCo at all.
    BR Michael.

  • Unable to connect to ECC system through stand alone JAVA program using JCO.

    Hi All,
    I want to connect to ECC system through standalone JAVA program using jco.while executing my java program it is saying that connection refused.
    I am getting the error as shown below.
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: CMALLC : rc=20 > Co
    nnect from SAP gateway to RFC server failed
    Connect_PM  GWHOST=192.168.10.99, GWSERV=sapgw01, SYSNR=01
    LOCATION    SAP-Gateway on host igm501 / sapgw01
    ERROR       partner '192.168.10.99:sapgw01' not reached
    TIME        Mon Sep  1 15:00:37 2008
    RELEASE     700
    COMPONENT   NI (network interface)
    VERSION     38
    RC          -10
    MODULE      nixxi.cpp
    LINE        2821
    DETAIL      NiPConnect2
    SYSTEM CALL connect
    ERRNO       239
    ERRNO TEXT  Connection refused
    COUNTER     2
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeConnect(Native Method)
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.connect(MiddlewareRFC.java:11
    25)
            at com.sap.mw.jco.JCO$Client.connect(JCO.java:3138)
            at JConnector_frmDesk.<init>(JConnector_frmDesk.java:91)
            at JConnector_frmDesk.main(JConnector_frmDesk.java:141)
    I have already configured SAPDP01,SAPGW01 in my services file in windows\system32\drivers\etc\services.
    What else i need to do to connect to ECC system through my JAVA program.Please help me in this regard.
    Regards,
    Ramana.

    Hi !
    Check this to verify that you are correctly using JCO:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
    Try to give in ashost="/H/saprouter/H/sap".
    Regards,
    Matias.

  • Prompting logon screen in remote system..

    Hi All,
    I have developed a RFC function module in B system and when i call this RFC function module from A system (for displaying a ALV report with the data fetched from B system), to my surprise it is prompting the logon screen of B system for entering the details, when we enter the logon details and press enter, then automatically it is taking us back to A system and displaying the report.
    Now the problem is can we get the data from B system and display the report in A with out prompting the logon screen of B system.
    Thank you in advance.
    Regards,
    Venu Gudala.

    Hi,
    Go to SM59 transaction and enter the RFC destination of system B
    and then go to the second tab i.e. logon/security and then enter the client, user and password details and then save it.
    then check if its working fine....
    Regards,
    Siddarth

  • Updating SAP  Table using JCO

    Dear All
                      How to update SAP Table (Any single or multiple tables) through Java code using JCO. Can any body provide sample code regarding this...
    Thanks&Regards
    mgreddy

    Hi,
    I think for that anyway you will have to use JCO as the middleware to connect to SAP R/3.
    So what you can to do is to write three RFCs and call them through JCO from your JAVA application.
    1. First BAPI for reading the dictionary information about an SAP table.
    2. Second to read data from the table.
    3. And, third to write data to that table.
    But if you want to edit any table (and not a specific table) then your program will become even more complex since then you will have to pass the table name and information dynamically to the BAPIs.
    Best regards,
    Guru.

  • How to revert the data that is loaded using BDC for transaction PA30

    Hi All,
    We had loaded the data in SAP using BDC-Session Unfortunately.
    Now we want to delete all the data which is loaded usong these sessions.
    Please can anyone know the procedure to do so.(May be using LSMW)
    This is the test environment.
    This is the HR Data.
    Transaction we used is PA30.
    Thank you,
    Edited by: Kumar B on Sep 16, 2009 6:55 PM

    Sorry All for the late response.
    Thanks Swathi ..I thought in same manner.
    But we used the LSMW,It deleted the records in the exact fashion we need.
    It was a nice experience.
    Use T-code SE38 run the report RPUDELPN and pass the pernr entire data will delete. as it is a test client then go to NUMKR Feature reset it and upload the correct data again.
    I think that would not have worked for us as it deletes all the employee records.
    Might be dangerous too
    If it is has standard fast entry screen then use pa70 for mass deletion
    Apart from deletion,Also we need to delimit the previous record.
    Thank you All

Maybe you are looking for

  • Should I have Copies in 3 Folders - Data, Original & Modified?

    I have a Powerbook G4 that is running out of Hard Disk space & I am looking for opportunities to find some space. I have not touched ANY of the files in the iPhotot Library, as I know that is a no-no, but it looks like I have copies of all pictures i

  • Is it possible to get a black background when using Picture Book layout in iphoto?

    I want to customize the layouts more in iphoto--either be able to use a black background when using the Picture Book layout, or have more layout options in the Photo Essay layout.  Are either of these possible? Thanks!

  • FF and Safari position fix

    This was the last post in a thread earlier today. When no vertical scrollbar is required centered a web page will jump about 5px to the right compared to the position when scrollbar is present. I'm reposting it because I wanted everyone to have a cha

  • Internet Explorer 9 stops using PAC File

    Hi, several machines that have Internet Explorer 9 installed suddenly stopped connecting to the internet using a PAC file. Chrome as well as Firefox work with the PAC file set in IE, setting a static proxy adress in the Proxyserver field in IE works

  • Text formatting issues from MS Word 2011 to InDesign CS5.5

    Is there anyway to copy and paste text from MS Word 2011 into InDesign CS5.5 and have it retain the original formatting? Each time I try to copy and paste content from MS Word, even into a text box, all the bolding and italics are lost. I've tried to