cancel
Showing results for 
Search instead for 
Did you mean: 

import paramters not being sent to java listener from abap function module

Former Member
0 Kudos

hi ,

i am trying to call java program from abap. i have doen all the settings required in sm59 and the respective function module reqd and the program to call the fucntion module 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.

-


java program handle request----


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");

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

try "commit" after rfc call...

CALL FUNCTION 'ZTEST_PDF_CREATE' DESTINATION 'GNJ2EEGCD'

EXPORTING

TEST = w_val

IMPORTING

RETURNVAL1 = w_ret

TABLES

TEST_TABLE = itab.

commit work and wait.

regards,darek