Sending IDoc to java

Hi everyone,
I'm interfacing a Java appl with SAP using JCo and Can I send Idoc between these 2 systems? and how can we do that?
Thanks,
Alex

Hi,
  See the following links:
Sending Idoc to a java application
Kind Regards,
S.Saravanan.

Similar Messages

  • 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.

  • SEND IDOC using JCO(Priorty -HIGH)

    Hi, all
    I am facing to send IDOC through JCO(Java Connector Object). if some body have idea then reply me.
    In previous dovelopment i was using BAPI for save data . Now my requirement is IDOC.
    Regards,
    Sandeep
    Edited by: sandeep verma on Jan 2, 2009 2:41 PM
    Edited by: sandeep verma on Jan 2, 2009 2:41 PM

    hi sandeep,
    check this thread this will give the idea
    Re: Send an IDoc over JCo
    Sending Idoc to a java application
    Sending IDoc to java
    let me know  uneed any further info
    bvr

  • Partner profile to send Idoc to PI 7.4 system from ECC

    Dear Experts ,
    Do we need a partner profile to send Idoc to PI 7.4 system from ECC.
    or Just Port on TRFC is enough ..?
    if i need to create a Partner profile ...how to define a logical system and how Assign Logical System to Client... when there is no client for JAVA only PI system ..?
    thanks
    Shakif

    Hi Mohamed,
    You need to create a tRFC port on sending ECC system. The RFC destination selected in this port os the one created for IDOC transfer.
    Also you need a logical system, use client 000, i.e. PI1CLNT000.
    At last you have to create a partner profile to define the IDOC type used.
    Best Regards
    Harald

  • IDOC ORDERS05 - need to know how to send IDOC using EAN

    Dear Expert,
    in my site i have scenario to convert PO for 1 system to SO on other system.
    Now my configuration is send IDOC using vendor material.
    But I need to change for send with EAN code, and it can create my IDOC to SO (using EAN code)
    How can i do?
    Thank you for your answer,
    @tom

    Start here:
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/
    Also these:
    Sun's basic Java tutorial
    Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's Thinking in Java (Available online.)
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java.
    James Gosling's The Java Programming Language. Gosling is
    the creator of Java. It doesn't get much more authoratative than this.

  • Sending IDocs as 'control messages' to a Logical System

    Hi all,
    I have defined an external Logical System to where I send Idocs. The Idocs are received and processed by a SAP Java Connector on that LS.
    At the moment, when for example a purchase order is created for a specific vendor, a message to that vendor is sent through ALE, and the receiver port for that Vendor is set so that it resembles/is sent to the Logical System.
    My question is, is it possible, for example when you create a purchase order, to define the message control in such a way that a regular 'New Printout' (or other message) is send to the Vendor (as it normally would), as well as an IDoc message for that purchase order to the Logical System: so send 2 messages to different systems upon creation of the purchase order .
    The main idea is that the IDocs are sent to the Logical System to keep track of the actions done by a user, transparant to the user, so that its actions are logged.
    Hope this is clear,
    David

    Yes, You can do it through outbound IDoc. Create another output types and configure the same from NACE and the processing would be done through EDI.
    Then you need to configure the partner profile in WE20 with that output types.
    Thanks
    Subhankar

  • 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 through adapter IDoc_AAE

    Hi, guys!
    We have SAP PO version 7.4
    We need to setup the unloading of the IDoc from BI in PO
    I used the following sources:
    http://scn.sap.com/docs/DOC-31398 
    http://help.sap.com/saphelp_nw74/helpdata/en/34/66c81241874285851e2497aa6f0573/content.htm?frameset=/en/c2/91865252c84716b3b8be394851c9c0/frameset.htm
    http://scn.sap.com/docs/DOC-34155  
    http://scn.sap.com/people/william.li/blog/2011/05/04/configuring-pi-730-java-idoc-adapter
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/08/05/connect-multiple-sap-ecc-clients-from-java-idoc-sender-adapter-by-resource-adapter-cloning
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2010/10/21/pixi-pi-73-new-java-based-idoc-adapters-configuration-sender-receiver--teaser
    but it doesn’t work.
    I created Jco provider xi_idoc_default_pid (where PID  replaced the SID BI system)
    I created the RFC in PO for BI  xi_idoc_default_ destination _pid (ping successful)
    in inboundRA have in ProgrammID:  xi_idoc_default_pid
    in destination - xi_idoc_default_ destination _pid
    I created Sender channel (manual and default)
    I created in BI in sm59 RFC T
    I input   the program xi_idoc_default_pid , which was created in the first step, in field, and input
    gateway and host - my PO
    but the test does not pass the RFC.
    Could you please tell me,  what the problem is?
    I configured IDoc_AAE receiver. data arrives in BI, help me to setup up  send IDoc  from BI in PO
    Thanks.

    Hi,
    We also faced same issue for the RFC created from our ECC to SAP PO (netwaever 7.4 ) system. It is TCP/IP connection.
    there are 2 solutions:
    1) set gw/acl_mode parameter to 0 in ECC system resolved the issue. Ofcourse you need restart of Source(ECC) system. But it is not recommended in Prod systems
    2) Regenerated Reg info and sec info files in Source system(ECC) and created them in target system also and kept them in /usr/sap/SID/SYS/SCS01/data.
    The created files are given below for reference.
    Reginfo file:
    P TP=* HOST=*
    P TP=* HOST=*
    Secinfo file:
    P TP=* USER=* USER-HOST=* HOST=*
    P TP=* USER=* USER-HOST=* HOST=*
    BR
    Ravikiran

  • If message failed at communication channel, then need to send idoc to R/3

    Hi folks,
    i got a requirment like .....If message failed at communication channel, then need to send idoc to R/3.
    can anybody suggest the possible solution.

    HI
    If you use a catching a MAIL - PI ALERT and based on that alert if u creating an IDOC then it is good if u really supress the alert immediately once the ALERT comes but if u really check and supress the ALERT fine Otherwise a CONTINOUS IDOCs will get created at SAP system.
    Also there might be some natural generic reasons for communication channel fails
    a)  somtimes if the target FTP is down
    b)  if there is some issue with FILE ENOUGH
    c)  If File adpater is placing same file already exists or with already Opened by some target application
    d)  Dynamica file naming issue. (technical issue)
    WHy cant u do scenario in the below steps without keeping BPM, CATCHING ALERTS which doesnt give exact QUARANTEE
    Do one thing make a technical design in such a way into 1 flow or 2 flows in worst case
    In INTERFACE MAPPING-->
    a) Insert your current Normal Graphical mapping
    b) Javamapping:- This code will take the first mapping output as Input through Stream Transformation and create a same FILE through JAVA FTP Comments at specified Cleint Location. I recommend in order to avoid direct interraction of writing a file at client FTP better always write at your Local PI NFS Application outbound directory which doesnt require host name and user and pwd. Even if it requires you can do a RFC lookup and maintain a host, Port, User ID, pwd, Directory, FIle naming pattern in that table or else simply DO VALUE MAPPIING and pass it through XML INPUT from FIrst mapping as additional fields
    c) WITH IN THE SAME JAVAMAPPING: -
       If it successfully writes a file - wRite a TRACE log ("FILE NAME+ Sucecssfully written+ File Bytes")
       Then create an simple small XML OUTPUT and PASS that JAVA MAPPING OUTPUT To 3rd Grahical Mapping as Input it might be less than 5KB.
    Note: - Remember that this output XML should be ina Multmapping SPLIT MERGET FORMAT with 1 FIELD or required INFO
    as KEY FIELD INFO using DOM FACTORY
    d) GRAPHICAL MAPPING: -
      SOURCE IS JAVAMAPPING OUTPUT and TARGET HAS 2 messages
                           Message 1) SAME INPUT SMALL XML OUTPUT COMING FROM JAVA MAPPING OUTPUT
                           Message 2) IDOC TY{E STRUCTURE
    Keep a Condition based on KEY VALUE Coming from source field execute either 1 Message1 or Message 2
    In this way you can complete in a single Flow. 
    Later you can deifnee a simple flow to PICK and DROP from SOURCE file  Writing through javamapping to client location Or else
    WRITE A small OS SCRIPT and CALL in Receiver FILE COMMUNICATION at OS Command so that while writing a LOG file it will move the file from Source FTP to CLient FTP location.
    Regards
    Amar Srinivas Eli

  • Send IDocs to machines depending of the Organizational Units.

    hello,
    I want to know if there is a way to send IDocs to a determain machine depending of the organizational Unit or their sub-tree objects.
    Imagine, I have 10 organizational Units (10 countries), and I want to send to each country without sending the modification to the rest os the other countries.
    I there a way I can do it?
    Thank yu very much in advance...
    PM

    Hi David,
    This can be done in the Mapping.. For this Java Mapping will be easier.
    First you need to read input xml document, and search for the Geography/Region.. And then gorup the similar one into the list etc..
    After this Mapping, you will be having one message for each Geography . For this you required to use BPM and in the BPM you can split the messages(1:N) mapping.. But it is still based on the target Structure. If you have many geographies, then it is not an idle solution..
    If you want to make your scenario as an Independent, then you can go with some workaround solutions like this. Output all the files into one folder in XI. And from XI execute an Shell Script, which will read the data and tarnsfer into required Geograhy/Person etc.
    So in this case XI part is almost independent. Only you need to maintain the SHell script..
    This is just my views
    Use SAX parser for the Java Mapping here..about Java mapping
    Java Mapping
    Java Mappings for XI
    Mark helpful answers
    Hope this helps,
    Regards,
    Moorthy

  • IDoc to Java -- not calling 'handleRequest'

    Hello,
    I try to send IDocs from SAP to a JCoIDoc.Server. I tried to use JCoIDocSample3.java out of sapidocjco-1.0.6
    IDoc goes out correctly, in my IDoc-Server the overriden method 'protected void handleRequest(IDoc.DocumentList documentList)' is never called.
    In method 'void dispatchRequest(Function function)' the following exception occures:
    com.sap.mw.idoc.IDoc$Exception: (2) IDOC_ERROR_METADATA_UNAVAILABLE: The meta da
    ta for the IDoc type "LOIPRO01" is unavailable.
            at com.sap.mw.idoc.jco.JCoIDoc$JCoDocument.<init>(JCoIDoc.java:326)
            at com.sap.mw.idoc.jco.JCoIDoc$JCoDocumentList.<init>(JCoIDoc.java:3072)
            at com.sap.mw.idoc.jco.JCoIDoc$Server.dispatchRequest(JCoIDoc.java:10267
    Can anybody help me with this problem?
    C. Stephani

    Hi,
    I'm trying to receive IDOc from SAP. I'm using JCoIDocSample3.java program. I'm not able to receive the IDoc from SAP. I'm getting the following message
    <b>Started MyIDocServer.
    MyIDocServer is listening now...
    Incoming IDoc list request containing 0 documents...</b>
    Can anyone tell me what is the problem... can anyone send me the sample code...
    Thanks in advance
    -Booshan.

  • Developing IDOCs with Java

    Hi Experts,
    I have a question. Is it possible to create an IDOC with Java (with informations of the Java Stack) and send the IDOC to the ABAP Stack?
    If yes, what do I have to do for it? Do anybody have some example coding for that?
    Thank you in advance!!!
    Greetings, Alexander

    Hello Alexander,
    These documents should be a good start.
    [SAP Java Connector|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/fcadaf90-0201-0010-4091-bd0bcd7b7f6a] (with IDoc API reference)
    [IDoc support for SAP Java Apps|http://help.sap.com/saphelp_nwmobile71/helpdata/en/45/2b9b0573434aa8e10000000a11466f/content.htm]
    Easwar Ram
    http://www.parxlns.com

  • Sending Idocs from SAP-R/3 to XI, bundle and map them to one XML-file

    Hi All,
    We need to send IDoc's (DEBMAS06) from R/3 to XI and  bundle and map them to a single xml-file. Please help us with your suggestions on how to proceed using a simple solution (probably need of BPM).
    Regards,
    Theo

    Hi Theo,
    there is an example in SAP Library: <a href="http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm">Collecting and Bundling Messages - One Interface</a>. Plz post us your detailed quetions.
    Regards,
    Udo

  • Getting error code 37 while sending IDOC via WE19

    Hello experts,
    I am facing a very unlikely error which is preventing me from testing my scenario.
    I dont have XI quality server and hence I am using my development server as both dev and quality. Hence I need to connect both dev and quality SAP R/3 system to my XI dev system. While I have done all the configurations in my XI and both SAP R/3 systems, its giving me error when i am trying to send IDOC from quality system.
    In quality R/3 i have done the following:
    1) Created RFC for my XI dev server
    2) Created port for this RFC
    3) Created partner profile adding all required IDOCS in the outbound parameters
    4) Created distribution channel for all the idocs
    In XI dev system i have done the following:
    1) Created RFC for both dev and quality of R/3
    2) Created port for both the RFCs
    3) Maintained the IDOC metadata for both the ports
    Now when I am pusing IDOC via dev of r/3 (we19) is working fine but when I am doing the same from quality of r/3 its giving me status code of idoc as 37 that says "An error was identified in the control record while adding an IDoc. The sender port SAPQTY_510 is invalid."
    But I have created this sender port SAPQTY_510 in my XI dev system and have also maintained the idoc metadata. I dont know why this error is coming.
    Can anyone please point out what mistake i have done or if i missed sometig as I am trying to connect 2 r/3 systems to one XI system.
    Its really urgent hence your help will be highly apreciated.
    Thanks,
    Yash

    hi yash,
    where you created SAPQTY_510 ,it should be created in R/3 Quality RFC destinations.
    In XI DEV create port like SAPxxx WHERE xxx is SID of quality system.
    actually we are getting confused.
    i guess you used same name SAPQTY_510 in quality R/3 and XI DEV .
    In error it says sender port SAPQTY_510  is invalid mean port of Source not XI DEV(receiver).
    just try to use some other name say SAPXXX_QUA and confirm the error.
    when IDOC is sent to XI DEV  ,port of  XIDEV  SAPQTY_510 has nothing to play any role .
    just check whether rfc destination of sender port (QUALITY R/3)you used is of type 3.
    so please check at which port error is coming.
    Thanks & Regards,
    Rama Krishna
    Edited by: rama krishna talluri on Mar 5, 2008 10:02 AM

  • Message SR 053 when i send idoc from SAp R/3 4.6C to PI 7

    Hi,
    I try to send idoc from SAP r/3 4.6C to PI 7. I had made  ALE configuration in my sender system ( SAP 4.6C) but idocs are not sent to PI. In SM58 i have message "Name or password is incorrect (repeat logon)". Yet i'm sure that user and password are correct because if i test RFC destination using SM59 , test is OK.
    Is somebody can help me ?

    Hi,
    In R/3 :
    my RFC destination is type 3 and point to XI. The port in the partner profile  point to this RFC destination. ( all seems good !).
    In Xi : i created a port and i load manually idoc in idx2 to be sure that RFC destination was OK. Nothing in IDX5.
    When i send idoc MATMAS using BD10 from R3 to Xi i have something very strange: first the message B1 038  "1 master IDocs set up for message type MATMAS" and just after
    the XI logon screen  appears !! Then message "1 communication IDoc(s) generated for message type MATMAS" and this idoc stay in SM58 with message "Name or password is incorrect (repeat logon)".
    Somebody can give me requires caracteristics for XI user used in R/3 RFC destination ?

Maybe you are looking for

  • Safari cannot find the internet plug in

    I have a new Intel iMac that initially had no problem surfing any web site. I now have a problem with any page that contains "shockwave". As and example when I try to got to www.autotoll.com.hk I get stopped by the following message... ++Safari canno

  • How can I install windows 7 in bootcamp from the install CD using superdrive

    Hey Guys. I'm a pilot and want to use flight simulator X which is a windows only program. So what I want to do is use bootcamp but when I go into bootcamp assitant I cant partion or install windows from the install CD its asking for a ISO file the fo

  • Main computer with itunes crashed and need to turn on itunes match

    Hello, My computer crashed and I need to turn on Itunes Match on that computer.  Is there any other way to turn it on from another computer?

  • Web Gallery in CS4

    I note that the useful Web Gallery for is no longer in CS4. I think that for the Photographer's community Adobe Lr has taken a good portion of their attention and includes the Web Gallery function on it. But Customize the Web Gallery in Lr adding htm

  • Alert Problem. Pls advice

    Hi Aall, I have made one alert Category. Initially Wwhen I do not check -- Suppress Multiple Alerts of This Rule  every time I was getting alert. But as I want one alert I check that box I am not getting any alert. Pls advice urgent Regards