cancel
Showing results for 
Search instead for 
Did you mean: 

Connector Framework JCO

Former Member
0 Kudos

i'm trying to execute a rfc function (a Z function) in an R3 system.The example from pdk for ep6(bapi_salesoreder_getlist) it's working fine.

when i execute i receive the error:

com.sapportals.connector.execution.ExecutionException: Nested Exception. Failure when executing JCO remote function.

withou any explications.

Accepted Solutions (1)

Accepted Solutions (1)

former_member194198
Active Participant
0 Kudos

I imagine this thread is dead but I get the

com.sapportals.connector.execution.ExecutionException: Nested Exception message when my JCA call doesn't match the RFC input or output parameters. E.g. I'm calling field PONUM but PONUMBER is the input parameter in the RFC.

Cheers

Richard

Former Member
0 Kudos

Hello,

When get a ConnectorException you can find out all the nested exceptions it holds and finally get to the original JCO that was thrown.

You can use the following code for example:

public static void printException(Exception e)

{

ConnectorException ce = null;

Exception le= null;

if(e instanceof ConnectorException)

{

ce = (ConnectorException)e;

System.out.println("Linked Exception: " +

ce.getMessage());

le = ce.getLinkedException();

printException(le);

}

else

{

System.out.print(e.getMessage());

if(e instanceof ConnectorRuntimeException)

System.out.print("Connector Runtime Exception was discovered");

else

e.printStackTrace();

return;

}

}

Best regards,

Ran

Answers (4)

Answers (4)

Former Member
0 Kudos

Now it's working without other modification.

When i create a function in r3 how the metadata for this function it's propagate in portal, because as far as i know jco use a repository for execute functions

Former Member
0 Kudos

the function it's remote enabled

Former Member
0 Kudos

Hi Florin,

could you please post the relevant parts of your source code?

Regards,

Dominik

Former Member
0 Kudos

//create connection

IConnectorGatewayService cgService = (IConnectorGatewayService) tempCon;

if (cgService == null) {

log.writeSEVERE("Error in get Connector Gateway Service");

return;

}

connection = cgService.getConnection(sap_system_alias, request);

//i verifyed the connection it's not null

IInteraction ix = connection.createInteractionEx();

String function_out = "CUSTOMER_T";

RecordFactory rf = ix.getRecordFactory();

IInteractionSpec ixspec = ix.getInteractionSpec();

String functionName = "ZRFC_CUSTOMER_GET";

ixspec.setPropertyValue("Name", functionName);

MappedRecord input = rf.createMappedRecord("input");

input.put("NAME1", new String("nname"));

MappedRecord output = (MappedRecord) ix.execute(ixspec, input);

//the error it's threw at the last line

Former Member
0 Kudos

Hi Florin,

well, your Java code looks fine so far. Can't see any errors there.

Have you tried the following:

- Execute the function locally from the ABAP system itself (in SE38)

- Execute the function remotely from a different ABAP system

- Checked if the calling user has sufficient permissions in the target system (using for instance an authorization trace in ST01)

Regards,

Dominik

Former Member
0 Kudos

It's working with a jco client write on my computer.

It's not working from portal.

i believe it's something about how portal create repository for functions.

Former Member
0 Kudos

it's possible to work directly from iview without any connector framework???

detlev_beutner
Active Contributor
0 Kudos

Hi Florin,

did you have a look into the error log under .../cluster/server/managers/console_logs/..._error.log?! (Path for 6.20)

Hope it helps

Detlev

Former Member
0 Kudos

no errors, nothing!