Query and return attributes from SAP R/3

Hi All,
Please help in how to fetch attributes from SAP R/3 and display in IDM.
There is an attribute which will have list of names and id's in SAP R/3 we need to fetch that information from SAP R/3 and display that information in SUN IDM.
We are Using JCO adapter.
Pls help me in this.

You can get a list of users on an SAP system with the bapi function "BAPI_USER_GETLIST". I don't see that function used by the resource adapter for SAP. You can write some Java code to call "BAPI_USER_GETLIST" and write a rule to access it.

Similar Messages

  • Call external URL from ABAP userexit, capture data and return it to SAP?

    My apologies if this question has been asked before, but I've searched for a few hours today and haven't found anything directly related to my question.  Thank you in advance for any help you may be able to provide!
    I would like to be able to make a call from an SAP userexit during Sales Order Entry in the VA01 transaction in the SD module to an external website, allow the user to capture some data in the external site and then pass that data back into the userexit where I can use it to populate internal tables, etc.
    I'm completely unfamiliar with Web Dynpro programming, but this seems like a good place to start my search for a solution. 
    Does this sound like a problem that can be solved with Web Dynpro and what documentation or code examples should I reference to go about building such a solution.
    I should also note that I'm hoping to build a solution that could be called from any userexit in R/3, SAP ERP, SAP CRM, etc. and would obviously need to learn about what dependencies to consider (ex: SAP GUI version, SAP product release number, Web AS release, etc.).
    Eric

    Thank you for the response.  Let me provide some additional information.
    The external application will be a Hosted Web page.  It is not an SAP system. 
    The external application will be a web page served by a separate system outside of the company domain(shouldn't matter what the technology is I would think - but the web page will be hosted by a different company than the one calling the URL) that would appear as a web page in which the user will enter data, logic will be performed on that data and then some or all of the data would need to be passed back to the calling point in SAP.
    For practical discussions it doesn't matter to me if the call in ABAP occurs in an SD userexit, in a custom report, in an HR screen or in a CRM business partner screen.  There will be many places where this external application may be called from and I'm just trying to figure out how to call an external HTTPS URL and return data from that web page to the calling point in ABAP.
    I hope that clarifies my question.
    Thanks!
    Eric

  • Can I access Webi queries and Xcelsius dashboards from SAP portal?

    Hello,
    Can I access Webi queries and Xcelsius dashboards from SAP portal?  And how?
    Thanks

    Portal Part 1
    /people/ingo.hilgefort/blog/2010/03/29/sap-businessobjects-enterprise-sap-enterprise-portal--part-1-of-4
    Portal Part 2
    /people/ingo.hilgefort/blog/2010/03/30/sap-businessobjects-enterprise-sap-enterprise-portal-part-2-of-4
    Portal Part 3
    /people/ingo.hilgefort/blog/2010/04/08/sap-businessobjects-enterprise-sap-enterprise-portal--part-3-of-4
    Portal Part 4
    /people/ingo.hilgefort/blog/2010/04/21/sap-businessobjects-enterprise-and-sap-enterprise-portal--part-4-of-4
    Ingo

  • Get user and Oranization Attributes  from portal channels

    Hello,
    I am trayin to retrieve some user and arganizational attributes from portal channels (2005Q1), but, with directive "<dtpc:getStringAttribute key="attribute"/>, i can not retrieve some importants attributes as "dn" and an custom attribute from the organization that contain user entry, for example, "orgIdSuscriptor".
    i don't know how to retrieve in the same channel some attributes of user entry and some attributes from oraganization entry, any one know how?
    Thank yu very much.

    Thanks that helpful in some ways, but I want to get the page_id. For example, if I create a page with the name PG_DEPT and the display name "Department Page". I need to know how to get the current PG_DEPT name from the API. Also, I will like to get the current URL from the page (http://portal/pls/portal/page=123).

  • Removal of transit stock and old inventory from SAP

    Dear All,
                How to  Removal of transit stock and old inventory from SAP.
    We had taken an approval for removal of some transit stock and old inventory (366.173 DWT) from SAP as on 31.03.2014.
    We have removed 279.509 DWT and the balance qty cannot be removed from transit/plant inventory
    removed some transit stocks ,but the major
      old inventory viz; at plant 1000 a stock of 15.693 DWT is appearing.
    Thanks
    Teknath

    Hi,
       Please follow the procedure explained in the note:  392205 - Analysis of stock in transit/correction for split valuation and  1727922 - Stock in Transit is not cleared with movement types 557/558 in the transaction MB5T
    Regards,
    AKPT

  • Help Required -- Can we use SQL Query to READ data from SAP MDM Tables

    Hi All,
    Please help.........
    Can we use SQL Query to READ(No Creation/Updation/Deletion  just Read) Data from SAP MDM tables directly, without using MDM Syndicator.
    Or direct SQL access to SAP MDM tables is not possible. Only through MDM Syndicator can we export data.
    Thanks in Advance
    Regards

    All the tables you create in Repository comes under A2i_CM_Tables in Database named as your repository name. So the tables names are fields of table A2i_CM_Tables. Now i tried it but cant make it.
    Now, I dont think its possible to extract all fields in tables and there values using select query. May be pure sql guy can do that or not.
    But there is no relation of data extraction and syndicator. Data is viewed in Data Manager. and you can also store data in a file from DM also.
    BR,
    Alok

  • URGENT HELP !JCO RETURN structure from SAP

    Hello,
    I am working on my intern project and I got some trouble.
    I have used JDBC to access a table in Oracle(this is an independent DB)I updated a column in the table and selected all data that
    was marked as 6 based on the update(SAP needs this data). I passed the values to a JCO application,
    which connects to SAP and send the data (I presume what I'm doing is correct) to a structure in SAP.
    SAP does some internal calculations with the data and should return the data back using the same
    structure but this time with some changes on the data.
    For example the field steuk is marked as 7 if the data processing was successful and if the data
    structure wasn't successful a 6 will be return.
    The return Values should be updated in the oracle DB indicating if the transfer was successful
    or not. And next time the same data will be sent to SAP following the same path.
    Now when I look at the return getString data in Eclipse, the result seems ambiguous.I don't see the data I presumably
    sent to the SAP structure using:
    JCO.ParameterList list = function.getTableParameterList();
    JCO.Table ztable =  list.getTable("ZSAORA_RUECK");
         for (int i = 0; i < 19; i++) {
         ztable.appendRow();
         ztable.setValue(value,field name);
    Am I doing some thing wrong here??? Any Help will be highly appreciated. Codes could be sent to [email protected]
    BELOW are the codes:
    CONNECTING TO test_table in Oracle DB:
    import java.sql.*;
    public class DatabaseConnect {
         public static void main(String[] args) {
         Connection con = null;
         Statement stmt = null;
         ResultSet re = null;
         String[] ParamArray;            
            ParamArray = new String[24];
         //Properties logon;
         try {
              Class.forName("oracle.jdbc.driver.OracleDriver");
         con = DriverManager.getConnection
    ("jdbc:oracle:thin:@226.190.0.1:1521:testdb","test","test1");
         stmt = con.createStatement ();
         stmt.executeUpdate("UPDATE test_table set steuk = 6 WHERE steuk = 5");
    ResultSet rs = stmt.executeQuery("SELECT mandt,kokrs,werks,arbpl,aufnr,vornr,ile01,"+
    "lsa01,ism01,ile02,lsa02,ism02,ile03,lsa03,ism03,"+
    "ile04,lsa04,ism04,steuk,matnr,budat,kostl,pernr,"+
    "rueckid FROM test_table where steuk =6");                              
         while (rs.next()) {
         for (int i = 1; i <= 24; i++){
         ParamArray[i-1] = rs.getString(i);
         System.out.print(rs.getString(i) + 't');
         System.out.println();                    
         } catch(Exception e) {
         e.printStackTrace();                    
         } finally {
              try
         if(stmt != null) stmt.close();
         if(con != null) con.close(); 
         } catch (Exception exception) {
              exception.printStackTrace();
         // Bapi call
         TryBapi sap = new TryBapi(ParamArray);
    BELOW IS THE JCO Code which connects to SAP and send data to the structure:
    import com.sap.mw.jco.IFunctionTemplate;
    import com.sap.mw.jco.JCO;
    public class TryBapi extends Object {     
    JCO.Client mConnection;     
    JCO.Repository mRepository;     
    OrderedProperties logonProperties;
    public TryBapi(String[] paramArray){
         try {
         logonProperties = OrderedProperties.load("/logon.properties");
         mConnection = JCO.createClient((String)logonProperties.get("jco.client.client"),
             (String)logonProperties.get("jco.client.user"),
            (String)logonProperties.get("jco.client.passwd"),
                             null,
           (String)logonProperties.get("jco.client.ashost"),
         String)logonProperties.get("jco.client.sysnr")
         mConnection.connect();
         mRepository = new JCO.Repository("SAPJCO",mConnection);
         catch (Exception ex) {
         ex.printStackTrace();
         System.exit(1);
         JCO.Function function = null;
         JCO.Table tab = null;
         try {
              function = this.createFunction("Z_UPDATE_SAORA_RUECK");
              if (function == null) {
              System.out.println("Z_UPDATE_SAORA_RUECK not found in SAP.");
              System.exit(1);
         JCO.ParameterList list = function.getTableParameterList();
              JCO.Table ztable =  list.getTable("ZSAORA_RUECK"); //inserting 24 records loop.
         for (int i = 0; i < 24; i++) {
         ztable.appendRow(); //ztable.setValue(value, field name)
         ztable.setValue("300","MANDT");
         ztable.setValue("KOKRS" + i, "KOKRS");
         ztable.setValue("WERKS" + i, "WERKS");
         ztable.setValue("ARBPL" + i, "ARBPL");
         ztable.setValue("AUFNR" + i, "AUFNR");
         ztable.setValue("VORNR" + i, "VORNR");
         ztable.setValue("ILE01" + i, "ILE01");
         ztable.setValue("LSA01" + i, "LSA01");
         ztable.setValue("ISM01" + i, "ISM01");
         ztable.setValue("ILE02" + i, "ILE02");
         ztable.setValue("LSA02" + i, "LSA02");
         ztable.setValue("ISM02" + i, "ISM02");
         ztable.setValue("ILE03" + i, "ILE03");
         ztable.setValue("LSA03" + i, "LSA03");
         ztable.setValue("ISM03" + i, "ISM03");
         ztable.setValue("ILE04" + i, "ILE04");
         ztable.setValue("LSA04" + i, "LSA04");
         ztable.setValue("ISM04" + i, "ISM04");
         ztable.setValue("STEUK" + i, "STEUK");
         ztable.setValue("MATNR" + i, "MATNR");
         ztable.setValue("BUDAT" + i, "BUDAT");
         ztable.setValue("KOSTL" + i, "KOSTL");
         ztable.setValue("PERNR" + i, "PERNR");
         ztable.setValue("RUECKID" + i, "RUECKID");
         list.setValue(ztable,"ZSAORA_RUECK");
         function.setTableParameterList(list);
         mConnection.execute(function);
         catch (Exception ex) {
         ex.printStackTrace();
         System.exit(1);
          JCO.Table codes = null;
         try {
         codes = function.getTableParameterList().getTable("ZSAORA_RUECK");
         System.out.println("Return Values starts HERE:");
         for (int i =0; i < codes.getNumRows(); i++){                 
         codes.setRow(i);
         System.out.println(codes.getString("MANDT")+ 't'+
         codes.getValue("KOKRS")+ 't'+
         codes.getString("WERKS")+ 't'+
         codes.getString("ARBPL")+ 't'+
         codes.getString("AUFNR")+ 't'+
         codes.getString("VORNR")+ 't'+
         codes.getString("ILE01")+ 't'+
         codes.getString("LSA01")+ 't'+
         codes.getString("ISM01")
    /*     codes.getString("ILE02")+ 't'+
         codes.getString("LSA02")+ 't'+
         codes.getString("ISM02")+ 't'+
         codes.getString("ILE03")+ 't'+
         codes.getString("LSA03")+ 't'+
         codes.getString("ISM03")+ 't'+
         codes.getString("ILE04")+ 't'+
         codes.getString("LSA04")+ 't'+
         codes.getString("ISM04")+ 't'+
         codes.getString("STEUK")+ 't'+
         codes.getString("MATNR")+ 't'+
         codes.getString("BUDAT")+ 't'+
         codes.getString("KOSTL")+ 't'+
         codes.getString("PERNR")+ 't'+
         codes.getString("RUECKID")       */
         catch (Exception ex) {
         ex.printStackTrace();
         System.exit(2);           
         mConnection.disconnect();
    public JCO.Function createFunction(String name) throws Exception {
         try {
         IFunctionTemplate ft =     mRepository.getFunctionTemplate(name.toUpperCase());
         if (ft == null)
         return null;
         return ft.getFunction();
         catch (Exception ex) {
         throw new Exception("Problem retrieving JCO.Function object.");
    Message was edited by: Rudolph Emange
    Message was edited by: Rudolph Emange

    Hi Astrid,
    Thank you for your remarks. The problem I'm having is that when I do send the values to SAP using the loop:
    JCO.ParameterList list = function.getTableParameterList();
    JCO.Table ztable =  list.getTable("ZSAORA_RUECK");
         for (int i = 0; i < 19; i++) {
         ztable.appendRow();
         ztable.setValue(value,field name);
    I do expect to have(or see) some values when I do access the same table structure(This is just a structure and
    not a real table as I do understand that there is a different between a structure and a table in SAP) and
    not the field names back.In the second try and catch block:
    try {
         codes = function.getTableParameterList().getTable("ZSAORA_RUECK");
         System.out.println("Return Values starts HERE:");
         for (int i =0; i < codes.getNumRows(); i++){                 
         codes.setRow(i);
         System.out.println(codes.getString("MANDT")+ 't'+
         codes.getValue("KOKRS")+ 't'+
         codes.getString("WERKS")+ 't'+
         codes.getString("ARBPL")+ 't'+
         codes.getString("AUFNR")+ 't'+
         codes.getString("VORNR")+ 't'+
         codes.getString("ILE01")+ 't'+
         codes.getString("LSA01")+ 't'+
         codes.getString("ISM01")
    I'm trying to access the values I sent in the first try and catch block. I presume I should see some real values and not the
    field names.This is how my output looks like:
    300     KOKR     WERK     ARBPL0     AUFNR0     VORN     ILE     
    300     KOKR     WERK     ARBPL1     AUFNR1     VORN     ILE     
    300     KOKR     WERK     ARBPL2     AUFNR2     VORN     ILE     
    300     KOKR     WERK     ARBPL3     AUFNR3     VORN     ILE     
    300     KOKR     WERK     ARBPL4     AUFNR4     VORN     ILE     
    300     KOKR     WERK     ARBPL5     AUFNR5     VORN     ILE
    This does not reflect the values but the field names. Why is it this way? Does it mean that my array is wrong or I'm not at all
    sending the values. Please HELP ME OUT HERE.
    Could any one show me a better way how to send the values selected from Oracle table using perhaps an
    ARRAY to the ZSAORA_RUECK structure in SAP?
    I am trying to send the values from the select statement in the first jdbc application
    to the value field in ztable.setValue(value,  field name).
    My Regards!
    Message was edited by: Rudolph Emange

  • Pass variables and return ResultSet from same preparedStatement

    I am passing "fp" and "week_no" to a preparedStament in a class and want to return the values to my jsp page. "fp" and "week_no" are used twice. Please see below. When I run it, I get no error messages but, it doesn't display any data.
    I have the following code in a class:
    public ResultSet getHistory(String fp, String week_no)
                        throws SQLException, Exception {
    ResultSet rs = null;
    if (con != null) {
    try {
         PreparedStatement getHist;
         getHist = con.prepareStatement(
         "SELECT sbu, TO_CHAR(((sum_dollar) + (adj_sum_dollar)),'$999,999,999.99') AS sum_dollar, TO_CHAR(actual_date,'MM/DD/YY') AS actual_date, " +
         "((sum_cases) + (adj_sum_cases)) AS sum_cases, " +
         "((new_order_cases) + (adj_new_order_cases)) AS new_order_cases, " +
         "((total_open_orders) + (adj_total_open_orders)) AS total_open_orders, " +
         "((back_orders) + (adj_back_orders)) AS back_orders, " +
         "TO_CHAR((sum_dollar/sum_cases), '999.99') AS yield " +
         "FROM SUMMARY " +
         "WHERE actual_date BETWEEN (SELECT begin_dt " +
                   "FROM fiscal_calendar " +
                             "WHERE fiscal_period = '?' " +
                             "AND week_number = '?' " +
                             "AND week_number <> '9' " +
                             "AND fiscal_yr = '2003') " +
                        "AND " +
                             "(SELECT end_dt " +
                        "FROM fiscal_calendar " +
                             "WHERE fiscal_period = '?' " +
                             "AND week_number = '?' " +
                             "AND week_number <> '9' " +
                             "AND fiscal_yr = '2003') " +
              "ORDER BY actual_date, sbu ");
         getHist.setString(1, fp);
         getHist.setString(2, week_no);
         getHist.setString(3, fp);
         getHist.setString(4, week_no);
         rs = getHist.executeQuery();
         } catch (SQLException sqle) {
    error = "SQLException: Update failed, possible duplicate entry.";
         throw new SQLException(error);
    } else {
    error = "Exception: Connection to the database was lost.";
         throw new Exception(error);
    return rs;
    This is in my jsp:
    <%
    String fp = request.getParameter("fp");
    String week_no = request.getParameter("week_no");
    historyInfo.connect();
    ResultSet rs = historyInfo.getHistory(fp, week_no);
    while (rs.next()) {
    //String sum_dollar = rs.getString("sum_dollar");
    %>
    <%= rs.getString("sum_dollar") %>
    <%
    %>

    Hi,
    First thing U can't do this way in java. If U are executing this sort of database query, after retriving all the values, put inside Haahtable or HashMap as the application required and return it.
    Otherwise execute this query at the same place where u r printing values in jsp page insted of writing it inside seperate method..It will work.
    If still it's not workimg, please let me know.
    Rajeh Pal

  • Operating System request Import return code has different return code from SAP SE01 log screen.

         Hi experts.
         I sent request from DEV system to PRD system at OS level but I am facing interesting problem. I sent request at OS level and return code 8, that means with error but if we look same request transporter log  at SAP side vi tranzaction SE01, Transporter log show me no error. I did not test with return code 0(zero), 4 or 12 at OS level.
    Our OS  is SOLARIS 11.2 and Database Oracle 11G and SAP Netweaver 7.40.
    Thank for help.

    Read what you have posted:
    Alternatively, you can find these logs in the following files in the
    log directory of your transport directory (usually:
    /usr/sap/trans/log):
    - tp Step 6: P<YY><MM><DD>.<SID>
    - tp Step N: N<YY><MM><DD>.<SID>
    - tp Step S: DS<YY><MM><DD>.<SID>
    Sort the files by date and check the latest one.
    Markus

  • How to extract Cleared and Open Items from SAP R/3?

    Hi experts,
    I have a requirement from user to extract cleared and open invoice items from SAP R/3.
    Can someone tell me how to do that?
    Thanks!

    Hi,
    Use the Data source 0FI_AR_4 to Know the status (0FI_DOCSTAT) of payment to be done by customer.
    OR
    Enhance the 2LIS_13_VDITM with VBUP fields which will give the status of Billing.
    With rgds,
    Anil Kumar Sharma .P

  • Creating a function and return something from an XML file

    Hi!
    I'm working with timeline actionscript. I want to create a function that loads my xmlfile and returns an xmlobject with the file's content.
    This is what I got so far:
    my_btn.addEventListener(MouseEvent.CLICK, getXML("myxml.xml")); //1067: Implicit coercion of a value of type void to an unrelated type Function.
    function getXML(fn:String):void{
         var infoLoader:URLLoader = new URLLoader();
         infoLoader.addEventListener(Event.COMPLETE, xmlLoaded);
         infoLoader.load(new URLRequest(fn));
         var myXML:XML = xmlLoaded(); //1136: Incorrect number of arguments.  Expected 1.
         trace(myXML);
    function xmlLoaded(e:Event):XML{
         return e.target.data;
         //trace(e.target.data);
    Can anyone take a look and perhaps point me in the right direction?
    Thanks

    I have never used a listcomponent, so I can only help with the steps before filling it with data.
    I think you should at start of your application load the XML with filenames and just after it's completed, e.g. in Event.COMPLETE handler, load all other XMLs looping through filenamesXML, like this
    var filenamesXML:XML;
    var XMLsToLoad:uint = 0;
    function filenamesXMLLoaded(e:Event):void
         filenamesXML = XML(e.target.data);
         XMLsToLoad =  filenamesXML.filenames.children().length();
         for (var i:uint =1; i < filenamesXML.filenames.children().length(); i++)
                  getXML( filenamesXML.filenames.children()[i] ); // the function from my previous post, don't forget to implement it
    //modify the minor xml load handler from the previous post
    function xmlLoaded(e:Event):void
         var loadedXML:XML = XML(e.target.data);   
         xmlArray.push(loadedXML);
         XMLsToLoad--;
    //assign the one click handler to all buttons, a loop here would be quite handy
    function clickHandler(e:MouseEvent):void
         if (XMLsToLoad == 0) //check if all xmls have been completely loaded
              switch (e.target.name) // swith by clicked button's instance name
                   case "button_1":
                        // here you have to implement supplying listcomponent with data, I think a loop again will be a good idea
                        break;
                   case "button_2":
                        // ibid.
                        break;
    Regards,
    gc

  • Data (Master Data Changes and Transaction Data) from SAP BW to SAP BPC 5.1

    Hi guys
    I have seen posts on this forum describing data transfers from SAP R/3 to SAP BPC. I assume the procedure for data transfers from SAP BW to SAP BPC 5.1 should be the same i.e. using SSIS packages.
    However I have some unique requirements -
    1. DATA AT DIFFERENT AGGREGATED LEVELS - I need data from SAP BW at different levels - Some data comes at Product level while other at Customer level and some at Project Level. The current procedure takes BW queries output in excel sheets (6 files) and then use the data manager package to load the data in SAP BPC 5.1 using appropriate transformation and conversion files. This procedure is highly manual and I am looking at using SSIS package to do this. However, because of having data at different levels, it becomes a little tricky. How can we achieve this using SSIS?
    2. UPDATING MASTER DATA - I need to update the master data (dimension members) in SAP BPC 5.1 at the start of every month. The current procedure compares (in MS ACCESS) the data from the queries mentioned in 1 to the dimension members in SAP BPC 5.1 and spits a file with the new entries which needs to be manually updated in the appropriate dimensions using Admin Console. I am looking at automating this task. I cannot just replace all the contents of a dimension with the members coming from SAP BW since the dimension members contains some dummy members which are used for planning.
    3. HIERARCHY CHANGES - What is the best way to capture the hierarchy changes in SAP BW into SAP BPC 5.1?
    Please advise.
    Thanks,
    Ameya Kulkarni

    Hi Ameya,
    how did you solve the described problems? Can you give some hints about uploading master data and updating the hierarchy?
    BR, André

  • 1.6 Dynamic Photo Gallery - alt and title attributes from xml file?

    Hi!
    I would like to attach information to my gallery images from
    the XML-file used by the gallery.
    Especially the alt and title attributes for the "img
    id="mainImage"-tag would add a bit more user friendliness.
    I found
    this
    example about adding caption to images very help full and
    everything worked just fine, thanks to clear information!
    (http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=602&threadi d=1306782&enterthread=y)
    Could someone come up with an example of adding title/alt
    attributes values from XML file?
    I'm sure there are quite a few out ther who would like to see
    a solution to this ;)

    You need to add your info to the XML.
    So something like:
    <photo
    path = "travel_01.jpg"
    width = "263"
    height = "350"
    title="my title"
    alt_text="Alt Text"
    thumbpath = "travel_01.jpg"
    thumbwidth = "56"
    thumbheight = "75">
    </photo>
    Then in your detailregion:
    <img src="{dsData::large/@base}{@path}" alt="{@alt_text}
    title="{@title}" />
    I am using
    http://www.adobe.com/devnet/dreamweaver/articles/spry_photo_album.html
    as the source of my samples...
    So, just add the data to the XML and then you will have these
    attributes available as data references.
    Hope this helps.
    Don

  • Multithreading and Returning Value from RMI

    Hi all,
    I have an RMI Object which is Multi Threaded. The scenario is like this:
    The client program will pass different program specific codes to the RMI object. Multiple clients can pass same or different codes. If the codes are different they can share common data in an asynchronous way other wise they need to be synchronized.
    This RMI object will do some database transactions and will return a value to the client. I am not sure how to return a value to the client which has invoked this method as this method executes asynchronously.
    I am sorry if this posting is inappropriate for this forum.
    Thanks in Advance
    Srinivas

    If the database transaction executes asyncrhonously, the remote method has to wait for it and return the result via the return statement.
    As the remote request is already executing in a thread of its own there is of course no need for the database transaction to execute asynchronously from RMI's point of view so if you can get rid of that complication in your architecture you may as well do it. OTOH your application architecture may do it for other reasons

  • Excel VBA - Automatically checkout and checkin documents from SAP R/3

    Hello,
    I'm trying to implement some sort of automatic solution for checking out and in documents in SAP.
    We have EasyDMS as Document Management System and need to reword about 10000 files which have a bug in their macro. For this purpose I created an Addin for Word and Excel that changes the macros automatically when opening a file. Due to security problems we cannot distribute this Addin to all Users (because you must deactivate macro security for enabling this Addin). So we thought about a possibility to automate the process and do the changes over weekend.
    My idea was to write a makro in Excel that takes the information about the files (documentnumber, version...) form an Excel table and uses RFC to call a function that can checkout the files. On this machine the Addin would be enabled, of course.
    I found the function "BAPI_DOCUMENT_CHECKOUTMODIFY2" and tried to implement the call via RFC, but I get an error.
    The error says: Application-defined or object-defined error
    I think the Problem is the data structure of the parameters.
    Can someone figure out how I have to set up the parameters to get the function to work? I have no idea how this should be done, although I read some tutorials.
    Thanks for your help!
    regards,
    Thomander
    Here is my Code so far (I stopped because I get the error at line "objDocumentfile.Value = "Test 2.doc"):
    Dim sapConn As Object 'Declare variant
    Set sapConn = CreateObject("SAP.Functions") 'Create ActiveX object
    If sapConn.Connection.Logon(0, False) <> True Then 'Try Logon
       MsgBox "Cannot Log on to SAP"
    End If
    Dim objFunction As Object
    Set objFunction = sapConn.Add("BAPI_DOCUMENT_CHECKOUTMODIFY2")
    Dim objDocumenttype As Object
    Dim objDocumentnumber As Object
    Dim objDocumentpart As Object
    Dim objDocumentversion As Object
    Dim objDocumentfile As Object
    Set objDocumenttype = objFunction.Exports("DOCUMENTTYPE")
    objDocumenttype.Value = "PM2"
    Set objDocumentnumber = objFunction.Exports("DOCUMENTNUMBER")
    objDocumentnumber.Value = "A5N00030059989"
    Set objDocumentpart = objFunction.Exports("DOCUMENTPART")
    objDocumentpart.Value = "000"
    Set objDocumentversion = objFunction.Exports("DOCUMENTVERSION")
    objDocumentversion.Value = "D"
    Set objDocumentfile = objFunction.Exports("DOCUMENTFILE") = "Test 2.doc"
    objDocumentfile.Value = "Test 2.doc"
    Dim objCheckedoutfile As Object
    Set objCheckedoutfile = objFunction.Exports("CHECKEDOUTFILE")

    Hello,
    I'm trying to implement some sort of automatic solution for checking out and in documents in SAP.
    We have EasyDMS as Document Management System and need to reword about 10000 files which have a bug in their macro. For this purpose I created an Addin for Word and Excel that changes the macros automatically when opening a file. Due to security problems we cannot distribute this Addin to all Users (because you must deactivate macro security for enabling this Addin). So we thought about a possibility to automate the process and do the changes over weekend.
    My idea was to write a makro in Excel that takes the information about the files (documentnumber, version...) form an Excel table and uses RFC to call a function that can checkout the files. On this machine the Addin would be enabled, of course.
    I found the function "BAPI_DOCUMENT_CHECKOUTMODIFY2" and tried to implement the call via RFC, but I get an error.
    The error says: Application-defined or object-defined error
    I think the Problem is the data structure of the parameters.
    Can someone figure out how I have to set up the parameters to get the function to work? I have no idea how this should be done, although I read some tutorials.
    Thanks for your help!
    regards,
    Thomander
    Here is my Code so far (I stopped because I get the error at line "objDocumentfile.Value = "Test 2.doc"):
    Dim sapConn As Object 'Declare variant
    Set sapConn = CreateObject("SAP.Functions") 'Create ActiveX object
    If sapConn.Connection.Logon(0, False) <> True Then 'Try Logon
       MsgBox "Cannot Log on to SAP"
    End If
    Dim objFunction As Object
    Set objFunction = sapConn.Add("BAPI_DOCUMENT_CHECKOUTMODIFY2")
    Dim objDocumenttype As Object
    Dim objDocumentnumber As Object
    Dim objDocumentpart As Object
    Dim objDocumentversion As Object
    Dim objDocumentfile As Object
    Set objDocumenttype = objFunction.Exports("DOCUMENTTYPE")
    objDocumenttype.Value = "PM2"
    Set objDocumentnumber = objFunction.Exports("DOCUMENTNUMBER")
    objDocumentnumber.Value = "A5N00030059989"
    Set objDocumentpart = objFunction.Exports("DOCUMENTPART")
    objDocumentpart.Value = "000"
    Set objDocumentversion = objFunction.Exports("DOCUMENTVERSION")
    objDocumentversion.Value = "D"
    Set objDocumentfile = objFunction.Exports("DOCUMENTFILE") = "Test 2.doc"
    objDocumentfile.Value = "Test 2.doc"
    Dim objCheckedoutfile As Object
    Set objCheckedoutfile = objFunction.Exports("CHECKEDOUTFILE")

Maybe you are looking for

  • Using xorg 1.5 in testing with some problem with keyboard and mplayer

    I have the following lines in my xorg's log file: (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (WW) RADEON(0): R500 support is under development. Please report any issues to [email protected] (WW) RADEON(0): LVDS Info: (WW)

  • SQL Injection with Oracle Text

    I did a search here for any posts about SQL Injection on Oracle Text indexes, but returned no hits. Can anyone give their opinion about whether SQL Injection is a concern when using Oracle Text or what steps can be taken ahead of time to prevent (or

  • Gmail Options button not working in standard view for Firefox 4

    Since upgrading to Firefox 4 gmail does not work correctly in standard view. I can't select my username or options at the top right or select emails to delete or perform any actions on. I use IE and everything works fine. I tried restarting in safe m

  • Number internal range in CO

    Hi just want to ask, how can we created internal number range in CO?  I already created the number range, but still users cannot transact such as invoicing and post incoming payment. How can we configure it? Thanks and more power

  • Rendering 1:1 previews is slow!

    While LR5 was whiling away a day (or two or three) rendering 1:1 previews for 70,000 nefs etc, I had a look at what it was doing using Windows Resource monitor. Having read that the reason for .dat files is to speed up rendering, I was surprised to s