Conversion of XML Idoc to File Idoc
Hi,
My query is:
I have an XI (PI 7.0) in between an SAP system and a file system. An idoc comes into XI. It needs to be conerted to a file idoc, ie, each segment needs to be separated by a new line. How can I achieve this?
1. Do I have to create a java/ ABAP class?
2. Is an adapter available which does this for me?
Hi Tamoghno,
1. No
2. Yes, use the File/FTP and IDoc Adapters.
Do a search on SDN on "How To ..." for IDoc and File scenario and you will find a plethora of them. You can also start at the WIKI page for SAP XI.
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/main&
Also try this:
https://wiki.sdn.sap.com/wiki/display/XI/SAPR3%28Idocs%29ToXI--Steps+Summarized
Hopes this helps!
Regards,
John Ta
Similar Messages
-
Conversion of multiple xml idocs to flat file
Hi,
I did ABAP mapping to convert xml idoc to flat file by using the reference how to do abap mapping in xi3.0.pdf
It is working for only one idoc at a time.
If I have multiple idocs in a single xml file, the above code is not working.
Please let me know what cchange to be done to work out for this.
Hope am clear.
Regards,
Anil.Look For the Occurances of target Field node...It should be 1 to unbounded
-
XML IDOC to Native IDOC Conversion
Hi,
We have a scenario, where we need to convert XML idoc into native idoc and write to a file. I am doing this based on
How To Convert an IDoc-XML structure to a flat file and vice versa in XI 3.0.
When I first executed the scenario, I was getting the following error
Z_ABAP_MAPPING_IDOC_TO_FLAT (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION) An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause Dereferencing of the NULL reference.
After including the try-catch block, now i am just getting a blank file without any conversion.
Can anyone help me on this?
Regards,
RaviHi,
It looks to be error in ABAP mapping
To test ABAP mapping in XI use the transaction SXI_MAPPING_TEST after creating a little scenario in the directory.
Or even you could do this with below sample code
Lets create one ABAP mapping class with the method IF_MAPPING~EXECUTE
data: obj type ref to zcl_abap_mapping_test.
data: source type xstring,
result type xstring.
data: param type ref to IF_MAPPING_PARAM,
trace type ref to IF_MAPPING_trace.
create object obj.
try.
CALL METHOD obj->IF_MAPPING~EXECUTE
EXPORTING
SOURCE = source
PARAM = param
TRACE = trace
IMPORTING
RESULT = result.
CATCH CX_MAPPING_FAULT .
ENDTRY.
This is a link very useful for ABAP Mapping :
http://help.sap.com/saphelp_nw04/helpdata/en/86/8280ba12d511d5991b00508b6b8b11/frameset.htm
Or may be think this exception you need to catch it in the ABAP..
This may help u- http://help.sap.com/saphelp_47x200/helpdata/en/55/bff20efe8c11d4b54a006094b9456f/content.htm
just cross verify with this guide-
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
Thanks
swarup -
XML IDoc conversion: No known segments identified
Hi all,
am working on a File to IDoc scenario. In runtime, error occurs at Call Adapter phase.
<SAP:Category>XIAdapter</SAP:Category>
<SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_METADATA</SAP:Code>
<SAP:P1>XML IDoc conversion: No known segments identified</SAP:P1>
Can anyone help me in diagnosing.
Thanks,
ChilankaHi,
This issue wis not with Mapping.
The issue is that the utout of the mapping does not confirm to the Idoc metadata,
Exactly why I want to look at the output of the mapping.
Regards
Bhavesh -
XML IDoc file to IDOC .
Hi,
I am receiving XML idoc (Orders05) file from 3rd party to PI system , PI needs to create sales order IDoc ( Orders05) in ECC system.
1) Do I need to create source structure for XML IDoc file ? If yes should I create the structure as Orders05 ?
2) How to map line items of xml file to Orders05 IDoc line items ?
Please help.
Thanks - Vinay.Hi Vinay,
Please see Mikes reply in this thread. You may follow the same procedure:
XML to FlatFile IDOC
Regards,
---Satish -
Content conversion for multilevel varying structure File to Idoc
Hi All,
I have following file structure.
VO
C1
S1 1 to unbounded
H1 1 to unbounded
D1 0 to unbounded
D2 0 to unbounded
U2 0 to unbounded
UC 0 to unbounded
My Idoc structure.
ISU_EL34
IDOC 0 to unbounded
E1ISU34 1 to unbounded
ZSEGMENT 0 to 1
I have applied the content conversion for the length specific file as follows.
Recordset structure: VO,1,C1,1,S1,1,H1,1,D1,,D2,,U2,,UC,
Do I need to do any changes over here to satisfy the above file structure.
V0 and C1 occurs only once in a file.
for S1 I should have H1 compulsory and others are optional, but i need to create Idoc when D1 data is available only.
I'm able to read the total file with the above content conversion.
MY requirements:
1) I need to create the Idoc based on the occurance of D1 node. I'm using H1 data also in the idoc not S1.
2) My doubt is whether the content conversion I have provide is applicable to the structure I have prepared.
3) When I'm trying useOneAsMany function for the above ie H1 data should repeat in Idoc as and when D1 repeats.I'm failing the error is both queues are not contain same number of data..
Could anyone suggest how I should approach for the above scenario.Hi Sravya,
It is really helpfull answer , Thanks for sharing my problem .
It worked for this purpose, but I'm facing following problems
MY scenario
The file contains records V0,C1,S1,H1,D1,D2,U2 and Uc
In which Im using the data of H1,D1,D2,U2 and UC for creating target Idoc.
Every H1 contains at least 1 D1 record, If D1 exists D2 ,U2 and UC may or may not exist.If exists those are in a sequence and should consider the data of them to create Idoc.
Idoc should be created for every D1.
Problem facing:
Do we have any mechanism to group the D1 records to the relevant header.since Im unable do this with content conversion.
I think bcz of above problem; some records (D2 & U2 & UC) data is populating in Idoc even there is no D2,U2 and Ucs.
Thanks,
venu. -
Error in IDOC: XML IDoc conversion: No known segments identified
Hi Team
i am facing error in my scenario. When we are testing my interface, another Interface is picking up the Messages and resulting into an error.
There is no mapping involved in my scenario.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Call Adapter
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>XIAdapter</SAP:Category>
<SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_RUNTIME</SAP:Code>
<SAP:P1>XML IDoc conversion: No known segments identified</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:Stack>Error: XML IDoc conversion: No known segments identified</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
please help me out
thanx in advanceHi,
Do The following:
1) Delete the IDX2 entry and try to reimport once again....and in the IR also do the same.
2) Have a look into this SAP Note- 742093
3) Check the IDX1 entry , RFC destination entry... may be not pointing correctly.
4) If any field which is mandatory in the idoc must not be disabled...take care about it.
Hope this will help you...
Regds,
Pinangshuk. -
IDOCType PORDCR101 : XML IDoc conversion: No known segments identified
Hello all,
I'm strugling with the mapping to the IDOC create puchase order PORDCR1.PORDCR101.
The source structure for the moment is exactly the same as the target strcuture i.e. our IDOC.
So I would not expect to much problems with this one.
However, when sending the message we get the following error in SXI_MONITOR:
<SAP:Category>XIAdapter</SAP:Category>
<SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_RUNTIME</SAP:Code>
<SAP:P1>XML IDoc conversion: No known segments identified</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Error: XML IDoc conversion: No known segments identified</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
I also augmented the trace lvl to 3 and got the following in the Trace-part of TC SXI_MONITOR and
suspect it starts to get wrong already in the beginning
- <!-- ************************************
-->
<Trace level="1" type="T">----
</Trace>
<Trace level="1" type="T">---- Outbound IDoc-Adapter -
</Trace>
<Trace level="1" type="T">----
</Trace>
Trace level="1" type="T">Convert one IDoc</Trace> .
<Trace level="2" type="T">Convert Control Record</Trace>
<Trace level="2" type="T">Convert Data Records</Trace>
<Trace level="3" type="T">Segment= E1BPMEPOHEADER</Trace>
<Trace level="2" type="T">Ignore unknown Segment E1BPMEPOHEADER</Trace>
<Trace level="2" type="T">Ignore segment field: COMP_CODE</Trace>
<Trace level="3" type="T">Segment= E1BPMEPOHEADERX</Trace>
<Trace level="2" type="T">Ignore unknown Segment E1BPMEPOHEADERX</Trace>
<Trace level="3" type="T">Segment= E1BPMEPOADDRVENDOR</Trace>
<Trace level="2" type="T">Ignore unknown Segment E1BPMEPOADDRVENDOR
I already found the four or so other threads on the SDN website about this error and in the mean-time tried them (delete and reload the structure with IDX2, set the begin and segment-attribute to 1, make sure that the segments-names self are also mappend) but to no avail.
We just implemented two other IDOC's (DELVRY03 and WMMBID02) and they arrive at SAP without problmens.
Hope you have form ideas to get me out of this one.
Tnx and best regards.
Bart.Hi Bart,
We had a similar problem.... It took us 2 days to find out what the problem was... Nothing on SDN was helpfull so far... First we incremented the trace level of XI to see the debug messages... Then we saw that certain segments could not be identified and are ignored, others not...
So further investigation in IDX2 to the specific IDoc with problems showed us a list with all used segments and their versions. Some segments had only 1, others had more versions....
So we could identify the problem as a segment version problem. It seemed that our IDoc Communication Channel took not the most recent version. So we changed the "Segment Version" to the most recent one and the problem was solved!
Please reward points if this was usefull to you...
cheers!
Pedro -
XML IDoc conversion: No known segments identified PPCC2PRETTICKET01
Hello to everybody,
I'm working with JDBC adapter to IDOC scenario with standard message PPCC2PRETTICKET01 and I found this message:
IDOC_ADAPTER">ATTRIBUTE_IDOC_RUNTIME
XML IDoc conversion: No known segments identified
I've read previous thread and I've already try to Reimport the Idocs into Repository
and Delete the Idoc metadata from the in Transaction IDX2 and reimport the same.
I'm in SAP NetWeaver 2004s.
Do you have another ideas?
Many thanksHi,
I've filled up control record in message mapping, I tried with Apply C R but it doesn't work.
I don't know how to disable EDI_DC40 in message mapping because the fields are red.
I've filled up every segment field with a constant with the right segment name but nothing.
This is the payload after the error but since the JDBC adapter in:
<?xml version="1.0" encoding="UTF-8" ?>
- <PPCC2PRETTICKET01>
- <IDOC BEGIN="1">
- <EDI_DC40 SEGMENT="EDI_DC40">
<TABNAM>EDI_DC40</TABNAM>
<DIRECT>2</DIRECT>
<IDOCTYP>PPCC2PRETTICKET01</IDOCTYP>
<MESTYP>PPCC2PRETTICKET</MESTYP>
<SNDPOR>SAPXI0</SNDPOR>
<SNDPRT>LS</SNDPRT>
<SNDPRN>XIDEV100</SNDPRN>
<RCVPOR>SAPDEV</RCVPOR>
<RCVPRT>LS</RCVPRT>
<RCVPRN>SYSDEV300</RCVPRN>
</EDI_DC40>
</IDOC>
</PPCC2PRETTICKET01>
Thank for more ideas.
Fabrizio -
XML IDoc conversion: No known segments identified ,only few times
Hi all,
Our scenario is in production and is working fine,few times i get the below error.
This is a Daily run scenario.This week it ran 5 time right and 2 , times it failed to create Idocs for the same sccenario.
Can any one help me.
<SAP:Category>XIAdapter</SAP:Category>
<SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_METADATA</SAP:Code>
<SAP:P1>XML IDoc conversion: No known segments identified</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Error: XML IDoc conversion: No known segments identified</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Errorcheck if these discussions help you:
XML IDoc conversion: No known segments identified
IDOCType PORDCR101 : XML IDoc conversion: No known segments identified
Regards,
Abhishek. -
Automate flat IDOC to XML IDOC using one interface
Hello all,
We are currently going through a migration process where XI will be replacing a legacy system. As part of our testing procedure, we are using historical data pairings from the legacy system and using an automated tool to compare if the interfaces we develop in XI match. The catch is we need the data that we are comparing in XML format for the automated tool to be able to do the comparison, and unfortunately the legacy data is a flat format. So now I would like to automate a way to convert this data to XML format.
Specifically for IDOCs, I would like to have an interface which picks up the flat files, transforms them to XML, and then drops them back into another file directory in the XML format. It would need to be able to pick up any kind of IDOC (given that XI has the metadata already imported), recognize what message type it is, then do the conversion.
I have been reading on SDN and found that there is a standard tool to do the conversion, but it appears it can only handle one kind of IDOC at a time, and it appears it only picks up one specifically named file at a time.
Has anybody tried to implement a scenario like this? Any help is appreciated (A walkthrough would be the best!).
Thanks in advance,
MikeMike,
What version of PI will you be using? PI 7.11 can now auto-convert Flat File IDocs to XML IDoc and vice versa.
Here is the documentation:
http://help.sap.com/saphelp_nwpi711/helpdata/en/b5/bd93642dd3410f90ebea702399fac4/frameset.htm (flat to XML)
http://help.sap.com/saphelp_nwpi711/helpdata/en/74/a45bc07e2043fb9b63295229178903/frameset.htm (XML to flat)
I have not tried this personally, but seems like you might be able to use a "File to File" scenario with no mapping, and use the "IDOCFlatToXmlConvertor" Module in your File Adapter Comms Channel and it may just work, giving you files that are the IDoc XML version of the flat file it is reading. It looks like it does an RFC call to the back-end SAP system where the IDocs are originally from (or could be any system as long as you know the IDocs in there are identical), and reads the IDoc metadata (which has always included flat file field offsets for each IDoc Segment Field), and applies that either to convert from flat file IDoc to XML IDoc, or XML IDoc to flat file IDoc.
It does mention that there is a limitation that there can only be one IDoc in the source flat file - could be a problem if you have many in one file, which is pretty typical.
Regards,
Brendan -
Create XML-IDOC from outgoing invoice data
Hi!
A customer would like to get informations from our invoice with XML. The XML-file should be a XML-IDOC. Can I create this file by printing the invoice? Is there a function module to create the XML?
Thanks
Markus>
Markus Deutschmann wrote:
> Can you explane your solution a little bit more?
> Wher ecan I create a XML-Port?
Check tcode for creating ports : WE21. -
Loading Invoice XML IDoc with digital signature via XI into R/3
Hi,
I received an Invoice XML IDoc with digital signature via Mail (for test purposes) and want to load it via XI into an R/3 systeme.
My idea is to load the Invoice XML IDoc file via the File Sender Adapter into XI and send it to the R/3 system via the IDoc Inbound adapter.
Due to the digital signature the file looks like this:
0 S *H÷
D0 @ 1 0 + 0 ' *H÷
0 0 û etc.
When I load the file like this with the File Sender Adapter, an error message occurs in the XI Monitoring as the XML Parser cannot read the file due to the digital signatur (as expected).
Has anybody an idea how I can configure the File Sender Adapter Communication Channel to be able to load only the XML IDoc and ignore the digital Signature strings?
Thanks in advance for your support.
AlexBTW
do use the second way you need:
Security Settings for the Sender Mail Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/27/c0524257a1b56be10000000a155106/content.htm
and
Key Storage Service
http://help.sap.com/saphelp_webas630/helpdata/DE/e9/a1dd44d2c83c43afb5ec8a4292f3e0/content.htm
apart from adapter module config
Regards,
michal -
XML IDOC data (hosted on a web server) & handling multiple WSDLs
Hi ALL,
1)how to design an Interface for picking up an XML IDOC data (hosted on a web server) which will be uploaded to SAP or converted to a file
this is what the customer has given me ..can any one explain me this and help me how to more forward
2).This Interface must use UDDI concept because we are going to use multiple BAPIs /RFCs as WSDLs
what is this mean can any send me some document on this
3).Use web-service navigator concept as we will be handling multiple WSDLs
i worked on 1. to define a place holder in WebAS for holding the
wsdls.
2. publish the wsdls in WebAS UDDI Repostory
but i have never used web-service navigator concept as we will be handling multiple WSDLs what is the difference ..send me some step by step docs ..
thanks very much
RK..1.I am not clear with the requirement too. THere is no big deal in sending XML to IDOC or File. Based on your requirement you have to import IDOC structure or ify ou are using file, create a structure for the file.
If u are asking about sendin the XML directly without mapping, even you can do that without MM and even IM.
Please be more elaborate and if you are not clear with what client said, paraphrase them or ask again. Its not good to start work unless we are very clear with the requirement.
you can say to my understanding i feel this, now pI will send data like this. Is it correct?
2. More information on UDDI
http://en.wikipedia.org/wiki/UDDI
I dont think you need to worry much about this now with many features provided in ESR especially
3. http://<Host>:<port>/wsnavigator/
The webservices going out of PI are published here.
provide host and port are host and port details of ext system.
Once you enter link in your browser, it shows the available webservices hosted there.
All you need is to click on the required wsdl and test it.
It is as good as sending your data from PI to other system.
It is similar to Altova XML spy but the difference here is you enter the values directly here but in XML spy we send XML . -
Receiving binary IDOC via Queue and convert it to XML-IDOC
Hello,
we are focusing the following scenario:
We receive an plain, binary IDOC in a MQSeries Queue. We want to pick it, transform it and place it into R/3 (of course using XI 3.0). Afterwards the other way around.
I know the Howto for the ABAP mapping from XML-Idoc to plain IDOC. This may also work for our scenario. Do you agree?
The other way around is more difficult. I assume that - since the IDOC adapter resides in the ABAP stack - we cannot re-use an existant adapter module in the JMS adapter. Right?
I heared about JCO capabilities of "xmlizing" Idocs - but did not find hints within the javadoc. Anyway, would this really be the preferred way - writing an user exit for the adapter using JCO - to handle this? There must be a way to do it better, must it not?
How did you guys face this problem - I think its a common one...
Any starting points for a discussion are appreciated....
Greets,
helgeHi Helge,
For the conversion of the incoming flat message, one could imagine a similar ABAP mapping as the one described for the XML->flat message conversion. The function module IDX_IDOC_TO_XML could be a good starting point for your search.
To perform conversions in the Java stack (e.g. in an adapter module) might be a quite complex task since you first have to get the IDoc metadata. And there you cannot reuse existing function modules.
Best regards
Joachim
Maybe you are looking for
-
Adobe Bridge problem, Anyone help?
Hi I am using After Effects and want to add an effect to Text i use the brower presets option which opens Adobe Bridge. Adobe Bridge normally allow a preview of the effect in the preview section. However where the preview should be an 'unidentified
-
HP Installer Setup not running on Windows 7
HP OfficeJet 6500 Windows 7 Attempting to perform a first-time install on my new laptop. Running the setup.exe file from the OJ6500vE709_Full_14 software download immediately results in an error message that HP Installer Setup has stopped working.
-
Uploading photo album from iphoto library
New at Mac. I have 2 thousands photos on my Mac. I have created many albums for these on Iphoto. When I want to upload these albums , i do not have access to my iphoto library . Instead i get the library where the photos have been downloaded by the h
-
Photoshop elements 12 "valid size not available for this creation"
I see the message "valid size not available for this creation" when I am in organizer and I try and go to create a collage, photo book or any of those options. I have tried to see what other people have done by changing their location to usa/Canada
-
How to use Mic with RCA Connectors?
I use iTunes and Nicecast to do an Internet radio show. I have tried using a usb headset with an attached mic. However, the sound is rather tinny compared to my old headset that I used on my PC. Are there any connectors I could buy where I could u