on 03-16-2004 6:39 PM
Hello,
the JCo Tutorial says that
"...both inbound (Java calls ABAP) and outbound (ABAP calls Java) calls are possible..."
But I didn`t find any informationen about calling Java functions from ABAP.
Does anyone found some information about this topic and / or can give me an example how to call Java from ABAP?
Kind regards,
José
hi gregor,
I know its been quite long since u have posted this article, Can you please send me some examples.
or if anyone has implemented this type of connection with examples. habashi.akram@gmail,com
Best Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I use
srv[0] = new Server("localhost","sapgw00","JCOSERVER01",repository);
but return error message:
ERROR partner not reached (host localhost, service 3300)
Can anyone help me?
Best Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
have a look at the Example5.java and Example7.java files coming with the SAP Java Connector. They are implementing a JCo Server which registers to your SAP System and could be called like a RFC enabled function module.
Regards
Gregor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gregor,
I have tried your weblog regarding example 5 and it works.
However, when I try to modify the ABAP program to use transactional RFC, I won't get a response from the Java application.
I wrote something like:
CALL FUNCTION 'STFC_CONNECTION'
in background task
DESTINATION 'JCO'
as separate unit
EXPORTING
requtext = requtext.
This is because I need the Java application to process the required task asynchronously from the SAP system.
Or is transcational RFC not supported for calling an external system?
Best Regards,
Junwen
hi gregor,
i know its been quite long since u have posted this article. but i am not able to get the import parameters in my java program (listener on the server). the return value gets sent properly.
i have program which passes parameters to the function module . niether i am able to get values from import parameter nor from table values. i have trying for quite some time now
REPORT ZTEST_KUMAR.
DATA : W_RET TYPE char255.
DATA : w_val TYPE char255,
itab TYPE TABLE OF ZTEST_PDF,
wa TYPE ZTEST_PDF.
wa-CUST1I = 'TESTS'.
wa-TEMP = 'ALLLL'.
append wa to itab.
w_ret = 'skasnask'.
w_val = 'djsdjsdsd'.
CALL FUNCTION 'ZTEST_PDF_CREATE' DESTINATION 'GNJ2EEGCD'
EXPORTING
TEST = w_val
IMPORTING
RETURNVAL1 = w_ret
TABLES
TEST_TABLE = itab.
WRITE W_VAL.
WRITE W_RET.
--
protected void handleRequest(JCO.Function function)
{
if (function.getName().equals("ZTEST_PDF_CREATE")) {
try{
JCO.ParameterList input = function.getImportParameterList();
JCO.ParameterList output = function.getExportParameterList();
JCO.ParameterList tables = function.getTableParameterList();
JCO.Table table1 = tables.getTable(0);
System.out.println(input.getValue("TEST"));
//String importval = input.getValue("INPUT").toString();
output.setValue("KUMAR212", "RETURNVAL1");
Hi there - I know this is a bit late, but I have such a document! If you'd like to send me an email, I'll reply with it as an attachment:
justin.thomas@sap.com
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
I am trying to call JAVA program from ABAP.Could you please share the document you have on email my id rcpatil18@gmail.com.
Thanks,
Reshma Patil.
For short I can explain what the trick is:
You need a connection that is already up. For this purpose there is a service in the Engine that can bring up and keep such a connection. Then you have to use an ABAP program that is a RFC to call such connection.
Please watch our docs at http://help.sap.com
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.