on 05-27-2010 10:33 AM
Hi,
We are doing a RFC to file scenario where our o/p file is in XML format.
The required o/p file format is :
<?xml version="1.0" ?>
<MAT_GROUP xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<HEADER>
<MINISTRY_CODE>TOT</MINISTRY_CODE>
<DEPARTMENT_CODE>000</DEPARTMENT_CODE>
</HEADER>
<DETAILS>
<MATERIAL_GROUP>
<CODE>THIRDPRTY</CODE>
<END_DATE xsi:nil="true" />
</MATERIAL_GROUP>
</DETAILS>
</MAT_GROUP>
But i am using a graphical mapping which gives me the following o/p
<?xml version="1.0" encoding="utf-8" ?>
<xsi:MAT_GROUP xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<HEADER>
<MINISTRY_CODE>TOT</MINISTRY_CODE>
<DEPARTMENT_CODE>000</DEPARTMENT_CODE>
</HEADER>
<DETAILS>
<MATERIAL_GROUP>
<CODE>THIRDPRTY</CODE>
<END_DATE>0000-00-00</END_DATE>
</MATERIAL_GROUP>
</DETAILS>
</MAT_GROUP>
can u let me know how to remove xsi which is before MAT_GROUP and how to changed the END_DATE with xsi:nil="true"
I tried to do XSLT mapping using ALTOVA by following the steps given in the link [url]http://wiki.sdn.sap.com/wiki/display/XI/FileTOFile-UsingXSLTmapping(forBeginners) but when i copy the XSD code from DT and save it as XML/XSD file and trying to Insert it into ALTOVA Mapforce it is not able to create the schema and shows the following error:
An error has occurred when generating an XML schema for the file C:\Documents and Settings\ISSUSER\Desktop\Gebiz\xml code\header_rcv1.xml.
Nothing to generate. Maybe all root elements are in known namespaces (e.g. 'http://www.w3.org/2001/XMLSchema').
Can anyone guide me...
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can we use multiple types of mapping at the same time?
Keep the JAVA mapping as the last one in the Interface Mapping.....and yes you can use multiple mapings (types of mappngs) in the same Interface Mapping.
If you remove the namespace from Message Type then too you will see xml encoding tag in the output.....to remove this xml encoding you have to use the JAVA mapping.
b'cos we also want to remove xsi in the o/p file
You want to remove only xsi?
Regards,
Abhishek.
Edited by: abhishek salvi on May 27, 2010 4:57 PM
Create your target message type without a namespace.
If you have PI 7.11 you can use constant xsd:nil for this purpose.
Otherwise add that nil and the namespace with XSLT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this - Edit your Message Type in ESR/IR and make the XML namespace field blank. This will remove the xmlns:xxx stuff from the payload.
If you want to go for XSLT mapping, check out this tutorial - [Beginneru2019s Guide to XSLT Mapping in SAP PI|http://www.riyaz.net/blog/beginners-guide-to-xslt-mapping-in-sap-pi/technology/sap/769/]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The field XML Namespace is available in Message Type. Not in datatype. This field is very much editable, check again. Generally data type namespace by default gets copied to this field. If you make it blank, your payload namespace will become blank.
Edit: Please note that Namespace and XML Namespace are two different fields
Edited by: Riyaz Sayyad on May 27, 2010 3:30 PM
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.