cancel
Showing results for 
Search instead for 
Did you mean: 

parameters from portal to BW using JCO

Former Member
0 Kudos

Hi,

we are trying to call a RFC function in the BW system using java connector. The parameters include the infocube name, infosource name, and the filename which will hava the data we are uploading to the infocube.

However, for some reason, the file name parameter is not being passed from the portal interface on the client side to the RFC function but all other parameters are. The filename parameter is of type string.

Any idea why parameter is not being passed?

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

here is the java code and log

IConnectorGatewayService cgService =(IConnectorGatewayService) PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);

try {

prop = new ConnectionProperties(req.getLocale(), req.getUser());

}

catch (Exception e) {

logger.error( "Couldn't establish a connection with the user " + req.getUser() + "." );

}

try {

client = cgService.getConnection(system_alias, prop);

} catch (Exception e) {

logger.error("Couldn't establish a connection with a target system " + system_alias + ".");

}

IInteraction interaction = client.createInteractionEx();

IInteractionSpec interactionSpec = interaction.getInteractionSpec();

//create IFucntion instance

IFunctionsMetaData functionsMetaData = client.getFunctionsMetaData();

IFunction function = functionsMetaData.getFunction(functionName);

//create Return Structure

RecordFactory recFactory = interaction.getRecordFactory();

MappedRecord importParameters = recFactory.createMappedRecord("input");

importParameters.put("INFOCUBE", "ZEP_CUBE");

importParameters.put("INFOSOURCE", "ZEP_IS");

importParameters.put("UPDMODE_READ", "D");

importParameters.put("NEWDATASET", "testname");

MappedRecord exportParams = (MappedRecord) interaction.execute(interactionSpec, importParameters);

....

Messages in dev_jrfc.trc:

<RfcGetException

Error> occured [6] >Mon Oct 24 14:44:28,818<

RfcException:

message: File is not available

Return code: RFC_CLOSED(6)

error group: 104

key: RFC_ERROR_SYSTEM_FAILURE

message in my log file:

INFO 2005-10-24 14:44:28,771 - Access SAP_BW for ZEP_FLATFILE_TD_LOAD (SSO: true)

INFO 2005-10-24 14:44:28,787 - Starting Interaction...

INFO 2005-10-24 14:44:28,802 - Set import parameters per MappedRecord object

INFO 2005-10-24 14:44:28,802 - --- Set INFOCUBE to >ZEPpp_CUBE<

INFO 2005-10-24 14:44:28,802 - --- Set INFOSOURCE to >ZEP_ISS<

INFO 2005-10-24 14:44:28,802 - --- Set UPDMODE_READ to >D<

INFO 2005-10-24 14:44:28,802 - --- Set newfilename to >testname<

ERROR 2005-10-24 14:44:28,818 - Caught an ConnectorException:

com.sapportals.connector.execution.ExecutionException: Nested Exception. Failure to execute native function. Connection Failed: Nested Exception. Native connection to the back end system is broken.

INFO 2005-10-24 14:44:28,818 - Released SAP client (SSO)

kai_unewisse3
Active Contributor
0 Kudos

the above log file was from a earlier version. the correct version is :

INFO 2005-10-24 14:44:28,802 - --- Set INFOCUBE to >ZEP_CUBE<

INFO 2005-10-24 14:44:28,802 - --- Set INFOSOURCE to >ZEP_IS<

INFO 2005-10-24 14:44:28,802 - --- Set UPDMODE_READ to >D<

INFO 2005-10-24 14:44:28,802 - --- Set NEWDATASET to >testname<

INFO 2005-10-24 14:44:28,802 - --- Set DATASET to >somepath<

The INFOCUBE, INFOSOURCE AND UPDMODE_READ are received on the ABAP side without problems (we wrote the data in a file after received) The NEWDATASET and DATASET (which is the file with path) are both not received (or are empty) ...

The ABAP Code Interface is:

""Local Interface:

*" IMPORTING

*" VALUE(INFOCUBE) LIKE BAPI6112-INFOCUBE

*" VALUE(INFOSOURCE) LIKE BAPI6112-ISOURCE

*" VALUE(NEWDATASET) TYPE CHAR255

*" VALUE(DATASET) TYPE STRING

*" VALUE(UPDMODE_READ) LIKE BAPI6109-UPDMODE_READ

*" EXPORTING

*" VALUE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2