How to Call abap functn/program from java layer

Hi all,
    I have to develop a program which has to call abap function/program from java side or how to call a abap program through java ..
pls send me related links or explanations.. dont send unrelated answers..
Regards,
Arivarasu S

Hi,
You mean accessing ABAP functions from J2EE perspective, then I think we can do this by using SAP Java Resource Adapter and also through webservices.
SAP Java Resource Adapter (SAP JRA) can be used as an add-on for the SAP JCo SAP JRA enables the implementation of standard interfaces from diverse J2EE servers to the SAP JCo in the SAP Web AS. The SAP JRA thus simplifies
communication with ABAP within heterogeneous J2EE landscapes.
Go through the following links which has Good documentation on how to achieve this
Accessing BAPIs Using the SAP Java Resource Adapter
[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933e247d3ba4]
Connectivity and Interoperability
[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/326d82e5-0601-0010-fca4-9caf27b89c26]
Finally with WebServices. Accessing SAP Business Functions (ABAP) via Web Services
[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/06adbf03-0a01-0010-f386-d8e45561a3c4]
Regards
Raghu

Similar Messages

  • How do I call a C++ program from Java?

    I've tried using Runtime.exec to call my C++ program from Java but I don't think I'm doing it correctly. Could someone explain how to properly use it? Here's what I'm trying (this is in an applet that is only going to be running on an intranet so only PCs in my LAN will be affected):
    Runtime runtime=runtime.getRuntime();
    Process proc =runtime.exec("mkdir C:\\Test");

    What do you expect your operating system should do with a command "mkdir"? It doesn't understand this. "mkdir" is a shell command, so you need to execute the shell:
    runtime.exec("cmd /c mkdir C:\\test");

  • How to call a VB application from Java

    Hi,
    does anybody know how to call a VB application from java.
    Would appreciate if you can provide me with an example.
    thanks

    try exec()ing the cad program with the name of the file as a command line parameter...
    Runtime.getRuntime().exec("CADProg.exe Test.prt");
    i have no clue if this will work but it seems like it's worth a try.

  • Call visual prolog program from java

    Hi friends,
    is there someone help me to call ( run) prolog program from java.
    i write a parser with Javacc parser generator and stored parsed information in prolog database and I want create some query in java that work in the prolog file.
    how can i combine java and prolog programs. i used visual prolog.
    Can someone help me?
    Thanks you in advance.
    yours sincerely,
    ksu

    Since visual prolog can produce dll's, you can use JNI:
    http://java.sun.com/j2se/1.4.2/docs/guide/jni/index.html

  • How to call a .bat file from java code?

    How to call a .bat file from java code? and how can i pass parameters to that .bat file?
    Thanks in advance

    thanks for ur reply
    but still i am getting the same error.
    I am trying to run a .bat file of together tool, my code looks like below
    import java.lang.Runtime;
    import java.lang.Process;
    import java.io.File;
    class SysCall{
         public static void main(String args[]){
              String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
              //String path="D://Borland//Together6.2//bin//Together.bat ";
              Runtime r= Runtime.getRuntime(); //Declare the system call
              try{
                   System.out.println("Before batch is called");
                   Process p=r.exec(cmd);
                   System.out.println(" Exit value =" + p.exitValue());
                   System.out.println("After batch is called");
              /*can produce errors which must be caught*/
              catch(Exception e) {
                   e.printStackTrace();
                   System.out.println (e.toString());
    I am getting the below exception
    Before batch is called
    java.lang.IllegalThreadStateException: process has not exited
    at java.lang.Win32Process.exitValue(Native Method)
    at SysCall.main(SysCall.java:17)
    java.lang.IllegalThreadStateException: process has not exited

  • How to call backing bean method from java script

    Hi,
    I would like to know how to call backing bean method from java script.
    I am aware of serverListener and [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    but i am running in to some issues with [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    regarding which i asked for help in other thread with subject ....Question on AjaxAutoSuggest article (Ajax Transactions Using ADF and J...)
    The reason why i posted is ( though i realise both are duplicates) .. that threads looks as a specific question to that article hence i would like to ask the quantified problem is asked in this thread.
    So could any please letme know how to call backing bean method from java script
    Thanks
    Murali
    Edited by: mchepuri on Oct 24, 2009 6:17 PM
    Edited by: mchepuri on Oct 24, 2009 6:20 PM

    Hello,
    May know how to submit a button autoamtically on onload of page with clicking a welcome alert box. the submit button has managed button too to show a message on console using SOP.
    the problem is.
    1. before loading the page a javascript comes on which i clicked ok
    2. the page gets loaded and the button is there which gets automatically clicked and the managed bean associated with prints a message on console using SOP.
    I m trying to do this through server listener and click listener. the code is(adf jspx page)
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" binding="#{backingBeanScope.backing_check4.d1}">
    <af:form id="f1" binding="#{backingBeanScope.backing_check4.f1}">
    <af:commandButton text="commandButton 1"
    binding="#{backingBeanScope.backing_check4.cb1}"
    id="cb1" action="#{beanCheck4.submit1}"/>
    <af:clientListener type="click" method="delRow"/>
    <af:serverListener type= "jsServerListener"
    method="#{backingBeanScope.backing_check4.submit1}"/>
    <f:facet name="metaContainer">
    <af:resource type ="javascript">
    x=confirm("hi");
    // if(x){
    delRow = function(event){
    AdfCustomEvent.queue(event.getSource(), "jsServerListener", {}, false);
    return true;
    </af:resource>
    </f:facet>
    </af:form>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_check4-->
    </jsp:root>
    the backing bean code is -----
    public class classCheck4 {
    public classCheck4() {
    public String submit1() {
    System.out.println("hello");
    return null;
    }

  • How to call a concurrent program from a Custom JSP page.

    Hi,
    I have a custom JSP page which i have deployed by creating a form function with the path of the JSP Page
    and added the JSP Page to the OA_HTML top.
    Now, i need to call a concurrent program from the JSP Page, i have all the parameters in my page and i am using the standard class as below:
    ConcurrentRequest cr= new ConcurrentRequest(con);
    int requestId= cr.submitRequest("XXINV",programName,null,null,false,vec);
    I have verified my connection object and it is OK but i am getting the exception that user is not set to run the program.
    I tried the below code in my JSP page and getting -1 for all test variables :-
    int userId = wctx.getUserId();
    int respApplId = wctx.getRespApplId();
    int respId = wctx.getRespId();
    I think i need to set the context in JSP page to run the program..
    Pls help ....
    Regards
    Saurabh Jaiswal

    Hi,
    Thanks for the reply,,,
    This is a possible solution but this will allow to run the program anyhow.
    But the procedure which i call thru callable statement will start with
    fnd_global.apps_initialize (3825, 50603, 704);
    fnd_request.submit_request API call.
    Now, the values of user and Responsibilty is required in the program and it changes.
    With this approach we have to hardcode the user and resp.
    The same JSP page is attached to other responsibilities and there the concurrent program would get fired as if fired from the resp Id hardcoded as above.
    Need to capture user Id and RespId.
    How can i set the apps Context in JSP page???
    Regards
    Saurabh Jaiswal

  • How to call a BPEL process from Java ?

    How can I call a BPEL process from Java?
    The Java client should be outside of the PEL engine.
    Does someone have a piece of sample code for
    a "Hello world" java-to-bpel call (+ java client src)?

    http://www.oracle.com/technology/products/ias/bpel/pdf/orabpel-Tutorial7-InvokingBPELProcesses.pdf

  • 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]

  • How to call an exe program from the JSP page?

    How to call and display the interface from a exe (residing on C: drive) on my JSP page. Our customers supplied us with an exe file and they want this to be incorporated on the JSP page that has other components also, like forms, etc. The interface of the program has to be displayed in specific co-ordinates on the JSP page. Any help is highly appreciated. Thanks in advance.

    Can't be done with JSP.
    JSP runs java on the SERVER only.
    All that gets to client is an HTML page. So all that
    you can do at the client is what an HTML page can do.
    Obviously that doesn't include running a file on the
    client machine.
    Take a look into Applets, or maybe ActiveX controls.Thanks for the reply.
    Any idea on how to use the ActiveX controls in this regard?

  • Calling Same C program from Java Classes

    Hi!
    Can anyone let me know how to call the same C program using JNI from multiple Java Classes/programs?.
    Cheers
    Sai

    JNI creates a shared library.
    Any application that needs to can use the shared library at the same time.
    Ideally you use the same interface that you created for one application via JNI in the other applications.

  • How to call a Dialog Program from another Dialog Program

    Dear All,
    How can I call a dialog program with return value from another dialog program?
    Regards,
    Alok.

    Hi Alok,
    1. Insted of creating 2 different Dialog program. It's good to create as many screens as you want in same module pool program. Any way you can use the different TCODE for each screen.
    2. Another and The best way is to create a function group and then inside function group use the function 2 module... In the function group define a global variable which will be present for both the function group if they are getting executed in sequence. and inside the Function Module call the screens using command " call screen <screenno>".
    3. You can use set / get parameter to pass values of a field between two dynpro program.

  • How to call a C program in java PACKAGE

    am trying to call a method implemented in C from java.
    I followed the instructions of sun.java.com tutorial for the simple example of HelloWorld. It works fine.
    BUT, when I try to do the same in a package, I run into a lot of trouble. I did the following :
    1. Created HelloWorld.java in a package GUI/ and compiled it
    package GUI;
    import java.io.*;
    class HelloWorld {
    public native void displayHelloWorld();
    static {
    System.loadLibrary("hello");
    // Call native method through this from other classes
    public void callinghello() {
    callip();
    public static void main(String[] args) {
    new HelloWorld().displayHelloWorld();
    2. javah -jni HelloWorld -- to create HelloWorld.h
    3. wrote HelloWorldImp.c
    4. g++ -Wall -shared -I/usr/lib/j2sdk1.3/include -I/usr/lib/j2sdk1.3/include/linux HelloWorldImp.c -o libhello.so
    -- compiled and created .so file
    5. Set the package directory in Classpath, path and LD_LIBRARY_PATH
    6. When it is run java GUI.HelloWorld
    I get this error
    Exception in thread "main" java.lang.NoClassDefFoundError: OrionGUI/HelloWorld
    Can anyone help me. If you have any links to how to call native methods in package, please let me know. Thanks.

    GOT IT !!!
    I had to change the name of the method in .h file generated by javah command. On doing
    javac -d ../../classes HelloWorld.java
    go to the ../../classes directory (where you have the class file) and do
    javah HelloWorld
    I got a HelloWorld.h file in which I had
    JNIEXPORT void JNICALL Java_HelloWorld_display(JNIEnv *, jobject);
    I added the package name too:
    JNIEXPORT void JNICALL Java_GUI_HelloWorld_display(JNIEnv *, jobject);
    The HelloWorldImp.c file should have the same name (ie with package) and be in the same directory(ie ../../classes)
    compile and build the shared library to get "libhello.so" file
    gcc -c -fPIC -I/usr/lib/j2sdk1.3/include -I/usr/lib/j2sdk1.3/include/linux HelloWorldImp.c
    gives .o file
    gcc -shared -o libhello.so HelloWorldImp.o
    gives .so file
    then run java with the command in my first message. It works.
    Thanks for the reply "thedracle".

  • How to call a C program in java?

    I would like to call a C program (which does not return anything back to the Java program) from a Java class? Or is there any simple example just to do such a task online?
    Thanks.

    two options:
    1) Use JNI and call your C routines directly
    2) Make an executable and call it using Runtime.exec()

  • How to call C/C++ - Code from Java?

    I would like to know if it is possible to call C or C++ - Code from Java and how to do.

    In short, yes you can do this.
    Have a look at http://java.sun.com/docs/books/tutorial/native1.1/concepts/index.html
    to see how...
    Good luck!

Maybe you are looking for

  • Basic Excise duty not flowing in Purchase order

    Hi, We are using TAX INJ and in version 4.7E. BED Percentage is not flowing in Purchase order, whereas E.cess andSEcess is flowing in PO. We have checked all the settings and also the replies in SDN forum on this issue. COuld anybody add further inpu

  • In-House repair in CRM

    Dear Experts, We have requirement to process In-house repair from CRM system. In our scenario we are creating Return for Repair for the Return request . This item is triggering sales order in SD where inbound processing is done. After analysis, Techn

  • Final Cut Pro for PowerPc G3 Mac

    is there Final Cut Pro for PowerPc G3 Mac, Im pretty sure I need version 2.0, so please comment a download like, or comment if you know anything, thanks

  • WWI report Symbols

    Hi Gurus I am in the process of creating new template for Incident Management. In incident management we have Root Cause hierarchy. In our system we dont have standard symbols for root cause hierarchy. Any idea what are the symbols we need to use for

  • SOA-INFRA is in FAILED state while upgrading the Oracle Identity Manager to 11.1.1.5

    This issue ocurred when we were trying to Upgrade our OIM to version 11.1.1.5. The installation of all the suites went fine(Oracle IDAM 11.1.1.5 and SOA Suite 11.1.1.5). The domain is also created and schemas are also upgraded. But when we create a d