JCo - asynchronous calling RFC
As far as I know, there is possibility make asynchronous RFC call via JCo.
How can I get return values from such calling?
Is there some code example, please?
Thanks.
hi!
please check this thread
Get the return value of an RFC function / BAPI
Similar Messages
-
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 -
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 -
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 -
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 -
How to call RFC in Async Mode using TCP/IP RFC Destination ?
Hi experts,
Can anybody tell me how to call an Async RFC using TCP/IP RFC Destination ?
Regards,
UmeshCheck the link
http://help.sap.com/saphelp_nw04/helpdata/en/80/09680289c751429ab3b07ad2a61c10/content.htm
It says
<b> For asynchronous calls, no connection to external systems is possible (TCP/IP connections in transaction SM59).</b>
Regards,
Abhishek -
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 -
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 -
Synchronous - asynchronous interface (RFC - XI - jdbc)
hello to everybody!
i want configure a synchronous - asynchronous interface (RFC - PI - jdbc) whit my PI 7.1
This RFC send 2 output tables to PI/XI and i want write it into 2 different tables in a SQL Server Database.
How can i do it?
i tried whit one mapping to a unique outbound datatype...but only header table was insert and not rows.
i tried whit 2 Receiver Interfaces but i have on mapping the follow error:
Multiple inbound interfaces not supported for synchronous calls
so??
other possibility?
BPM?
please help me
Thanks
AlessandroHi,
I have a similar problem; I have JMS - PI - RFC synchronous scenario. I will receive message from JMS, and depending on the data received, I should call either of two RFCs (NOT BOTH). The BAPI return message should then be sent back to JMS.
Hence, I have one "Sender/Outbound" Message Interface, one receiver determination for that Message Interface - in which there is "one" receiver (backend SAP system).
In "Interface Determination", I specifed the two BAPIs as two Interfaces, and defined conditions based on "context objects" - since I need to know the Interface Mapping "dynamically"
However, I get the error - "Multiple inbound interfaces not supported for synchronous calls ". any suggestions on how to proceed?
I am posting this question here as it is a related issue. Hope it is fine.
Thanks,
Archana -
Conversion error in JCo outbound call
hi all
i am working on making OUTBOUND call from SAP using JCo,
our SAP system is Unicoded and i am refering Jco example 5 from JCo2.1.8 demo.
i am able to make connection successfully , but while running test ABAP program for testing connection, i am getting Short dump error headed :
Conversion error "ECHOTEXT" from character set 4103 to character set 4102
A conversion error occurred during the execution of a Remote Function
*Call. This happened either when the data was received * or when it was
*sent. The latter case can only occur if the data is sent from * a Unicode
system to a non-Unicode system.
The current program had to be terminated because of an
error when installing the R/3 System.
my ABAP prg. is this :
REPORT z_jco_test.
PARAMETERS: requtext LIKE sy-lisel.
*ECHOTEXT LIKE SY-LISEL
**" RESPTEXT LIKE SY-LISEL
DATA: echotext type SYLISEL,
resptext LIKE sy-lisel,
rfctest TYPE TABLE OF rfctest,
wa_rfctest TYPE rfctest.
wa_rfctest-rfcdata1 = requtext.
wa_rfctest-rfcdata2 = 'Hello World'.
APPEND wa_rfctest TO rfctest.
CALL FUNCTION 'RFC_PING'
DESTINATION 'JCO'.
*CALL FUNCTION 'STFC_CONNECTION'
* EXPORTING
* requtext =
** IMPORTING
** ECHOTEXT =
** RESPTEXT =
CALL FUNCTION 'STFC_CONNECTION'
DESTINATION 'JCO'
EXPORTING
requtext = requtext
IMPORTING
echotext = echotext
resptext = resptext
TABLES
rfctest = rfctest.
WRITE: 'Echo Text: ', echotext.
WRITE: 'Response Text: ', resptext.
LOOP AT rfctest INTO wa_rfctest.
WRITE: / 'rfcdata1: ', wa_rfctest-rfcdata1.
WRITE: / 'rfcdata2: ', wa_rfctest-rfcdata2.
ENDLOOP.
i have made RFC connection unicode yes.
please guide meHelo!
We have a similar problem here. Could you please explain your solution in a bit more detail ?
Thanks in advance,
Markus -
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 -
Calling RFC from custom connector
Hi,
I am developing a custom connector for UWL to get tasks from 3rd party system.
I need to call a RFC from backend SAP system to complete Input data for this 3rd party provider.
I assume that I have to make an RFC call from getItems() method of connector.
Any idea how to call a RFC from UWL custom connector code?
Please help.
Thanks & Regards,
AmeyHello Karri,
Yes, I am aware of two ways of calling RFCs from Java code.
Normally, I use following approach to call RFCs from my other Portal Components (JSPDynpages): -
IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
IPortalComponentContext myContext = request.getComponentContext();
IPortalComponentProfile myProfile = myContext.getProfile();
String sapSystem = myProfile.getProperty("SystemIdentifier");
ISystemLandscapeWrapper landscapeWrapper = (ISystemLandscapeWrapper) UMFactory.getSystemLandscapeWrappers().get(0);
ISystemLandscapeObject systemLandscapeObject = landscapeWrapper.getSystemByAlias(sapSystem);
IJCOClientService clientService = (IJCOClientService) PortalRuntime.
getRuntimeResources().getService(JCO_CLIENT);
request.getNode().putValue(LOCALE_NODE_KEY, Locale.ENGLISH);
IJCOClientPoolEntry poolEntry = clientService.getJCOClientPoolEntry(sapSystem,request);
JCO.Client client = poolEntry.getJCOClient();
client.connect();
IRepository repository = JCO.createRepository("repository", client);
IFunctionTemplate functionTemplate = repository.getFunctionTemplate(Z_BAPI_EMP_GBU_GET);
JCO.Function function = new JCO.Function(functionTemplate);
JCO.ParameterList importList = function.getImportParameterList();
importList.setValue("US", "OBJTYP");
importList.setValue(request.getUser().getUniqueName(), "USRID");
client.execute(function);
JCO.ParameterList outputList = function.getExportParameterList();
gbuCountryBean.setGbu(outputList.getString("GBU"));
gbuCountryBean.setCountry(outputList.getString("COUNTRYCODE"));
gbuCountryBean.setPersArea(outputList.getString("PERS_AREA"));
gbuCountryBean.setCompanyCode(outputList.getString("COMPANYCODE"));
When I tried implementing same in UWL custom connector, I am not able to get instance of 'request' object.
Any hints/ideas on this?
Hence as an temporary alternative, I wrote following to successfully execute RFC.
mConnection = JCO.createClient(sapclient, sapuser,
sappassword, "EN", saphost, sapsysnumber);
mConnection.connect();
mRepository = new JCO.Repository("GetLeaveRequestFlag", mConnection );
IFunctionTemplate ftemplate = mRepository.getFunctionTemplate(Z_BAPI_CHECK_LR_TO_APPROVE);
myFunction = new JCO.Function(ftemplate);
JCO.Field OBJECT_TYPE = myFunction.getImportParameterList().getField("OBJECT_TYPE");
OBJECT_TYPE.setValue("US");
JCO.Field USERID = myFunction.getImportParameterList().getField("USERID");
OBJECT_TYPE.setValue(p_userID);
mConnection.execute(myFunction);
JCO.Field leaveRequestFlag = myFunction.getExportParameterList().getField("FLAG_LEAVE_REQUEST_RECORD");
mConnection.disconnect();
But only catch here is that I need to create & maintain SAP logon credentials for a particular user manually.
It is not possible to single sign on connector user into SAP system (like its done above).
Any thoughts on this?
Thanks & Regards,
Amey -
What is a gateway proxy?? what are synchronous and asynchronous calls?
bapis are rfc enabled. but are there any other rfc's available in sap? what is a gateway proxy?? what are synchronous and asynchronous calls?
Hello:
Lets st art at the beginning.
There are NO documented viruses that affect a Mac running OS X - none (there are instances of Malware).
Gateway GEO-IP/BOTNET Alert
This is a Youtube video that explains what you have (I assume you installed it somehow) on your computer:
http://www.youtube.com/watch?v=JwRi2me2hSk
For openers, I would uninstall any A/V software you have put on your system. It is certainly possible that that junk has put some other stuff on your computer.
I'm also afraid my computer might have been hacked?
Highly unlikely.
Barry
Maybe you are looking for
-
your not register as developer Please register in the OSS How would i know weather i am getting error for old systemBW3.5 or new systemBI7.0 Please some can tell me how would i find this ? does it identify with installation number
-
Cannot install GUI to Hyper-V 2012 R2 server core
Hi everyone, I have followed this article to convert a server core install to have a GUI installed: http://andersonpatricio.ca/enabling-and-disabling-the-graphical-interface-in-hyper-v-server-core/ When I run the powershell command: Install-WindowsFe
-
Hi, With the help of JDC i am able to finish the work of creating the customized comobo but I'm stuck at the edge. I have a customized comobobox, which can show multiple columns in its combo popup, but only one item of column should be shown as selec
-
Unable to download episodes of my podcast
Hello, As suggested by a great guy, I just ask here my issue : My own podcast is available from iTunes : "Tablette Café" (with a "é") ; I can download episodes from iTunes on Mac, but it seems impossible for everybody to download episodes from iTunes
-
Delete the Contact app, how is this possible?
both my ios devices show my contacts app as installing, waiting for the download to start. like they were normal apps, not one of apples. If I tap and hold on the app, it lets me delete it. I did this on the iPhone after doing a phone restore did no