cancel
Showing results for 
Search instead for 
Did you mean: 

JCo and Empty Response Function

Former Member
0 Kudos

Hi experts,

I have a problem with JCo and Functions.

I've configured SAP R/3 to communicate with External System and vice versa... External System is my product.

I send a MATMAS (transaction BD10) to my logical system. I display Outbounding IDOC (Transaction WE02), I see sended idoc, i check data in IDoc structure and all is ok.

IDoc arrives on External System, but IDoc is empty.

Function Name is correct but JCO.Table for control record and data record are empty.

I've used JCo APi to write Function in XML file, this i result:

<?xml version="1.0" encoding="UTF-8"?>
<IDOC_INBOUND_ASYNCHRONOUS>
<TABLES>
<IDOC_CONTROL_REC_40></IDOC_CONTROL_REC_4 0>
<IDOC_DATA_REC_40></IDOC_DATA_REC_40>
</TABLES>
</IDOC_INBOUND_ASYNCHRONOUS>

I use:

JCo 2.0.12;

SAP R/3 4.7 enterprise;

SAP ECC 7.0;

I've checked all configurations but i don't understand...

thanks,

Marco Genova

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Marco,

Did you find a solution or issue to your problem. I am too having the same problem.

The IDoc is generated in SAP with data, but in the server handler the JCo.Table for control and data are empty. Could not find the issue, please let me know if you have found the solution to this.

Regards,

Loveline Thomas.

Former Member
0 Kudos

Hi,

Excuse me, I don't have posted solution..

The problem is in SAP ERP, R/3 is not configured to use tRFC or R/3 is bad configured. I work with ICC test System, the RAC support had changed server which i've used. I don't have problem with new server.

For details on configuration use forum on R/3 configuration or similar...

I hope that these informations can help you.

regards.

Genova Marco.

Former Member
0 Kudos

Hi,

"used JCo APi to write Function "

Please post the code used for populating result data. This will give idea to us where you may have gone wrong.

regards,

ganga

Former Member
0 Kudos

this is the code of incoming function, function is called by SAP System to send an IDOC to my code ...

protected void handleRequest(JCO.Function function) {
        	String methodCall = "handleRequest(" + function + ")";
            getLogger().debug(methodCall+",  mode execution: "+executeElaboration);
            
        	JCO.Table table_control;
        	JCO.Table table_data;
        	PreparedStatement querySequence = null;
           
            String functionSAP = function.getName();
            
            // process incoming request
            if (!function.getName().equals("INBOUND_IDOC_PROCESS") &&
                    !function.getName().equals("IDOC_INBOUND_ASYNCHRONOUS")) {
                throw new JCO.AbapException(
                        "NOT_SUPPORTED",
                        "This service is not implemented by the external server");
            }
            
            if(executeElaboration){
            	try {
            		String functionID = tidManager.nextNumberFunction();
            		try{
	            		tidManager.updateTIDStatus(sTid, profile.getLogicalSystemRcv(),tidManager.getRecipient(), SAPTIDManager.TID_RUNNING);
	            		
	            		String statement = "SELECT UM_SEQUENCE.NEXTVAL FROM DUAL";
	            		Connection sharedConnection = getAgent().getConnection(SAPReader.this, schemaName);
	            		querySequence = sharedConnection.prepareStatement(statement);
		                
	            		if(getLogger().isDebugEnabled()){
		            		ParameterList list = function.getTableParameterList();
		            		int numTables = list.getTabLength();
		            		
		            		getLogger().debug("numtables: "+numTables);
		            		for(int i = 0; i < numTables; i++){
		            			getLogger().debug("table name: "+list.getTable(i).getName());
		            		}
		            		
		            		function.writeXML("remove/file.xml");
[...]

Other code don't go because tables (control and data) are empty.

Edited by: m.genova on May 25, 2009 12:58 PM