JCo Call RFC
I have defined a RFC and call it via JCo.
The RFC is used to fill data to my table.
The problem is the data can be fill via the import parameter, but the table parameter is not work. I have tested the RFC in function builder and it work.
Here is my RFC:
FUNCTION Z_FYP_BAPI_ORDER_CREATEFROMDAT.
""Local interface:
*" IMPORTING
*" VALUE(PLACEORDER_IMPORT) TYPE ZFYP_ORDER
*" EXPORTING
*" VALUE(RETURN) TYPE BAPIRETURN
*" VALUE(ORDERID_EXPORT) TYPE ZFYP_ORDER-ORDERID
*" TABLES
*" ORDERITEM_IMPORT STRUCTURE ZFYP_ORDERITEM
DATA: RC LIKE INRI-RETURNCODE,
NUMBER(10) TYPE C,
ITEMID TYPE I.
TABLES: ZFYP_ORDER.
TABLES: ZFYP_ORDERITEM.
DATA WA_ORDERITEM LIKE LINE OF ORDERITEM_IMPORT.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
OBJECT = 'ZFYP_OR'
NR_RANGE_NR = '1'
IMPORTING
RETURNCODE = RC
NUMBER = NUMBER.
PLACEORDER_IMPORT-ORDERID = NUMBER.
ORDERID_EXPORT = NUMBER.
INSERT INTO ZFYP_ORDER VALUES PLACEORDER_IMPORT.
ITEMID = 0.
LOOP AT ORDERITEM_IMPORT INTO WA_ORDERITEM.
WA_ORDERITEM-ORDERID = NUMBER.
WA_ORDERITEM-ORDERITEMID = ITEMID.
INSERT INTO ZFYP_ORDERITEM VALUES WA_ORDERITEM.
ITEMID = ITEMID + 1.
ENDLOOP.
ENDFUNCTION.
Hi Chun,
just follow this code.
private static JCO.Client client;
private static JCO.Repository repository;
client =
JCO.createClient(
"<client num>",
"<user name>",
"<password>",
"en",
"<server ip or server name>",
"<instance number>");
client.connect();
repository = new JCO.Repository("REP", client);
try {
IFunctionTemplate m_read_container;
m_read_container =repository.getFunctionTemplate("<RFC Name>");
JCO.Function function_read_cont = m_read_container.getFunction();
JCO.ParameterList tables =
function_read_cont.getTableParameterList();
//For Tables
JCO.Table table = tables.getTable("<Your table Name from table parameter>");
<b>// specified number of empty rows at the end of the table
table.appendRows(<Enter the number of expected rows>);
for(int i=0;i<table.getNumRows();i++)
// Moves the row pointer to the next row
table.nextRow();
// public void setValue(<Data Type> value,java.lang.String fieldName)
// set the field values . must have a look at the data type of the field to be set.
// Here can use table.getNumColumns() .. to find out the number of of columns in the table , and loop through this...
table.setValue(<use type casted data value>,<fieldName>);
}</b>
// Execute the RFC
client.execute(function_read_cont);
} catch (Exception e) {
For function details just refer these links.
JCO API
http://www.huihoo.org/openweb/jco_api/com/sap/mw/jco/JCO.html
JCO.Table
http://www.huihoo.org/openweb/jco_api/com/sap/mw/jco/JCO.Table.html
Regards
Kishor Gopinathan
Similar Messages
-
How to via JCO Call RFC upload file to the SAP DMS.
HI ,ALL :
NOW i want to upload file via JCO,but i upload in sap gui is success ,but jco call RFC is error ,this is my code:
excute this code is not error ,but the data not write to SAP,
//连接SAP
Client client = com.hipfung.jco.JCOFactory.getInstance().getClient();
JCO.Repository repo = new JCO.Repository("ZOA01", client);
//调用RFC函数
IFunctionTemplate ft = repo.getFunctionTemplate("CVAPI_DOC_CHECKIN");
JCO.Function f = ft.getFunction();
IFunctionTemplate ft2 = repo.getFunctionTemplate("BAPI_TRANSACTION_COMMIT");
JCO.Function commitFunction = ft2.getFunction();
//设置传入参数值(注意类型)
//1.传入参数为Field
f.getImportParameterList().setValue("TXB", "PF_DOKAR"); //
f.getImportParameterList().setValue("0000010101010101020000000","PF_DOKNR"); //文档类型
f.getImportParameterList().setValue("01","PF_DOKVR"); //文档版本
f.getImportParameterList().setValue("000","PF_DOKTL");
f.getImportParameterList().setValue("SAPFTPA","PF_FTP_DEST");
f.getImportParameterList().setValue("SAPHTTPA","PF_HTTP_DEST");
// Get content as table
f.getImportParameterList().setValue("TBL", "PF_CONTENT_PROVIDE");
//read file and trans to byte
byte b[]=null;
File inf = new File("d:
test.jpg");
InputStream in;
try {
in = new FileInputStream(inf);
b =new byte[(int)inf.length()]; //创建合适文件大小的数组
in.read(b); //读取文件中的内容到b[]数组
in.close();
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
//set byte to internal table
JCO.Table poItem = f.getTableParameterList().getTable("PT_CONTENT");
poItem.appendRow(); //增加空行
poItem.setValue(b, "ORBLK");
poItem.nextRow();
//运行RFC函数
try
client.execute(f);
client.execute(commitFunction);
catch(JCO.AbapException ae)
System.err.println("JCO.AbapException: < DMS > " + ae);
ae.printStackTrace();
catch(JCO.Exception e)
System.err.println("JCO.Exception: < DMS > " + e);
e.printStackTrace();
//返回参数
JCO.Structure struct = f.getExportParameterList().getStructure("PSX_MESSAGE");
String te = struct.getString("MSG_TYPE");
System.out.println("RFC Error Type is :"+te);
String pr = struct.getString("MSG_TXT");
System.out.println("RFC get Data is :"+pr);
com.hipfung.jco.JCOFactory.getInstance().release(client);
i can get file via CVAPI_DOC_CHECKoutView
Edited by: pan qiaoming on Mar 15, 2011 3:05 PMHI ,ALL :
NOW i want to upload file via JCO,but i upload in sap gui is success ,but jco call RFC is error ,this is my code:
excute this code is not error ,but the data not write to SAP,
//连接SAP
Client client = com.hipfung.jco.JCOFactory.getInstance().getClient();
JCO.Repository repo = new JCO.Repository("ZOA01", client);
//调用RFC函数
IFunctionTemplate ft = repo.getFunctionTemplate("CVAPI_DOC_CHECKIN");
JCO.Function f = ft.getFunction();
IFunctionTemplate ft2 = repo.getFunctionTemplate("BAPI_TRANSACTION_COMMIT");
JCO.Function commitFunction = ft2.getFunction();
//设置传入参数值(注意类型)
//1.传入参数为Field
f.getImportParameterList().setValue("TXB", "PF_DOKAR"); //
f.getImportParameterList().setValue("0000010101010101020000000","PF_DOKNR"); //文档类型
f.getImportParameterList().setValue("01","PF_DOKVR"); //文档版本
f.getImportParameterList().setValue("000","PF_DOKTL");
f.getImportParameterList().setValue("SAPFTPA","PF_FTP_DEST");
f.getImportParameterList().setValue("SAPHTTPA","PF_HTTP_DEST");
// Get content as table
f.getImportParameterList().setValue("TBL", "PF_CONTENT_PROVIDE");
//read file and trans to byte
byte b[]=null;
File inf = new File("d:
test.jpg");
InputStream in;
try {
in = new FileInputStream(inf);
b =new byte[(int)inf.length()]; //创建合适文件大小的数组
in.read(b); //读取文件中的内容到b[]数组
in.close();
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
//set byte to internal table
JCO.Table poItem = f.getTableParameterList().getTable("PT_CONTENT");
poItem.appendRow(); //增加空行
poItem.setValue(b, "ORBLK");
poItem.nextRow();
//运行RFC函数
try
client.execute(f);
client.execute(commitFunction);
catch(JCO.AbapException ae)
System.err.println("JCO.AbapException: < DMS > " + ae);
ae.printStackTrace();
catch(JCO.Exception e)
System.err.println("JCO.Exception: < DMS > " + e);
e.printStackTrace();
//返回参数
JCO.Structure struct = f.getExportParameterList().getStructure("PSX_MESSAGE");
String te = struct.getString("MSG_TYPE");
System.out.println("RFC Error Type is :"+te);
String pr = struct.getString("MSG_TXT");
System.out.println("RFC get Data is :"+pr);
com.hipfung.jco.JCOFactory.getInstance().release(client);
i can get file via CVAPI_DOC_CHECKoutView
Edited by: pan qiaoming on Mar 15, 2011 3:05 PM -
Jco call rfc throws error after WAS upgrade sp15
Hi all.
When 2 days ago, our WAS engine version is sp14.
And we have one application using jco library to connect to SAP R/3. It works well.
After we upgrade WAS to sp15.
This function throws out the error.
Umrechnungsfaktor konnte nicht bestimmt werden
Is there anybody can help me ? Its very urgent !Hi
A)Go to adming page http://<localhost>:<port> >>click Web Dynpro >>Content admin >> create, maintain, test Jco and also you can Test the SLD connection too
B)If you are using any JDBC driver,Check your JDBC driver is registered. or else you have register it
1. Start the Visual Admin tool
2. In the tab Cluster, open the node of the server you want to check.
3. Open the node Services under the server you want to check.
4. Click on the entry ClassLoader Viewer under Services. 5. The components are displayed in the right window. Open the node Applications in the right window.
6. Look for the entry sap.com/com.sapportals.connectors.database and click on it.
Under sap.com/com.sapportals.connectors.database, your JDBC driver should be available
Cheers
Jawahar Govindaraj
PS: Reward points -
Error in BPM: "COMMUNICATION FAILURE" during JCo call. Error opening an RFC
hello experts
i am receiving the above error incase of BPM scenario where i am having a Transform step and synchronous RFC step.
i referred to the few threads discussing such problems and was trying to find whether my mapping is correct and i tested my mappings using my payload which looks good.
When looked into the Mapping trace of the BPM "Show container" i found error ""COMMUNICATION FAILURE" during JCo call. Error opening an RFC connection" and it seems that when BPM is attempting to call interface mapping it is throwing this error.
Thanks in advance.
Regards
rajeevhi,
I think no problen with the mapping part,
jco connection requird when xi try to stablish the connection with the adapter .
please look the link provided.
Setup and test SAP Java Connector outbound connection
please also check the following parameter at the exchange profile
com.sap.aii.rwb.server.centralmonitoring.r3.ashost
com.sap.aii.rwb.server.centralmonitoring.r3.client
com.sap.aii.rwb.server.centralmonitoring.r3.sysnr
com.sap.aii.rwb.server.centralmonitoring.httpport
these parameter must be given properly.
if every thing is ok than and problem still exist than try to restart the system.
for us after restarting its worked fine.
regards,
navneet -
Exception when using jco to call rfc
Hi All,
When I used JCO to call rfc 'RFC_GET_TABLE_ENTRIES' to get the records of the table 'MARC'. I met the following Exception, it seems that there are too many records in the table. And I have used the import parameter 'MAX_ENTRIES' to set the number of records , but it seems no use. So is there any suggestion to solve this problem?
Exception in thread "main" com.sap.conn.jco.JCoException: (104) RFC_ERROR_SYSTEM_FAILURE: No storage space available for extending an internal table.
at com.sap.conn.jco.rt.MiddlewareJavaRfc.generateJCoException(MiddlewareJavaRfc.java:602)
at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.execute(MiddlewareJavaRfc.java:1679)
at com.sap.conn.jco.rt.ClientConnection.execute(ClientConnection.java:1018)
at com.sap.conn.jco.rt.RfcDestination.execute(RfcDestination.java:1071)
at com.sap.conn.jco.rt.RfcDestination.execute(RfcDestination.java:1056)
at com.sap.conn.jco.rt.AbapFunction.execute(AbapFunction.java:251)
at JTest.step4WorkWithTable(JTest.java:179)
at JTest.main(JTest.java:351)
Caused by:
RfcException: [null]
message: No storage space available for extending an internal table.
Return code: RFC_SYS_EXCEPTION(3)
error group: 104
key: RFC_ERROR_SYSTEM_FAILURE
message class: SR
message type: A
message number: 044
message parameter 0: TSV_TNEW_PAGE_ALLOC_FAILED
at com.sap.conn.rfc.engine.RfcIoOpenCntl.RfcReceive(RfcIoOpenCntl.java:1927)
at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.execute(MiddlewareJavaRfc.java:1631)
... 6 more
Caused by: com.sap.conn.rfc.exceptions.RfcGetException: No storage space available for extending an internal table.
at com.sap.conn.rfc.engine.RfcImp.ab_rfcerror(RfcImp.java:1233)
at com.sap.conn.rfc.engine.RfcGet.rfcget_run(RfcGet.java:128)
at com.sap.conn.rfc.engine.RfcGet.ab_rfcget(RfcGet.java:23)
at com.sap.conn.rfc.engine.RfcRcv.ab_rfcreceive(RfcRcv.java:32)
at com.sap.conn.rfc.engine.RfcIoOpenCntl.RfcReceive(RfcIoOpenCntl.java:1884)
... 7 more
Thank you very muchCongrats Darek!
That function really works... here is my program test:
package integracao.sap.teste;
import java.util.Properties;
import integracao.sap.config.ConfigUtil;
import integracao.sap.funcao.RFC_READ_TABLE;
import com.sap.mw.jco.IRepository;
import com.sap.mw.jco.JCO;
public class TestJCOError {
private static Properties config;
private static JCO.Client createJCOClient(){
JCO.Client client = JCO.createClient(config.getProperty("numClient"), config.getProperty("user"), config.getProperty("password"), "EN", config.getProperty("host"), config.getProperty("numPrograma"));
return (client);
@param args
public static void main(String[] args) {
config = ConfigUtil.getConfig();
JCO.Client client = createJCOClient();
client.connect();
IRepository repository = JCO.createRepository("REP", client);
JCO.Function func = RFC_READ_TABLE.createFunction(repository);
func.getImportParameterList().setValue("MARC", "QUERY_TABLE");
func.getImportParameterList().setValue(";", "DELIMITER");
func.getTableParameterList().getTable("OPTIONS").appendRow();
func.getTableParameterList().getTable("OPTIONS").setValue("MATNR = '000000000000000011'", "TEXT");
func.getTableParameterList().getTable("FIELDS").appendRow();
func.getTableParameterList().getTable("FIELDS").setValue("MATNR", "FIELDNAME");
client.execute(func);
JCO.Table table = func.getTableParameterList().getTable("DATA");
System.out.println("NumRows: " + table.getNumRows());
System.out.println("Content: " + table.getValue("WA"));
Result:
NumRows: 1
Content: 000000000000000011
Hope it helps everybody!
Regards,
Danilo Andrade -
Hi,
Since Sp14 , one can do an RFC Lookup using the Lookup API and the RFC adapter for cross referencing.One can also do a JCO call directly to get the corss referencing data.
My question is ,which among the 2 approaches is a better option and why?
Looking forward to some valuable tips and information,
Regards,
BhaveshHi Bhavesh,
You could check this out..
http://help.sap.com/saphelp_erp2005/helpdata/en/0f/f084429fb4aa1ae10000000a1550b0/frameset.htm
P.S Please mark helpful answers -
Incorrect data from "table.getString" in jCO call to a Unicode SAP sys
We have started getting java errors, with a local standalone java application, after we converted our SAP system to Unicode. The java application makes a RFC call to SAP and runs a functional module, which extracts payment data. The data is passed through table parameters T_OUTLOG and T_FILE.
When trying to get data from the first field/parameter of a table, it also picks up data from the second field/parameter. It seems to be picking up twice the number of expected characters. Consequently when we try to get data from the second field/parameter, it now contains the data from the third field/parameter.
Below are the sample data, java code and results:
eg. SAP TABLE "T_OUTLOG" has the following fields and values:
FILE: 103501U1
LAUFD: 20070803
LAUFI: TIN01R
RPPOST: 44
JAVA CODE:
com.sap.mw.jco.JCO.Table table = function.getTableParameterList().getTable("T_OUTLOG");
for(int i = 0; i < table.getNumRows(); i++)
table.setRow(i);
String s12 = table.getString("FILE");
String s13 = table.getString("LAUFD");
String s14 = table.getString("LAUFI");
int j = Integer.parseInt(table.getString("RPOST"));
RESULTS:
S12 ("FILE") = 103501U120070803
S13 ("LAUFD")= TIN01R
Please advise if you have seen this error before. Is there a need to update any of the jCO jar, rfc, dll files etc.? If so how can this be done?Jco return a big String with the result. When you initialize the JCO.table get the structure and length of each field.
But, your code is correct. Check in SAP the function and structure of T_OUTLOG
Also, you can use JCO.Field to find the error.
com.sap.mw.jco.JCO.Field objCurrentField = null;
com.sap.mw.jco.JCO.Table table = function.getTableParameterList().getTable("T_OUTLOG");
for (int j = 0; j < table.getFieldCount(); j++) {
objCurrentField = table.getField(j);
System.out.println(j> Name: + objCurrentField. getName() + ; Length+ objCurrentField.getLength() + ; Type: + objCurrentField.getTypeAsString() + ; Value: + objCurrentField.getValue());
Remember, The abap data type its different in JAVA and depend of the users parameters. Example: Fields Type DATUM in SAP return to JAVA 00.00.0000 or 00/00/0000 or 00000000. Maybe the problem its the data type. -
Hi all WebDynpro Gurus
I am using EP7.
I am developing an WD application for KM functionality in which I need to call RFC from backend. I followed the "<b>Creating WD application accessing ABAP function</b>" example.
But when I executed the application I got following exception.
<i><b>Root Cause</b>
The initial exception that caused the request to fail, was:
com.sap.lcr.api.cimclient.CIMClientException: java.net.MalformedURLException: URL must have a host part
<b>Correction Hints</b>
Accessing the System Landsape Directory (SLD) failed. Depending on the concrete reason (see root cause) check the following:
is the SLD Supplier in the J2EE engine configured correctly? See the SLD documentation for more details about the SLD and about how to configure it.
are all JCO destinations maintained correctly? Use the preinstalled Web Dynpro Content Admin application to check/edit the destination. Use the Ping and Test functions of the Content Admin to verify that each destination is properly configured.</i>
I checked JcO connections in the webdynpro content admin. There the status is unknown and create tabs are disabled.
I checked the SLD connections in content admin , the entries are as below:
<b>Host name : blank
Port: -1
User: blank
Url: http://.-1/sld</b>
Where could i configure these SLD settings and what should be the new entries ?
I dont have permission to view WebDynpro console.
Please help me out.Vinod,
Claim: "Hello, World" application with WD and RFC is the "Hello, World" application with most complex configuration.
Prove:
1. You need to run http://host:port/sld and import CIM context
2. You need to add technical WebAS ABAP systems to SLD (same URL)
3. You need to run Visual Administrator and setup SLD connection parameters (host, port, user, password)
4. You need to (re)deploy your WD application
5. You need to run web-based WebDynpro Content Administrator and configure JCO connections.
Fortunately, [1]-[4] is necessary only ones per server, [5] is necessary per every application.
Valery Silaev
SaM Solutions
http://www.sam-solutions.net
P.S. After I'd started working with XI I understood that procedure described above is not complex at all -
Can we call RFC in any other way except using adaptive
Hi,
I want to know if there is any possible way to call RFC other than using the adaptive model.
Answers will rewarded.
RegardsHi,
you can use JCO or Enterprise Connector to connect with R/3.
JCO-->http://www.sapdevelopment.co.uk/java/jco/jcohome.htm
EC-->http://help.sap.com/saphelp_webas630/helpdata/en/79/c6213e225f9a0be10000000a114084/content.htm
Regards,
Naga -
How to handle JCO.AbapException on JCO call in ABAP
Hello Forum,
I am implementing an JCO Server scenario.
I use dynamic repositories like Example7.java from the JCO documentation.
Example7 throws an JCO.AbapException if anything went wrong, e.g. the function is not implemented. My coding is like:
protected void handleRequest(JCO.Function function) throws AbapException {
try {
// Process incoming requests
} catch (Exception e) {
log.error(this.getProgID() + ": error handling request " + function.getName(), e);
throw new AbapException(function.getName(), e.getMessage());
How to react on this AbapException?
The examples in SAP Help documentation only catch
SYSTEM_FAILURE and COMMUNICATION_FAILURE.
I implemented the JCO call as well like following.
CALL FUNCTION 'MY_JCO_FUNCTION_MODULE'
DESTINATION JCO_DEST
<...>
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE RFC_MESS
COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
But these two are only thrown and caught when something with communication went completely wrong, e.g. RFC not found.
When the exception in the JCO server occured and JCO.AbapException was thrown I always get an ABAP short dump, i.e. the exception was not handled.
Additionaly, the exception is named like the JCO function called and the message text which was submitted to JCO.AbapException is not displayed. I think that means that the AbapException was not recognized at all?
The JCO API doc says:
Creates an exception with the specified key. This constructor is normally used in the server's handleRequest() methods to throw an exception which is part of the function interface definition. In such a case the SAP system will not raise a system exception. If however the specified key is not a defined exception for the currently processed function module the SAP will raise a system exception.
But whether I define an exception in the function interface definition named like the module (thererfor new AbapException(function.getName(), <...>)) or not, it always dumps. I understand the exception that a system exception is raised when the exception is not defined? But this is not been handled with above ABAP code as well.
What is wrong here? Could anyone post an example please how the exception has to be handled?
Please note that I do not define static repositories but have the remote function defined on in the ABAP server to be used by dynamic repository (like the STFC_CONNECTION test rfc). Am I right that the exception should be defined in that RFC remote definition?
Thanks,
CarstenDear everybody,
Finally I solved this old problem
I am a novice in JCO and played a little with the problem and found an old reference to the difference between J2EEAbapException and AbapException classes. I modified my program and it works! ABAP caller gets the correct exception, not system_failure! The details:
1. modify beanname.java source
import com.sap.mw.jco.JCO;
import com.sap.mw.jco.JCO.J2EEAbapException;
public interface ... extends EJBObject {
public void processFunction(JCO.Function function) throws RemoteException, J2EEAbapException;
2. modify beannamebean.java source
import com.sap.mw.jco.JCO.J2EEAbapException;
public void processFunction(JCO.Function function) throws J2EEAbapException {
throw new JCO.J2EEAbapException("NODATA");
3. modify beannamelocal.java source
import com.sap.mw.jco.JCO;
import com.sap.mw.jco.JCO.J2EEAbapException;
public void processFunction(JCO.Function function) throws J2EEAbapException;
I hope it helps for somebody else too!
Imre -
Call RFC from java (j2ee) / call to j2ee from R/3
hello
i´ve browsed the forum for some time to find how to:
1.) call ejb from r/3 system via rfc
2.) call rfc enabled function modules on r/3 from within an j2ee enviroment
but i didn´t quite get it, because i was a bit confused about all the mentionend techniques
what i found out about
1.) use ejb (session bean) and jndi; configure RFC-Engine Service (we use sap webas)
2.) use jco / jca
(or all rfc enables rfm´s are available as web service, but didn´t find anything about this)
so my question:
are these the preferred techniques to connect j2ee (webAS) <-> r/3; if not are there any others, maybe easier methods?
and last but not least: are there any good online tutorials for this topic?
thanks in advance
franzJust as a short partial reply.
The generic Java --> RFC method is JCO (it will work on older versions as well), you can think of it as a JDBC driver where R/3 is the database, it behaves very similar in many ways.
EJB development on SAP WAS is really not any different from EJB development on any other J2EE server. The deploy tool is superb. very easy to use and the JNDI registry, etc. are standard stuff...
ABAP to EJB calls, haven't looked at this in over a year now, but back then we did a Proof Of Concept based on information at http://help.sap.com and it did work indeed. The only thing was back then that you needed to do a few tweaks to get it to work properly.
As mentioned above, look at the JCO examples and then you can ask more specific questions once you get stuck.
Good Luck!
Cheers,
Kalle -
Can not call RFC contains "call transaction" in webdynpro
We use Webdynpro to develope a UI that can create service orders in CRM
system. We create an RFC funciton "ZKLEE_CRM_ORDER_MODIFY" in CRM,which
contain a statement of "CALL TRANSACTION 'CRMD_BUS2000120' USING T_BDC
MODE 'N' MESSAGES INTO MESSTAB.".
But as we exacute the RFC from WEB,we got 3 error messages in the
output "MESSTAB":
1.MESSAGE ID = "DC",MESSAGE NUMBER = "006", MESSAGE = "Control
Framework: Fatal error - GUI cannot be reached".
2.MESSAGE ID = "SY",MESSAGE NUMBER = "002", MESSAGE = "Exception
condition CNTL_ERROR raised."
3.MESSAGE ID = "00",MESSAGE NUMBER = "359",and it is a terminate
message.
The problem is that we can use webdynpro to call RFCs that do not
contain "call transaction" freely. At first we suspect that it is our
RFC function's fault, but we tried it in ABAP enviroment,and it works
OK. We also tried to call this RFC in JSP through JCO,the same error
occurs.
Our system enviroment is CRM 4.0, J2EE 640, kernel 640 patch 109.HI,
Thank you for your information.
Maybe you are right that BAPI/RFC can not contain "call transaction" statement. But two weeks ago, one of my colleagues tried to use "call transaction" in RFC through JCO in our R/3 enviroment(not in CRM),and he successed.
So I suspect the kernel release. The kernel of R/3 is 640,while CRM is 620(I said our CRM kernel release is 640 before,and it is a mistake.).I will confirm whether what my colleague said is right by myself, and will also told you the result.
Message was edited by: Vincent zklee -
Calling RFC Adapter fails - convert error
Hi,
I have a problem with calling RFC Adapter. I'm using JDBC->XI->RFC scenario. JDBC does just "select 'W' from dual". In the destination SAP system RFC function is created for test purposes. This function has one parameter - string type. After calling it, it should write a sysdate into the SAP Z_ table. The XI should call the function with the 'W' parameter. But this fails. Everything is ok, but calling the RFC returns following error (copied from the Runtime Workbench -> Message Monitoring :
Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of 'W', in "u
(Yes, this is thw whole error message. I don't know what u should be...)
Did someone get this error?
Thanx 4 answers, PeterHello all,
Let me reopen the topic of my colleague. I'm facing the same error though with bit different symptoms. Here it is.
ERROR msg:
Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of 'Z', in "T
The XML message (MainDocument):
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:Z_BAPI_ACCESSIBILITY_TEST_XI xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
<BAPI1008 />
<PARAM>Z_XID_500_ACC</PARAM>
<ZTTOTH_BAPI1008 />
- <b><ZTTOTH_STRUCT>
<PARAM1></b>Z_XID_500_ACC</PARAM1>
</ZTTOTH_STRUCT>
</ns0:Z_BAPI_ACCESSIBILITY_TEST_XI>
According to the error message the parser expects behind string ...<ZTTOTH_STRUCT><PARAM1> another tag, but the question is why.
To make all this more funny here I paste another XML message of BAPI calling which works fine (without the error described above):
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:Z_BAPI_PARAMETERS_TEST_XI xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
<PARAM>Z_XID_500</PARAM>
- <ZTTOTH_STRUCT>
<PARAM1>Z_XID_500</PARAM1>
</ZTTOTH_STRUCT>
</ns0:Z_BAPI_PARAMETERS_TEST_XI>
The BAPI functions are absolutely the same except those other two import-pramater structures (BAPI1008 and ZTTOTH_BAPI1008). I'm gonna to try to add those import-parameter structures into Z_BAPI_PARAMETERS_TEST_XI, but anyway - this is weird.
Does anybody have an idea, what should be wrong ?
Thx. Tom
Message was edited by: Tomas Toth -
Dear All,
In one of my scenarios I have called RFC to my R/3 server. But now ita throwing an error mail that user id/password locked. I am checking the messages in SXMP_MONI and it is showing the following description.
<b>com.sap.aii.af.ra.ms.api.DeliveryException: RfcAdapter: receiver channel has static errors: can not instantiate RfcPool caused by: com.sap.aii.af.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.af.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed Connect_PM TYPE=A ASHOST=10.6.4.55 SYSNR=00 GWHOST=10.6.4.55 GWSERV=sapgw00 PCS=1 LOCATION CPIC (TCP/IP) on local host with Unicode ERROR partner not reached (host 10.6.4.55, service sapgw00) TIME Sat Mar 17 07:46:10 2007 RELEASE 640 COMPONENT NI (network interface) VERSION 37 RC -10 MODULE nixxi_r.cpp LINE 8684 DETAIL NiPConnect2 SYSTEM CALL SiPeekPendConn ERRNO 10061 ERRNO TEXT WSAECONNREFUSED: Connection refused COUNTER 4</b>
Can u please suggest what is the error and how can it be solved.
Warm Regards,
N.Jainhi,
ya i have checked the RFC connection in SM%( and it is working and also I have tested the authorisation there for tht user and everything is working fine.
but still the error message is coming in SXMB_MONI in every minute.
Warm regards,
N.Jain -
"SYSTEM FAILURE" during JCo call. max no of 100 conversations exceeded
Hi Experts,
My scernario is : RFC->File Asynch
When i do testing this scenario in Configuration (ID) -> tools-> test configuration I got below error.
Interface Mapping
Runtime error
"SYSTEM FAILURE" during JCo call. max no of 100 conversations exceeded / CPIC-CALL: 'ThSAPCMRCV' : cmRc=17 thRc=45
1) I have created incremented 100 to 300: Set the following environment variable CPIC_MAX_CONV=300
2) In sender RFC communication channel i have all correct parameters like: gateway service,Program ID, client number, password, userid etc
Pleas help me out.
thanks
siva grandhihi,
se this
/thread/174978 [original link is broken]
Look at SAP note 314530,316877
set this enviroment Variables:
set CPIC_MAX_CONV = 500 (WINDOWS)
setenv CPIC_MAX_CONV 500 (unix)
also check the rfc destination JCO_RUNTIME_JCOSERVER
AI_RUNTIME_JCOSERVER. if u have any error in this RFC plz refer to this link
http://help.sap.com/saphelp_nw04s/helpdata/en/9b/da0f41026df223e10000000a155106/frameset.htm
Thanks
Rodrigo
ps:reward points if useful
Edited by: Rodrigo Pertierra on Mar 26, 2008 11:59 AM
Maybe you are looking for
-
Need Help With Download For Airport Express
Ok, computer dummy here needing help with airport express. We were given airport express last night from a friend who recently purchased a newer gadget. He told us we would need to come here to download the operating system. I see lots of links to up
-
Selling iPod classic 160G don't remember old password, won't restore
Hi, I have read all the answers to restoring my ipod classic to sell, and have already tried restore. When I hit restore, itunes requests apple id & password. My problem: This ipod classic was set up under an old apple id & password that I do not r
-
Apple Remote Desktop - most options grey (dimmed)
I bought a new imac,transferred my information to the new imac, and now almost all the options for remote desktop are gray (dimmed). I reinstalled remote desktop, but to no avail (It did not even ask for the serial number). I have a classroom full of
-
How to change latency type to fast?
How to change latency type to fast?
-
I keep getting error code 150340 when installing Acrobat reader.