Idoc specification

Hi
I am new to this forum.
I need to read and generate an idoc file in a Java application.
I am searching for documentations abuot idoc: cuold you tell me where to find the officiale Idoc specifications?
Second, are there any library (Java) that can generate Idoc files?
Thank you
Regards
Alberto

>
Bhakti Haria wrote:
> Hi,
>    I am a ABAP developer and have received a requirement for Writing Interface Specification. The requirement is as follows:
> There are 3 outbound master data idocs MATMAS,DEBMAS & BATMAS which need to be sent from SAP (client) to XI to Warehouse. These idocs will be received by the warehouse in xml format. I need to write a specification with mappings for the XI team to do the necessary conversion of idocs to xml format. I have managed to collect all idoc related data and fields required for warehouse.I have been provided with the template for writing the specification for XI team to proceed with conversion to xml.Please advise how should i proceed?
> If required, I can send the template to your email id.
> If any one can help me with writing the first spec, i would manage the rest.
> I simply need some sample spec to follow.
> If you have some sample spec, you can even provide it to me.Kindly help.
>
> Thanks & Best Regards,
> Tejas Savla
Hi Tejas,
IDocs are pulled from the SAP Back-end system onto the PI(XI) system in metadata form. You don't have to do the conversion explicitly, it is taken care! I guess your job will be done once you send the IDoc from SAP R/3 to PI (XI). It will be easy for you if you can pick up the metadata (nothing but IDoc in XML format) and try to map it with the XML that Warehouse is expecting just for the specification doc perspective.
Let me know if you need more help.
Thanks & Regards,
Anand Patil

Similar Messages

  • IDOC XML Parsing

    Hi Everyone.
    I've got some lovely XML IDocs.  I'd like to read them into the IDOC Class Library and send them to SAP with JCo..........
    But I can't get some simple code to parse the XML.  I've been sending XMLs to SAP for a long time and they were always valid in SAP.  They are also valid XML.
    I also borrowed the code directly out of the JCo documentation, so you'd think it would work.
    I'm using Java 6, IDoc Class lib 3.01.  I've also tried Java 5.  If I could parse the XML I would be using SAP 4.7 and JCo 3.01....
    I've used JDOM for creating my XML.  I've tried UTF-8 and ISO-8859-1 encoding.  The error doesn't change
    The error message i get is IDOC_ERROR_PARSE_FAILURE: Invalid charachter encountered in XML input data sourcee: state=EXPECTING_IMMEDIATE_TAG_END, charPosition=48, lineNumber=1, columnNumber=49, invalidChar=U+0053, sourceSnippet=...<?xml version "1.0" encoding="UTF-8"?>....
    Heres my function I'm using.
    (getRfcConnection is my own helper function to create a RFC Destination)
    The rest of it is really just copied + pasted from the documentation.
    public static void submitXml(Sap_Pruefziffer sap_pruefziffer, String language,String iDocXML)
        throws JCoException, CS_Rfc_Exception, AbapException, IDocParseException
            JCoDestination destination = getRfcConnection(sap_pruefziffer,language);
            IDocRepository iDocRepository = JCoIDoc.getIDocRepository(destination);
            String tid = destination.createTID();
            IDocFactory iDocFactory = JCoIDoc.getIDocFactory();
            //this would be great for re-implementing the OrderDataFactory
            //although that works just fine
            // a) create new idoc
            /*IDocDocument doc = iDocFactory.createIDocDocument(iDocRepository,"MATMAS02");
            IDocSegment segment = doc.getRootSegment();
            segment = segment.addChild("E1MARAM");
            // and so on. See IDoc Specification .....
            JCoIDoc.send(doc, IDocFactory.IDOC_VERSION_DEFAULT, destination, tid);*/
            // b) use existent xml file
            //get IDOC XML/IDOC Parser
            IDocXMLProcessor processor=iDocFactory.getIDocXMLProcessor();
            //parse the XML/IDOC
            IDocDocumentList iDocList=processor.parse(iDocRepository, iDocXML);//, IDocXMLFormat.SAP_RELEASE_610, IDocXMLProcessor.PARSE_WITH_FIELD_VALUE_CHECKING
            //send the XML/IDOC per RFC (our destination)
            JCoIDoc.send(iDocList, IDocFactory.IDOC_VERSION_DEFAULT, destination, tid);
            //not really sure what this does
            destination.confirmTID(tid);
    Thanks for your help in advance
    Martin

    Hi Martin,
    For the XML file processing we have to use XML Parsers, these are bit difficult.
    We got the same issue in our project, we written normal java code to parse the xml file.
    Do one thing, if the xml file is not big one then take the xml data into a string. parse the string based on characters < and >.
    Suppose we have xml data as below
    String str = "<emp>employee1</emp>"
    You have to get the string between >,<.
    Regards,
    Lakshmi Prasad.

  • Pb with simultaneous input Idocs

    Hi,
    When I receive an Idoc (specific), I have to control it and if it's ok, create a MM goods receipt + a SD delivery + a Goods issue for the delivery. It's working for always the same 3 materials.
    My problem is that sometimes, when I receive 3 or more Idocs in the same time, materials plant data are locked by the previous Idoc at the goods issue.
    So, I have added a lock just after controls with this function ENQUEUE_ESINDX and a DEQUEUE after creating the goods issue.
    But this lock seams not working. I tried to put waitings, but no more success
    Have u got any idea?
    Thanks in advance
    Dominique

    The inbound processing must be happenin through a FM if I m correct .
    In BD51 , you can decide the inbound processin mode of the Function module...
    whether ...
    it permits mass processing or single processing ....You select 1 ( Individual input )
    and then check
    Thanks
    Soumyadip

  • How to cancel/reverse an inbound idoc?

    I wish to cancel then reverse an inbound idoc specifically, WPUUMS01 (sales data compressed) as if the idoc never existed and wasn't processed in SAP.
    The said idoc was already processed in SAP and the material and billing documents (in WPER) were already created.
    Hope someone could help me on how to go about this.
    Thanks!

    hello ,
    may be u can try to look in for the concerned bapi and then delet tht record via tht bapi for e.g say to delete a create sales order demo code is -
    DATA: T_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
    DATA: BAPISDH1X LIKE BAPISDH1X.
    PARAMETERS: P_VBELN LIKE VBAK-VBELN.
    SET THE DELETION FLAG
    BAPISDH1X-UPDATEFLAG = 'D'.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = P_VBELN
    order_header_inx = BAPISDH1X
    tables
    return = T_RETURN
    COMMIT WORK.

  • Configuring IDOC Listener on MII 12.1

    Hi,
    I had a basic question around the configuration.
    This is from 12.1 help:
    "The SAP Java Resource Adapter (SAP JRA) server is used to connect to SAP ERP Central Component (SAP ECC) to receive remote function calls (RFC) and IDocs. You can use the asynchronous HTTP interface to post data to SAP MII for asynchronous transaction processing."
    In this regard is it mandatory to first configure SAP JRA on NW and then proceed with the IDOC specific config both on the R/3 as well as NW side?
    The reason I ask this is that we are currently struggling with this config on 12.1.8 (build 30) where the BASIS folks are observing that the system hangs when they try to add enteries to the XMIIIDOC component . Before going through with the IDOC config they made sure that the JRA is configured and followed the steps as mentioned in the 12.1 installation guide under "Configuring JRA for JRA Actions" & "Cloning the default JRA Config" sections.They are simultaneously also following up in the NW forums to find a solution.
    Additionally I had another question (this one's specifically for MIke Appleby ). Would one have to follow similar config steps as IDOC when configuring the RFC listener , atleast from the NW CE perspective? We are trying to download Control Recipes from R/3.
    Thanks
    Udayan

    Hi Udayan,
    Yes, the configuration for the RFC Listener is essentially the same as the IDoc Listener, except the binding is different (do not change either type from the default values and you should be fine).
    The differences between the two Listener types are really on the ECC side.  The installation instructions for Batch Manufacturing included the RFC Listener setup.  Keep meaning to write a separate document for RFC Listeners, but haven't yet.
    One general note of caution for all readers:
    Do not reuse ProgIDs from an IDoc Listener in an RFC Listener and vice versa.  Only use a unique ProgID once (and deleting them from one Listener or MII server to use them elsewhere is generally not advisable). 
    Roughly 90% of the tickets entered for IDoc Listeners with MII are because of ProgIDs used in more than one place.
    Regards,
    Mike

  • IDOC_TO_FILE ALEAUDIT message SPLIT

    Hi, 
    1.   I am sending an IDOC from R3 to XI.
    2.   In XI IDOC splits in to 2 messages
    3.   XI sends the 2 messages to 2 File systems(FTP).
    4.   NO BPM,  tried on SP19 / SP20,
    5.    Expected 2 ALEAUDIT messages back to R/3
    Problem:
        ALEAUDIT messages are not reaching the R/3.
    Additional Info:
      1. I dont have any problem in receiving ALEAUDIT message in IDOC_XI_FILE scenario with out message split, means one receiver. Problem is with message split and 2 receivers.
    Thanks in advance.
    Moni

    Hi Moni,
    Please check following points -
    1. Do you get any error in SXMB_MONI transaction in XI? Whats happening to the response messages there? Are you able to see any entry in SXMB_MONI for that?
    2. Also ALEAUDIT idoc only allows few statuses not all. It will be worth checking which status is being passed back to R3. (This will not be relevent in you case as the scenario works without message split...)
    3. Check if you have set up partner profiles correctly and corresponding parter number is set in Idoc specific attributes in adapter channel.
    Hope this helps.
    Rahul.

  • PI Message Map - useOneAsMany issue with more than 10 lines.

    I am having an issue using 'useOnAsMany' .  I am using this to map lines of text from an idoc, specifically the SHPMNT04 idoc.  When there are more than 10 lines of text (i.g. 10 occurances of E1TXTP8) the sytem drops everything after the 10th line.  When I check the context of the fields it appears all occurances are being mapped however when I execute the map it drops the text after the 10 line.  Is this a bug?  Has anyone seen this and know of an answer?
    I am using 'useOneAsMany' with E1TXTH8-TDID as the first argument and E1TXTP8-TDLINE as the second and third arguments.  I am simply moving all the text when TDID = Z001.

    Hi Busse,
    Can you check the occurence of the target field to which you are mapping? If it is 0..10 then you will only 10 lines in outupt, else it should get populated.
    Regards,
    ---Satish

  • XML-comments not allowed in IDOC_AAE-Adapter?

    Hi,
    we have a File to IDOC scenario and are using the IDOC_AAE adapter for sending IDOCs to the SAP system.
    In our mapping we have added some comments into the XML-IDOC-structure.
    By sending the document to the SAP-system we are getting the following error:
    MP: exception caught with cause
    com.sap.aii.af.idoc.exception.IDOCAdapterException: Error before sending due to
    idoc parsing error: (7) IDOC_ERROR_PARSE_FAILURE: Invalid XML 1.0 character
    encountered within IDocXML for type <INVOIC01>:
    state=READING_FIELD_STARTTAG, charPosition=872, lineNumber=23, columnNumber=14,
    invalidChar=U+0021,
    sourceSnippet=...RCY>^~~~<KUNDEUINR>DEXXXXXXX</KUNDEUINR>^~~~<BSART>INVO</BSART>^~~~<!--
    ZIM_IDOC_RBU_HEAD_S -->^~~... ^
    The problem seems to be the <!-- - Tag in the structure.
    But the ! (U+0021) is a correct XML 1.0 character. I don't know why the IDOC-XML parser throws this exception.
    Does anybody have an idea what the problem is?
    When we remove the comments the IDOC could be sent successfully to the SAP system.
    Are only IDOC-specific characters allowed here, no comments and no other XML-specific characters and structures?
    This would be very strange.
    Thanks for your answer.
    Regards
    Thorsten

    Hi Anoop / Ilayarajan,
    Could you please post the solution for this error. When I provision a user to PeopleSoft, I am getting similar error: com.waveset.util.WavesetException: An error occurred adding user "userID' to resource 'PeopleSoft Component Interface'. com.waveset.util.XmlParseException: XML Error: 1:1: Content is not allowed in prolog.
    Thanks
    User_idm

  • Transfer of SAP FICA summary records to SAP FI through FIDCCP02

    Hello,
    I am looking at transferring SAP FICA data to SAP FI. I am aware that a standard idoc FIDCCP02 should be triggered when FPG1 is used. I would like to know if there are any idoc specific settings that need to be carried out for the summary records to be posted into the idoc. Appreciate if you can shed some light on this.
    In anticipation of a prompt response,
    Regards,
    Sameer Aroskar

    Hi Sameer,
    Following configuration needs to be in place for ALE Set -Up (in sequence); hope this help u, please take the help of technical team for PORT set up.
    1.     IMG > IDoc Interface / Application Link Enabling (ALE)> Basic Settings > Logical Systems> Define Logical System
    2.     IMG > IDoc Interface / Application Link Enabling (ALE)> Basic Settings > Logical Systems> Assign Logical System to Client
    3.     IMG > IDoc Interface / Application Link Enabling (ALE)> Communication> Create RFC Connections
    4.     SAP menu> Tools> ALE> ALE Administration> Runtime Settings> Port Maintenance
    5.     IMG > IDoc Interface / Application Link Enabling (ALE)> Modelling and Implementing Business Processes> Maintain Distribution Model and Distribute Views
    6.     IMG > IDoc Interface / Application Link Enabling (ALE)> Modelling and Implementing Business Processes> Partner Profiles> Generate Partner Profiles
    7.     IMG > IDoc Interface / Application Link Enabling (ALE)> Modelling and Implementing Business Processes> Global Organizational Units> Cross-System Company Codes
    8.     IMG > Financial Accounting (New)> Financial Accounting Global Settings (New)> Tax on Sales/Purchases> Basic Settings> India> Activate Country Version India for Specific Fiscal Years
    9.     IMG > Financial Accounting (New) > Financial Accounting Global Settings (New) > Document> Document Types> Define Document Types for Entry View
    10.     IMG > Financial Accounting (New) > Financial Accounting Global Settings (New) > Document> Document Number Ranges> Documents in Entry View> Define Document Number Ranges for Entry View
    11.     IMG > Financial Accounting (New) > Financial Accounting Global Settings (New) > Contract Accounts Receivable and Payable> Integration> General Ledger Accounting> Define Posting Specifications for General Ledger Transfer
    12.     IMG > SAP NetWeaver > Application Server > IDoc Interface / Application Link Enabling (ALE) > Modelling and Implementing Business Processes > Global Organizational Units > Cross-System Business Areas

  • IDOC_INPUT_HRMD error

    Hi All,
    I would like to ask if any of you experienced a problem about transferring ALE/IDOCS specifically from HR box to CRM box? On our system we use pfal transaction to transfer data from HR to CRM. But the problem in here is that there are some employee data which are overwritten by a previous data transferred.
    I often see this occurence when a certain employee (A) become a withdrawn, then the next employee's (B) name will be changed to the name of this withdrawn employee. Take note that B's update in hr was only IT0000.
    Is there a SAP Note about this kind of issue? I already checked the user exits that we are using but it unly updates our Z-fields not the SAP fields.
    I'm hoping that anyone of you could answer this issue.
    Regards,
    Marc

    You are not using the right process code.
    In partner profile - in message type
    u will see the process code to which a function module is attached,
    for ur message type, this is not the right function module.
    Regards
    Manu

  • Can we use IDOC_INPUT_ Message type for creating and changing the document

    Hi,
    I have a requirement to create or change the requisition data.
    Can I use IDOC_INPUT_PREQCR01 function module for both the purpose.
    OR shall I go for custom function module by using BAPI function modules to create or change the data.
    Please help me in this regarding.
    Answers will be rewarded.
    Thank you.
    Eswar

    Hello Eswar
    You could use the IDoc processing function module if you had the data already available in the IDoc specific format (which is unlikely). This would mean you are receiving the IDoc data from another SAP system.
    Instead, check the BAPI explorer (transaction BAPI) if you can find an appropriate BAPI.
    Regards,
      Uwe

  • How to block the status mail for an inbound Idoc to a specific user

    Hi,
    I have to stop sending the error status mail to a specific user depenidng on Partner Type. This will trigger when an inbound Idoc contains status error(message type INVOIC &ORDRSP).This user needs other mails which are getting triggered with the same Idoc for the same partner. Basically, the requirement is to block only the status mail for that user. The statndard task for this is TS70008125 and it uses the agent determination rule 30000001 (Idoc Administrator).in WE46, this task is assigned to process code EDIR. I have copied the task to a custom task and changed the agent determination rule. I would like to know how will I configure this task so that this custom task will trigger for the status error, without altering other workflows for the same message type & the partner type. Or is there any other way to block the mail?
    Thanks,
    Santosh

    Hi,
    I have done the required coding to exclude the specific agent from the rule,copied the task and its ready. My question is how do I map this custom task to a particular partner type, for the message type INVOIC in WE20? (The message type used for the inbound Idoc is INVOIC). I checked the Partner profile in WE20. Most of the process code is using function module as the processing type.
    Thanks,
    Santosh

  • IDOC to FILE Scenario-Error in defining Adapter specific Identfier

    Hi All,
    I am configuring IDOC to FILE scenario where IDOC will be send from ECC to PI System.I did following configuration
    I created RFC,PORT,LS and Partner Profile on R/3 System. I had maintained SLD and IR. In ID I created Configuration scenario and business system.When I click on menu->Adapter specific Identfier where I want to specify IDOC Adapter and RFC Adapter. But it is not allowing to edit it is not editable. As we provide LOGICAL SYSTEM,sender system ID and client number of the sender system.

    Hi Kavi,
    I assume you correctly filled the Logical System of your Business System in the SLD...
    Then in Integration Direction, use menu "SLD clear cache".
    Always in Integration Direction, open your Business System, go to menu "adapter specific identifier", and... close to button "close", you should have another button like something ''check'' or "compare to SLD' or ''retreive SDL data'' (I have not an openned PI to check the right term). Use this button to get value stored in SLD to this local definition.
    Mickael

  • Problem with specific idoc

    Hello
    i developped a flow between a BW sytstem to an EBD system via XI. in EBD the message should be integrated in a specific IDOC linked to a message and a MF.
    IDX1 and IDX2 are customized in XI
    In the receiver system partner profiles and distribution model are customized too.
    However,when i test i have a red flag in moni with this message  :
    <SAP:Code p1="Meta data EDISDEF for port SAPEBD, IDoc type ZIDOC_POTEST and CIM type not maintained" p2="" p3="" p4="">IDOC_ADAPTER.METADATA</SAP:Code>
    has someone got an idea please ?
    is it possible to use a specific idoc with xi ? 
    thanks in advance
    Cédric

    Nothing new for the moment... two weeks until next job...
    next monday 7h30 am oberkampf with jéjé
    if you want?

  • Query on IDOC Ack (STATUS) config in XI for a specific partner comm.

    Hi Experts,
    Is it possible to configure the IDOC Ack (STATUS.SYSTAT01 message) in XI for a specific partner communication? We want to configure our system like ALEAUD but the message type should be STATUS.SYSTAT01 and the acknowledgment should be send to sender system for a specific partner only if XI receives any IDOC like (Orders) from that specific partner. For other partners (same sender system) we donu2019t want this acknowledgment settings and configuration. If possible please provide the configuration filters steps etc. Thanks for your valuable inputs in advance.
    Thanks,
    Satish
    Edited by: Satish Jaiswal on Jan 8, 2009 2:55 AM

    Hi Husain,
    I have the document you have mentioned. Please note my requirement is to filter the Ack while creating and sending to R/3 based on Partner and Message type. The document provides info only on Message type filter but not parner specific for same sender system!!! Any help appreciated. Also note: BPM and Alert is out of scope.
    Looking for  some ALE configuration tricks to achieve this.
    Thanks
    satish
    Edited by: Satish Jaiswal on Jan 9, 2009 2:40 AM

Maybe you are looking for