IDOC-- XML conversion
Hi all,
Could anyone let me know if there is any method of converting IDOC to XML with out using XI or any EAI tools?
Raghav
Raghavan,
If you want to convert an idoc to XML (write to XML file), then ALE has a simple mechanism to do it.
Please read the following post in SDN , wherein we can define a XML port (instead of a file port) to convert a idoc to XML
convert IDOC data to XML format.
Some post also list the required FM to achieve the same
Similar Messages
-
Flat Idoc to Idoc XML conversion error.
Hi All,
We are using PI 7.1 EHP1, Where in we would like to see the capabilty of User-Module for Conversion of IDoc Messages Between Flat and XML Formats. Gone thru the below blog and maintained the necessary NWA configurations:
How to Use User-Module for Conversion of IDoc Messages Between Flat and XML Formats
While testing phase, The file is not been picked by the Sender File Adapter and the below error is been displayed in RWB:
"MP: exception caught with cause com.sap.conn.idoc.IDocParseException: (7) IDOC_ERROR_PARSE_FAILURE: Invalid character encountered in XML input data source: state=INITIAL, charPosition=0, lineNumber=1, columnNumber=1, invalidChar=U+0045, sourceSnippet=...EDI_DC40 510000000002889077846C 3012 SHPMNT05 ZSHPMNT9 S... ^"
Any Clues?
ThnxHi Stefan,
You are right i have maintained the mandatory parameters (SAPRelease, SourceJRA, TargetDestination) within the sender File adapter module key parameters.
Now getting another error within Comm Channel Monitoring:
MP: exception caught with cause java.lang.StringIndexOutOfBoundsException: String index out of range: -1
Any Clues?
Thnx -
Hi Exerts,
When IDoc sent from R/3 got successfully loaded with all segments in WE02 wihtout overlapping,
I find the data gets overlapped in XML only for a deep routed structure in sxi_monitor, while WE02 has no issue for it.
Analysis made:
1. IDoc details had been checked for the field which has 18 digits, but at XML it receives only 5 digits after which it loads to next element of that structure.
2. When i crosschecked with cache, it was fine and i even activated once with the updated metatdata from R/3.
Queries:
1. From R/3 end, everything looks fine by analyzing WE02, i also checked by running IDOC_XML_TRANSFORM, but this XML has generated the proper data as seen in WE02. Where did it get this issue for overlapping in Integration engine? Will R/3 use this standard function module to transform to XML message or any else that creates this unknown error?
2. I activated the complete objects in repository and also checked the cache status, but still it gets me the same overlapping at XML under the Inbound message. Could anyone kindly clarify why this happens?
Helpful answers will be rewarded.Santhosh,
Thanks for the quick response.
I cross-checked already in IDX2 for the segment reflections as defined in R/3.
But unforgetedly i missed checking the outbound ports which had required this updations....
This works well...
Here is your granted points.
Thanks a lot for remainding me this resolution Santhosh...
Thanks!
Regards,
Dhayanandh .S -
Error in Idoc to XML conversion
Hi,
I am doing Idoc to XML conversion using standard program RSEINB00. Can anyone plz tell me what are the pre-requisites to executing this program? I am getting an error message Port XXX segment defn YYYYY in IDoc type ZZZZZ CIM type do not exist.
Why am i getting this error? and what is the slution for it?
Regards,
Mateen.Hi
Delete the metadata in IDX2 for the corresponding IDOC type in PI.
Also re-import the same in IDX2.
Reimport the IDOC type into Integration Repository under your SWCV.
Then check it..
Refresh the cache also. -
SAP IDOC XML to Flat File Conversion
Hello,
I have downloaded SAP schema through the "Consume Adapter Service" with properties GenerateFlatFileCompatibleIdocSchema = "true" and FlatFileSegmentIndicator = "SegmentType". I am trying to convert IDOC XML into a IDOC Flat File.
Though the flat file gets created it has a "/" at the end of each blank field which I do not want in the flat file. I see the schema has <recordInfo structure="delimited"...> which I believe should be "positional". I tried
changing preserve_delimiter_for_empty_data="True" and suppress_trailing_delimiters="False" properties also but did not help.
I would appreciate any help on this.
Thanks,
TarunHi Tarun....
please check this property set this property GenerateFlatFileCompatibleIDoc is set to false -
Adapter module in PI 7.1 EhP1 for Falt File Idoc to Idoc xml transformation
Hi Experts,
In PI 7.1 (EhP1) there is a java adapter module that can be added to the file adapter that automatically transforms Flat File representation of IDoc to IDoc XML. Can anyone provide the link to this particular module? Tried searching but could not get the specific module name or parameters.
The same conversion can be achieved using a standard SAP provided ABAP mapping but we need to use the module in this case.
Thanks and regards,
Shiladitya/people/william.li/blog/2009/04/01/how-to-use-user-module-for-conversion-of-idoc-messages-between-flat-and-xml-formats
FYI~~~ -
Idoc xml message in JMS adapter
Hi All,
Question 1:
My scenario is MQ series(JMS adaptr) to SAP(IDOC adptr) . In my mapping both source and target structure is same IDOC structure.Where MQ series will send IDOC xml. In such case shall i need to do content conversion at JMS adapter level or not.whthr IDOC xml can be directly handle at Mapping level without doing any content conversion in adapter level.
Question 2(viceversa):
SAP(IDOC adptr) to MQ series(JMS adaptr) . In my mapping both source and target structure is same IDOC structure.Where MQ series expect me IDOC xml. How to handle content conversion at JMS recvr adapter level.
my assumption only in case of (xml to plain) and (plain to xml) require content conversion here my Input and output is IDOC xml.Saravanan,
As Expert Vishnu Mentioned,
>In such case shall i need to do content conversion
NO need to use
>How to handle content conversion at JMS recvr adapter level
http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-adapters/how%20to%20use%20the%20content%20conversion%20module%20with%20xi%203.0%20j2ee%20jms%20adapter.pdf
Cheers
Agasthuri Doss -
How to convert IDoc-XML to native Idoc-File with in SAP XI/PI
Hello,
I have a problem to Create an native IDoc-Format for an File-Receiver.
The scenario:
I get an Idoc (ZMATMAS) from a SAP System to an MATMAS-exchange-scenario. One of the non-SAP-receiver-systems needs an other native IDoc-Format as File. So I have to map the ZMATMAS to the receiver Format and write this as File. The problem is, that this file contains the data as IDoc-XML and not as native IDoc-format.
Has anybody an idea for this problem?U need to use sender idoc adapter and file receiver adapter.
U can do file content conversion at receiver end.
Content Conversion is basically to convert a text file that contains complex structures into an XML source format and vice versa. It is present only in the File Adapter because it is one of the message protocol which will convert the structure to a desired format.
There are many blogs for File Content Conversion. Some of them are listed hereunder:-
Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
How to send a flat file with various field lengths and variable substructures to XI 3.0
Content Conversion (Pattern/Random content in input file)
NAB the TAB (File Adapter)
File Content Conversion for Unequal Number of Columns
Content Conversion ( The Key Field Problem )
The specified item was not found.
You may also check the FCC documentation for Sender and Receiver:-
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm -
Creating IDoc XML and sending to XI
There is a mechanism to create IDoc XML within SAP ERP through the use of
Change Pointers in concert with a port of type XML File (WE21). This is well
documented in this document.
http://www.erpgenie.com/sap/sapedi/Conversion%20of%20IDOCs%20to%20XML%20format.pdf
My question is whether the IDoc XML can be generated using Change Pointers and
the resulting IDoc XML be sent to XI through a RFC Adapter.
Please don't suggest using an IDoc Adapter. I already know how to do that.
Thanks
VamsiHello Vamsi,
2) You need use Sender File Adapter for this.Not by RFC Adapter
1)yes, you can generate IDOC-XML using Change pointer
for better understanding...
Re: Change pointers trouble
CHANGE POINTER SAPAPO/C5
Re: Change pointer issue!!
If you want to know the basic concepts of Change pointers...Search SDN..you will find lot of info regardin this...
******************Reward points,if found useful -
Hello All,
I've gone through the 'How To Convert Between IDoc XML Structures and Flat Files in XI 3.0' guide. What I am having trouble wrapping my head around is the creation of the interface mapping, in particular the 'Target Message' interface. Obviously the 'Source Message' interface would be the incoming IDoc but what is the 'Target Message' interface that is used?
Looking forward to seeing the light,
MikeHi Mike,
your target message will be a XML structure which will be written to your output file.
The Structure will somewhat be of this type:
<root>
<Sub structure>
<Data/>
</Sub structure>
</root>
And you need to configure the Receiver File Adapter to see your output, also you can use File Content Conversion to change the output to<i> text.</i>
For that please go through this weblog by Mr. Arpit Seth:
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
I hope it helps,
Thanks & Regards,
Varun Joshi -
Hello everybody,
On my system SAP, i need to send a IDOC to XI who convert it to a flat file idoc like this :
SAP => IDOC XML => XI => FLAT FILE IDOC.
Can anyone help me on this subject.
ThanksIf you need the file in the idoc structure itself, I would suggest to create the file in R/3 and poll the file from XI.
Otherwise creating a flat file from the IDOC XML using the file-content conversion will be very cumbersome.
I don't find any other way to create the idoc flat file, anyone has a better idea??
But the polling solution will not work online. Still assuming that the file you create in the output side will be polled at some regular interval by some other application, make the polling frequency of the XI sender adapter same as the one of application at the output side should be enough.
If you are doing this as an experiment, I suggest you to create a file-content-conversion
regards,
kk -
Hello All,
When SAP is triggers an IDOC to SAP XI, the conversion from IDOC to IDOC XML takes place in SAP XI(correct me If Im wrong here).
Can some body tell me what is the mechanism behind this conversion from IDoc to IDOC xml....and there is no adapter comes to into picture as the sender is SAP....which component does this conversion in XI
Regards,
ThaiTo Convert IDOC to IDOC XML and the other way around,IDOC Meta Data is required by the IDoc adapter(availabe at Integration Server).
IDoc metadata is loaded in IDX2 Using RFC connection maintained in IDX1(port maintenance in the IDoc adapter).
For more details refer http://help.sap.com/saphelp_nw70/helpdata/en/ab/bdb13b00ae793be10000000a11402f/frameset.htm -
Send/Receive IDOCs (XML) from/to SAP R/3 with XI-SOAP without XI!
Dear SAP specialists,
(BACKGROUND) We are using the Microsoft BizTalk Adapter for SAP 1.0, developed on top of the SAP DCOM Connector (we are using the version 6.20 Patch Nr. 177), with Microsoft BizTalk Server 2002 SP1 in order to send and receive IDOC via the tRFC transport protocol. We are using the Microsoft BizTalk Adapter for SAP 1.0 since February 2002, and today we are exchanging more than 25,000 IDOC/day with this architecture.
When we migrate our SAP R/3 system to the version 4.7 with WAS 6.20, I was very enthusiastic about the possibility of sending the IDOC in XML via the standard HTTP transport protocol, because it would considerably simplify my architecture, i.e. no need of any (expensive) adapter any more! But, I had to realise that the quality of service exactly once will not be there anymore with HTTP as it exists with tRFC. Then, we carry on using the tRFC transport protocol with the adapter.
(QUESTION) But recently, I followed the SAP Course TBIT40 XI Foundations and I learn that:
1. On one hand, the XI-SOAP protocol supports the quality of service exactly once by the usage of a message GUID within the XI-SOAP envelope;
2. On the other hand, all mySAP solutions using WAS 6.20 (or higher) carry a small Integration Engine (with XI-SOAP as the native transport protocol).
Then, my question is: << Is it possible to exchange IDOC (XML) directly with an SAP R/3 4.7 (WAS 6.20) via the XI-SOAP transport protocol using the small Integration Engine embedded into it, with the quality of service exactly once? >>
Many thanks in advance and best regards,
Patrice KrakowHello Patrice
We have same issue. Is it possible to use IDoc (XML) directly with SAP 5.0 with SOAP (HTTP) without XI?
Since your que is three years old, I'm sure you must have found some method for this.
We'll highly appreciate your help.
Regards: Gaurave -
Issue in Excel to XML Conversion
Hi Gurus,
I am creating a custom java module in sap nwds 7.3 for Excel to XML Conversion. But I am getting following error
Classpath dependency validator message.
Classpath entry will not be exported or published. Runtime ClassNotFoundExceptions may result.
I imported the Jars from a different PI system and i am using NWDS in local PC with creating a separate folder with all JARs and also imported them using build path option.
This issue is occuring for all the jars imported.
I am using following code.
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.AbstractTrace;
import java.util.HashMap;
import jxl.Cell;
import jxl.Workbook;
public class JavaMappingExcelToXML implements StreamTransformation{
private Map map = null;
private AbstractTrace trace = null;
public void setParameter(Map arg0) {
map = arg0; // Store reference to the mapping parameters
if (map == null) {
this.map = new HashMap();
public static void main(String args[]) { //FOR EXTERNAL STANDALONE TESTING
try {
FileInputStream fin = new FileInputStream ("c:/ashu.xls"); //INPUT FILE (PAYLOAD)
FileOutputStream fout = new FileOutputStream ("C:/Users/ashutosh.a.upadhyay/My Documents/ashuXML2.xml"); //OUTPUT FILE (PAYLOAD)
JavaMappingXLStoXML mapping = new JavaMappingXLStoXML ();
mapping.execute(fin, fout);
catch (Exception e1) {
e1.printStackTrace();
public void execute(InputStream inputstream, OutputStream outputstream) {
String msgType = "Message Type name will come here";
String nameSpace = "Namespace Name will come here";
String xmldata = "";
try {
Workbook wb = Workbook.getWorkbook(inputstream);
xmldata ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+ "<ns0:"+msgType+" "+"xmlns:ns0=\""+nameSpace+"\n">";
Cell[] cells ;
Cell[] cellNames ;
cellNames = wb.getSheet(0).getRow(0);
for(int j=1;j<wb.getSheet(0).getRows();j++){
xmldata = xmldata+"\n<Record>\n";
cells = wb.getSheet(0).getRow(j);
for(int i=0;i<wb.getSheet(0).getColumns();i++){
xmldata = xmldata+"\t<"+cellNames[i].getContents()+">"+cells[i].getContents()+"</"+cellNames[i].getContents()+">\n";
xmldata = xmldata+"</Record>";
xmldata = xmldata+"\n</ns0:"+msgType+">";
System.out.print(xmldata);
xmldata.getBytes();
wb.close();
byte by[] = xmldata.getBytes();
outputstream.write(by);
inputstream.close();
outputstream.close();
System.out.println("\n"+"File processed");
catch (Exception e) {
e.printStackTrace();
Request you to guide how to resolve this issue.
Thanks in advanceThanks Anand,
PDF shared by you was extremely helpful. Now I have successfully developed and deployed the adapter. But while using it in Communication Channel I am getting following error.
Error: com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception during lookup operation of object with name localejbs/ExcelToXML, cannot resolve object reference. [Root exception is javax.naming.NamingException: Error occurs while the EJB Object Factory trying to resolve JNDI reference Reference Class Name: Type: clientAppName Content: sap.com/SAP_Exel_To_XMLEAR Type: interfaceType Content: local Type: ejb-link Content: Excel_To_XML Type: jndi-name Content: ExcelToXML Type: local-home Content: sap.com.excelToXML.Excel_To_XMLLocalHome Type: local Content: sap.com.excelToXML.Excel_To_XMLLocal com.sap.engine.services.ejb3.runtime.impl.refmatcher.EJBResolvingException: Cannot start applicationsap.com/SAP_Exel_To_XMLEAR; nested exception is: java.rmi.RemoteException: [ERROR CODE DPL.DS.6125] Error occurred while starting application locally and wait.; nested exception is: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5029] Exception in operation [startApp] with application [sap.com/SAP_Exel_To_XMLEAR]. at com.sap.engine.services.ejb3.runtime.impl.DefaultContainerRepository.startApp(DefaultContainerRepository.java:398) at com.sap.engine.services.ejb3.runtime.impl.DefaultContainerRepository.getEnterpriseBeanContainer(DefaultContainerRepository.java:182) at com.sap.engine.services.ejb3.runtime.impl.DefaultRemoteObjectFactory.resolveReference(DefaultRemoteObjectFactory.java:55) at com.sap.engine.services.ejb3.runtime.impl.EJBObjectFactory.getObjectInstance(EJBObjectFactory.java:144) at com.sap.engine.services.ejb3.runtime.impl.EJBObjectFactory.getObjectInstance(EJBObjectFactory.java:63) at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl._getObjectInstance(ObjectFactoryBuilderImpl.java:76) at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl.access$100(ObjectFactoryBuilderImpl.java:33) at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl$DispatchObjectFactory.getObjectInstance(ObjectFactoryBuilderImpl.java:226) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:283) at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:434) at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:223) at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:242) at javax.naming.InitialContext.lookup(InitialContext.java:351) at javax.naming.InitialContext.lookup(InitialContext.java:351) at com.sap.aii.af.lib.util.ejb.FastEjbFactory.createEjbInstance(FastEjbFactory.java:69) at com.sap.aii.af.lib.util.ejb.FastEjbFactory.createEjbInstance(FastEjbFactory.java:50) at com.sap.aii.af.app.mp.ejb.ModuleProcessorBean.getModuleLocal(ModuleProcessorBean.java:419) at com.sap.aii.af.app.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:287) at sun.reflect.GeneratedMethodAccessor946.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:74) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:191) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:23) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at com.sun.proxy.$Proxy3299.process(Unknown Source) at com.sap.aii.adapter.file.File2XI.send(File2XI.java:3605) at com.sap.aii.adapter.file.File2XI.processFileList(File2XI.java:1374) at com.sap.aii.adapter.file.File2XI.invoke(File2XI.java:669) at com.sap.aii.af.lib.scheduler.JobBroker$Worker.run(JobBroker.java:534) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:182) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:280) ]
pl
please help -
Send / Receive Idoc(XML) in SAP ECC 5.0
Hi Experts,
We are using SAP standard idocs to exchanges master data and Sales data between SAP and non SAP system. currently all the idocs are generated and posted as flat file structure.
There is possiblity to use idoc(XML) and HTTP service instead of standard process without XI?
All info related with this is welcome. is it possible? how?
all suggestion n helpful ans will be rewards with points.
regards: gaurave.Hi Gaurave,
I have comae accross this type of issue once and hope the below link will give you an idea.
http://msdn2.microsoft.com/en-us/library/cc185479.aspx
thanks,
KIRAN
Maybe you are looking for
-
How can I make my guardians buy me an iPhone 5?
Hey, Apple forum people. Maybe you guys can help me with my problem/question today? Well, I am thirteen years of age, and I'm very addicted to Apple products (I currently have a iPod touch and iPad) Now, my birthday is in November, and I will be 14 y
-
How do you embed a Lightroom 3 Slideshowpro web gallery into webpage using Dreamweaver CS5?
I watched the YouTube video by Rafael "RC" Concepcion for incorporating Lightroom into Dreamweaver CS4 but I'm using Dreamweaver CS5 and his method did not work on my Mac system. Does anyone have a step-by-step way or video?
-
Any way to get rid of reflection effect in .Mac slideshows?
I find the reflection effect in the slideshows totally unnecassary, and very distracting. With some photos it even has a distorting effect. I tried to get rid of it by using a workaround posted last year: http://discussions.apple.com/thread.jspa?mess
-
JRE 1.4.2 Java Runtime Parameters
Does anyone happen to know where/how these settings are saved on a Windows OS? I'd like to write a program to automatically set this on client machines to make deployment easier as we need to set the -Xmx for each user. I've searched the registry and
-
Hi Does anyone know if its possible to query data based on direction eg. select all objects that are east of object A. Thanks K