Showing results for 
Search instead for 
Did you mean: 

sql call

Former Member
0 Kudos
- <payload operations="">
- <MT_Outlettest_B1 xmlns="">
  <CreateDate />    
<DSTRB1 /> 
  <DSTRB2 />         
  <SCODE /> 
  <STATUS /> 
  <query id="httpheader.???" value="" /> 
- <Payload Role="C" id="atom1" system="0010000117" mode="single" method="Automatic detection by key word(Automatic detection by key word)" sql="SELECT CreateDate, T0.[U_DSTRB], T0.[U_DSTRB],T0.[U_SCODE], T0.[U_STATUS], T0.[U_SALESORG] FROM "@CW_PJP" T0 where datename(dw,CreateDate) = 'Monday'" disable-output-escaping="false">
- <ResultSet xmlns="" rowCount="1">
- <Row>
  <CreateDate>2011-11-07 00:00:00.0</CreateDate> 
  <U_STATUS /> 

Here when i am using sql cal the data is taking from table but its not set in paload operation

I have used this function

						<xsl:value-of      select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='C' and ./@id='atom1']/jdbc:ResultSet/jdbc:Row/jdbc:createdate"></xsl:value-of>

but its not geting the value from result set of sql query.

Can any one help me?

Edited by: Sinha_Sinha on Feb 8, 2012 5:27 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sinha,

XPATH is case sensitive.

a reference to createdate will not find <CreateDate>

Former Member
0 Kudos

thanks for reply jon

I have checked it , i unable to find this error . can you send me some example of this xpath messege string that working properly

Former Member
0 Kudos

Hi john

thanks for reply

its value coming from result set . when i used payload role "R" then its set the value

but when i set the value in payload role "X" its not seting the value.

can you tell me why its is hapening?

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:b1e="" xmlns:b1ie="" xmlns:bfa="" xmlns:jdbc="" xmlns:rfc="urn:sap-com:document:sap:rfc:functions" xmlns:sim="" xmlns:utils2="" xmlns:vpf="" xmlns:xci="" xmlns:xsl="" version="1.0" bfa:force="" vpf:force="" jdbc:force="" rfc:force="" b1ie:force="" b1e:force="" xci:force="" sim:force="" utils2:force="">
	<xsl:output method="xml" encoding="UTF-8" indent="yes"></xsl:output>
	<xsl:param name="atom"></xsl:param>
	<xsl:param name="sessionid"></xsl:param>
	<xsl:variable name="msg" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role=&apos;S&apos;]"></xsl:variable>
	<xsl:variable name="vpSender" select="/vpf:Msg/vpf:Header/vpf:Sender/@Id"></xsl:variable>
	<xsl:variable name="vpObject" select="/vpf:Msg/vpf:Header/vpf:Sender/@ObjId"></xsl:variable>
	<xsl:variable name="vpReceiver" select="/vpf:Msg/vpf:Header/vpf:ReceiverList/vpf:Receiver[./@handover=&apos;P&apos;]/@Id"></xsl:variable>
	<xsl:variable name="vpvar" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role=&apos;C&apos; and ./@id=&apos;atom1&apos;]/@value"></xsl:variable>
	<xsl:template match="/">
		<Msg xmlns="">
			<xsl:copy-of select="/vpf:Msg/@*"></xsl:copy-of>
			<xsl:copy-of select="/vpf:Msg/vpf:Header"></xsl:copy-of>
				<xsl:copy-of select="/vpf:Msg/vpf:Body/*"></xsl:copy-of>
				<Payload Role="X" id="{$atom}">
					<xsl:call-template name="transform">
	<xsl:template name="transform">
		<xsl:call-template name="setCall"></xsl:call-template>
		<xsl:copy-of select="$msg/*"></xsl:copy-of>
	<xsl:template name="setCall">
		<call xmlns="">
				<out:MT_test_B1 xmlns:out="">
				<!--0 or many of these elements are allowed, order doesn't matter-->
					<xsl:value-of select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role=&apos;C&apos; and ./@id=&apos;atom1&apos;]/jdbc:ResultSet/jdbc:Row/jdbc:U_DSTRB"></xsl:value-of>
			<query id="httpheader.???" value=""></query>