FM call from Variant Function in JAVA SCE

Hello,
I have an issue with Variant Configuration in CRM WEB UI / WebShops.
We have created a variant function in ECC to read/pull a customer master value (KNVV table).  This is working fine in ECC & got the desired result.
Now we need replicate the same in CRM. For this we need to create KB, Version & write a variant function in Java class in SCE. In that variant function we need to call a function module and get the customer master / Business partner value as similar to ECC process described above.
But we see that the SAP standard is not supporting FM calls from VF in Java. i.e. we are unable to call the JCO call to a CRM function module from SCE.  The package for User defined classes "com.sap.sce.user" and the method inside it public boolean execute(fn_args args, Object obj) { ..... } has no option to make a FM call.
Has anyone faced the similar requirement and has any resolution for this? 
Thanks,
Surya.

Hi Eric,
You sound quite familiar with the variant functions. I am also working on IPC-SCE
variant functions for few years now.
We have a situation where I am building some debug logs in one java variant function and want to display it to the web UI at some condition.
Is there any object(like context etc.) that IPC server-side and Webapps share?
I can write that log to a text file and read it from web ui ... but I wanna avoid that.
Is there any other way you know of???
Regards,
Ruchika

Similar Messages

  • How can i call a c++ function through java

    Hi,
    dose anyone knows how to call a C++ function in java?
    Thanks.

    see JNI...
    basically declare a native method in your java class, then run javah on the class thus generating a *.h file. Then implement the c/c++ function. Compile the c/c++ part as a shared library, and make sure its accessible from your LD_LIBRARY_PATH env variable.
    Go through the steps in the JNI docs, and things shoulde be fine... hopefully ;)

  • I am using a Application in c dll calling from jni jar by java applet in firefox version 19.0 , the problem is click event message box will not working correct

    I am using a Application in c dll calling from jni jar by java applet in firefox version 19.0 , the problem is button click event message box or popup window will not working correctly. Please any one suggest me the steps to overcome this not responding or slowness in the responding problem of Button click event.

    Hello,
    In Firefox 23, as part of an effort to simplify the Firefox options set and protect users from unintentially damaging their Firefox, the option to disable JavaScript was removed from the Firefox Options window.
    However, the option to disable JavaScript was not removed from Firefox entirely. You can still access it from about:config or by installing an add-on.
    '''about:config'''
    # In the address bar, type "about:config" (with no quotes), and press Enter.
    # Click "I'll be careful, I promise"
    # In the search bar, search for "javascript.enabled" (with no quotes).
    # Right click the result named "javascript.enabled" and click "Toggle". JavaScript is now disabled.
    To Re-enable JavaScript, repeat these steps.
    '''Add-ons'''
    You can alternatively install an add-on that lets you disable JavaScript, such as
    *[https://addons.mozilla.org/firefox/addon/noscript/ No-Script] (to disable JavaScript on a per page basis, as required)
    *[https://addons.mozilla.org/firefox/addon/quickjava/ QuickJava] (to easily disable and enable JavaScript, automatic loading of images, and other content)
    Thank you and I hope this helps!

  • DB Call from Oracle Business Rule +Java Method call from OBR

    Hi,
    1.We have a requirement in project where we need to make DB Call from Business rule.
    We are using ORACLE SOA11g.
    Is this possible.Any pointers on this will be helpfull.
    2.Can we call java method from Oracle Business Rule.If so pls suggest how it can be done.
    Thanks In Advance,
    Oracle SOA User

    You can implement java class to make database updates using JDBC. You can add Java class as fact in business rules and invoke methods as actions of the business rules.
    Hope this will help.
    Jayesh Patel
    http://jayesh-patel.blogspot.com/
    http://www.yagnasys.com/

  • How to call the DLL functions through Java

    Hello,
    I have already got a VC++ generated DLL. It has serveral functionalities. I need to call those functions from my Java Application. Now i know that it can be possible only through writing Java JNI Interfaces.
    Everywhere i only see they give an example where in they tell to create an DLL. Now how do i will call if an DLL is ready and exists.
    If anyone can give an example then it will be very helpful to me. Please mail me at [email protected] .
    Thank you
    vvpatro

    You can't call functions in an arbitary DLL form Java. You need to use JNI to produce a 'wrapper' DLL that maps Java methods to the methods in the target DLL. The purpose of the wrapper is to allow type conversion between Java types and C/C++ types. The complexity of this task depends largely on the types used in th target DLL. If the targer DLL uses only primitive types such as char, byte, int, long, string, the translation is simple and the wrapper DLL will be 'thin'. If however, the target DLL passes arrays and objects, or employs callbacks, these more work to do, and the wrapper will be correspondingly 'thicker'.
    Hope this helps.

  • Returning values from JNI functions to Java

    I have a JNI function which returns a "jstring" to the calling Java function.
    I need also to return 2 byte values.
    Can I return them all...? if so, how?

    I have a JNI function which returns a "jstring" to the
    calling Java function.
    I need also to return 2 byte values.
    Can I return them all...? if so, how?"Also"? Then you do the same thing as if you were returning two different types in java only code, you wrap it in an object.

  • Return type Boolean From Oracle Function

    1. How do I get a return type of Boolean from Oracle function in Java?
    2. I have a function fx overloaded in Oracle (8 variances) and I have trouble getting the right one in Java. Is 8 too high a figure or Java does not support calling overloaded functions or what?
    Thanks for any help.

    I am facing a similar situation, where I have defined an overloaded function in one package (2 variants) which both return a type BOOLAN value.
    I am having trouble to setting up an CallableStatemnt to call one of this functions from Java. Whenever I set the parameter with a BIT or NUMBER data type, I get an exception with java.lang.boolean during my
    callablestatement.setobject( indez, parameter, OracleTypes.BIT );
    or
    callablestatement.setobject( indez, parameter, OracleTypes.NUMBER );
    I have no problem calling the function from SQLPlus, but doing so from Java raises the exception. I have found no exact match in OracleTypes or java.sql.Types for a BOOLEAN data type.
    In your response do you mean to modify the Function to return a NUMBER instead of a BOOLEAN, or do you mean to set the parameter as Types.NUMBER in the calling java code?
    Thanks,
    Fedro

  • Is it possible to modify private member of a class directly from main function?

    This is the code which modifies the private String stk[] indirectly from main method when sorting option is called from main method:
    import java.io.*;
    class Stack
        private String stk[];
        private int tos;
        private int size;
        Stack()
            size=5;
            stk=new String[size];
            tos=-1;
        Stack(int sz)
            size=sz;
            stk=new String[size];
            tos=-1;
        boolean push(String s)
            if(tos==size-1) return false;
            stk[++tos]=s;
            return true;
        String pop()
            if(tos<0) return "Stack Underflow";
            return stk[tos--];
        String[] display()//array type function to return an array called "stk"
            return stk;
        int returnSize()
            return tos;
    class myStack
        public static void main(String args[]) throws IOException
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            Stack S=new Stack();
            int opt=-1;
            while(opt!=6)
                System.out.println("\n\n\n");
                System.out.println("[1] - Create Stack");
                System.out.println("[2] - Push");
                System.out.println("[3] - Pop");
                System.out.println("[4] - Display");
                System.out.println("[5] - Display List In Ascending Order");
                System.out.println("[6] - Exit");
                System.out.print("Option: ");
                opt=Integer.parseInt(br.readLine());
                if(opt==1)
                    System.out.print("\n\nEnter the size of stack: ");
                    int size=Integer.parseInt(br.readLine());
                    S=new Stack(size);
                    System.out.print("\nStack Created...");
                else if(opt==2)
                    System.out.print("\n\nEnter String: ");
                    String s=br.readLine();
                    if(S.push(s))
                        System.out.print("\nSuccessfull...");
                    else
                        System.out.print("\nStack Overflow...");
                else if(opt==3)
                    System.out.print("\nItem Deleted: "+S.pop());
                else if(opt==4)
                    int sz=S.returnSize();
                    System.out.print("\n\n\nStack Contains: "+(sz+1)+" Item(s)\n");
                    String st[]=S.display();
                    while(sz>=0)
                        System.out.println(st[sz]);
                        sz--;
                else if(opt==5)
                    int s=S.returnSize();
                    String stc[]=S.display();
                    for(int i=0;i<=s;i++)
                        for(int j=i+1;j<=s;j++)
                            if(stc[j].compareTo(stc[i])<0)
                                String t=stc[i];
                                stc[i]=stc[j];
                                stc[j]=t;
                    System.out.println(stc[i]);
                else if(opt>6)
                    System.out.print("\nPress 6 To Exit....");

    Short answer is: no.
    Long answer is: you should not try to. Information hiding is the fundamental principle of OOP. This means that the code dealing with an object has no knowledge about the objects inner structure. It only knows the methods provided by its interface.
    You should declare all object properties private and prevent any other code outside the owning class to manipulate it. This includes leaking properties via "getter" methods. In your example the display() method is bad in two ways:
    its name does not convey its purpose.
    it a "getter" that returns the private property stk to the caller who may change it. Eg. the caller could add or delete an entry without changing tos accordingly.
    bye
    TPD

  • How to call a C function calling a Java Method from another C function ?

    Hi everyone,
    I'm just starting to learn JNI and my problem is that I don't know if it is possible to call a C function calling a Java Method (or doing anything else with JNI) from another C function.
    In fact, after receiving datas in a socket made by a C function, I would like to create a class instance (and I don't know how to do it too ; ) ) and init this instance with the strings I received in the socket.
    Is all that possible ?
    Thank you very much for your help !

    Hard to understand the question, but by most interpretations the answer is going to be yes.
    You do of course understand that JNI is the "API" that sits between Java and C and that every call between the two must go through that. You can't call it directly.

  • Java function call from Trigger in Oracle

    Moderator edit:
    This post was branched from an eleven-year-old long dead thread
    Java function call from Trigger in Oracle
    @ user 861498,
    For the future, if a forum discussion is more than (let's say) a month old, NEVER resurrect it to append your new issue. Always start a new thread. Feel free to include a link to that old discussion if you think it might be relevant.
    Also, ALWAYS use code tags as is described in the forum FAQ that is linked at the upper corner of e\very page. Your formulae will be so very much more readable.
    {end of edit, what follows is their posting}
    I am attempting to do a similar function, however everything is loaded, written, compiled and resolved correct, however, nothing is happening. No errors or anything. Would I have a permission issue or something?
    My code is the following, (the last four lines of java code is meant to do activate a particular badge which will later be dynamic)
    Trigger:
    CREATE OR REPLACE PROCEDURE java_contact_t4 (member_id_in NUMBER)
    IS LANGUAGE JAVA
    NAME 'ThrowAnError.contactTrigger(java.lang.Integer)';
    Java:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "ThrowAnError" AS
    // Required class libraries.
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import com.ekahau.common.sdk.*;
    import com.ekahau.engine.sdk.*;
    // Define class.
    public class ThrowAnError {
    // Connect and verify new insert would be a duplicate.
    public static void contactTrigger(Integer memberID) throws Exception {
    String badgeId;
    // Create a Java 5 and Oracle 11g connection.
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    // Create a prepared statement that accepts binding a number.
    PreparedStatement ps = conn.prepareStatement("SELECT \"Note\" " +
    "FROM Users " +
    "WHERE \"User\" = ? ");
    // Bind the local variable to the statement placeholder.
    ps.setInt(1, memberID);
    // Execute query and check if there is a second value.
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
    badgeId = rs.getString("Note");
    // Clean up resources.
    rs.close();
    ps.close();
    conn.close();
    // davids badge is 105463705637
    EConnection mEngineConnection = new econnection("10.25.10.5",8550);
    mEngineConnection.setUserCredentials("choff", "badge00");
    mEngineConnection.call("/epe/cfg/tagcommandadd?tagid=105463705637&cmd=mmt%203");
    mEngineConnection.call("/epe/msg/tagsendmsg?tagid=105463705637&messagetype=instant&message=Hello%20World%20from%20Axium-Oracle");
    Edited by: rukbat on May 31, 2011 1:12 PM

    To followup on the posting:
    Okay, being a oracle noob, I didn't know I needed to tell anything to get the java error messages out to the console
    Having figured that out on my own, I minified my code to just run the one line of code:
    // Required class libraries.
      import java.sql.*;
      import oracle.jdbc.driver.*;
      import com.ekahau.common.sdk.*;
      import com.ekahau.engine.sdk.*;
      // Define class.
      public class ThrowAnError {
         public static void testEkahau(Integer memberID) throws Exception {
         try {
              EConnection mEngineConnection = new EConnection("10.25.10.5",8550);
         } catch (Throwable e) {
              System.out.println("got an error");
              e.printStackTrace();
    }So, after the following:
    SQL> {as sysdba on another command prompt} exec dbms_java.grant_permission('AXIUM',"SYS:java.util.PropertyPermission','javax.security.auth.usersubjectCredsOnly','write');
    and the following as the user
    SQL> set serveroutput on
    SQL> exec dbms_java.set_output(10000);
    I run the procedure and receive the following message.
    SQL> call java_contact_t4(801);
    got an error
    java.lang.NoClassDefFoundError
         at ThrowAnError.testEkahau(ThrowAnError:13)
    Call completed.
    NoClassDefFoundError tells me that it can't find the jar file to run my call to EConnection.
    Now, I've notice when I loaded the sdk jar file, it skipped some classes it contained:
    c:\Users\me\Documents>loadjava -r -f -v -r "axium/-----@axaxiumtrain" ekahau-engine-sdk.jar
    arguments: '-u' 'axium/***@axaxiumtrain' '-r' '-f' '-v' 'ekahau-engine-sdk.jar'
    creating : resource META-INF/MANIFEST.MF
    loading : resource META-INF/MANIFEST.MF
    creating : class com/ekahau/common/sdk/EConnection
    loading : class com/ekahau/common/sdk/EConnection
    creating : class com/ekahau/common/sdk/EErrorCodes
    loading : class com/ekahau/common/sdk/EErrorCodes
    skipping : resource META-INF/MANIFEST.MF
    resolving: class com/ekahau/common/sdk/EConnection
    skipping : class com/ekahau/common/sdk/EErrorCodes
    skipping : class com/ekahau/common/sdk/EException
    skipping : class com/ekahau/common/sdk/EMsg$EMSGIterator
    skipping : class com/ekahau/common/sdk/EMsg
    skipping : class com/ekahau/common/sdk/EMsgEncoder
    skipping : class com/ekahau/common/sdk/EMsgKeyValueParser
    skipping : class com/ekahau/common/sdk/EMsgProperty
    resolving: class com/ekahau/engine/sdk/impl/LocationImpl
    skipping : class com/ekahau/engine/sdk/status/IStatusListener
    skipping : class com/ekahau/engine/sdk/status/StatusChangeEntry
    Classes Loaded: 114
    Resources Loaded: 1
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 0
    Classes skipped: 0
    Synonyms Created: 0
    Errors: 0
    .... with no explanation.
    Can anyone tell me why it would skip resolving a class? Especially after I use the -r flag to have loadjava resolve it upon loading.
    How do i get it to resolve the entire jar file?
    Edited by: themadprogrammer on Aug 5, 2011 7:15 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:21 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:22 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:23 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:26 AM

  • Read item from Java class and call to stored function/procedure of database

    Hi,
    I am looking solution that I was trying to find becasue of I am not expert and novice of ADF so I am getting problem to do. I am trying migrating from oracle forms to JDeveloper[ADF].
    I want to call database stored function from JSF pages by java bean class of a button press event (manually created) and after button event I have called java class which I created manually. But I can not read that values what I given into jsp page.
    question1: How can I read jsp pages items value to java class ?
    question2: How can I call to database stored function/procedure with that parameter?
    question3: How can I use return value of that stored function/procedure ?
    Please reply me .
    Thanks,
    zakir
    ===
    Edited by: Zakir Hossain on Mar 29, 2009 10:22 AM

    ---

  • Duration of an Abap Function call from Java using Jco3

    Hi guys!
    I would like to use this discussion to get some refernces of the duration Timespan of an RFC call from Java to SAP. At the moment, i need at last about 200ms to call the Abap function. I'm just using one simple import and export parameter (so no deep structures). I think that the reason for my poor performance is, that the Java Tool and the SAP instance are not in the same network. So, i hope some of you have some data, how fast an RFC call from Java using Jco can be executed.
    greetings, Hannes

    Hi Hannes,
    I think you have already got the answer to your question - the network set-up you have is probably the bottleneck.  Whenever I've worked with Java <-> ABAP and they are in the same network, I've had no performance problems at all.
    Does your RFC contain any complex logic or business processes?  Are you able to try and call something that does nothing, say it just accepts an input string and returns it straight away as an export.  Do you have any scope for testing with your Java tool on the same network as the SAP system?
    Cheers,
    G.

  • Java functions call from C++ App

    Hi,
    I'm new to Java, One of our client have generic APIs for there business logic, those are written in JAVA, now we want to use some of these APIs in C++ application. Can any one suggest/address me the better way to do this?
    Thanks in advance.
    Thanks,
    --Ravi Kiran.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    To call Java functions from C++ you need a VM running in your process, and JNI is the interface you need to use in the C++ code.
    One of the interfaces in JNI lets you create a VM. You generally only want one VM, so if the application started out in Java, you have a VM already and you don't need to create one.
    Note that JNI is really a C <-> Java interface, and usually any C++ code called from Java is C++ 'extern "C"' functions. Java won't know anything about C++ objects. And you use JNI to get C++ to understand Java objects.
    Hope this was helpful.

  • Can I call a C function from Java (using JNI) ??

    hello,
    I need to call one C function from remote device and get its return value(o/p) (for my application it is device SSID ) and display in the client PC.
    Is it possible in java without using SNMP connction?.
    please give me idea about it.
    I need this information as soon as possible.
    Thank you.

    see JNI...
    basically declare a native method in your java class, then run javah on the class thus generating a *.h file. Then implement the c/c++ function. Compile the c/c++ part as a shared library, and make sure its accessible from your LD_LIBRARY_PATH env variable.
    Go through the steps in the JNI docs, and things shoulde be fine... hopefully ;)

  • How to call a php function from java...

    helllo fellow java developers!
    Im trying to figure out how I can call a php function from my java code.
    I know it sounds a bit unintiutive, seeing how java is a rich programming language, BUT java simply cannot do the task that the php script can do. It simply acts differently.
    So I am trying to call a php function, that returns a string object, and capture that string object....
    is this possible?
    something like....
    String strMyString = phpFunction( strVariable )
    ???????/ any ideaS?

    idea #1 - come up with a better plan that doesn't involve invoking php from java.
    Give one example of something php can do that java can't.
    idea #2 - forget java, and just write it in php.
    Involving multiple frameworks/languages/runtime environments is a recipe for an overcomplicated solution that will be impossible to maintain.
    I'd say keep it simple and stupid, and stick with one language.
    If you're still hooked on the idea, maybe try [this link|http://www.infoq.com/news/2007/10/php-java-stack]

Maybe you are looking for