Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Java Beginner need Help(numbers on java hand over, calc and return to sap)

Hi @all!

I have a new Question.

I am Beginner and would like two numbers handed on java over functional module, count on to let and sap return on.

The JCO server is furnished, always gets as result 0.

Here my beginning code:

<b>Function Module:</b>

CALL FUNCTION 'Z_TEST' destination 'JAVARFC'
  EXPORTING
    f1      = f1
    f2      = f2
  IMPORTING
    p       = p
    .

<b>Bean.java</b>

public void processFunction(JCO.Function function) {
		try {
			JCO.ParameterList input = function.getImportParameterList();
			JCO.ParameterList output = function.getExportParameterList();
			JCO.ParameterList tables = function.getTableParameterList();

			if (function.getName().equals("Z_TEST")) {

				input.setValue(input.getString("f1"), "f1");
				input.setValue(input.getString("f2"), "f2");

.

.

.

and now? as it continues and is correct that?

thanks in advance

Former Member
Former Member replied

Hello

try only with this in java code

output.setValue(150,"P");

then deploy and test again, if the result is not 150 (also test with debugger in SAP) than something is wrong with your deployment (Wrong JNDI Name, failed deployment, .....)

regards franz

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question