Java API from ABAP program.
Hi
I have a requirement to call a Java API from ABAP program.
We are using a third party component for encrypting the files
using Java API The component consist of ".jar" files. I need to
know exactly where we need to copy the ".jar" files on application server,
so that I can call the API methods in my ABAP code and process the file in SAP,
and how to establish a connect with there server for the encryption.
Thanks
Regards
Lalith
LInk is:
/people/puru.govind/blog/2006/12/20/let-abap-speak?page=last&x-maxdepth=0
Similar Messages
-
Calling Java API from ABAP using JCo (Part 2)
Hello,
This is an additional question to thread Calling Java API from ABAP using JCo
Has anyone managed to get the input parameter value
input.getString("REQUTEXT")
that is being passed from ABAP?
If yes, what kind of setting you need to do? Because when I execute, it has no value.
Thus, the below ECHOTEXT parameter returns blank value:
output.setValue(input.getString("REQUTEXT"),"ECHOTEXT");
When I debug by printing the below line, the input XML is indeed without value:
System.out.println(input.toXML());
Anybody knows how to pass input variable from ABAP to JAVA using JCo?
rgs,
hiroshiHallo Hiroshi,
as far as I can see, you are doing it the right way. The problem might be that the ABAP program does not fill in this parameter because something went wrong in the SAP System.
Have you tried setting a breakpoint (an HTTP session - remote breakpoint) and tried checking step by step if the value is being processed and put into the REQUTEXT field?
Bye,
Sameer -
Calling Java API from ABAP using JCo
I need to call Java API from ABAP & BSP also. For this I have got useful information related to JCo from following blog:
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
But, I am facing one problem. On executing Java program myExample5.java (recommended by Gregor Wolf) from command line I get following error message:
Server JCOSERVER01 changed state from [ STOPPED ] to [ STARTED ]
Exception in server JCOSERVER01:
com.sap.mw.jco.JCO$Exception: (129) JCO_ERROR_SERVER_STARTUP: Server startup failed at Thu Apr 26 13:46:32 IST 2007.
This is caused by either a) erroneous server settings, b) the backend system has
been shutdown, c) network problems. Will try next startup in 1 seconds.
Connect to SAP gateway failed
Connect_PM TPNAME=JCOSERVER01, GWHOST=gateway, GWSERV=3300
LOCATION CPIC (TCP/IP) on local host
ERROR hostname 'gateway' unknown
TIME Thu Apr 26 13:46:32 2007
RELEASE 640
COMPONENT NI (network interface)
VERSION 37
RC -2
MODULE ninti.c
LINE 336
DETAIL NiPGetHostByName2: hostname 'gateway' not found
SYSTEM CALL gethostbyname_r
COUNTER 1.
Can anyone please help me out. Do I need to do any setting?
I'll surely reward points.
Thanks & Regards,
Nilesh KumarHi Nilesh,
From the error i think that the error is with the hostname.
Please enter the the Application Server IP/Hostname.
If you are loggin to SAP System "XX1" from SAP GUI. Then click the change Item tab and see Application server name/IP let say "XX2" for hostname or "xx.xx.xx.xx" for IP.
Replace <i>srv[0] = new Server("gateway","sapgw00","JCOSERVER01",repository);</i>
with <i>srv[0] = new Server("XX2","sapgw00","JCOSERVER01",repository);</i>
If App Server is IP then replace with
<i>srv[0] = new Server("xx.xx.xx.xx","sapgw00","JCOSERVER01",repository);</i>
Let me know if it is throwing any error.
Thanks,
Prashil -
Call Java Program from ABAP Program
Dear all,
In our scenario, we need to let ABAP call services provided by a standalone Java program. From online help I found some overview introduction and I'd make the called program a registered program in a RFC with type "T" (TCP/IP Connection). Can anybody give some concrete documentation? A step-by-step guide would be greatly appreciated.
Best Regards
Jeromecheck this thread
Re: Calling Java API from ABAP using JCo -
Call to Java web service from abap program
HI,
I want to call to Java WS from abap program and i read some post how to do that in release of NW 6.4 but I want to know what is the simplest way to do that in release 7.0 .
Many Thanks,
NinaHi Uwe,
Thank you.
I have WSDL or URL how i can call to them ,in the example that you send i don't find the place that it called.
Do i have to create proxy for that ?
BR
Nina -
How to run Java codes from ABAP
Hi Gurus,
I have .JAVA & .CLASS files which connect to the website through HTTPS connection and generates the TEXT file at C:\ by obtaining some data from WEB Site. This java files needs SSL certificate Which has been imported in SAP. How can i run the Java files from SAP R/3, Please help me.
Thanks
Ganeshhiii
refer to following link..
Java from ABAP?
Re: Calling Java API from ABAP using JCo
i hope it will solve your problem
regards
twinkal -
Accessing the Par file or java methods in ABAP programming at ECC from EP
Hi experts,
Can we access par file or java methods in ABAP programming (ECC side)which are at Enterprise portal side .If it is possible please
let me know the procedure.Thanks for your help.
Thanks and Regards,
VenkatHi Das,
The mentioned wiki is for uploading the par file ,but my question is diffrent.This file or java method need to be used in ABAP side.
Thanks and Regards,
venkat -
Hi All,
I need to call a Java function from ABAP. Currently i work on client machine and i have a sample java program with me. What do i need to do in order to execute that Java program from ABAP se38 program?
1. Should i place that java program on server in order to execute?
2. How to maintain RFC Destination in SM59? what is meant by program id and gateway mentioned in in SM59 under create option.
Can some one help me with this regard?
Points will be awarded!!
Thanks in advance,://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/59ef6011-0d01-0010-bfb0-b51381e00509
http://www.erpgenie.com/abap/bapi/example.htm
Reward points if it is useful... -
JCo Outbound( calling Java Function from ABAP )
HI,
I want to call a JAVA function from ABAP.I have installed the JCo toolkit and included the sapjco.jar file in the classpath of my system.
When i execute the program(Example5.java,provided with sapjco.zip) from the command prompt,it is working fine,the server listens to the calls made from ABAP via RFC destination.
But if i copy the same program in NWDS in a JAVA project,to run it from there as JAVA application,after including the sapjco.jar file in the project JAVA build path,i get the following error,marked by a red cross ,at the head of the program,even before i run it.
<b>This compilation unit indirectly references the missing type com.sap.jdsr.writer.DsrIPassport (typically some required class file is referencing a type outside the classpath)</b>
What changes do i need to make,to run it from NWDS?
I tried to include the sapjcorfc.dll file along with the sapjco.jar in the java build path,but it doesn't help.
Please tell how to solve this issue?
Regards,
Siddharthahello sid,
which jco version are you using?
are you using the same jco lib when running in command
line and in nwds?
if you are, try checking the order of the your classpath.
your jco lib (which you are using in command line) should
come first in order prior to the default libraries in your project.
regards
jo -
How to call Java API from BSP?
I have a requirement to call Java API from BSP application.
I have checked the forum and found that it is possible by using some ABAP codes.
However there is no pointer on how this is done.
Can someone explain the details on how to call Java API from BSP is done?
I found class CL_EJB_JAVA_OBJECT_METHODS to call a method in EJB but can't find function or SAP class to call Java API.
Actually is there any BSP extention which can used to call Java API?
Thanks,
Hendricheck out these weblogs, it should give you an idea how to go about it.
/people/ignacio.hernndez/blog/2006/12/04/speech-synthesis-listen-the-application-server-is-talking-to-you
/people/puru.govind/blog/2006/12/20/let-abap-speak
Regards
Raja -
How to invoke java application from ABAP
How to invoke java application from ABAP ? Suppose I needto execute a EJB wihic is running on my SAP J2EE Enigne from an ABAP Program .
Thanks,
ManishHi Manish,
did you get some further documents concerning "abap program calls ejb"?
If yes, could you please send me some informations.
Thank you for your help.
Kind regards, Patrick. -
Call a Java Function From Abap
Hi, I need to call a java function from ABAP, I have a WAS 640 to deploy the module.
I have found this tutorial...
[ABAP calls Java via RFC|/people/thorsten.franz3/blog/2008/11/21/abap-calls-java-via-rfc-1-introduction]
The problem is that it uses a newer version of WAS and it implements EJB 3.0 wich only works on Java 5, but my WAS has java 1.4.2.
Anyone knows how to adapt this Blog to a WAS 640 version ?
Or Perhaps there is another way of doing this, maybe publishing my function as a web service.
Regards.
Mariano.Why don't you expose your Java functionality as a Web Service and consume it in ABAP program. That should be much easier and the web service can be used in other places as well.
Best regards,
Ritesh Chopra -
Java calls from ABAP code in XI
Java and ABAP gurus,
Is it possible to make java call from ABAP. Is a sample out there I can take a look at.
Please help.
Thanks.Hi,
YES, Very well it is Possible,
This will help you
/people/bv.pillai/blog/2006/09/28/calling-mdm-java-api-application-executable-from-abap
/people/vijayasarathy.raghunathan/blog/2005/12/28/java-editor-inside-abap
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
JCo Outbound( calling Java Function from ABAP )
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
Call Java Class and Methods from ABAP
Regards
Agasthuri Doss -
Calling java APIs from a function module
Hi,
Can someone tell me whether it is possible to call Java APIs from a function module in SAP system?
Thanks in advance,
VineethaHi,
I guess you have changed the properties of screen only.
I assume you have made a Ztransaction Code.
When you define a transaction code, you need to specify a screen number for radio option program and screen and you need to specify a screen and not subscreen.( I think so!!)
You changed only the code without changing the transaction code properties.
Therefore, i think u r getting a dump.
If you want to call your subscreen, call it in some screen and then call that screen using your transaction code properties.
To include a subscreen screen in the subscreen area of the main screen and call its PBO flow logic, use the following statement in the PBO event of the main screen:
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN <area> INCLUDING <prog> <dynp>.
To call the PAI flow logic of the subscreen screen, use the following statement in the PAI flow logic of the main screen:
PROCESS AFTER INPUT.
CALL SUBSCREEN <area>.
Refer:
http://help.sap.com/saphelp_webas630/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm
Regards,
Tanveer.
Please mark helpful answers.
Message was edited by: Tanveer Shaikh
Message was edited by: Tanveer Shaikh -
Hi everyone!
Is there a way in ABAP to output XML files? Pls. send code/ function module if any.
From ABAP programs, we are sure that we can output TEXT files, but how about XML files?
The significance of this question is related
Currently we are using XI to interface SAP and AMS, this question for ABAP to produce XML file arose, if for example, the XI server is down and we have to still send data from one system to another. IDocs can also produce XML files, pls confirm. Earlier however, we have preferred XI rather than IDocs to do this. Anyway, any idea regarding this scenario will be greatly appreciated.
Thanks and God bless!
CelesteHi,
Please check this sample codes from other thread.
1. itab --- > xml
xml ---> itab.
2. This program will do both.
(just copy paste in new program)
3.
REPORT abc.
*-------------- DATA
DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
DATA : BEGIN OF itab OCCURS 0,
a(100) TYPE c,
END OF itab.
DATA: xml_out TYPE string .
DATA : BEGIN OF upl OCCURS 0,
f(255) TYPE c,
END OF upl.
DATA: xmlupl TYPE string .
******************************* FIRST PHASE
******************************* FIRST PHASE
******************************* FIRST PHASE
*------------------ Fetch Data
SELECT * FROM t001 INTO TABLE t001.
*------------------- XML
CALL TRANSFORMATION ('ID')
SOURCE tab = t001[]
RESULT XML xml_out.
CALL FUNCTION 'SCMS_STRING_TO_FTEXT'
EXPORTING
TEXT = xml_out
* IMPORTING
* LENGTH =
TABLES
FTEXT_TAB = itab.
*-------------- Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filetype = 'BIN'
filename = 'd:xx.xml'
TABLES
data_tab = itab.
******************************* SECOND PHASE
******************************* SECOND PHASE
******************************* SECOND PHASE
BREAK-POINT.
REFRESH t001.
CLEAR t001.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'D:XX.XML'
filetype = 'BIN'
TABLES
data_tab = upl.
LOOP AT upl.
CONCATENATE xmlupl upl-f INTO xmlupl.
ENDLOOP.
*------------------- XML
CALL TRANSFORMATION ('ID')
SOURCE XML xmlupl
RESULT tab = t001[]
BREAK-POINT.
Regards,
Ferry Lianto
Maybe you are looking for
-
Imqadmin: No. of messages not displayed correctly in durable subs screen
This question applies to the standalone platform edition of Message Queue v3.5 SP2 running on solaris. I have a number of durable subscribers connecting to a topic. Each & all subscriber have a selector set to filter the data. From imqadmin I can sel
-
LiveCycle Data Services without Java...?
Hey everyone, I recently came across the really cool LiveCylce DS stuff. The part that most interests me is the managed data features that make the client side coding super simple. Unfortunately, it looks like it only works with a java back-end. Is
-
WRT325n Internet Connectivity Problem
Hi, I have a WRT325n and every so often it won't allow internet connections. To solve the problem, I have to login to the box and just press save. This reloads it and everything is fine. Im not too sure why this is happening. Has anyone else had this
-
How can I erase Disk space setup for Bootcamp??
Hey I have a question. I was trying to setup Bootcamp with Windows XP. Everything was great and was doing step by step fine. When it ask how much space I wanted to put apart for the windows I put around 48GB and it was named DISKOS4. Then I change my
-
2lis_02_scl and 2lis_02_itm
Hi developers, I've activated the extractors 2lis_02_scl and 2lis_02_itm, when I do the initalitation in the setup tables I don't see any record also if in the execution log there are 7230 documents. Any ideas to solve my problem? Best Regards!