Wrap IDoc into Envelope or dismiss Envelope

Dear all,
I have the following scenario: SOAP --> PI --> IDoc.
The entry payload in RXMB_MONI looks like this at the moment
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
     <SOAP-ENV:Header/>
     <SOAP-ENV:Body>
          <YP4TENCO>
               <IDOC BEGIN="1">
                    <EDI_DC40 SEGMENT='1'>
                         <TABNAM>EDI_DC40</TABNAM>
                         <DOCNUM>XXX</DOCNUM>
                         <DIRECT>2</DIRECT>
                         <IDOCTYP>YP4TENCO</IDOCTYP>
                         <MESTYP>YP4TENCOINPUT</MESTYP>
                         <STDMES>YP4TENCOINPUT</STDMES>
                         <SNDPOR>XXX</SNDPOR>
                         <SNDPRT>XXX</SNDPRT>
                         <SNDPRN>XXX</SNDPRN>
                         <RCVPOR>XXX</RCVPOR>
                         <RCVPRT>XXX</RCVPRT>
                         <RCVPRN>XXX</RCVPRN>
                         <CREDAT>20120305</CREDAT>
                         <CRETIM>083702</CRETIM>
                         <SERIAL>XXX</SERIAL>
                    </EDI_DC40>
                    <YP4TENCOINPUT SEGMENT="1">
                         <JOBID>XXX</JOBID>
                         <DATUM>20120305</DATUM>
                         <UZEIT>083702</UZEIT>
                         <UNAME>XXX</UNAME>
                         <NAME1>XXX</NAME1>
                    </YP4TENCOINPUT>
               </IDOC>
          </YP4TENCO>
     </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I get the following error in Message Mapping in SXMB_MONI:
com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_MM_YP4TENCO_TO_Yp4tencoinput_: RuntimeException in Message-Mapping transformatio~
In trace I can further track down the error to not being able to create the BEGIN structure of the IDoc:
com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /YP4TENCO/IDOC/BEGIN. Queue does not have enougth values in context. Target xsd requires a value for this element but target field mapping does not produce one. XML instance is not invalid for source xsd, or the target field mapping does not fulfill the requirement of the target xsd.
If I test the message mapping in IR withouth the SOAP envelope everything is working fine.
My questions are:
1. At the moment the sender soap communication channel has "do not use soap-envelope" checked. Would it suffice to uncheck "do not use soap-envelope" to make this working?
2. If not, how would I set up Mapping in IR the most efficient way? I have the Idoc already imported and now would need to sort of wrap the SOAP-Envelope around this IDoc structure. Is there an efficient way to do this (maybe with data type enhancement or external definition)
Thanks and kind regards
Jens

Hi all,
ok, I did the following:
First I removed the interface (operation) mapping from the interface determination. At that stage the sender soap communication channel did not have the "do not user soap-envelope" checked. At this time I could not see payload in the entry message in SXMB_MONI. There is header and body but no payload.
The resulting error message then was:
Message 355F1797678D11E1CF710000007558D2 does not contain an IDoc as its payload and therefore cannot be processed
Then, second, I did check the "do not user soap-header" again (this was the very initial setting of the CC). After doing this I got the following error message stating that the now delivered SOAP header does not resemble an IDoc.
The resulting error message then was:
Error: MSGGUID FA607498679111E1CF9C0000007558D2: Tag HEADER found instead of tag IDOC BEGIN
So it seems for me that without "do not use soap-header" the payload is not being sent to mapping engine. If "do not use soap-header" is checked, payload is being sent, but with the SOAP envelope which will give me mapping errors when having no mapping in place like Grzegorz suggested.
My SOAP sender communication channel has XI Default Parameters urn:sap-com:document:sap:idoc:messages YP4TENCOINPUT.YP4TENCO and und tab "module" the module name "sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean" and module type "Local enterprise bean" with module key "soap" as one and only entry.
5. What could cause the behavior that checking / unchecking the "do not use soap-envelope" resulting in seemingly dropped payload
6. Where could I, assuming that the sender is sending steadily with soap envelope see the payload if "do not use soap-envelope" is unchecked in sender communication channel.
Thanks a lot all
Kind regards
Jens

Similar Messages

  • Detecting changes in address in a smartform to allow sorting into envelopes

    Hello,
    We have a sorting machine which can place hardcopy invoices into envelopes, placing several invoices into 1 envelope as long as the billing address is the same.
    To achieve this, we need to print a mark on some invoices to indicate that the current invoice is the last for the current envelope and the next invoice (with a different address) will be placed into a new envelope.
    Is it feasible to somehow find the address of the next document to be printed?
    We have a simple setup:
    RSNAST00 calls our own copy of RLB_INVOICE passing the current invoice in the NAST table. A smartform is then called to print out the invoice.
    I am not sure if this is something that can be done via logic in the smartform or if it means an ABAP change. Any advice greatly appreciated!
    Thanks,
    Stuart.

    Hi
    You don't need to use IMPORT/EXPORT parameter:
    If the many invoices are printed in the same session, all data of previous invoice are available for the next one:
    A routine to clear all global data is placed at the beginning of the program in order to solve this "problem":
    So you need to have a gloabal varianble where to check the previous address and check it with the current one.
    This control should be done in the program, not in the smartform, and it works fine if the invoices to be printed are correctly sorted before printing them.
    The problem could be this solution can see when a new envolope starts only, i.e. it can't understand when the last invoice cames
    Max

  • Unable to import IDoc into IR

    Hi - For no reason i can't import the IDoc into XI.
    The problem seems to be that in backend system is a problem. The basis-type and the segments are all released - to me because i released and de-released them. The Idoc was developed in client 010 and i want to import ist from 011 - of course there was some kind of transport!
    In WE20 of backend system i am not able to pick this IDoc for Incoming parameter, no idea why.
    In XI i am able to import MetaData via IDX2 but i am still not able to import the IDoc!!
    can somebody help?! br Jens

    Hi,
    1 Scenario
    This guide deals with all the configurations required to create an IDoc adapter in Exchange Infrastructure
    3.0 to send an IDoc from XI to the SAP backend system.
    Unlike other types of adapters, the IDoc adapter has dependencies on the XI 3.0 ABAP configurations and
    the backend SAP system configurations. Those configurations information will have to be either created
    first or retrieved in order to complete the IDoc adapter configuration.
    2 Introduction
    Configuring IDoc adapter in Exchange Infrastructure 3.0 requires some configuration on the SAP
    systems, for both XI and the backend system where the IDoc message is to be sent. These steps, although
    simple, are many times missed or mis-configured, causing the delivery of messages to fail.
    Since IDoc adapter uses the ABAP stack, instead of J2EE, the configuration requirements are mainly in
    ABAP.
    Setting up IDoc adapters requires the XI integration server to be able to communicate with the backend
    SAP system, and also to make sure that the Logical System Name used when posting IDoc exists on the
    backend SAP system.
    3 The Step By Step Solution
    The basic steps for the IDoc configuration are outline below:
    1. Configure SM59 on XI to communicate to SAP backend system.
    2. Configure port on XI for IDoc communication.
    3. Create or verify the Logical System Name on the SAP backend system.
    4. Create or verify business system in XI’s System Landscape Directory.
    5. Verify the Logical System Name of the business system.
    6. Verify or add the Logical System Name for the sender business system.
    7. Create/configure the Communication Channel for the IDoc receiver adapter
    3.1 Configure SM59 on XI to communicate to SAP backend system.
    1. Using transaction SM59, create an RFC destination with Connection Type = “3”.
    In this example, the RFC destination name is “NDVCLNT510”.
    2. Enter the logon information:
    3. Test the connection by clicking on “Testing connection” and “Remote logon”.
    Both must be successful.
    3.2 Configure port on XI for IDoc communication.
    4. Go to transaction IDX1 on XI, and create a port. In this example, the Port name is “SAPNDV”.
    •     &#61472;The Port name must be in the form of “SAPxxx”, where xxx is the system ID of the backend SAP
    system.
    •     The Client must be the client number of the backend SAP system.
    •     Select the RFC Destination which was created in the previous step.
    3.3 Create or verify the Logical System Name on the SAP backend system.
    5. Enter transaction SALE on the SAP backend system.
    6. Create or verify the Logical System Name. In our example, NDVCLNT510 is verified.
    3.4 Create or verify business system in XI’s System Landscape Directory.
    The business system name for the SAP backend system must contain a valid Logical System Name. This Logical System Name is the one verified or created in the previous step.
    7. In the System Landscape Directory,  select the SAP backend business system. If one does not exist, then create the business system. Verify the Logical  System Name.
    3.5 Verify the Logical System Name of the business system.
    8. In the Integration Directory, doubleclick on the business system (in our example, it is NDVCLNT510).
    Navigate the menu:
    Service • Adapter Specific Identifiers.
    If information is empty or incorrect, then it will have to be synchronized with the content of the System Landscape Directory. Follow the steps below for synchronization.
    9. (Optional) Synchronization of the business system in Integration Directory to the business system in System
    Landscape Directory.
    •     &#61472;Double-click on the business system in the Integration Directory.
    •     &#61472;Switch to Edit mode.
    •     &#61472;Select menu: Service • Adapter-Specific Identifiers 
    10. (Optional) Within the dialog box, click on the button as indicated below to resynchronize.
    11. (Optional) If the expected data from the System Landscape Directory is not updated, then the SLD cache may need to be cleared first.
    3.7 Create/configure the Communication Channel for the IDoc receiver adapter.
    15. In the Integration Directory, create an IDoc receiver communication channel.
    •     &#61472;The RFC Destination is from step 3.1.
    •     &#61472;The Port is from step 3.2.
    NOTE:
    There is no need to create an IDoc sender Communication Channel for XI. Instead, the backend SAP system must be configure to send the IDoc to XI.
    4 Appendix
    Transaction: IDX2
    There are a couple of situation where IDX2 can be useful on the XI system.
    1. When we want to test connection between the XI and SAP backend system.
    2. When an IDoc has changed, and the meta data stored in XI needs to be update. When an IDoc is sent from the SAP backend system to XI, XI will first check to see if the meta data for the IDoc is already in its persistent cache. If not, then XI will use the configuration in IDX1 to retrieve the IDoc meta data from the backend system. If the
    meta is already in cache, then it will NOT do so. Therefore, when an IDoc has changed, it is necessary to manually update the new meta data on XI, or delete it from the cache, so that the latest version can be retrieved. IDX2 is used for this purpose.
    Go to transaction IDX2 and click on “Create”.
    Enter the IDoc Type and the Source Port as defined in step #2. Click “Continue”.If successful, the following will show up. If error occurs, then the IDX1 configurations will need to be re-checked.
    Regards
    Hemant
    Award point if find helpful

  • Unable to import IDoc into NWBPM from NWDS

    Dear PO Experts,
    We are migrating an existing interface
    (IDoc<-->PI<-->SOAP using BPM (Multiple sync calls)).
    We are un able to import IDoc into NW BPM project as a service Interface. (For BPM we exported IDoc into local system as an external definition and did few modifications to the xsd as per below blog and exported back to PO server as an external definition.Create Service Interface for the same .
    http://scn.sap.com/community/process-orchestration/blog/2014/09/24/idoc-to-nw-bpm-scenario#comment-542653 )
    We are getting below exception while importing IDoc Service Interface into BPM project.I have attached IDoc WSDL file for your reference.Could you please share your expertise on this issue.
    >>>An internal error occurred during: "Importing MOIN models for XSDs and WSDLs...".
    java.lang.OutOfMemoryError: Java heap space
    at java.util.ArrayList.<init>(ArrayList.java:112)
    at org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA.initialize
    (XSDParticleImpl.java:1271)
    at org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA.<init>
    (XSDParticleImpl.java:1050)
    at org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA.initialize
    (XSDParticleImpl.java:1149)
    at org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA.<init>
    (XSDParticleImpl.java:1039)
    at org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA.initialize
    (XSDParticleImpl.java:1272)
    at org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA.<init>
    (XSDParticleImpl.java:1060)
    at org.eclipse.xsd.impl.XSDParticleImpl.getDFA
    (XSDParticleImpl.java:2041)
    at org.eclipse.xsd.impl.XSDModelGroupImpl.validateRoot
    (XSDModelGroupImpl.java:599)
    at org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.validate
    (XSDComplexTypeDefinitionImpl.java:1408)
    at org.eclipse.xsd.impl.XSDConcreteComponentImpl.validate
    (XSDConcreteComponentImpl.java:565)
    at org.eclipse.xsd.impl.XSDSchemaImpl.validate(XSDSchemaImpl.java:1653)
    at com.sap.tc.esmp.tools.core.util.EMFUtils.validate(EMFUtils.java:613)
    at
    com.sap.tc.esmp.tools.xsd.xml.EmfSchemaImporter.calculateAffectedPartitions(EmfSchemaImporter.java:903)
    at
    com.sap.tc.esmp.tools.wsdl1import.Wsdl1Importer$ImportChain.calculateAffectedPartitions(Wsdl1Importer.java:365)
    at
    com.sap.tc.esmp.tools.wsdl1import.Wsdl1Importer$ImportChain.resolveImportLink(Wsdl1Importer.java:545)
    at
    com.sap.tc.esmp.tools.wsdl1import.Wsdl1Importer$ImportChain.createChainLink(Wsdl1Importer.java:522)
    at com.sap.tc.esmp.tools.wsdl1import.Wsdl1Importer$ImportChain.init
    (Wsdl1Importer.java:461)
    at com.sap.tc.esmp.tools.wsdl1import.Wsdl1Importer$ImportChain.<init>
    (Wsdl1Importer.java:337)
    at com.sap.tc.esmp.tools.wsdl1import.Wsdl1Importer.prepareWsdlImport
    (Wsdl1Importer.java:1381)
    at com.sap.tc.esmp.tools.wsdl1import.Wsdl1Importer.prepareWsdlImport
    (Wsdl1Importer.java:1368)
    at com.sap.tc.esmp.tools.facade.Import.prepareWsdlImport
    (Import.java:106)
    at
    com.sap.tc.esmp.tools.editor.jobs.RepositoryMetadataProcessor.doImportFiles(RepositoryMetadataProcessor.java:298)
    at
    com.sap.tc.esmp.tools.editor.jobs.RepositoryMetadataProcessor.access$300(RepositoryMetadataProcessor.java:52)
    at com.sap.tc.esmp.tools.editor.jobs.RepositoryMetadataProcessor$4.run
    (RepositoryMetadataProcessor.java:248)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    Regards
    Venkat

    Hi Venkat,
    Find the below link.
    http://scn.sap.com/community/process-orchestration/blog/2014/11/29/using-idocs-in-nwbpm

  • TCODE TO DOWNLOAD IDOC INTO A FLAT FILE

    Hi All,
       Please let me know if there is any tcode to download IDOC into a flat file..
    Regards,
    Kaveri

    try with we60 where you should have links to download the idoc type.
    Please check this:
    1. How to Download a Hierarchy to a Flat File
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb
    2. How To Convert an IDoc-XML structure to a flat file and vice versa in XI 3.0 Version 1.10
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    run the report RSEOUT00 with the idoc number, flat xml file will be generated at the location user/sap/XI/SYS/global/idoc_file
    Please rewrds if found help ful

  • How to get structure of IDOC into xi in the scenario is IDOC - XI - File

    hi XI Guys,
          When i want to Integrate SAP sys(IDOC) with File how to get structure of IDOC into XI, As we will define Data types in File -> XI -> File. Please send Step by Step process as i am new to Netweaver(XI)
    ThankYou,
    B.Pushparaju.

    When i want to Integrate SAP sys(IDOC) with File how to get structure of IDOC into XI
    >>>>
    import the IDoc under the imported object in your SCV. Note that import should be allowed for the SCV.
    As we will define Data types in File -> XI -> File.
    >>>>
    Ref. these blogs to help you out ..
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

  • Merging multiple idocs into 1 XML output

    Hi Gurus,
      I've got a scenario whereby i will need to send payment documents via idocs to XI and XI will output them into an XML file.
    At the moment, when i perform a payment run for multiple vendors and send the idocs out, i realised that multiple idocs are being sent out and XI will output multiple XML docs.
    Is there any way i can merged these idocs into a single XML document? The idocs are all from the same system.
    Thanks in advance.

    HI,
    I think this is possible using PACKAGING.
    Check this note 814393 on Service Market Place.
    You want to create or process an XI message with multiple instances of an IDoc (of the same IDoc or extension type) in the mapping.
    Please refer below link to follow the steps to Merge IDOCs under single XML,
    SAP Network Blog: Collecting IDocs without using BPM
    Collecting IDocs without using BPM
    IDoc packaging
    Reason and Prerequisites
    The relevant IDoc is imported into the Integration Repository.
    Solution
    1) Log on to the Integration Repository.
    2) Open the relevant IDoc in the object editor.
    3) Select the "Export XSD" menu option in the "Tools" menu.
    4) In the subsequent dialog box, assign a file name and save the data to the hard disk of your local PC.
    5) Open the file that you have saved in step 4 in an adequate editor (for example, Notepad) for editing.
    6) Locate the first entry: <xsd:element name="IDOC" type="<
    Idocname>"> and add the following expression, maxOccurs="unbounded", between the value of the type attribute and the closing angular bracket.
    Example:
    <xsd:element name="IDOC" type="ADR2MAS.ADR2MAS02"
    maxOccurs="unbounded">
    7) Save the modified file to the hard disk of your local PC.
    8) In the message mapping, use the file saved in step 7 instead of the imported IDoc by using the "Import XML or XSD" function in the mapping tool to select the source or target messages.
    Thnaks
    swarup

  • Batching of multiple IDOCs into 1 IDOC-XML file

    Hi PI experts,
    I would like to send all idocs from the same payment run (based on run date & run id) as 1 idoc-xml file to PI.
    The number of idocs is variable depending on the payment run.
    Is this possible without using ccBPM?
    I understand it can be achieved according to /people/stefan.grube/blog/2006/09/18/collecting-idocs-without-using-bpm by using FILE adapter. But I don't want to save the idocs into a file system and the number of records in a file is also fixed.
    Is there other alternative solution?
    Thanks,
    Ken.

    Hi Michal,
    Yes, I have seen your blog and also would like to use the IDoc packaging feature which comes with 7.0 EHP1 onwards, but I am not sure whether the IDoc collecting can be based on the payment run date and run id.
    The sending of the collected IDocs is based on when the program RSEOUT00 is executed.
    If we perform 2 separate payment runs before the RSEOUT00 is executed, would PI receive 2 Idoc-XML files or 1 combined Idoc-XML file. We would like to receive 2 separate XML files.  
    Hope you can confirm this.
    Thanks.

  • I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to customer. Can you please help me on the same?

    HI Experts,
    I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to vendor. Can you please help me on the same?
    Thanks
    SaiSreevastav

    Hi Sai,
    you can use XSLT or java mapping or adapter module to convert IDOC xml to XLS. Please refer the below blog
    Convert incoming XML to Excel or Excel XML – Part 1 - XSLT Way
    Convert incoming XML to Excel Sheet Part 2 – Adapter Module way
    Convert incoming XML to Excel Sheet
    then after converting to Excel, you can use the payloadswap bean in mail adapter
    XI: Sender mail adapter - PayloadSwapBean - Step by step
    regards,
    Harish

  • 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

  • How to import the IDOC into Seeburger BIC mapping designer

    Hi All,
    Can u please tell me how to import the IDOC into Seeburger BIC mapping desginer.
    I have scenario My scenario is SAP GTS 7.0.....>Seeburger BIS.....>Atlas customs system for Germany
    Idoc coming from SAP GTS to Seeburger BIS and then convert to EDIFACT send
    to Atlas systeam.
    Regards,
    Ramesh.

    Hi Ramesh
    BIC is a tool from Seeburger to transmit the XML data to EDI and EDI to XML.
    Seeburger mapping programs for transferring the XML data to EDI data and EDI data to XML data, but not for the structure changing, in the IR your mapping program is same.
    Receiver side you need AS2 Adapter for converting data to EDI target structure. we have many EDI versions are available, for converting the EDI to XML or vice versa AS2 gives some default mapping programs, xml to EDI or EDI to XML convertion done through this mapping programs.
    Seeburger AS adapter provider provides some mapping programs(for example EDI4010 version or other), if you are using the same EDI version(4010) then you can use that mapping programs, if the version is different then we can manually generate the Seeburger X2E and E2X mappings for the corresponding version and signal(850 or 810 or ..), for this seeburger provides the mapping designer tool (BIC), there we can develope the X2E and E2X mapping programs and configure this in the Seeburger work bench.
    Regards
    Ramesh

  • Name of the programme, which writes PO Output IDOC into a file

    Hello Guru's,
    Will anyone know the name of the Program which writes the Purchase Order Output Medium IDOC into a file ( xl file, text file etc,.) in SAP.

    Hello
    I cannot tell you the program name (but this should be easy to find out using debugging) yet just send the PO output to the required port ( WE21 ):
    - generate XML file -> send to XML port
    - generate flat file   -> send to FILE port
    Regards
      Uwe

  • How to import Custom idoc into  IR?

    I have a custom idoc and i need to map it with the receiver format after importing into IR . Please let me know the sequence of steps to import custom idoc into  Integration repository?
    I think I need to first import into IDX2 and then import into repository. Am I correct?

    Hi Prateek,
    thanks for the information .The normal standard idocs we import by searching the idoc eg- for importing matmas we type mat and we search it, since it is a standard idoc it will be available in the list (after selecting the chek box "Import of idoc or rfc interfaces from sap system permitted").
    But my question is how we import custom idoc as they wont be present in the list?

  • Is there any standard program to parse idocs into horizontal structure

    Could anybody please let me know if there is any SAP program to parse IDOCS into horizontal structures. We need to generate a flat file within SAP using IDOCS.
    Your earlier response is much appreciated.
    Regards
    Kasi

    Hi Kasi,
    Please check this FM EDI_IDOC_PARSER.
    Hope this will help.
    Regards,
    Ferry Lianto

  • Breaking up of, One IDoc to many IDocs & combing Many IDocs into one IDoc?

    Does anybody have any sample code of:
    Splitting an IDoc into multiple IDocs and
    Combining many similar IDocs into one IDoc
    Any pointers will be appreciated.
    Regards
    Mahesh

    This is the code for splitting of an inbound idoc into multiple idoc
    REPORT ztemp no standard page heading .
    ******************Data Declaration for selection screen***************
    TABLES: edidc,edidd.
    CALL SELECTION-SCREEN 9000.
    SELECTION-SCREEN: BEGIN OF SCREEN 9000,
                      BEGIN OF BLOCK b1 WITH FRAME.
    SELECT-OPTIONS: idocno FOR edidc-docnum.
    SELECTION-SCREEN:END OF BLOCK b1 ,
                      END OF SCREEN 9000.
    *******************Data Declaration ************************************
    DATA : it_contrl LIKE TABLE OF edidc WITH HEADER LINE,
           it_hdata     LIKE TABLE OF edidd WITH HEADER LINE,
           it_fdata  LIKE TABLE OF edidd WITH HEADER LINE,
            it_gdata  LIKE TABLE OF edidd WITH HEADER LINE,
           it_data LIKE TABLE OF edidd WITH HEADER LINE,
           it_status LIKE TABLE OF bdidocstat WITH HEADER LINE,
           it_bdwfretvar LIKE TABLE OF bdwfretvar WITH HEADER LINE,
           it_bdi_ser LIKE TABLE OF bdi_ser WITH HEADER LINE,
           it_ldata LIKE TABLE OF edidd WITH HEADER LINE,
           it_tede2  LIKE  tede2,
           vbeln LIKE vbak-vbeln,
           idocnum LIKE  edidc-docnum,
           result LIKE bdwfap_par-result,
           it_stat LIKE edids.
    DATA : count TYPE i ,
           counter TYPE i ,
           temp TYPE i VALUE 1 ,
           line TYPE i ,
           tab LIKE sy-tabix.
    *********************passing values to control record*****************
    it_contrl-direct = '2'.
    it_contrl-rcvprn = 'ID3IDES802'.
    it_contrl-rcvprt = 'LS'.
    it_contrl-doctyp = 'ORDERS05'.
    it_contrl-idoctp = 'ORDERS05'.
    it_contrl-sndpor = 'ZSOFI'.
    it_contrl-sndprt = 'LI'.
    it_contrl-sndprn = '1000'.
    it_contrl-mestyp = 'ORDERS'.
    APPEND it_contrl.
    ************************Select query for data*************************
    SELECT   * FROM edid4 INTO CORRESPONDING FIELDS OF TABLE it_fdata
    WHERE   docnum IN idocno.
    SELECT   * FROM edid4 INTO CORRESPONDING FIELDS OF TABLE it_data
    WHERE   docnum IN idocno AND segnam NOT LIKE 'E1EDP%'  .
    SELECT   * FROM edid4 INTO CORRESPONDING FIELDS OF TABLE it_hdata
    WHERE   docnum IN idocno AND segnam  LIKE 'E1EDP%'.
    **************select query to count the no of E1EDP01 segment*********
    SELECT COUNT( * ) FROM edid4 INTO count  WHERE docnum IN idocno AND
    segnam = 'E1EDP01'.
    *************to determine the no of idocs to be generated************
    count = count / 5.
    PERFORM datasplit.
    **********************************for remaining idocs*****************
    counter = count MOD 5.
    IF counter NE 0.
      PERFORM dataremain. .
    ENDIF.
    *&      Form  datasplit
          text
    -->  p1        text
    <--  p2        text
    FORM datasplit  .
      LOOP AT it_data.
        MOVE-CORRESPONDING it_data TO it_gdata.
        APPEND it_gdata.
      ENDLOOP.
      DO count TIMES.
        PERFORM split.
        perform idoccreate.
        enddo.
    ENDFORM.                   " datasplit
    *&      Form  SPLIT
          text
    -->  p1        text
    <--  p2        text
    FORM split .
      LOOP AT it_hdata.
        IF temp <= 5.
          ON CHANGE OF it_hdata-segnam.
            IF it_hdata-segnam = 'E1EDP01'.
              MOVE-CORRESPONDING it_hdata TO it_gdata.
              APPEND it_gdata.
            ELSE.
              MOVE-CORRESPONDING it_hdata TO it_gdata.
              APPEND it_gdata.
              temp = temp + 1.
            ENDIF.
          ENDON.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " SPLIT
    *&      Form  dataremain
          text
    -->  p1        text
    <--  p2        text
    FORM dataremain .
      CLEAR it_gdata[].
      LOOP AT it_data.
        MOVE-CORRESPONDING it_data TO it_gdata.
        APPEND it_gdata.
      ENDLOOP.
      LOOP AT it_hdata .
        IF sy-tabix  > 10.
          MOVE-CORRESPONDING it_hdata TO it_gdata.
          APPEND it_gdata.
        ENDIF.
      ENDLOOP.
      perform idoccreate.
    ENDFORM.                    " dataremain
    *&      Form  idoccreate
          text
    -->  p1        text
    <--  p2        text
    form idoccreate .
    ***********************for creating the inbound idocs****************
    CALL FUNCTION 'IDOC_INBOUND_WRITE_TO_DB'
       EXPORTING
         pi_status_message             = it_stat
         pi_do_handle_error            = 'X'
       PI_NO_DEQUEUE                 = ' '
         pi_return_data_flag           = 'X'
      PI_RFC_MULTI_CP               = '    '
       IMPORTING
         pe_idoc_number                = idocnum
         pe_state_of_processing        = sy-subrc
         pe_inbound_process_data       = it_tede2     "for process code
        TABLES
          t_data_records                = it_gdata
      T_LINKED_OBJECTS              =
        CHANGING
          pc_control_record             = it_contrl
    EXCEPTIONS
       IDOC_NOT_SAVED                = 1
       OTHERS                        = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      COMMIT WORK.
    *it_contrl-status = '64'.
    modify it_contrl index 1.
    ****************for posting the idoc**************************
      CALL FUNCTION 'IDOC_INPUT_ORDERS'
        EXPORTING
          input_method                = 'A'
          mass_processing             = '1'
       IMPORTING
         workflow_result             = result
      APPLICATION_VARIABLE        =
      IN_UPDATE_TASK              =
      CALL_TRANSACTION_DONE       =
       DOCUMENT_NUMBER             = vbeln
        TABLES
          idoc_contrl                 = it_contrl[]
          idoc_data                   = it_gdata[]
          idoc_status                 = it_status[]
          return_variables            = it_bdwfretvar[]
          serialization_info          = it_bdi_ser[]
      EDI_TEXT                    =
      EDI_TEXT_LINES              =
       CLEAR : it_contrl-docnum.
      COMMIT WORK.
    endform.                    " idoccreate

Maybe you are looking for

  • ESI deduction for mid joining employees

    Hi Friends For an employee joined in 05th Feb, master data salary is Rs.14768.77 (sum of wagetypes considered for ESI calculation)  and the actual salary calculated is Rs.12941.43. For the purpose of ESI deduction the calculated salary is projected f

  • Problem to install Adobe Cs4 design premium on mac Mountain Lion

    Hi, I've changed my old Macbook pro (my OS was Snow Leopard) for the last new Imac. I did back up everything on an external disk with Time Machine. When I've started for the first time on the new Imac with Mountain Lion, I've restored everything from

  • When i cancel one dvd recording the windows stop answering....

    ... And the dvd dissapear..... FOREVER! I Tryed this: -Click on the cancel button -Then the window stop answering and didnt even stop recording my dvd- -Reinit the finder... NO WAY. Do not run -Force the end of the finder process... NO WAY... Do not

  • Currency field in PO item

    Hi, in what table is contained the field related to the currency (WAERS) for each item of a PO ? I didn't find it in table EKPO. Regards

  • Can't see firewire harddrive on mini 10.4

    It all started with the dang cat.   for some feline reason she had to spray a disconnected external maxtor 1 touch firewire harddrive. I removed it from the external case, cleaned up the cat residue and put it back together. As far as I could tell th