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

Similar Messages

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

  • Trying to send Idoc using Standard Outbound Processin option

    Hi friends
    i created a IDoc  using the Link
    SAP Menu->Tools->Bussiness Communiation-> IDoc Basis -> Test -> Test Tool
    I selected an Idoc of Type MATMAS
    and clicked Standard Outbound Processing , i gave the receiver port , Partner Type(LS) and Partner No. this port is basicall connecting to XI system , and my intention is to send an MATMAS Idoc to XI .
    But once i click Standard Outbound Processing , it throws a dialog saying <b>" Idoc 00000000001900024 was saved but cannot or should not be sent"</b>
    what might be the reason . kindly reply if you know how else do i send a MATMAS IDoc fro R/3 to XI

    Hi,
    have a look at this weblog first:
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    it shows how to post an idoc to XI
    you need:
    1. WE20 (for matmas) in your R3
    2. rfc dest to XI from your r3 (SM59)
    3. TCODE IDX1 in your XI with parnter number 
    also have a look at dosuments section
    on the XI FAQ page (below)
    for many idoc weblogs
    https://websmp207.sap-ag.de/~sapdownload/011000358700001410142005E/Configure.pdf
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • 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

    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_ASYNCHRONOUS.convertTablesToIDoc(RFC_IDOC_INBOUND_ASYNCHRONOUS.java:2005)
    at rFC_IDOC_INBOUND_ASYNCHRONOUS.RFC_IDOC_INBOUND_ASYNCHRONOUS$IDOC_INBOUND_ASYNCHRONOUS.marshal(RFC_IDOC_INBOUND_ASYNCHRONOUS.java:1969)
    at SAP_BAPI_TRFC_JCE2.Collaboration_1.IDOC_INBOUND_ASYNCHRONOUSReceive(Collaboration_1.java:10)
    at SAP_BAPI_TRFC_JCE2.Service1.Collaboration_1_Runtime_Handler.handleRequest(Collaboration_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.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.stc.is.ejb.slsb.StatelessSessionContainerService.invokeEJBMethod(StatelessSessionContainerService.java:262)
    at com.stc.is.ejb.BaseBeanContainerService$ContainerInvocationChainListener.perform(BaseBeanContainerService.java:1038)
    at com.stc.is.listener.TransactionInvocationChainListener.perform(TransactionInvocationChainListener.java:236)
    at com.stc.is.listener.PoolInvocationChainListener.perform(PoolInvocationChainListener.java:85)
    at com.stc.is.listener.JNDIInvocationChainListener.perform(JNDIInvocationChainListener.java:67)
    at com.stc.is.listener.IIOPInvocationChainListener.perform(IIOPInvocationChainListener.java:62)
    at com.stc.is.listener.InvocationContextInvocationChainListener.perform(InvocationContextInvocationChainListener.java:59)
    at com.stc.is.listener.SecurityInvocationChainListener.perform(SecurityInvocationChainListener.java:195)
    at com.stc.is.ejb.BaseBeanContainerService.invoke(BaseBeanContainerService.java:457)
    at com.stc.is.proxy.ContainerInvokerService.invoke(ContainerInvokerService.java:365)
    at com.stc.is.proxy.GenericProxy.invokeContainer(GenericProxy.java:329)
    at com.stc.is.proxy.LocalStatelessSessionProxy.invoke(LocalStatelessSessionProxy.java: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_ASYNCHRONOUS.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

  • 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

  • Idoc not recive while sending using program & SEND IDOC IMMEDIATELY in we20

    <b>i am sending idoc using program</b> - with function master dat distribute function,
    now if i set SEND IDOC IMMEDIATELY in outbound message in we20 'partner profile' than idoc get status 03 but at reciver end idoc not found with any status.
    if select collect idoc immideatly than work properly.
    what precaution needed while sendig idoc throug send idoc immideatly with Program,
    regards,
    r p.

    Hi rp,
    when using SEND IDOC IMMEDIATELY in outbound messge, the packet size should be 1 and use start subsystem option.
    Thanks,
    Rajeev Gupta
    Message was edited by:
            RAJEEV GUPTA

  • Using JCo : IDoc to XML and XML to IDoc

    Hey guys,
    I need some guidance on Creating an xml file out of an IDoc using JCo and vice versa.
    Can anybody please provide with the code samples or any kind of documentation on this topic.
    Points will be rewarded
    +| Eleana West

    Hi,
    what you are looking for is the sapidocjco.jar. You can get if from the service marketplace and it comes with a couple of example Java code which shows how to implement it. You will also need the normal JCo jar to use the sapidocjco.jar.
    Bye,
    Sameer

  • Send IDoc to Multiple Ports

    Hi,
    I have a custom IDoc message type YYY17101[Custom Type]. I need to send IDoc using this message type to 2 different rfc destination. The two RFC are
    1. SAP R/3 system
    2. XI system
    My question is which partner profile type i have select to send IDoc using message type YYY17101.
    Can i use partner profile type LS for sending IDoc to SAP R/3 and Partner pofile type US for XI system?
    Thanks
    aRs

    Hi aRs,
    Your challenge is in fact not so very difficult.
    First you define both R/3 and XI as an LS-type partner in your system, since both systems need to receive a message from your target system.
    Then you must use transaction BD64 to create a modelview (or choose in SALE the path Modelling and Implementing Business Processes --> Maintain Distribution Model and Distribute Views).
    Create your own NEW model.
    Use Add message type to add your specific message and supply your own LS system as source and the first target LS system (R/3).
    Use again Add message type to add again your specific message and supply your own LS system as source and the second target LS system (XI).
    If you view your model you will see ONE source system (your own) and TWO target systems (each with the same message below it).
    You can add filters to the message (to prevent incorrect messages to be send) if these are defined in your own IDoc.
    Now you can distribute this model to the target systems (in the menu choose: Edit --> Modelview --> Distribute.
    If the partners in question can be reached this goes OK.
    If all went well, go to the target systems and start transaction BD64 and select the model there. Then choose from the menu: Environment --> Generate partner profiles.
    At this point your ALE customization is complete and communication has been setup.
    So as you see, it is possible.
    Regards,
    Rob.

  • Send an IDoc over JCo

    Hi,
    I'm a newbie and I'm wondering if its possible to send an IDoc with the JCo to the SAP-System.
    It's a work for university, but nobody here has any experiences with SAP.
    I've got a Mini-WAS 6.20 Testsystem (the one with the Flightbooking example on it). I have an IDoc (with an order) generated from an java application.
    My part is to get this IDoc in this SAP-System. Only get it somehow stored, thats all. No checking if order is somehow valid, concerning availability or whatever.
    Question:
    - Can I send an IDoc with JCo?
    - In order to store this IDoc, can a BAPI (or whatever other possibilities there are) do the "storing" for me?
    - What else must I configure?
    - Is there a good tutorial for my problem?
    Any suggestions are very welcome, since I need a starting point.
    Thanks
    Jonny

    Hi, Johannes!
    <b>- Can I send an IDoc with JCo?</b>
    Yes you can. All you need is SAP Java IDoc Class Library.
    <i>
    The SAP Java IDoc Class Library consists of two parts, the SAP Java Base IDoc Class Library and the SAP Java Connector IDoc Class Library.
    The packages of the SAP Java IDoc Class Library include the software as well as documentation. The SAP Java Base IDoc Class Library provides an API which helps navigating, reading, filling, and modifying IDocs. This base package is middleware independent. Creating, sending, and receiving IDocs is middleware dependent. To make use of the SAP Java Base IDoc Class Library you will need an additional middleware dependent add-on package implementing the defined interfaces like the SAP Java Connector IDoc Class Library. In the package of the SAP Java Connector IDoc Class Library examples are included.
    The Windows NT / 2000 Ports of the SAP Java IDoc Class Library are shipped as zip files. The Unix Ports of the SAP Java IDoc Class Library are shipped as tgz files.</i>
    <b>- In order to store this IDoc, can a BAPI (or whatever other possibilities there are) do the "storing" for me?</b>
    Storing of IDoc is performed on the receiving part - system does it automatically.
    <b>- What else must I configure?</b>
    You have to set up logical destination for JCo partner as well as inbound partner profile for corresponding IDoc message type.
    <b>- Is there a good tutorial for my problem?</b>
    Working examples and java docs included in SAP Java IDoc Class Library distribution is a good starting point.
    Regards,
    Maxim.

  • Is it possible to use BAPI-ALE to send an idoc using the message control?

    Hi Guys
    Is it possible to use BAPi-ALE to send an IDOC using a message control?
    I have configured the system to send an IDOC when a outbound delivery is saved in the system.
    I have done the following.
    1). I am using the std BAPI-ALE interface provided by the object type LIKP.
    2). I am using the method SAVEREPLICA for which an interface already exists in BDBG transaction.
    3). I hace created a distribution model in BD64 and added the BAPI - LIKP and SAVEREPLICA
    4). Created a partner profile ( using the generate partner profile option in the BD64 transaction )
    QUESTION:
    1). How do i associate the custom OUTPUT type created for Delivery ?
    2). I tried to associate the custom output type in the Partner profile definition under the message control tab but i am not sure which Process code to be used? Since the partner profile was generated automatically from BD64 it has an entry for SHP_OBDLV_SAVE_REPLICA as a message type in the outbound parameters. and i am unable to find a process code for this Message type in WE41. So what process code should i use in the Message control tab against the custom output type?
    3). Do i need to leave the message control tab empty without making any entry? If yes then how would the system come to know that it needs to trigger this partner profile when the custom output type is proposed by the system?
    will award points for useful answers
    Edited by: Workflow  learner on May 29, 2008 8:49 PM

    "any way"
    Applications such as ScreenRecycler, http://www.screenrecycler.com/ScreenRecycler.html, can do it.

  • Problems with sending IDocs into R/3 using BPM

    Hi Vishnu,
    as I have read the forum, you have experience with sending IDocs into R/3 from XI using the BPM.
    Did you have problem, that this sending takes very long time?
    My BPM splits the xml, sends IDoc into R/3 immediately, but the processing of the 2nd IDoc takes 6-10 minutes!
    Do you have any idea, what could be wrong?
    Thanx 4 answer, Peter

    Vishnu, I was discussing this problem in another thread, but no helpful answer was sent, and I have read, that you have experience, so - just for explanation
    Well,
    yes, this situation is really strange.. New facts are:
    when I send into XI XML, which is splitted in the BPM only into 1 IDoc, it is processed immediately. When I send there XML for 2 IDocs, the first is processed immediately, the 2nd starts immediately, but end of process is after 6-10 minutes, it depends... Then I tried to send there XML for 10 IDocs - and now attention please! 5 of them have been processed almost immediately, 5 of them after 8 minutes...  The last test was with 16 items - 6 processed immediately, 10 after 10 minutes...  And all these 10 minutes was my 4 processor XI box unavailable, with over 60% load... But finally the IDocs arrive!!
    Any explanation???
    This is really unbelievable situation!
    Port name is SAPDEV, rfc destination DEVCLNT100
    Actually, when I was creating the scenarion using the wizard and trying to add my communication channel(IDoc type) to receiver agreement, I got error - communication channel is not configured correctly, use another one. But somewhere I read, that I should create the receiver agreement manually. So I did.
    To my BPM:
    -receive MSG
    -switch (but I'm testing only one branch now) - and the MSG message is always passed here, it's ok
    -then I have transformation to MultiMSG (message with multiple DATA for multiple IDOCS)
    -then comes the split mapping Multi2SingleMSG
    -then ForEach Block with sending the Single MSG
    this is the end of the BPM, and outside the BPM comes the mapping Single2IdocMSG and sending the IDoc into R/3
    before I had the Single2Idoc mapping in the BPM, but thought, that this could be the bottleneck, so moved the mapping after the BPM... It didn't help...
    So, what do you say?
    Peter

  • Send idoc to SAP using FTP

    Hi All,
    The below mentioned is my requirement:
    From legacy system need to send idocs i.e..
    Flat File --> Data services --  via ftp -->SAP
    Material master date is available in the file file.I have to fill the idoc matmas using the data services and send it to sap.
    So in order to achieve this I have performed the below mentioned steps:
    1.Created data store and Imported the idoc matmas from sap(All types of configurations are done)
    2.created datastore for flatfile
    3.mapped the fields in flatfile to idoc in dataflow.
    Now here are the show stopper's for me:
    1.How to send this filled idoc through ftp?
    2.How to extend the idoc in data services?(if an indicator in flat file is  '1' then I have to extend the material to all the plants available)
    Please share ur inputs.
    Thanks,
    Ugandhar

    Ricky,
    Is it ok if you can schedule your file adapter for every 1 hour. If yes then see this weblog:
    /people/shabarish.vijayakumar/blog/2006/11/26/adapter-scheduling--hail-sp-19-
    But what I see is one disadvantage. If you send Idocs from R3 it will reach to XI and will stay in XI till the adapter process it.
    One other option is collect the Idocs in R3 and send to xi.
    ---Satish

  • UOM Conversion while sending IDOC's using EDI

    Hi ,
      We are sending PO's using EDI and we want to convert the UOM while sending IDOC.
      EX:-   FT = FOT, VOL = VO
      Is there any config.
    Thanks in advace,

    No.. I am using the standard function module.
    We can cretae converion rule using SALE transaction for ALE.
    SALE> Modeling and Implementing Bus Procc> Convert Data Between Sender and Receiver..-->
    Like this do u we have any Config.. or shall I handle the conversion in the Customer exit ..

  • Why IDoc Sender Channel Used in Outbound Scenario's

    Hi Team,
    In my outbound scenario's ,I never used IDoc sender channel.Only ALE settings I have configured..PartnerProfile,RFC dest,Port etc.
    Why can we use Idoc Sender channel? Is it only used for IDocFlat file format OR for normal Idoc's also? If we use Idoc sender Channel , how it is processing - Is it TRFC queues-sm58 ?
    Can you give me clear idea on it / suggect any blogs.
    Thanks.
    Drumi

    HI,
    In my outbound scenario's ,I never used IDoc sender channel.Only ALE settings I have configured..PartnerProfile,RFC dest,Port etc.
    Why can we use Idoc Sender channel? Is it only used for IDocFlat file format OR for normal Idoc's also? If we use Idoc sender Channel , how it is processing - Is it TRFC queues-sm58 ?
    we dont necessary to create Sender Communication channel for IDOC and Proxy and http because xi and sender systems(out bound) resides on abap stack and also dont need for any idoc.
    The reason is that R/3 can directly send Idocs to XI via ALE layer using RFC destination specified in SM59.
    This IDoc after reaching XI is converted in IDoc-XML. This is done when we specify IDoc metadata IDX2 in XI. It is then used in IR for mapping.
    Now for the receiver side, when IDoc-XML is created after mapping program run is sent to R/3. Before that, it has to
    be converted into IDoc. This conversion is IDoc-XML to IDoc is done by IDoc Receiver adapter.
    one case we need to create sender IDoc Communication channel for IDOC packaging concept thats all.
    thanks,
    Edited by: bhavanisankar.solasu on Dec 16, 2011 7:12 AM

  • How To use External Message To Send IDOC From XI To R/3

    we need to split one source message to several IDOC To
    R/3,But Standard Imported r/3 idoc contains only one idoc per message,so we export the standart idoc to a
    xsd file and change it to a  multi "IDOC" segment structure and import back to xi again,after that,we create a message interface use the imported
    message type and use it to send IDOC to r/3 via idoc adapter,but at the "call atapter" step it gernarate a
    error:"Unable to interpret IDoc interface MI_IDOC_IN".
    what we should pay attention to when use external message
    to send idoc to r/3?
    (when use the imported idoc message to send  single idoc per message,it is no probelm)
    thx

    The way this works is:
    1. In your Message Mapping use the External WSDL defintion that you loaded after tweaking the "IDOC" Occurance.
    2. Then in your INTERFACE MAPPING use the orginal IDOC Name that you imported from R/3.
    3. Use the original IDOC Name in Integration Builder too.
    This should work.
    Thanks
    Ashish

Maybe you are looking for