Error sending IDOC from external Java application to Sap ERP system

Hi Experts!
When I try to send Idoc from Java application to XI an error occurs : no service for system CLNTJAVA, client in Integration Server.
My question is: What value the setSenderPort() is excepting?The Java third party business system's logical name or the ERP business system's logical name where the JCO can be found?I tried both of them, but still have the problem.
Please help. I read all threads about this error, but non of those can help me.
My relevant java sourcecode:
            doc.setSenderPort("CLNTJAVA");
The XI documentation says that:In the case of non-SAP senders, the entry in the SNDPOR field is interpreted as a logical system name, and the corresponding business system is searched for in the runtime cache.
Both case(third party business sytem and erp business system) I have configured the ID    i think correctly. I  made a business systems,I configured the adapter specific identifies,I  made the IDX1 port,I made the RFC destination,I polled the IDOC type with IDX2 transaction, I have made full cache refresh,I configured the INTEGRATION_DIRECTORY_HMI rfc destination,but I do not made any communication channels, receiver determinations, receiver agreement.
My configurations if it can help for you.
Hostname:sapsp5
System name: NE2
Clients:
000 ERP
001 Integration Server
<b>SLD configurations:</b>
Third Party Technical system name: Java_sytem
Business System:CLNTJAVA
Logical system name: CLNTJAVA
<b>ID configurations:</b>
Business System:CLNTJAVA
adapter-specific identifiers:logical system:CLNTJAVA, <u>the rest is initial</u>,because I cant change it.
IDX1 port name: CLNTJAVA the client is 001. the rfc destination is client_001.
I think the IDX1 port and the adapter specific identifiers are wrong. is it?
my java source if the sender is the JCO
doc.setSenderPort("INTSERV");
My configurations if the sender is the JCO.
<b>SLD configurations:</b>
Technical system name: NE2
Business System:INTEGRATION_SERVER_NE2
Logical system name: INTSERV
<b>ID configurations:</b>
Business System:INTEGRATION_SERVER_NE2
adapter-specific identifiers:logical system:INTSERV,system NE2,client 001.
IDX1 port name: INTSERV the client is 001. the rfc destination is client_001.
Could this error be an autorization error?I tired to connect to the xi from the Java, with the user PIISUSER extended with PISUPER roles.
Thank very much.

Hi!
My SNDPOR already set to my source business system's logical name if you check my configurations(JAVACLNT), so there is another problem unfortunately. I set SNDPRN to JAVA, but it still does not work.
Check this configuration please(posted here:
No service for system ... in Integration Directory)
doc.setMessageType("ACC_DOCUMENT");
doc.setRecipientPort("SAPSE1"); // get stuck in XI mapping if not set
doc.setRecipientPartnerType("LS");
doc.setRecipientPartnerNumber("SE1CLNT500");
<b>doc.setSenderPort("SAP3MA");</b>
doc.setSenderPartnerType("LS");
<b>doc.setSenderPartnerNumber("TREMACLNT");</b>
doc.setClient("100");
Inside XI configuration integration builder
<b>Business Service: Service: TREMACLNT</b>
Under the menu Service - Adapter specific identifiers
Idoc Adapter Logical system: TAPPMAN (This thing is important when sending idoc XI -> SAP and should match the logical sys in the receiving SAP system)
IDoc Adapter and RFC adapter R/3 Sysytem ID: 3MA
Client: 100
In IDX1 trans
<b>Port: SAP3MA</b> (Note that the 3MA here is matched against the IDoc Adapter and RFC adapter R/3 Sysytem ID: 3MA)
(a not so well documented feature)
Client: 100
RFC Destination: SE1 (A SAP test system from where IDOC def can be imported, rfc dests are setup in SM59)
I guess that your idx1 port name is the same as the SNDPOR value. I think it should be, because the XI is whatching the IDOC traffic in the idoc adapter port, so you should send the IDOC from external system to the adapter port. Is it right?
My idx1 port is the same as my SNDPOR value in Java,but still came the error.

Similar Messages

  • Example-- Call RFC from external Java Application

    Update: I need code example to call RFC from External Java application. Can onybody help me?                                                      
    RGDS
    RP
    hi all.
    i want to create my own log for each interface.
    i saw this blog:
    /people/michal.krawczyk2/blog/2006/09/20/xi-abap-mapping-logs--more-standard-better-visibility
    my doubt is how to catch the error that i see in SXI_MONITOR y put it in a Sub-Objetc.
    For example: in sxi_monitor i get the error for my interface NMUCustomer: "No receiver could not be found" or "Error Mapping Traformation".
    I created an Object called ZNMUCUSTOMER and a Sub-Objetc called ZERROR.
    what i must do to get the error I see in monitor and assign it to Sub-Object??
    Rgds.
    Message was edited by:
            Rodrigo Pertierra
    Message was edited by:
            Rodrigo Pertierra
    Message was edited by:
            Rodrigo Pertierra

    Hi,
    Oh, you are using ABAP mapping ......
    then use the following in ABAP mapping ..
    TRACE1,TRACE2,TRACE3.... for trace level 1,2,3......
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/866ce290-0201-0010-338f-b8c3553aaa0f
    Regards
    Chilla

  • Send IDoc from External System to SAP system

    Hi Folks,
        I have a requirement to send IDocs from an external system to the SAp system. Basically the external system is a subsystem which is able to send & receive idocs. The external system is currently able to send idocs to SAP system through the ALE layer but now we have to replace it by PI. Now the external system has to send teh IDocs to the SAP ECC system through the SAP PI 7.0.
       Kindly let me knowq how I can achieve it.
    Regards,
      Santosh

    Hi Satish,
    You can achieve this requirement
    1)If your external system going to support web service cals then send IDoc from External system as a web service, in PI use sender side SOAP and receiver side IDoc receiver channel  to  send IDoc.
    or
    2)Use proxy program ,implement the same ALE logic in PI.
      or
    3)Copy the Extenal IDoc message in to file folder as XML,then use file adapter to pick up this message and send it SAP using IDoc.
    Regards,
    raj

  • Use of LORD APIs from external Java application

    We have a need (business scnerio driven) to write an external Java application for Sales Order/Quotation entry. We have recently updated to EHP4 to make use of LORD APIs built by SAP for CRM processes. We are going through published APIs and learning them the hard way (tral and error). We are making progress but slow. Currently we are working through function group ERP_LORD which contains 32 function modules (ERP_LORD_LOAD etc)
    Does anyone know have documentation on basic order entry scnerios and APIs to use and further information on variations of ERP_LORD_SET that may save us some time?
    Any additional information will be appreciated.

    How will they be able to access your application if they aren't users of the system?

  • Can we wrap a RFC as webservice  and use from external java application ?

    Hi Friends ,
                         Our scenario is  call a webservice ( wrapped form of RFC)  from a external  java application  which will pass the input to that webservice and get back the result  .
                          How XI will play a role here ?
                          Can we wrap a rfc as web service  ?
                           Any blogs for that ?
                          Can you please give a brief details about this ?
                          Expecting yoour asap
    Best Regards .,
    V.Rangarajan

    Hi
    Can we wrap a rfc as web service ?
    Yes.
    <i>To use the SAP Web AS 6.40 you need to build a wrapper in the 6.40 system. This is a remote function call (RFC) enabled function module with the same interface or a similar interface that internally calls the required RFC-enabled function module in the old 4.6x system via RFC. The wrapper then can be exposed to the outside world as a Web service. Another option is to use the Integration Broker capabilities for calling Web services in an older system.</i>
    How XI will play a role here ?
    XI will pass the input to the external java application and get back the result to the webservice
    regards
    krishna

  • Error sending IDoc from ERP to PI 7.4 Java Only (stuck in SM58)

    Hi specialists
    I'm trying to send an IDoc to our new PI 7.4 Java Only.
    Because of some authorization issues I changed the RFC Destination <blabla> on PI (nwa) pointing to the ERP system.
    Now the IDoc is stuck in SM58 (tRFC queue) and I get this error message:
    The IDoc Destination <blabla> was changed. Refresh the destination instance with
    Meldungsnr. SR053
    Anyone able to tell me where to do this refresh? I'm new to PI 7.4 Java Only and could not find useful answers on SCN and other internet sources.
    Thanks a lot in advance for any hints.
    Renaud

    Hi Iñaki
    Great document btw... didn't stumble uppon this before. Thanks.
    I carefully went through it but nothing I tried helped.
    The RFC destination (PI -> ERP) is working fine.
    The resource adapter (inboundRA) is configured correctly. I can confirm, that the connection test of the RFC-Destination inside ERP (ERP -> PI) is successful.
    BUT still: sending an IDoc from ERP to PI fails with this message in SM58:
    The IDoc Destination <destinationName> was changed. Refresh the destination instance with
    Meldungsnr. SR053
    This seems to happen every time after one changes some settings in the destination specified in the inboundRA property "destinationName".
    So my question still is: how / where do I refresh this destination instance on a PI 7.4 Java Stack Only??? I mean without having to restart the whole PI instance...
    Best regards
    Renaud

  • Error sending IDOC from JCO Client to PI AEX 7.3.1

    Hi All
    We have a requirement to send an IDOC from a non SAP System to our ECC via PI AEX :
    JCO.Client --> PI AEX --> SAP ECC
    At this time, we are testing this scenario with a JAVA Client with JCO Library (3.0.10).
    Destination to PI is OK
    Destination to our SAP ECC (for IDocRepository) is OK
    But by sending the IDOC to PI we are getting the following error, Exception is raised on the PI System and sent back to the JCO Client :
    com.sap.conn.jco.JCoException: (104) JCO_ERROR_SYSTEM_FAILURE: while trying to invoke the method java.lang.Object.hashCode() of an object loaded from local variable 'key' (raised by system <extern>|PiSystem)
        at com.sap.conn.jco.rt.MiddlewareJavaRfc.generateJCoException(MiddlewareJavaRfc.java:670)
        at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.execute(MiddlewareJavaRfc.java:1881)
        at com.sap.conn.jco.rt.ClientConnection.execute(ClientConnection.java:1120)
        at com.sap.conn.jco.rt.ClientConnection.execute(ClientConnection.java:953)
        at com.sap.conn.jco.rt.RfcDestination.execute(RfcDestination.java:1465)
        at com.sap.conn.jco.rt.AbapFunction.execute(AbapFunction.java:319)
        at com.sap.conn.idoc.jco.JCoIDoc.send(JCoIDoc.java:323)
        at com.sap.conn.idoc.jco.JCoIDoc.send(JCoIDoc.java:353)
        at sap_connector_examples.IDocClientExampleToJavaPO_pbs.main(IDocClientExampleToJavaPO_pbs.java:97)
    Caused by: RfcException: [<extern>|PiSystem]
        message: while trying to invoke the method java.lang.Object.hashCode() of an object loaded from local variable 'key'
        Return code: RFC_SYS_EXCEPTION(3)
        error group: 104
        key: RFC_ERROR_SYSTEM_FAILURE
    Exception raised by <extern>|PiSystem
    PI Destination:
    jco.destination.repository_destination=ABAP_AS_WITHOUT_POOL
    jco.client.gwhost=PiSystem
    jco.client.gwserv=sapgw01
    jco.client.tpname=XI_IDOC_DEFAULT_PID
    jco.client.type=E
    ECC Destination: (ABAP_AS_WITHOUT_POOL)
    jco.client.lang=en
    jco.client.client=100
    jco.client.passwd=****
    jco.client.user=User
    jco.client.sysnr=00
    jco.client.ashost=ECCSystem
    We have already set the PI VM System parameter  jco.allow_non_abap_partner to 1
    ECC User has S_RFC Rolle
    I will be thankful for any advise.
    Thank You
    Regards
    Stéphane

    Hi
    InboundRA (Resource Adapter) is green (Fully available).
    What do you mean by maintaining JCO RFC Destination in PI ?
    We have set the inboundRA Properties has follow :
    ProgramID : XI_IDOC_DEFAULT_PID
    DestinationName : XI_IDOC_DEFAULT_DESTINATION
    Local: true
    mutliRepository : ED1=XI_IDOC_DEFAULT_DESTINATION_ED1;ES4=XI_IDOC_DEFAULT_DESTINATION_ES4;MD1=XI_IDOC_DEFAULT_DESTINATION_MD1;ES1=XI_IDOC_DEFAULT_DESTINATION_ES1;PD1=XI_IDOC_DEFAULT_DESTINATION_PD1;
    GatewayServer and Service are pointing to our PI System
    BindingKey : PI_AAE_IDOC
    And for each Repository we created a destination in NWA pointing to the corresponding ECC System.
    (target host pointing to the ECC System and the Gateway host  pointing to the PI System)
    Our Installation isn't new but it is the first time we are configuring the System for this scenario:
    JCO.client --> PI AEX
    Regards
    Stéphane

  • Sending IDoc from external system to XI system

    Hi All,
        I want to send an IDoc from a subsytem (External System) to the SAP PI system. how to achieve the same ?
    Regards,
       Santosh

    hi,
    >>>Do you mean to say the port I am creating for the external system should actually refer to a SAP system
    not the port - port's name should be a new one but the RFC should point to an SAP system
    >>>and the IDoc you want to transmit should be imported to that port using the tcode IDX2.
    this will be transported then from SAP application system
    >>>>In fact I have already done the same step but its still not working the IDoc is not reaching the XI system.
    then you should see the error in your sending tool - I worked with JCO IDOC client and the error was always
    very explanatory (like BS in SLD missing etc.) so it was pretty easy to debug
    Regards,
    Michal Krawczyk

  • IDOC from external system

    Hi,
    I have scenarion in that we will receive IDOC from external system (SAP system) in XI i.e. IDOC- XI -IDOC scenrio. from my Understanding ,to configure the scenario I have to do ALE from sender side and IDOC receiver channel in receiving side.
    External system (SAP) -(ALE)-> XI -(IDOC rcv)--> Our System (SAP)
    Please can anyone provide me steps to do ALE from external system.
    Edited by: tapan singh on Feb 28, 2011 11:51 AM
    Edited by: tapan singh on Feb 28, 2011 11:52 AM

    Hi,
    We can have alternate ways to send IDocs from external system to SAP system. One way is in below link
    http://help.sap.com/saphelp_46b/helpdata/en/52/16abf6543311d1891c0000e8322f96/content.htm.
    http://help.sap.com/saphelp_40b/helpdata/ru/52/16abcf543311d1891c0000e8322f96/content.htm
    I can think of few more, like In external system after generating Idoc, save it as a tex and send it to SAP system using Http post or using web service.
    Look out to below discussion.
    Send IDoc from External System to SAP system
    Regards
    Aashish Sinha
    Edited by: Aashish Sinha on Feb 28, 2011 1:16 PM

  • Sending SMS Via my java Application

    Hi all,
    I want to develop a feature to send SMS from my java application by using mobile phone.
    I am new to java.
    tell me how to connect the mobile phone from my applicatio and how do i send the SMS.
    Hoping your help sooner....
    Thanks and regards,
    Suresh Dhandauthapani.

    >
    Hoping your help sooner....
    Sorry I was too late.

  • Send IDOC from Business Connector to SAP faster

    Hi Developer!
    I need to send a very lot of IDOC converted from XML files from the Business Connector to SAP. The XML files are in different directories pro business partner, but they have a same type (ISU_MSCONS).
    My problem, that the import take a lot of time. Only in every 3 seconds (IDOC creation time) gets (or works up?) the SAP one IDOC. I start diferent services pro partner at the same time to import the IDOCs, but I couldnt short the 3 second work time in the SAP. So you can count it easy, that in 1 minute I can import 20, in 1 hour 1200, in 1 day 28800 IDOCs instead of 100.000.
    It is really parallel import? Have anybody any idea to make the import more faster. I know (asked the SAP Administrator) so, one BC - SAP connection (Program_ID) has more pools (= threads) in the SAP at the same time.
    Thanks any help,
    Charlie

    Hi Satish,
    You can achieve this requirement
    1)If your external system going to support web service cals then send IDoc from External system as a web service, in PI use sender side SOAP and receiver side IDoc receiver channel  to  send IDoc.
    or
    2)Use proxy program ,implement the same ALE logic in PI.
      or
    3)Copy the Extenal IDoc message in to file folder as XML,then use file adapter to pick up this message and send it SAP using IDoc.
    Regards,
    raj

  • Sending IDoc from ERP to PI

    Hi all,
    I am trying to sent IDoc's from the ERP (SAP ECC) side to PI. But the IDocs are not arriving at the PI side. In ECC tc:we05 they seem to be successfully sent.
    The Partner Type in we20 is "LI". I added the IDoc to the Outbound parameters and set the PORT to the Port we use for PI. But unfortunately it is not working.
    Any idea why?

    When sending IDoc from ECC System to PI.
    some settings needed on ECC System & PI System
    On ECC System
    Create Port in WE21 type LS (Logical System) use RFC Destination TYPE ABAP in that port.
    Create Partner Profile using PORT in WE20.
    Add the Idoc as Outbound in that Partner Profile.
    Now on PI System
    PI System does not have structure / matadata of IDoc.
    Create Port in IDX1.
    Import IDoc Matadata in IDX2 use Port created in IDX1.
    Create complete scenario & send IDoc from ECC, it will reach at PI System, if successful at ECC.

  • Sending IDOC from R/3 to MII error

    Hi,
    We are trying to send IDOC from R/3 4.7 to MII 12.1 (SP8 patch 9 on NW CE 7.11).
    We followed the guide below:
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3861e693-0e01-0010-e791-9b44d2693e6c
    Connection of message listener to R/3 works fine.
    RFC connection test from R/3 to message listener was successful.
    But when we try to do model distribution we get this error " - Communication error occured. Server repository could not create function template for 'MODEL_VIEW_REPLICATE'.
    Maybe someone encountered this error and can help to resolve it.
    Thanks in advance.

    Hi Michael,
    What do you mean by "manually registered the ProgID"? The message listener configuration property is as below:
    ProgramID:  MII_IDOC_CONNECT_5
    MaxReaderThreadCount:  1
    SAPClient:  800
    UserName: GAOMX
    Password: xxxxxxxx
    Language:  EN
    ServerName:  blade01a.memc.com
    PortNumber: 00
    BindingKey:  XMIIIDOC
    And also, following is error message found from LOG VIEWER of the MII server:
    here is one
    Message: not supported FunctionModule MODEL_VIEW_REPLICATE for IDocActivationSpec
    Date: 2011-07-21
    Time: 15:30:18:060
    Category: /System/Server/Connector/Rfc
    Location: com.sap.mw.jco.jra
    Application: sap.com/sapjra~xMIIIDOC05
    Thread: Thread[Managed_Application_Thread_20,5,Managed_Application_Thread]
    Data Source: j2ee/cluster/server0/log/system/server_00.log
    and another one
    Message: Server repository could not create function template for 'MODEL_VIEW_REPLICATE' caused by: java.lang.RuntimeException: not supported FunctionModule MODEL_VIEW_REPLICATE used with IDocActivationSpec registered for MII_IDOC_CONNECT_5 on system blade04a_MIT_00
    Date: 2011-07-21
    Time: 15:30:18:061
    Category: /System/Server/Connector/Rfc
    Location: com.sap.conn.jco
    Application: sap.com/sapjra~xMIIIDOC05
    Thread: Thread[Managed_Application_Thread_20,5,Managed_Application_Thread]
    Data Source: j2ee/cluster/server0/log/system/server_00.log
    Thanks,
    Mike

  • Send idoc when bp created and receive idoc from external

    I am sap abap developer and  am new to CRM technical side.
    *****my requirement is : when we create business partner and save it then i need to send that as an idoc to 3rd party theru ESP system.
    I planned to create BP using BAPI BUPAFS_FS_CREATE_FRM_DATA01 and generate idoc in CRM and should send to ESP. They will send to 3rd party and collect some data from tham and they have to generate idoc using BAPI which i specify (I dont know which bapi) and send to us. But i dont know what bapi i have to used at ESP to generate and send idoc from ESP to CRM. Is am not sure how to use bapi exactly.
    Please help me out as soon as you can. I was struct in project.Urgent

    Hi Mehar,
    SAP CRM supports this functionality in the standard. All you need is some customizing to get changes in CRM mapped to an outbound IDOC and send it out to an external system.
    Inbound is also covered. You can post IDOCs to the CRM system using an inbound port. No need to call a BAPI, you can create the IDOC externally and simply post it as a file to the CRM system.
    Alternatively, you can use XML to achieve the same.
    I've sent a configuration document to your email address. In it you will find all you need to perform the customizing for a working XIF scenario.
    Get back to me when you get stuck.
    Regards,
    Michael.

  • Sending IDoc from R/3 to XI -ongoing

    Hi,
    With reference to my previous errors while sending IDoc to XI from R/3 system. I have resolved errors with help of Seshagiri and Kummari advise and help. But now I am getting new kind of error, while sending IDoc from R/3 its getting passed from R/3, but while checking it in XI throug SXMB_MONI I am getting below error:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_POCreateIdoc_</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
      <SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_MM_POCreateIdoc_: RuntimeException in Message-Mapping transformatio~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Can any one advise me on this?
    Thanks & Regards
    Manish

    Hi,
    There were so many Mapping Objects under different Namespaces and under that different Message Mapping trees.
    Under one tree I have tested the XML message and found the below error:
    Cannot produce target element /ns0:MT_POFile/POItem/Price. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd Cannot produce target element /ns0:MT_POFile/POItem/Price. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
    Kindly check if this is the correct error I am getting related to SXMB_MONI error message.
    Regards,
    Manish

Maybe you are looking for