Abt xslt prog..
what these programs or translations ...
are these used for transforming the to and fro from xml to abap.... or the others... what is the need of such a transformation...
kindly discribe in detail about xslt ......
and xsl
regards,
bs
Hi Swami,
Extensible Stylesheet Language Transformation (XSLT) is based on XSL. While XSL transforms XML to HTML, XSLT is used to transform data content from one XML format and / or metadata tags to another XML format or tags. This XML transformation is often required for Enterprise Application Integration (EAI).
(The Extensible Stylesheet Language (XSL) is based on XML and is a recommended W3C standard. It separates the presentation of data from the data content. XSL is a transformation language that typically is used to translate XML data content to HTML - to be displayed in a browser. A single XSL stylesheet file can be used by many XML documents. )
Here are some useful links.
http://xml.coverpages.org/ni2003-12-17-a.html
http://www.topxml.com/xsl/tutorials/intro/xsl1.asp
http://www.topxml.com/xsl/default.asp
http://help.sap.com/saphelp_nw04/helpdata/en/4c/b2ad3de2d76b3be10000000a114084/content.htm
Regards,
Susmitha.
Dont forget to reward points for useful answers.
Similar Messages
-
More abt xslt ...
i have one more doubt pondering on....
ie
creating a single xslt program template can be able to be used for various programming transformations in the future... or for each program we create we must create a xslt prog... for THE programs transformation.... is it necessary....HI
GOOD
A SINGLE XSLT PROGRAM CANT BE USE IN VARIOUS PROGRAMM TRNSFORMATION IN THE FUTURE,THE XSLT FILE WILL BE DIFFERENT ACCORDING TO YOUR REQUIREMENT.SO FOR EACH AND EVERY PROGRAM YOU MIGHT HAVE TO RIGHT DIFFERENT XSLT PROGRAM.
I HAD GIVEN YOU SOME LINK,READ THEM CAREFULLY ,I HOPE YOU CAN GET SOME MORE IDEA ABOUT THE XSLT.
THANKS
MRUTYUN -
Hi Friends,
I am working on one scenario file to IDoc using XSLT Mapping.I have got the following query.
The file is obtained by the third party as xsd file.
This xsd file is mapped to IDoc.The xsd file contains multiple tax details (E1EDK04 seg) at the header level and multiple line item details at the item level (E1EDP01- E1EDP04 seg).
My query is, for each Tax header detail (E1EDK04), only one Tax Item detail /item detail should appear.
For ex:
E1EDK04(1) should match with E1EDP01-E1EDP04 (1) values. and so on.
IDOC
--E1EDK04 (1)
--E1EDK04 (2)
--E1EDP01
E1EDP02
E1EDP04 (1)
--E1EDP01
E1EDP02
E1EDP04 (2)
Currently I am getting structure as below:
IDOC
--E1EDK04 (1)
--E1EDK04 (2)
--E1EDP01
E1EDP02
E1EDP04 (1)
E1EDP04 (2)
--E1EDP01
E1EDP02
E1EDP04 (1)
E1EDP04 (2)
but the desired result is :
IDOC
--E1EDK04 (1)
--E1EDK04 (2)
--E1EDP01
E1EDP02
E1EDP04 (1)
--E1EDP01
E1EDP02
E1EDP04 (2)
E1EDK04 (1) seg to E1EDP04 (1)seg and so on for the above case using XSLT mapping..?
Thanks in advance for your help
SamIs there a specific reason why you are using XSLT mapping? You can go for graphical mapping and use node functions to acheive your result.
-
Error in ABAP XSLT transformation
Hi,
Im trying to upload some data from XML to abap. But Im getting an error while transforming xml data to internal table.
Here are the details.
XML:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Edited by XMLSpy® -->
<?xml-stylesheet type="text/xsl" href="ABAP1.xsl"?>
<conceptRevDecisionXml>
<projectInfo>
<projectId>P000755</projectId>
<stage>CON</stage>
<country>Ethiopia</country>
<region>AFRICA</region>
<teamleader>Priya Agarwal</teamleader>
<teamleaderfirstname>Priya</teamleaderfirstname>
<teamleaderlastname>Agarwal</teamleaderlastname>
<actionType>X</actionType>
</projectInfo>
</conceptRevDecisionXml>
XSLT: Transformation
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sapxsl="http://www.sap.com/sapxsl"
>
<xsl:strip-space elements="*"></xsl:strip-space>
<xsl:template match="/">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<PROJID>
<xsl:apply-templates select="//conceptRevDecisionXml"></xsl:apply-templates>
</PROJID>
</asx:values>
</asx:abap>
</xsl:template>
<xsl:template match="conceptRevDecisionXml">
<xsl:for-each select="projectInfo">
<xsl:value-of select="projectId"></xsl:value-of>
<xsl:value-of select="stage"></xsl:value-of>
<xsl:value-of select="country "></xsl:value-of>
<xsl:value-of select="region"></xsl:value-of>
<xsl:value-of select="teamleader"></xsl:value-of>
<xsl:value-of select="teamleaderfirstname"></xsl:value-of>
<xsl:value-of select="teamleaderlastname"></xsl:value-of>
<xsl:value-of select="actionType"></xsl:value-of>
</xsl:for-each>
</xsl:template>
</xsl:transform>
Once I run the program...Im getting an error saying...ABAP XML Formatting error in XML node..
Im new to ABAP-XML parsing..Pls help me where Im going wrong..
Thanks in advance.
Regards,
PriyaHi Priya,
you can try with the below,
1) Create a local ITAB with the structure of the XML,
TYPES: BEGIN OF t_data,
projectid TYPE char30,
stage TYPE char30,
country TYPE char30,
region TYPE char30,
teamleader TYPE char30,
teamleaderfirstname TYPE char30,
teamleaderlastname TYPE char30,
actiontype TYPE char30,
END OF t_data.
2) Create an XSLT prog in "STRANS" with the below code,
<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="/">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<L_DATA>
<xsl:apply-templates select="//projectInfo"/>
</L_DATA>
</asx:values>
</asx:abap>
</xsl:template>
<xsl:template match="projectInfo">
<conceptRevDecisionXml>
<PROJECTID>
<xsl:value-of select="projectId"/>
</PROJECTID>
<STAGE>
<xsl:value-of select="stage"/>
</STAGE>
<COUNTRY>
<xsl:value-of select="country"/>
</COUNTRY>
<REGION>
<xsl:value-of select="region"/>
</REGION>
<TEAMLEADER>
<xsl:value-of select="teamleader"/>
</TEAMLEADER>
<TEAMLEADERFIRSTNAME>
<xsl:value-of select="teamleaderfirstname"/>
</TEAMLEADERFIRSTNAME>
<TEAMLEADERLASTNAME>
<xsl:value-of select="teamleaderlastname"/>
</TEAMLEADERLASTNAME>
<ACTIONTYPE>
<xsl:value-of select="actionType"/>
</ACTIONTYPE>
</conceptRevDecisionXml>
</xsl:template>
</xsl:transform>
3) Call the transformation as shown below,
CALL TRANSFORMATION zxslt_project ---> "Name of the XSLT prog created above
SOURCE XML l_xml_str ---> Source XML string
RESULT l_data = l_data. ---> ITAB as in step 1 above
Regards,
Chen -
Using the XSLT processor for non-workbench XSLT
Hi there,
is it possible to use the built-in XSLT processor for arbitrary XSLT transformations which aren't checked in in the ABAP workbench but instead given as a runtime object (string or iXML)?
Instead of the built-in command CALL TRANSFORMATION which according to the doc is restricted to workbench transformations, I am looking for an option like this:
data: lo_transformation type ref to if_ixml_document,
lo_source type ref to if_ixml_document,
lo_target type ref to if_ixml_focument.
* I get lo_transformation and lo_source from somewhere out there
try.
lo_target ?= cl_some_fine_class_which_i_am_looking_for=>transform(
io_source = lo_source
io_transformation = lo_transformation ).
catch cx_xslt_runtime_error.
endtry.
Does anybody know such a feature?
For a background about this problem - in German language - see my blog
http://ruediger-plantiko.blogspot.com/2007/08/xslt-in-bsp-anwendungen-und-in-abap.html
Thanks and Regards,
RüdigerDear Rashid,
thanks - this is the answer! I wonder why I didn't find this class one year ago. A little test prog shows that it works fine and even performant (about 0.5 millisec for creating the new dynamic XSLT program with the method set_source_stream( ) ). For usage in web apps, it would be nice to know whether the temporary program remains available in the application servers' buffer after end of process. I can't check this, since this is performed on the C/C++ level, and SE30 doesn't track the method set_source_stream() itself (it could show a decrease of runtime after the first call).
Here comes a little self-contained ABAP program to test the functionality. It works well on our system with SAPKB70012.
Thanks and regards,
Rüdiger
* --- Test usage of a dynamically given non-workbench XSLT program
report zz_test_cl_xslt_processor.
data:
* iXML master
go_xml type ref to if_ixml,
* iXML stream factory
go_sf type ref to if_ixml_stream_factory.
load-of-program.
go_xml = cl_ixml=>create( ).
go_sf = go_xml->create_stream_factory( ).
start-of-selection.
perform start.
* --- Start
form start.
data: lo_source type ref to if_ixml_document,
lo_result type ref to if_ixml_document,
lo_processor type ref to cl_xslt_processor,
lv_p type progname,
lo_ex type ref to cx_xslt_exception.
perform get_source changing lo_source.
create object lo_processor.
try.
* Set source
lo_processor->set_source_node( lo_source ).
* Set result
lo_result = go_xml->create_document( ).
lo_processor->set_result_document( lo_result ).
* This could be time-critical, the creation of a dynamical XSLT prog?
perform set_transformation using lo_processor
changing lv_p.
* call xslt-proc
lo_processor->run( lv_p ).
* Display result
call function 'SDIXML_DOM_TO_SCREEN'
exporting
document = lo_result
title = 'Result of Transformation'
exceptions
no_document = 1
others = 2.
catch cx_xslt_exception into lo_ex.
sy-msgli = lo_ex->get_text( ).
message sy-msgli type 'I'.
endtry.
endform. "start
* --- Set XSLT transformation from stream
form set_transformation using io_processor type ref to cl_xslt_processor
changing cv_p type progname.
data: lo_trans type ref to if_ixml_istream.
* sv_p contains temp. name of XSLT program after first call
statics: sv_p type string.
if sv_p is initial.
* It seems that the name can be buffered on appserver level?
import progname to sv_p
from shared buffer indx(zx) id 'ZZ_TEST_XSLT_PROC'.
if sv_p is initial.
sv_p = 'X'.
endif.
endif.
* Provide the stream containing the XSLT document (as a stream)
perform get_transformation changing lo_trans.
* Set transformation
io_processor->set_source_stream( exporting stream = lo_trans
changing p = sv_p ).
* Buffer progname on server - seems to work
export progname from sv_p
to shared buffer indx(zx) id 'ZZ_TEST_XSLT_PROC'.
* string -> c move necessary, since xslt-proc-interface doesn't use
* the generic type csequence for program name
cv_p = sv_p.
endform. "set_transformation
* --- Parse a source given as string into an if_ixml_document
form get_source changing co_src type ref to if_ixml_document.
data: lv_s type string,
lo_stream type ref to if_ixml_istream,
lo_parser type ref to if_ixml_parser.
concatenate
`<?xml version="1.0" encoding="iso-8859-1"?>`
`<countings filiale="2412" invnu="TIEFKUEHL SEPT.07">`
`<count recNum="1" gid="1" ean="59111828843" menge="1"`
`preis="0" recNumFrom="1"></count>`
`</countings>`
into lv_s.
* Eingabestream erzeugen und in if_ixml_document abbilden
lo_stream = go_sf->create_istream_string( lv_s ).
co_src = go_xml->create_document( ).
lo_parser = go_xml->create_parser( document = co_src
istream = lo_stream
stream_factory = go_sf ).
lo_parser->parse( ).
endform. "get_source
* --- Put the transformation given as string into an if_ixml_istrean
form get_transformation changing co_trans type ref to if_ixml_istream.
data: lv_s type string.
concatenate
`<?xml version="1.0" encoding="iso-8859-1"?>`
`<xsl:transform version="1.0"`
` xmlns:xsl="http://www.w3.org/1999/XSL/Transform"`
` xmlns:asx="http://www.sap.com/abapxml">`
`<xsl:strip-space elements="*"></xsl:strip-space>`
`<xsl:template match="countings">`
` <asx:abap>`
` <asx:values>`
` <SELOPT>`
` <WERKS><xsl:value-of select="@filiale"></xsl:value-of></WERKS>`
` <INVNU><xsl:value-of select="@invnu"></xsl:value-of></INVNU>`
` </SELOPT>`
` <COUNTINGS>`
` <xsl:for-each select="count">`
` <ZSRS_ZWSTI_LINE>`
` <MATNR></MATNR>`
` <EAN11><xsl:value-of select="@ean"></xsl:value-of></EAN11>`
` <MAKTX></MAKTX>`
` <MENGE><xsl:value-of select="@menge"></xsl:value-of></MENGE>`
` <MEINH></MEINH>`
` <UNAME></UNAME>`
` <EXVKW></EXVKW>`
` <WAERS></WAERS>`
` <FF></FF>`
` <GID><xsl:value-of select="@gid"></xsl:value-of></GID>`
` <RECNUM><xsl:value-of select="@recNum"></xsl:value-of></RECNUM>`
` <RECNUM_FROM><xsl:value-of select="@recNumFrom"></xsl:value-of></RECNUM_FROM>`
` <REF_RECNUM><xsl:value-of select="@refRecNum"></xsl:value-of></REF_RECNUM>`
` </ZSRS_ZWSTI_LINE>`
` </xsl:for-each>`
` </COUNTINGS>`
` </asx:values>`
` </asx:abap>`
`</xsl:template>`
`</xsl:transform>`
into lv_s.
co_trans = go_sf->create_istream_string( lv_s ).
endform. "get_transformation
Edited by: Rüdiger Plantiko on Jul 4, 2008 10:25 AM -
Hi All,
I have a scenario where i need to use XSLT mapping, I would like you to provide docs/links from where i can get info abt XSLT mapping.
Thanks in advance
ShivaHi Thomas,
XSLT Mapping
xpath functions in xslt mapping
Design time Value-mappings in XSLT
File to Multiple IDocs (XSLT Mapping)
XSLT Mapping with java enhancement
XSLT Mapping With JAVA Enhancement ( For Beginners)
XSLT - Grouping XML with XSLT - From Muenchian Method To XSLT 2.0
Dynamically sending a mail to the PO creator using XSLT- ABAP Mapping -
Dynamically sending a mail to the PO creator using XSLT- ABAP Mapping
xpath functions in xslt mapping -xpath functions in xslt mapping
Lookups with XSLT - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
Using XSLT Mapping within the J2EE Adapter Framework -https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken]
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
Regards
Goli Sridhar -
Unable to open any programs in ABAP editor
Hi folks i'm unable to open any programs in ABAP Editor.
When ever i try to open any program it goes to short dump.
Even when i try to open STO4 to view error log.
it shows following message
Short text
Runtime error, short dump could not be written.
What happened?
Error in the ABAP Application Program
The current ABAP program " " had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Unfortunately, the system cannot carry out a detailed analysis of the
error, as the table SNAP (which gathers information at the time of
termination) does not contain a suitable short dump.
Information About Termination Point in XSLT Prog.
Termination occurred in the XSLT program " ".
The call took place using CALL TRANSFORMATION from the ABAP
program specified below.
In the source code, the termination point is in line " "
of the (Include) program " ".
Internal notes
The termination was triggered in function " "
of the SAP kernel, in line " " of the module " ".
The internal operation just processed is " ".
Internal mode was started at " ".hi,
check whether any exit has been implemented for se38 and because of some statements in that it may goto dump.
also try to open ur program from SE80.if u have access to se80 then u can do it from there itself.
reward points if hlpful. -
Calling graphical mapping from XSLT mapping Prog
hi guys;
can anyone tell me that weather we can call graphical mapping from XSLT mapping prog.If this is possible then can anyone guide me through the stepsMudit
Can you go through the links which might be useful to you:
Use of XSLT mapping?
Re: Java Mapping and Graphical Mapping
---Mohan -
Hi,
I have 2 mapping program one is main .xsl program and other one is value mapping program .xsl .
I have zipped both the program and imported into Imported archive in IR but while testing in interface mapping i am getting error.
error:could not compile xslt stylsheet.
Some of the interface having one .xsl program and value mapping is also defined in the main program itself,these interface i am able to execute successfully but unable to execute wherever there are 2 program (main prog + value mapping).
It seems that value mapping is not loading / executing.
Can anyone please guide me how to call value mapping using xslt mapping?
Thanks,
SubbuHi Prateek,
Thanks for the response.
Yes i have 2 program and both needs to execute in one interface mapping.
First program (main) is MappingMOAPS_SAVEMULTIPLE2013.xsl and second program i.e (value mapping) MO_vmf.xsl.
From main program itself value mapping program is called.
Please look below code for main & value mapping prog.
In main prog this is the parameter (<xsl:import href="MO_vmf.xslt"/>) where value mapping prog name is mentioned.
I have already zipped and imported but while testing in interface mapping it is giving error that "could not compile xslt stylsheet".
Could you plaese tell how to check or make XSL to accommodate multiple mappings?
Main mapping : MappingMOAPS_SAVEMULTIPLE2013.xsl --
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file was generated by Altova MapForce 2008sp1
YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
Refer to the Altova MapForce Documentation for further details.
http://www.altova.com/mapforce
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vmf="http://www.altova.com/MapForce/UDF/vmf" exclude-result-prefixes="vmf xs xsi xsl">
<xsl:import href="MO_vmf.xslt"/>
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="/PPR">
<MOAPS_SAVEMULTIPLE201>
<IDOC>
<EDI_DC40>
<xsl:for-each select="SI_ID_IDOCS">
<xsl:for-each select="ID_TABNAM">
<TABNAM>
<xsl:value-of select="."/>
</TABNAM>
</xsl:for-each>
</xsl:for-each>
<xsl:for-each select="SI_SP_SAP_PARTNER_INFO">
<xsl:for-each select="SP_MANDT">
<MANDT>
<xsl:value-of select="."/>
</MANDT>
</xsl:for-each>
</xsl:for-each>
<xsl:for-each select="SI_ID_IDOCS">
<xsl:for-each select="ID_DIRECT">
Value mapping : MO_vmf.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file was generated by Altova MapForce 2008sp1
YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
Refer to the Altova MapForce Documentation for further details.
http://www.altova.com/mapforce
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:vmf="http://www.altova.com/MapForce/UDF/vmf" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs xsi xsl">
<xsl:template name="vmf:inputtoresult">
<xsl:param name="input"/>
<xsl:choose>
<xsl:when test="$input='01'">
<xsl:value-of select="'PM1C'"/>
</xsl:when>
<xsl:when test="$input='02'">
<xsl:value-of select="'PM2C'"/>
</xsl:when>
<xsl:when test="$input='03'">
<xsl:value-of select="'EXT3'"/>
</xsl:when>
Regards,
Subbu -
Transforming XML into nested Internal Table via Call Transformation XSLT
Hi guys!
I am relatively new to this XML transformation to Abap Internal table. Hence I got help some help from this thread ABAP Development as well as referencing Txn SSTDEMO1 and SSTDEMO2
But I tried to attempt on my prog it failed. Heres my sample XML, XSLT & as well as Internal Table.
The good news is I am able to read in a BID item under bidlist BUT with no fields filled in the table.... Pls help....
<b><u>XML</u></b>
<?xml version="1.0" encoding="iso-8859-1"?>
<myXML>
<BIDLIST>
<BID>
<HEADER>
<DOC_CODE>4000000343</DOC_CODE>
<RESPONSE_NO>80000003</RESPONSE_NO>
<RESPONSE_DATE>2006-10-01</RESPONSE_DATE>
<SUPP_CODE>44</SUPP_CODE>
<SUPP_SITE_ID>44</SUPP_SITE_ID>
<SUPP_CONTACT_NAME>JIM BEAN</SUPP_CONTACT_NAME>
<SUPP_CONTACT_PHONE>+6512345678</SUPP_CONTACT_PHONE>
<SUPP_CONTACT_EMAIL>[email protected]</SUPP_CONTACT_EMAIL>
</HEADER>
</BID>
</BIDLIST>
<myXML>
<u><b>XSLT</b></u>
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sap="http://www.sap.com/abapxml"
>
<xsl:template match="/">
<asx:abap xmlns:asx="http://www.sap.com/abapxml">
<asx:values>
<BID_RESPONSE>
<xsl:for-each select="myXML/BIDLIST/BID">
<LBID>
<xsl:for-each select="HEADER">
<LHEADER>
<DOC_CODE> <xsl:value-of select="DOC_CODE"/> </DOC_CODE>
<RESPONSE_NO> <xsl:value-of select="RESPONSE_NO"/> </RESPONSE_NO>
<RESPONSE_DATE> <xsl:value-of select="RESPONSE_DATE"/> </RESPONSE_DATE>
<SUPP_CODE> <xsl:value-of select="SUPP_CODE"/> </SUPP_CODE>
<SUPP_SITE_ID> <xsl:value-of select="SUPP_SITE_ID"/> </SUPP_SITE_ID>
<SUPP_CONTACT_NAME> <xsl:value-of select="SUPP_CONTACT_NAME"/> </SUPP_CONTACT_NAME>
<SUPP_CONTACT_PHONE> <xsl:value-of select="SUPP_CONTACT_PHONE"/> </SUPP_CONTACT_PHONE>
<SUPP_CONTACT_EMAIL> <xsl:value-of select="SUPP_CONTACT_EMAIL"/> </SUPP_CONTACT_EMAIL>
</LHEADER>
</xsl:for-each>
</LBID>
</xsl:for-each>
</BID_RESPONSE>
</asx:values>
</asx:abap>
</xsl:template>
</xsl:transform>
<u><b>Internal Table</b></u>
TYPES: BEGIN OF T_HEADER,
DOC_CODE(17),
RESPONSE_NO(8),
RESPONSE_DATE(10),
SUPP_CODE(16),
SUPP_SITE_ID(15),
SUPP_CONTACT_NAME(140),
SUPP_CONTACT_PHONE(23),
SUPP_CONTACT_EMAIL(100),
D_HEADER TYPE T_HEADER OCCURS 0.
TYPES: BEGIN OF T_BID,
HEADER TYPE D_HEADER,
END OF T_BID,
D_BID TYPE T_BID OCCURS 0.
TYPES: BEGIN OF T_BIDLIST,
BID TYPE D_BID,
END OF T_BIDLIST,
D_BIDLIST TYPE T_BIDLIST OCCURS 0.
TYPES: BEGIN OF TYPE_DATA,
BIDLIST TYPE D_BIDLIST,
END OF TYPE_DATA.
DATA: BID_RESPONSE TYPE TABLE OF TYPE_DATA.hi
good
go through these links, i hope these ll help you to solve your problem.
http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/15ecdf90-0201-0010-d792-941a3c3c30a4
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/d-f/from%20xml%20to%20abap%20data%20structures%20and%20back%20bridging%20the%20gap%20with%20xslt
thanks
mrutyun^ -
Bitwise operators in XSLT:-
Hi ,
Does XSLT has support for BITWISE operations, If so Can you please help me out of that >
If not , Is there any other way to apply BITWISE logic to the flow in the BPEL.
I tried it using Java Embedded activity in the BPEL, but I am getting the following Exception SCAC-50012,tried referring to this Exception, but not able to get the exact view of that error., as this activity in the BPEL doesnt have JAVA editor I am not able to point out the same.Hi everybody,
I have the following queries in JAVA.
1)Is "Operator Overloading" is nothing but
but "Method Overloading" in Java?There's no operator overloading in Java. For example + can't be changed to mean something else.
2)Regarding BitWise Operators, i just wanna have
have an simple example abt the usage of bitwise
operators. i.e., in real world where we will be using
these ?Just one example of many is the use of bitwise XOR in simple encryption/decryption. The scheme is called XOR scrambling.
byte key = 0x77; // a key byte 0101 0101
byte any = ......; // any byte to be scrambled
byte scramble = key ^ any; // the scrambled byte
byte unscramble = key ^ scramble; // unscramble == any, the original byte is back againIt builds on the fact that if you XOR any byte with a bit pattern (key) two times you get the original byte back again. -
Debugging XSLT of Business Data List web part in SPD 2013
I am working on a Business Data List web part in SPD 2013. I want to customize that complex XSLT that got generated by the web part. It will be really helpful, if I can debug that XSLT. But I am not sure, how to debug XSLT from SPD? If at all, I need to
debug through Visual Studio also, I need the XML also, which I don't have. Can anyone please help?Hi Ven,
XSLT debugging , I have never heard abt it. Its like UI design and you modify it and test it in Browser. Thats the only way.
one such sample is http://msdn.microsoft.com/en-us/library/cc300164(v=office.12).aspx
Please remember to click 'Mark as Answer' on the answer if it helps you -
Dear SDN,
In an integration scenario we are using sender File Adapter and a ABAP XSLT Mapping.
Is there any way to get the source FileName from such mapping. Im trying to use the adapter-specific message attributes, but it doesn't work, and I didn´t find an example, probably I and doing somthing wrong.
regards,
GPThank you for your help,
I just try to access the adapter-specific attibutes using:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
<xsl:variable name="filename" select="key:create('http://sap.com/xi/XI/System/File', 'Directory')" />
</xsl:stylesheet>
but the following error raised:
<SAP:Stack>Error while calling mapping program YXSLT_TEST (type Abap-XSLT, kernel error ID CX_XSLT_RUNTIME_ERROR) Call of unknown function</SAP:Stack>
have you had this situation? -
How can I display XSLT transformer errors on a web page ?
Hi,
I have some JSP pages that access DB, create an XML based on DB data and then transform it into HTML through an XSLT stylesheet. Developing the XSL code it's easy to make mistakes and generate errors on trasformation, but what I receive on the web page is only a "Could not compile stylesheet" TransformerConfigurationException, while the real cause of the error is displayed only on tomcat logs. This is the code for transformation:
static public void applyXSLT(Document docXML, InputStream isXSL, PrintWriter pw) throws TransformerException, Exception {
// instantiate the TransformerFactory.
TransformerFactory tFactory = TransformerFactory.newInstance();
// creates an error listener
XslErrorListener xel = new XslErrorListener();
// sets the error listener for the factory
tFactory.setErrorListener(xel);
// generate the transformer
Transformer transformer = tFactory.newTransformer(new SAXSource(new InputSource(isXSL)));
// transforms the XML Source and sends the output to the HTTP response
transformer.transform(new DOMSource(docXML), new StreamResult(pw));
}If an exception is thrown during the execution of this code, its error message is displayed on the web page.
This is the listener class:
public class XslErrorListener implements ErrorListener {
public XslErrorListener() {
public void warning(TransformerException ex) {
// logs on error log
System.err.println("\n\nWarning on XEL: " + ex.getMessage());
public void error(TransformerException ex) throws TransformerException {
// logs on error log
System.err.println("\n\nError on XEL: " + ex.getMessage());
// and throws it
throw ex;
public void fatalError(TransformerException ex) throws TransformerException {
// logs on error log
System.err.println("\n\nFatal Error on XEL: " + ex.getMessage());
// and throws it
throw ex;
}When I have an error in the XSL stylesheet (for examples a missing closing tag), I can find on tomcat logs the real cause of the error:
[Fatal Error] :59:10: The element type "table" must be terminated by the matching end-tag "</table>".
Error on XEL: The element type "table" must be terminated by the matching end-tag "</table>".but on my web page is reported just the TransformerConfigurationException message that is:
"Could not compile stylesheet".
How can I display the real cause of the error directly on the web page?
Thanks,
AndreaThis code is part of a bigger project that let developers edit XSL stylesheets through a file upload on the system and we can't impose the use of any tool for checking the xsl. So, I need to display the transformer error on the web page.I see. This code is part of an editorial/developmental tool for developers to create and edit XSL stylesheets.
As part of the editorial process, XSL errors during editing can be considered a normal condition. In other words, it is normal to expect that the developers will generate XSL errors as they are developing stylesheets.
In this light, handling the XSL transformation errors is a business requirement that you need to handle. Using the Java Exceptions mechanisms, e.g. try / catch are inappropriate to handle business requirements, in my opinion.
I suggest that you look at how you handle the occurence of XSL errors differently than what you currently have. You need to:
(1) capture the Transformation exception on the server;
(2) extract the message from the exception and put it into a message that can be easily understood by the user;
The current error message that you have going to the web browser is not useful.
And you should not have the Transformation exception sent to the web browser either.
What you are attempting to do with the exception is not appropriate.
Handle the Transformation exception on the Business tier and use it to create a useful message that is then sent to the Presentation tier. In other words, do not send Java exceptions to web browser.
/> -
Hi,
I want to set the file name in the File Adapter as part of an XSLT-Mapping.
The steps are as follows in the XSLT:
1. Set Filename to new filename in ASMA.
2. Check if Month = '1' on payload xml. .
If month = 1 , then copy record in xml, else next record.
But I get an error:
Execution of mapping "urn:rlp.de:budgeting/OM_FileIN_to_FileOUT_Budget_1" failed. Reason: MappingException: Mapping failed, TransformException: Transformer exception occurred when executing XSLT BudgetFileNameMap (urn:rlp.de:budgeting, -1, 24903e11-1bce-11df-97ba-ddab0a076144), javax.xml.transform.TransformerException: com.sap.engine.lib.xsl.xpath.XPathException: Illegal number of arguments or types of arguments in a call of function 'dyn:put'., XPathException: Illegal number of arguments or types of arguments in a call of function 'dyn:put'.
The XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:ns0="urn:rlp.de:test:budgeting"
xmlns:map="java:java.util.Map"
xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration"
xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
<xsl:param name="inputparam"/>
<xsl:template match="/">
<!--change asma attributes -->
<xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" />
<!-- create asma key for FileName configuration -->
<xsl:variable name="dynamic-key" select="key:create('http://sap.com/xi/XI/System/File', 'FileName')" />
<xsl:variable name="new-value" select="yourfilename.xml" />
<xsl:variable name="fileName" select="dyn:put($dynamic-conf, $dynamic-key, $new-value)" />
<MT_FileIn_Budget>
<xsl:copy-of select="/ns0:MT_FileIn_Budget/BudgetRecord[Monat=1]"/>
</MT_FileIn_Budget>
<!-- copy payload -->
<xsl:copy-of select="." />
</xsl:template>
</xsl:stylesheet>found it, was an error in the code:
wrong: <xsl:variable name="new-value" select="yourfilename.xml" />
right: <xsl:variable name="new-value" select=" 'yourfilename.xml' " />
double quote single quote in a row!
cheers
Holger
Maybe you are looking for
-
I put in the WOT Addon, but Uninstalled it with not improvement.
-
I have a workflow that creates appointments in CRM 2011. The appointment is created setting a user as the organizer. The issue is that the appointment syncs to the Outlook client, and the user needs to open it on their Outlook calendar and click sen
-
Hi, serial number management
hi, sap gurus, we have entered the serial no at sales order level and it is not visible at order level then where we can see which serial number is alloted by us manually. 2. any body help me the process of serial number which should come automatical
-
Can't connect to iCloud after mountain lion install
After installing mountain lion I can use iCloud. I keep getting this pope up that this mac can't connect to icloud due to a problem with my e-mail account and suggest to open icloud preference to fix it. Then I get asked my passward which it does't a
-
LR5.3 CC Catalog does not open all folders.
Hi ! Last week I upgraded from LR4.3 to LR5.3CC on Windows 8, and since them I'm facing issues with the catalog. I have about 80.000 pictures in one catalog, splitted in subfolders by date. If I click in the main folder (Photos), I can browse all pic