Steps for receving/sending IDOC using ICAN
Hello,
Can somebody please send me the detailed steps required for receving an Idoc from a SAP r/3 system and then sending the same idoc to another sap r/3 system? What all options are available for this? I'm bit new to this and have looked at all the documents available with Ican . These documents have some information but doesn't clearly state the steps for a new user like me.
I'm using ICAN 5.0.5 version.
Regards,
Deepak
[461 byte] By [
draina] at [2007-11-26 9:45:34]

# 1
would you receive it online or as a file?regards chris
# 2
Hi Chris,I will like to receive it online. Can you please let me know the detailed steps for it?However, it would be great if you can tell the difference for the file option also.Thanks,Deepak
# 3
hi deepak,
online:
create a RFC OTD IDOC_INBOUND_ASYNCHRONOUS from sap.
create a jcd (A) that implements receive of this RFC OTD. then in the receive method you get the idoc.
create the ALE OTD for marshalling a specific IDOC e.g. CREMAS (BLANKPADDED)
create a jcd (B) with this CREAMS OTD
now you can marshall the input message comming from A into B and process it.
ps: when doing online transmission you have to configure SAP correctly TCP partner for ican
offline:
create a jcd A that gets a file whether from disk or from e.g. FTP and sends it to a queue
create a jcd B that has an ALE OTD e.g. CREAMS (CRLF) that marshals the bytes into the OTD
regards chris
mak a jcd
# 4
Hello Chris,Thanks for your reply. I will try the steps mentioned by you now. Also, can you please let me know the steps required for sending the idoc back to another R/3 System.Thanks,Deepak
# 5
Hello Chris,
I tried the following steps
1. Created a RFC OTD IDOC_INBOUND_ASYNCHRONOUS from sap r/3
2. Created a jcd that implemented receive of the above mentioned RFC OTD and then wrote the contents into a file using the writeBytes funtcion as described below.
FileClient_1.setByteArray( input.getIDOC_INBOUND_ASYNCHRONOUS().marshal() );
FileClient_1.writeBytes();
3. Connectivity map is
BAPI Ext. App > Service -> Outbound External File App.
4. Created a Environment with one outbound file external system, sap bapi external system and a logical host. Attached a integration server to the logical host. Give the sap connection settings in the properties section of sap bapi system including the PROGRAM ID.
5. Created a deployment profile and used auto map and clicked on the Activate button to deploy it on the logical host (it has already been started separately).
Now, when I deploy the application on the logical host nothing is happenning. In the integartion or the logical host log files it's showing that the pplication has been deployed but doesn't say anything about registering with the sap application.
Can you please let me know if I have missed any steps ?
Thanks,
Deepak
# 6
hi deepak,how many rfc servers are configured?do you have turned on transactional rfc with appropriate transaction file?have you turned on SAP logging?regards chris
# 7
When we are trying to configure the rfc from the sap it's not able to connect to the ICAN and gives a error that program id is not registered. We are giving the same program id in both ican environment settings and sap.
I have turned the transactional rfc in the server connection settings in the connectivity map. I have given the trans. id database as ../SAPTID/SapTRFC.TIDdb which was given in one of their examples. Do I need to do anything to setup this database also?
After I deployed the application, it created a blank folder named SAPTID under the logicalhost host folder.
I'm not sure why ICAN is not connecting to the sap server? Any ideas?
Regards,
Deepak
# 8
Hi Chris,
It's working partially now. Program Id is registered with the SAP as I'm able to create a RFC destination.
I changed the gateway hostname to the server ip and corrected the gateway service.
But, It's still not creating a file in my output directory. Any idea what I may be missing?
Also, can you let me know how can I send the recieved idoc to another sap r/3 system?
Regards,
Deepak
# 9
can you give me some err logs?
any indication that the receiving rfc is not called from sap?
sending an idoc to sap is very much the same as receiving:
create a jcd that receives e.g. a jms message with an idoc and then set the bytes for IDOC_INBOUND_ASCNCHRONOUS then call execute.
regards chris
# 10
Hello Chris,
Here is the error I receive in my log file after a CREMAS03 IDOC is sent to the RFC destination created for my program id. (Since this error is coming on the FileClient_1.setByteArray( input.getIDOC_INBOUND_ASYNCHRONOUS().marshal() ) it's not creating the file.)
2006-08-30 14:58:00,633 INFO [JCO.ServerThread-2] [com.stc.is.naming.NamingEnumerationImpl] [] init(), list size: 1, list: [Service1: javax.naming.LinkRef]
2006-08-30 14:58:02,258 ERROR [Thread-69] [SAP_BAPI_TRFC_JCE2.Service1.Collaboration_1_Runtime_Handler] [] Cannot access protected JCO.Table data
java.lang.RuntimeException: Cannot access protected JCO.Table data
at rFC_IDOC_INBOUND_ASYNCHRONOUS.RFC_IDOC_INBOUND_ASYNCHRONOUS$IDOC_INBOUND_ASYNCH RONOUS.convertTablesToIDoc(RFC_IDOC_INBOUND_ASYNCHRONOUS.java:2005)
at rFC_IDOC_INBOUND_ASYNCHRONOUS.RFC_IDOC_INBOUND_ASYNCHRONOUS$IDOC_INBOUND_ASYNCH RONOUS.marshal(RFC_IDOC_INBOUND_ASYNCHRONOUS.java:1969)
at SAP_BAPI_TRFC_JCE2.Collaboration_1.IDOC_INBOUND_ASYNCHRONOUSReceive(Collaborati on_1.java:10)
at SAP_BAPI_TRFC_JCE2.Service1.Collaboration_1_Runtime_Handler.handleRequest(Colla boration_1_Runtime_Handler.java:334)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.stc.is.ejb.slsb.StatelessSessionContainerService.invokeEJBMethod(StatelessS essionContainerService.java:262)
at com.stc.is.ejb.BaseBeanContainerService$ContainerInvocationChainListener.perfor m(BaseBeanContainerService.java:1038)
at com.stc.is.listener.TransactionInvocationChainListener.perform(TransactionInvoc ationChainListener.java:236)
at com.stc.is.listener.PoolInvocationChainListener.perform(PoolInvocationChainList ener.java:85)
at com.stc.is.listener.JNDIInvocationChainListener.perform(JNDIInvocationChainList ener.java:67)
at com.stc.is.listener.IIOPInvocationChainListener.perform(IIOPInvocationChainList ener.java:62)
at com.stc.is.listener.InvocationContextInvocationChainListener.perform(Invocation ContextInvocationChainListener.java:59)
at com.stc.is.listener.SecurityInvocationChainListener.perform(SecurityInvocationC hainListener.java:195)
at com.stc.is.ejb.BaseBeanContainerService.invoke(BaseBeanContainerService.java:45 7)
at com.stc.is.proxy.ContainerInvokerService.invoke(ContainerInvokerService.java:36 5)
at com.stc.is.proxy.GenericProxy.invokeContainer(GenericProxy.java:329)
at com.stc.is.proxy.LocalStatelessSessionProxy.invoke(LocalStatelessSessionProxy.j ava:96)
at $Proxy12.handleRequest(Unknown Source)
at STC_MDB__SAPBAPI_IN_Service1$1.run(STC_MDB__SAPBAPI_IN_Service1.java:325)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at rFC_IDOC_INBOUND_ASYNCHRONOUS.RfcRepositoryBase.getTableData(RfcRepositoryBase. java:251)
at rFC_IDOC_INBOUND_ASYNCHRONOUS.RFC_IDOC_INBOUND_ASYNCHRONOUS$IDOC_INBOUND_ASYNCH RONOUS.convertTablesToIDoc(RFC_IDOC_INBOUND_ASYNCHRONOUS.java:2001)
... 21 more
2006-08-30 14:58:02,289 INFO [Thread-69] [SAP_BAPI_TRFC_JCE2.Service1.Collaboration_1_Runtime_Handler] [] -- Transaction will be to rolled back--
Any Ideas?
Cheers,
Deepak
# 11
hi dee,looks like an old bug from the beginning of 505.what patch levels are applied to your system?i recommend at least R2 with applied latest eway patches.regards chris
# 12
Hi Chris,Any workaround for this problem? I'm stuck at the end point after so much struggle.I have 5.0.5 version which I downloaded from the sun's website. I assumed it to ne latest version.From where can I get the patches for the eway? Regards,Deepak
# 13
hi draina,
you can get your updates from http://goldstar.seebeyond.com/support/
please install all "service packs" they are called rollup patches (at least ) R2.
plus latest updates for all your eways.
if you do not have an account you can ask for it. contact your SUN key accountant.
regards chris
# 14
Hi Chris,
I will do that. Actually, I have not bought the license for ican. I downloaded it from the sun's website. I'm evaluting it for one of our requirements. If we are able to create a small prototype then we will buy a license.
Do I need to buy a license to get the ESR's for ican 5.0.5?
Regards,
Deepak
# 15
hi Deepak,i dont think so. but i would recommend that you talk to the SUN guys they can help you evaluating the product. afaik for getting updates you MUST have an support account. contacts can also be found here http://www.seebeyond.com/contact/index.aspregards chris
# 16
sorry double postMessage was edited by: Chris.Brennsteiner