Xslt transformation using SAP BC 47
Hi,
I'm trying to do a transformation using the sap transformation package in the SAP BC ( rel 47 )
I'm transforming an IDOC into a cXML order for example...
The transformed xml contains some rather odd characters...
Even a very simple xslt has these odd characters...
directly after the DOCTYPE
I'm using MapForce to create the xslt..
Has anyone else experienced these issues?
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE cXML SYSTEM "....."[
]>
<cXML payloadID="2005081645000002780916170000000000004039" timestamp="2005-08-16T09:16:17+0.00">
<Header>
<From>
Hi,
according to:
>
Michal_Krawczyk_PIXI wrote:
> as per:
> http://help.sap.com/saphelp_470/helpdata/EN/84/2e4d3ce624b800e10000000a114084/frameset.htm
> "The href attribute no longer applies in this case."
it appears the include element only works with the repository.... I tried
<xsl:include sap:name="<Name_of_the_Transformation_in_Repository>"/>
and it works.
However this would mean, all includes i have to make have to be imported to the repository. If that's really the case, it'll be a huge problem, because the xsl-files i want to include are outside of my reference
Regards, Lukas
Similar Messages
-
ABAP XSLT Transformation using element include
Hi there,
I am trying to convert data from SAP-DATA -> DOM over XSLT to a Stream.
For achieving this I have to use certain modularized XSL-Files which will later be accessible over http. At the moment however, those files are on my local hard drive (client) only. I tried to access these files using:
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sap="http://www.sap.com/sapxsl"
>
*<xsl:include href="D:\XSL\include.xsl"/>*
<xsl:strip-space elements="*"/>
<xsl:template match="/">
</xsl:template>
</xsl:transform>
I get the message "D:\XSL\include.xsl doesn't exist" when checking the syntax. When I test this in my OS however, it works perfectly. Being an SAP- and XML-Newbie my question is the following: Does SAP not know my hard drive mappings while I'm in a transformation or can i only access directories over al11/http. Or is it complete nonsense at all?
Regards, Lukas
Edited by: Lukas Weigelt on Jun 9, 2010 4:18 PMHi,
according to:
>
Michal_Krawczyk_PIXI wrote:
> as per:
> http://help.sap.com/saphelp_470/helpdata/EN/84/2e4d3ce624b800e10000000a114084/frameset.htm
> "The href attribute no longer applies in this case."
it appears the include element only works with the repository.... I tried
<xsl:include sap:name="<Name_of_the_Transformation_in_Repository>"/>
and it works.
However this would mean, all includes i have to make have to be imported to the repository. If that's really the case, it'll be a huge problem, because the xsl-files i want to include are outside of my reference
Regards, Lukas -
XSLT Transformation - using variables in title name
Hi,
Is there a way to set the title attribute of a table tab in XSLT dynamically through xslt? I'm trying to display sections of code which have the title hardcoded and are present in the xml being rendered. I need the title of that section determined dynamically while parsing through the object nodes of the xml.
Example:
<table id="Table ID" title="/Object1/attribute1/name" columnCount="3" seqNo="1">
instead of hardcoding the title name in the XSLT can we pull the name and set it from the xml being processed?
Thanks,
Pavan<section id="CALCULATION" title="Calculation">
<table id="CALCULATION" title="ClientName Calculation Information" columnCount="3" seqNo="1">
<xsl:for-each select="//returnableObjects/IntermediateResultsJB/IntermediateResultJB">
<xsl:if test="resultSetName[.='Client Name Calculation Information']">
<xsl:variable name="Variable1" select="resultName"/>
<xsl:variable name="Variable2" select="resultValue"/>
<!--<xsl:variable name="Variable3" select="resultOrder"/>-->
<detailRow>
<!-- <cell type="string">
<xsl:value-of select="$Variable3"/>
</cell> -->
<cell type="string">
<xsl:value-of select="$Variable1"/>
</cell>
<cell type="number">
<xsl:value-of select="$Variable2"/>
</cell>
</detailRow>
</xsl:if>
</xsl:for-each>
</table>
</section>This is the XSLT above being used. "ClientName Calculation Information" is hardcoded in the xml that is being rendered.
XML Fragment is given below:
<IntermediateResultJB>
<resultSetName>ResultSetName1</resultSetName>
<resultName>Name</resultName>
<resultValue>Value</resultValue>
<resultOrder>1</resultOrder>
</IntermediateResultJB>
<IntermediateResultJB>
<resultSetName>ResultSetName2</resultSetName>
<resultName>Name</resultName>
<resultValue>Value</resultValue>
<resultOrder>2</resultOrder>
</IntermediateResultJB>
<IntermediateResultJB>
<resultSetName>ResultSetName3</resultSetName>
<resultName>Name</resultName>
<resultValue>Value</resultValue>
<resultOrder>3</resultOrder>
</IntermediateResultJB>I want the XSLT above to use the <resultSetName> value["ClientName Calculation Information" e.g] to be set in the value of the title attribute of the <table> as well as <section>.
Thanks,
Pavan
Edited by: EJP on 23/05/2012 10:08: code tags. -
Any way to limit memory which XSLT processor uses?
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - ProductionWe use the xmltype.transform method to transform XSLT. We got oodles of memory (25Gb assigned to Oracle) but we do use a lot of that......
Is there a way to limit the amount of memory that the XSLT engine uses so as to avoid out of memory errors?
Errors in file /ora/oracle/diag/rdbms/prod01/PROD01/trace/PROD01_j001_16149.trc:
ORA-27102: out of memory
Linux-x86_64 Error: 12: Cannot allocate memoryThe XML file was just under 20Gb in size. I regularly see 10Gb xslt transformations using around 2Gb ram (via the top command on linux). I have no visibility to what the memory consumption was the time of the failure.Probably most of the heavy consumption is PGA related.
http://docs.oracle.com/cd/B28359_01/server.111/b28274/memory.htm#i49320
Have a look at the AWR history views concerning memory consumption. ADDM, ASH, AWR etc should give you more insight. See also the awr/addm/ash/-rpt.sql scripts in $ORACLE_HOME/rdbms/admin on the database server. You (officially) would need Diagnostic en Tuning pack licenses though, so be warned (even for "touching" those views). Probably the heavy consumption of memory is or (wrong) storage related or inefficient code... -
Validate xslt against JDK5 so we can remove the 'Use SAP XML Toolkit' flag
We are working on PI7.1 and have hit an issue with an XSLT mapping. We were getting an error when testing that said:
TransformerException during XSLT processing:
javax.xml.transform.TransformerException: com.sun.org.apache.xalan.internal.xsltc.TransletException: com.sun.org.apache.xalan.internal.xsltc.TransletException: java.io.FileNotFoundException
We found a few threads on SDN pointing us to using the 'Use SAP XML Toolkit' flag, which we'd not even noticed before. Ticking this flag did get us around the problem. Further investigation suggested to us, however, that this flag will not be available in future releases, so I guess our best solution would be to try and resolve the issues in our mapping against the current version of java (JDK5). When we use other tools such as XMLSPY they do not detect a problem with the XSLT. Can anyone point me to a tool that would enable us to validate our XSLT file against JDK5, which will provide us with error messages that will enable us to fix the error and therefore remove the 'Use SAP XML Toolkit' flag?
thanks,
Malcolm.> Can anyone point me to a tool that would enable us to validate our XSLT file against JDK5, which will provide us with error messages that will enable us to fix the error and therefore remove the 'Use SAP XML Toolkit' flag?
I am sorry to have to say that even inside SAP nobody can answer this question.
In principle it will work when it is pure XSLT 1.1 but some commands from XSLT 2.0 might work also. -
XSLT-ABAP using Call Transformation
Hello Friends,
I am new to this XSLT-ABAP transformation. I went through the blogs and forums and got a fair bit of idea on this. Now, i am trying to create a simple program/ xslt transformation to test the scenario. Once this is successfull i need to implement this in our project.
I am not sure, where and what i am doing wrong. Kindly check the below given XSLT/ XML/ ABAP Program and correct me.
My XML File looks as given below:
<?xml version="1.0" encoding="utf-8" ?>
- <List>
- <ITEM>
<ITEMQUALF>ITEM1</ITEMQUALF>
<MATERIAL>MAT1</MATERIAL>
</ITEM>
- <ITEM>
<ITEMQUALF>ITEM2</ITEMQUALF>
<MATERIAL>MAT2</MATERIAL>
</ITEM>
- <ITEM>
<ITEMQUALF>ITEM3</ITEMQUALF>
<MATERIAL>MAT3</MATERIAL>
</ITEM>
</List>
My XSLT Transformation looks as given below:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:template match="*">
<List>
<xsl:for-each select="ITEM">
<xsl:element name="ITEM">
<xsl:element name="ITEMQUALF">
<xsl:value-of select="ITEMQUALF"/>
</xsl:element>
<xsl:element name="MATERIAL">
<xsl:value-of select="MATERIAL"/>
</xsl:element>
</xsl:element>
</xsl:for-each>
</List>
</xsl:template>
</xsl:transform>
My ABAP program looks as below:
REPORT ztest_ram.
TYPES:
BEGIN OF ty_test,
itemqualf TYPE char10,
material TYPE char10,
END OF ty_test,
ty_t_test TYPE STANDARD TABLE OF ty_test.
DATA:
l_xml TYPE REF TO cl_xml_document,
t_test TYPE ty_t_test,
wa_person TYPE LINE OF ty_t_test,
t_xml_out TYPE string,
v_retcode TYPE sy-subrc,
v_totalsize TYPE i.
DATA: gs_rif_ex TYPE REF TO cx_root,
gs_var_text TYPE string.
* Create object
CREATE OBJECT l_xml.
* Call method to import data from file
CALL METHOD l_xml->import_from_file
EXPORTING
filename = 'C:\xml\xml_test.xml'
RECEIVING
retcode = v_retcode.
* Call method to Render into string
CALL METHOD l_xml->render_2_string
IMPORTING
retcode = v_retcode
stream = t_xml_out
size = v_totalsize.
* Call Transformation
TRY.
CALL TRANSFORMATION (`ZXSLT_RAM`)
SOURCE XML t_xml_out
RESULT outtab = t_test.
CATCH cx_root INTO gs_rif_ex.
gs_var_text = gs_rif_ex->get_text( ).
MESSAGE gs_var_text TYPE 'E'.
ENDTRY.
When i run this ABAP program to fetch the data from XML in to Internal table, i get the error message:
Incorrect element List for XML-ABAP transformation
I am really not sure how to proceed further. Could any one help me on this?
Note: Please do not paste the same links, as i have gone through most of them.
Thank you.
Best Regards,
Ram.UPDATE, works now.
ABAP:
method IF_HTTP_EXTENSION~HANDLE_REQUEST.
*THIS METHOD IS AN HTTP INTERFACE FOR A
*SICF WEB SERVICE HANDLER. IT RECEIVES AN XML PAYLOAD,
*READS IT INTO AN XSTRING, THEN TRANSFORMS THE
*XSTRING INTO ABAP DATA USING AN ABAP XSLT
*TRANSFORMATION PROGRAM
*Process incoming xml Request
data: lxs_request TYPE xstring.
lxs_request = server->request->get_data( ).
*BUILD DATA TYPES
TYPES: BEGIN OF ccw_line,
field11 TYPE STRING,
field22 TYPE STRING,
END OF ccw_line.
TYPES: BEGIN OF ccw_head,
field1 TYPE STRING,
field2 TYPE STRING,
lines TYPE STANDARD TABLE OF ccw_line WITH DEFAULT KEY,
END OF ccw_head.
DATA: ccw_heads type STANDARD TABLE OF ccw_head,
xccw_heads TYPE ccw_head.
DATA: ccw_lines TYPE STANDARD TABLE OF ccw_line,
zccw_lines TYPE ccw_line.
DATA: lr_transformation_error TYPE REF TO cx_transformation_error.
DATA: err_text TYPE string.
*CALL TRANSFORMATION
TRY.
CALL TRANSFORMATION zccwpayload_prg
SOURCE XML lxs_request
RESULT OUTPUT = ccw_heads. "RESULT PARAMETER ("OUTPUT") NAME MUST EQUAL TRANSFORMED XML ROOT eg <OUTPUT>XML DATA...</OUTPUT>
* RESULT XML my_xml_result. "THIS CAN BE USED IF YOU WANT TO RETURN XML INSTEAD OF ABAP DATA
CATCH cx_xslt_exception INTO lr_transformation_error.
err_text = lr_transformation_error->get_text( ).
server->response->set_cdata( err_text ).
ENDTRY.
*SAVE TO DATABASE
*BUILD RESPONSE
call METHOD server->response->set_cdata
EXPORTING
DATA = err_text.
endmethod.
XML SOURCE:
<?xml version="1.0" encoding="ISO-8859-1"?>
<HEADS> <!--MATCH ON THIS IN XSLT!!!-->
<HEAD><!-- FOR-EACH ON THIS-->
<headval1>myHeader</headval1>
<LINES>
<Line>
<lineval1>myLine</lineval1>
</Line>
<Line>
<lineval1>myLine</lineval1>
</Line>
<Line>
<lineval1>myLine</lineval1>
</Line>
<Line>
<lineval1>myLine</lineval1>
</Line>
</LINES>
</HEAD>
<HEAD>
<headval1>myHeader</headval1>
<LINES>
<Line>
<lineval1>myLine</lineval1>
</Line>
<Line>
<lineval1>myLine</lineval1>
</Line>
<Line>
<lineval1>myLine</lineval1>
</Line>
</LINES>
</HEAD>
<HEAD>
<headval1>myHeader</headval1>
<LINES>
<Line>
<lineval1>myLine</lineval1>
</Line>
<Line>
<lineval1>myLine</lineval1>
</Line>
</LINES>
</HEAD>
</HEADS>
XSLT PROGRAM:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
<xsl:output encoding="UTF-8" indent="yes" method="xml"/>
<xsl:template match="/HEADS"><!--This should be the root name of your source XML eg <HEADS>xml data...</HEADS> if you don't have a single root match on "/" -->
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<OUTPUT><!--MUST be all caps, MUST match CALL TRANSFORMATION RESULTS parameter name (RESULTS OUTPUT = myABAPDataStructure), and MUST not contain an underscore!!!-->
<xsl:for-each select="HEAD">
<HEAD> <!--ALL CAPS!!!-->
<FIELD1>
<xsl:value-of select="headval1"/>
</FIELD1>
<FIELD2>
<xsl:value-of select="headval1"/>
</FIELD2>
<LINES>
<xsl:for-each select="LINES/Line">
<LINE>
<FIELD11>
<xsl:value-of select="lineval1"/>
</FIELD11>
<FIELD22>
<xsl:value-of select="lineval1"/>
</FIELD22>
</LINE>
</xsl:for-each>
</LINES>
</HEAD>
</xsl:for-each>
</OUTPUT>
</asx:values>
</asx:abap>
</xsl:template>
</xsl:transform>
SAMPLE OF TRANSFORMED XML (MATCHES ABAP DATA STRUCTURE):
IF YOU TEST () YOUR TRANSFORMATION (IN XSLT_TOOL) WITH THE SAMPLE FILE AND IT DOESN'T LOOK LIKE THIS, YOUR TRANSFORMATION WILL FAIL. TAGS MUST BE ALL CAPS!!!!
<?xml version="1.0" encoding="UTF-8"?>
<asx:abap version = "1.0" xmlns:asx = "http://www.sap.com/abapxml">
<asx:values>
<OUTPUT>
<HEAD>
<FIELD1>myHeader</FIELD1>
<FIELD2>myHeader</FIELD2>
<LINES>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
</LINES>
</HEAD>
<HEAD>
<FIELD1>myHeader</FIELD1>
<FIELD2>myHeader</FIELD2>
<LINES>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
</LINES>
</HEAD>
<HEAD>
<FIELD1>myHeader</FIELD1>
<FIELD2>myHeader</FIELD2>
<LINES>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
</LINES>
</HEAD>
</OUTPUT>
</asx:values>
</asx:abap> -
How to do 2:1 transformation using XSLT in ccBPM?
Hi,
We have the following ccBPM defined:
A A B A/C D E F
Start---R1---T1---S2---T2---S3---T3---S1---END
R1: Receives Synch XML message A via plain HTTP adapter and opens S/A bridge.
T1: Transforms A into message B using XSLT
S2: Sends message B to a legacy system to do a lookup and gets response C
T2: Transforms A and C into D.
S3: Sends D to another legacy system synchronously and gets response E.
T3: Transforms E to the final response format F
S1: Sends F to the original requestor and close the S/A bridge.
We had created an XSLT style sheet which takes into
consideration of multi-mapping message structure (e.g.
ns0:Messages/ns0:Message1/A and Messages/Message2/C...)
For some reason, the integration process always fails at
Step T2. The only error message we got is:
<b>
Incorrect XML format after mapping: Message expected instead of Catalog
</b>
We went thru all the monitoring/trace tool and could not find any more info on the issue.
I'd really appreciate it if someone can explain the required steps
for designing and configuring n:1 XSLT transformation step.
Thanks in advance
-SimonHi Duke,
I still couldn't get it to work. I compared my xsl file
with yours and they look similar. I was able to turn on the
DefaultTrace. The trace log indicated the mapping call was
successful. But no output was generated. No error message
either. Supposedly XI combines two input xml messsages into
a single message to feed into the XSLT, is there away to
trace out this single input message?
Also do two input messages need to be correlated?
thanks again for your help
-Simon -
Execute a query using ABAP (XSLT transformation issue)
Hello,
I made the steps from this blog (part I, II and III).
/people/durairaj.athavanraja/blog/2005/12/05/execute-bw-query-using-abap-part-iii
When trying to run the XSLT transformation, I got the message that : XML invalid source file.
I am not sure what are the steps for running a transformation, or running it for this case ,maybe something it's not ok. I just run it, did not provide any information.
Any suggestions ? Did anyone use the function module described in this blog ?
Thank you very much in advance.try giving
CALL TRANSFORMATION (`ID`)
SOURCE meta = meta_data[]
output = <ltable>[]
RESULT XML xml_out
OPTIONS xml_header = 'NO'.
and check - sometimes the codepages configured in the BW system tend to cause an issue... I am not sure if the syntax is right though - but you are basically trying to bypass any encoding that is happening in the query transformation....
http://www.sapetabap.com/ovidentia/index.php?tg=fileman&sAction=getFile&inl=1&id=4&gr=Y&path=ABAP%2FABAPENANGLAIS&file=ABAP-XML+Mapping.pdf&idf=41
Edited by: Arun Varadarajan on May 18, 2009 11:28 PM -
Message transformation using XSLT
Hi OSB Gurus,
We are trying to implement following functionality using OSB.
1. We have XML messages in a folder.
2. Need to create a proxy service to take these messages and apply transformations using XSLT.
3. After transformation, put the messages in a different folder which will be picked up by another message broker.
Please give me some pointers about how i can design this. Also i would like to share my findings about the step 2, but having issues for defining input payload which should be defined in the step 1 above. I followed the document http://blog.jayway.com/2010/05/07/xslt-transformations-in-oracle-service-bus/ for registering the xslt transformation, but couldnot make it work as i am not sure about how i can integrate step 1 with step 2.
Thanks so much in advance.Thanks for the suggestion. I will try and see. Here are the files:
1. XML Input(Payload):
<?xml version="1.0" encoding="UTF-8"?>
<ODS>
<LICENSE_TRANSACTION>
<LIC_TRAN_ID>123</LIC_TRAN_ID>
<LIC_CAMIS_ID>String</LIC_CAMIS_ID>
<LIC_NBR>String</LIC_NBR>
<LIC_STATUS_DATE>2000-01-01</LIC_STATUS_DATE>
<LIC_ISSUE_DATE>2001-01-01</LIC_ISSUE_DATE>
<LIC_EXP_DATE>2002-01-01</LIC_EXP_DATE>
<LIC_INSP_REQ_FLAG>true</LIC_INSP_REQ_FLAG>
<LIC_LAST_RENW_SNT_DATE>2003-01-01</LIC_LAST_RENW_SNT_DATE>
<LIC_LAST_RENW_RCVD_DATE>2004-01-01</LIC_LAST_RENW_RCVD_DATE>
<LIC_FED_TAX_ID>String</LIC_FED_TAX_ID>
<LIC_NYS_TAX_ID>String</LIC_NYS_TAX_ID>
<LIC_OPR_HRS_OPN_FROM>14:20:00</LIC_OPR_HRS_OPN_FROM>
<LIC_OPR_HRS_OPN_TO>15:20:00</LIC_OPR_HRS_OPN_TO>
<LIC_TEL_NBR>718-123-1234</LIC_TEL_NBR>
<LIC_EMAIL_ID>String</LIC_EMAIL_ID>
<LIC_FAX_NBR>718-123-1234</LIC_FAX_NBR>
<LIC_NBR_OF_SEATS>10</LIC_NBR_OF_SEATS>
<LIC_ENTITY_CREATE_DATE>2005-01-01</LIC_ENTITY_CREATE_DATE>
<LIC_TRAN_CHG_DATE>2006-01-01</LIC_TRAN_CHG_DATE>
<DETAIL>
<LICENSE>
<LIC_TYPE_CODE>String</LIC_TYPE_CODE>
<LIC_CAMIS_CODE>String</LIC_CAMIS_CODE>
<LIC_CAMIS_CLASS>String</LIC_CAMIS_CLASS>
<LIC_CAMIS_SUB_CLASS>String</LIC_CAMIS_SUB_CLASS>
<BUR_DESC>String</BUR_DESC>
<LIC_CODE_SHORT_DESC>String</LIC_CODE_SHORT_DESC>
<LIC_CODE_LONG_DESC>String</LIC_CODE_LONG_DESC>
</LICENSE>
</DETAIL>
</LICENSE_TRANSACTION>
<STATUS>
<STATUS_CAMIS_CODE>String</STATUS_CAMIS_CODE>
<STATUS_SHORT_DESC>String</STATUS_SHORT_DESC>
<STATUS_DESC>String</STATUS_DESC>
</STATUS>
<PREMISES_ADDRESS>
<ADDR_BLDG_NBR>String</ADDR_BLDG_NBR>
<ADDR_STREET>String</ADDR_STREET>
<ADDR_LOCATION>String</ADDR_LOCATION>
<BOROUGH_DESC>Queens</BOROUGH_DESC>
<ADDR_CITY>String</ADDR_CITY>
<ADDR_STATE>String</ADDR_STATE>
<ADDR_ZIP_CODE>String</ADDR_ZIP_CODE>
<ADDR_HEALTH_AREA>String</ADDR_HEALTH_AREA>
<ADDR_HEALTH_CTR_DIST>String</ADDR_HEALTH_CTR_DIST>
<ADDR_COMMUNITY_DIST>String</ADDR_COMMUNITY_DIST>
<ADDR_BIN>String</ADDR_BIN>
<ADDR_BLOCK_NBR>String</ADDR_BLOCK_NBR>
<ADDR_LOT_NBR>String</ADDR_LOT_NBR>
<ADDR_ASMBLY_DIST>String</ADDR_ASMBLY_DIST>
<ADDR_CONGS_DIST>String</ADDR_CONGS_DIST>
<ADDR_ST_SEN_DIST>String</ADDR_ST_SEN_DIST>
<ADDR_CTY_COUN_DIST>String</ADDR_CTY_COUN_DIST>
<ADDR_XCOORDINATE>123</ADDR_XCOORDINATE>
<ADDR_YCOORDINATE>1234</ADDR_YCOORDINATE>
<DATEOFBUILDINGBUILT>2010-08-11</DATEOFBUILDINGBUILT>
<SCHOOLAREA>String</SCHOOLAREA>
<POLICE>String</POLICE>
<FIRE>String</FIRE>
<LOWCROSSSTREET>String</LOWCROSSSTREET>
<HIGHCROSSSTREET>String</HIGHCROSSSTREET>
<ISPARK>false</ISPARK>
</PREMISES_ADDRESS>
<MAILING_ADDRESS>
<ADDR_BLDG_NBR>String</ADDR_BLDG_NBR>
<ADDR_STREET>String</ADDR_STREET>
<ADDR_LOCATION>String</ADDR_LOCATION>
<BOROUGH_DESC>Queens</BOROUGH_DESC>
<ADDR_CITY>String</ADDR_CITY>
<ADDR_STATE>String</ADDR_STATE>
<ADDR_ZIP_CODE>String</ADDR_ZIP_CODE>
</MAILING_ADDRESS>
<BUSINESS>
<BUS_TYPE_SHORT_DESC>String</BUS_TYPE_SHORT_DESC>
<BUS_TYPE_LONG_DESC>String</BUS_TYPE_LONG_DESC>
<BUS_ID>String</BUS_ID>
<BUS_TRADE_NAME>String</BUS_TRADE_NAME>
<BUS_CORP_NAME>String</BUS_CORP_NAME>
<SITE_TYPE>String</SITE_TYPE>
<DESCRIPTION>String</DESCRIPTION>
<WEBSITE>String</WEBSITE>
<AGE_RANGE>String</AGE_RANGE>
<BUSINESS_PRINCIPAL>
<PRINCIPAL>
<BUS_PRNC_CAMIS_ID>124</BUS_PRNC_CAMIS_ID>
<BUS_PRNC_TITLE>String1</BUS_PRNC_TITLE>
<BUS_PRNC_FULL_NAME>String1</BUS_PRNC_FULL_NAME>
<BUS_PRNC_FNAME>String1</BUS_PRNC_FNAME>
<BUS_PRNC_LNAME>String1</BUS_PRNC_LNAME>
<BUS_PRNC_MNAME>String1</BUS_PRNC_MNAME>
<BUS_PRNC_DOB>2004-01-01</BUS_PRNC_DOB>
<HOMEPHONE>718-123-1234</HOMEPHONE>
<WORKPHONE>718-123-1234</WORKPHONE>
<FAX>718-123-1234</FAX>
<EMAIL>String1</EMAIL>
<CELLPHONE>718-123-1234</CELLPHONE>
<NOTES>String1</NOTES>
<STARTDATE>2004-01-01</STARTDATE>
<ENDDATE>2004-01-01</ENDDATE>
<ADDRESS>
<ADDR_BLDG_NBR>String1</ADDR_BLDG_NBR>
<ADDR_STREET>String1</ADDR_STREET>
<ADDR_LOCATION>String1</ADDR_LOCATION>
<BOROUGH_DESC>Queens</BOROUGH_DESC>
<ADDR_CITY>String1</ADDR_CITY>
<ADDR_STATE>String1</ADDR_STATE>
<ADDR_ZIP_CODE>String1</ADDR_ZIP_CODE>
</ADDRESS>
</PRINCIPAL>
<PRINCIPAL>
<BUS_PRNC_CAMIS_ID>123</BUS_PRNC_CAMIS_ID>
<BUS_PRNC_TITLE>String2</BUS_PRNC_TITLE>
<BUS_PRNC_FULL_NAME>String2</BUS_PRNC_FULL_NAME>
<BUS_PRNC_FNAME>String2</BUS_PRNC_FNAME>
<BUS_PRNC_LNAME>String2</BUS_PRNC_LNAME>
<BUS_PRNC_MNAME>String2</BUS_PRNC_MNAME>
<BUS_PRNC_DOB>2004-01-01</BUS_PRNC_DOB>
<HOMEPHONE>718-123-1234</HOMEPHONE>
<WORKPHONE>718-123-1234</WORKPHONE>
<FAX>718-123-1234</FAX>
<EMAIL>String2</EMAIL>
<CELLPHONE>718-123-1234</CELLPHONE>
<NOTES>String2</NOTES>
<STARTDATE>2004-01-01</STARTDATE>
<ENDDATE>2004-01-01</ENDDATE>
<ADDRESS>
<ADDR_BLDG_NBR>String2</ADDR_BLDG_NBR>
<ADDR_STREET>String2</ADDR_STREET>
<ADDR_LOCATION>String2</ADDR_LOCATION>
<BOROUGH_DESC>Queens</BOROUGH_DESC>
<ADDR_CITY>String2</ADDR_CITY>
<ADDR_STATE>String2</ADDR_STATE>
<ADDR_ZIP_CODE>String2</ADDR_ZIP_CODE>
</ADDRESS>
</PRINCIPAL>
</BUSINESS_PRINCIPAL>
<BUSINESS_INSURANCE>
<BUS_WRK_CMP_CARRIER>String</BUS_WRK_CMP_CARRIER>
<BUS_WRK_CMP_POLICY_NBR>String</BUS_WRK_CMP_POLICY_NBR>
<BUS_WRK_CMP_EXP_DATE>2004-01-01</BUS_WRK_CMP_EXP_DATE>
<BUS_DISB_INSU_CARRIER>String</BUS_DISB_INSU_CARRIER>
<BUS_DISB_INSU_PLCY_NBR>String</BUS_DISB_INSU_PLCY_NBR>
<BUS_DISB_INSU_PLCY_EXP_DATE>2004-01-01</BUS_DISB_INSU_PLCY_EXP_DATE>
</BUSINESS_INSURANCE>
</BUSINESS>
<RECEIPT>
<RCPT_PAYOR_NAME>String</RCPT_PAYOR_NAME>
<RCPT_CASH_FLG>true</RCPT_CASH_FLG>
<RCPT_REMIT_AMT>123</RCPT_REMIT_AMT>
<RCPT_APLY_AMT>123.50</RCPT_APLY_AMT>
<RECEIPT_DETAILS>
<RCPT_DET_PMT_AMT>123.51</RCPT_DET_PMT_AMT>
<RCPT_DET_PMT_DATE>2004-01-01</RCPT_DET_PMT_DATE>
<RCPT_DET_PMT_TIME>20:15:00</RCPT_DET_PMT_TIME>
<RCPT_DET_PMT_CHK_NBR>1111</RCPT_DET_PMT_CHK_NBR>
</RECEIPT_DETAILS>
<RECEIPT_DETAILS>
<RCPT_DET_PMT_AMT>23.50</RCPT_DET_PMT_AMT>
<RCPT_DET_PMT_DATE>2004-01-01</RCPT_DET_PMT_DATE>
<RCPT_DET_PMT_TIME>20:15:11</RCPT_DET_PMT_TIME>
<RCPT_DET_PMT_CHK_NBR>22222</RCPT_DET_PMT_CHK_NBR>
</RECEIPT_DETAILS>
</RECEIPT>
</ODS>
I will post remaining XSLT and output in my next posts.
Thanks for your help. -
How to generate XSL for an XML file to use it for XSLT transformation -SSIS?
Hi All,
Can anybody please help me to generate XSL for my attached XML file?
I need to use the XSL file for XSLT transformation.
Thanks & Regards,
SriHi Vibhav,
Thanks for the response.
I am aware of the process but not sure how to generate XSL file.
Can you please refer me to any tool which can convert XML to XSL? or please can you transform my simple XML to XSL?
Thanks & Regards,
Sri -
UTF-8 encoding in XSLT transformation
Hello,
I have a problem with a transformation of an ABAP structure into XML. I use the XSLT transformation for this.
My XSLT starts like this:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:strip-space elements="*"/>
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
I tried many settings I could find posted on the internet, but I did not find one that would allow encoding to UTF-8.
It always encodes to iso-8859-1 which my interface partner cannot read.
Does anyone know a way to force encoding to UTF-8?
Adding a command like <xsl:output encoding="utf-8"/> did not help.
Thanks a lot!
J. EulerHello!
I think I just solved the problem taking a different approach.
In a note here on SDN, a guy from SAP wrote, that the SAP XSLT processor is not able to code anything but the system's default to a string, BUT that it is able to code it to an xstring.
All I did now is add the tag
<xsl:output encoding="utf-8" indent="yes" method="xml"/>
to my xslt program and change the coding in the program accordingly.
The program code is now:
DATA: tempxstring TYPE xstring,
temp_length TYPE i,
conv TYPE REF TO cl_abap_conv_in_ce.
CLEAR tempxstring.
TRY.
CALL TRANSFORMATION
zxxje_tst_xslt
SOURCE omsregdatawebservice = wa_data
RESULT XML tempxstring.
CATCH cx_sy_conversion_base64.
CATCH cx_sy_conv_illegal_date_time.
ENDTRY.
IF tempxstring IS NOT INITIAL.
CLEAR: conv, temp_length, string_xml_result.
conv = cl_abap_conv_in_ce=>create( input = tempxstring ).
conv->read( IMPORTING data = string_xml_result len = temp_length ).
ENDIF.
Thanks anyways for all your help!
regards,
Johannes Euler -
Reg - XSLT Mapping using stylesheet exception during test
Hi experts,
I am new to SAP PI. Currently i am working on PI's XSLT Mapping using Stylusstudio.
I got error *Transformer Configuration Exception occurred when loading XSLT <name>.xsl; details: Could not compile stylesheet*.
I tried test by selecting SAP XML TOOLKIT too, then i am facing
*com.sap.engine.lib.xml.parser.NestedSAXParseException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: Prefix 'a' is not mapped to a namespace (:main:, row:4, col:15)(:main:, row=4, col=15) -> com.sap.engine.lib.xml.parser.ParserException: XMLParser: Prefix 'a' is not mapped to a namespace (:main:, row:4, col:15)*.
Kindly help me to overcome this issue.Hi,
Simply your XSLT file is not a well-formed XML. Check your syntax. You could also use the XML Tools plugin to Notepad++ to help you determine where the syntax error is precisely.
Moreover, this error "Prefix 'a' is not mapped to a namespace" might mean that you are using a tag: <a:something>, but "a" is not properly declared as a namespace, for instance like: xmlns:a="something.sap.com".
Hope this helps,
Greg -
XSLT transformation in XML to ABAP: special characters issue
Hi,
I am parsing well-formed XML file that has the following data (:
<projects><project><name>Wallis & Futuna</name></project></projects>
I use XSLT transformation:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:template match="projects">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<PROJECTS>
<xsl:for-each select="project">
<PROJECT>
<NAME>
<xsl:value-of select="name"/>
</NAME>
</PROJECT>
</xsl:for-each>
</PROJECTS>
</asx:values>
</asx:abap>
</xsl:template>
</xsl:transform>
If I use the above example without &amp; everything works fine, but the original XML fails with exception CX_XSLT_DESERIALIZATION_ERROR and message "Error during deserialization". Googling around did not give an answer.
Any words of wisdom?
Edited by: Alexei Isaev on Apr 26, 2011 5:04 AM
Edited by: Alexei Isaev on Apr 26, 2011 5:05 AMHi,
Please visit the following link for reference.
http://help.sap.com/abapdocu_70/en/ABAPCALL_TRANSFORMATION.htm
Thanks & Regards,
Harish -
BI Admin Tool and XSLT transformation for XML data source - How it works ?
Hello,
There is a possibility to import data from XML data source using BI Admin Tool.
In the import window we can point XSLT file. What is the purpose of that XSLT field?
Why I am asking ?
I thought it is smth like XSLT processor, but simply it doesnt work.
What I did:
- I pointed XML data source file
- I pointed XSLT transformation file
- Click OK, and still get the message that the XML file structure is not supported
After that I transformed that XML file with some desktop XSLT processor using the same XSLT file, and I tried to connect that file directly using BI Admin tool.Then it works. So it means that the transformation is ok.
So basically one question comes to my mind in that situation:
What is the purpose of XSLT field in BI Admin Tool when it comes to XML data source ?
(it doesnt look like XSLT processor)
Greetings
/MichalHi Mariano
Why you need to use XSLT for transforming XML file into ABAP table
Code is a part of some ABAP report. Looks like it is reading a file from file system and updating table after transformation
If you have requirement like you need to read XML file and then insert the data into a SAP table
You can use
File to RFC
File to Proxy scenario using SAP PI.
Please provide more inputs on requirement to help
Thanks
Gaurav -
XSLT transformation for XML to ABAP internal table
Hi, can anyone please tell me how it should be the xslt tranformation to conver this xml
<Embargos_ARBA_DOC>
<ns:Embargos_ARBA_MT
xmlns:ns="un:swissmedical:sap:proxy:embargos_arba:file">
<Embargos_ARBA_MT>
<FECHA>20081101</FECHA>
<CUIT>50000002124</CUIT>
<MONTO>0000013794090</MONTO>
<RAZON_SOCIAL>RAUL ARMANDO CUNQUEIRO S.A.C.I.</RAZON_SOCIAL>
</Embargos_ARBA_MT>
<Embargos_ARBA_MT>
<FECHA>20081101</FECHA>
<CUIT>55000001456</CUIT>
<MONTO>0000001144410</MONTO>
<RAZON_SOCIAL>PARODI ESTEBAN ARMANDO</RAZON_SOCIAL>
</Embargos_ARBA_MT>
</ns:Embargos_ARBA_MT>
</Embargos_ARBA_DOC>
to this abap Table....
DATA: BEGIN OF i_embargos_arba_doc occurs 0,
fecha TYPE d,
cuit TYPE char11,
monto TYPE char13,
razon_social(120),
END OF i_embargos_arba_mt.
so i can transform it with this sentence
CALL TRANSFORMATION ('embargos_transformation')
SOURCE XML source
RESULT Embargos_ARBA_DOC = embargos.
pls i need help because i am unable to create this xslt transformation...
I will give the highest rewards points to the one who can help me.
thanks!
marianoHi Mariano
Why you need to use XSLT for transforming XML file into ABAP table
Code is a part of some ABAP report. Looks like it is reading a file from file system and updating table after transformation
If you have requirement like you need to read XML file and then insert the data into a SAP table
You can use
File to RFC
File to Proxy scenario using SAP PI.
Please provide more inputs on requirement to help
Thanks
Gaurav
Maybe you are looking for
-
HT4356 How can I set the default to draft instead of normal printing?
I'd like to do most of my printing in Draft mode to save ink. How do I set that as the default, or even change it on the fly, when printing from the iPad Mini to an AirPrint printer? I have an HP OfficeJet Pro 8600 Plus. Thanks!
-
All, I am in the process of parsing documents and creating a Word 97 document. This document only contains a table. I was able to successfully create the table, change the column widths, and add headers. One of the columns contains comma delimited va
-
I have downloaded the trial version of lightroom.
I have downloaded the trial version of lightroom. Now i have purchased the student and teacher edition of creative cloud, However when I go into my lightroom it still is under the trial set and it either wants me to enter the key code or continue the
-
Community inquiry solicitation: Code improvement suggestions
AS the title of this thread implies, I am interested in improving the way I program. While continuing to work on a project, I found myself reaching back to old entry-level tricks learned early on to posit a solution to a problem. however, I am intere
-
How do i get rid of credit so i can change my store. - I was in NZ now in Aus. but can't change stores because of this silly 85c credit. any help? thanks