on 02-12-2007 9:40 PM
Hi SAP gurus
i have a string where i need to eliminate 'A.B.N' from the following string please advice
as i am new to xslt i am not sure how
xsl:value-of select="concat('A.B.N. ',$vABNNameValue)"/
this is the part of the xsl i am trying to change the above statement in .
:for-each select="/ORDERS02/IDOC/E1EDKA1" >
<xsl:if test="PARVW = 'LF' ">
<Name3>
<xsl:variable name= "vABNNameValue">
<xsl:value-of select="''" />
<xsl:for-each select="E1EDKA3" >
< xsl:if test="QUALP = 'ABN' ">
<xsl:if test="STDPN != ''">
<xsl:value-of select= "STDPN"/>
</xsl:if>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:choose>
<xsl:when test= "$vABNNameValue != ''">
< !xsl:value-of select="concat('A.B.N. ',$vABNNameValue)"/-!>
<xsl:value-of select="concat(' A.B.N. ',$vABNNameValue)"/>
<!<xsl:value-of select="$vABNvalue"/>>
</xsl:when >
<xsl:otherwise >
<!-- OVSD Call 324728 End -- >
< xsl:variable name="Name3Test">
<xsl:call-template name="Template_GetE1EDKA1Name3">
<xsl:with-param name= "TestValue">LF</xsl:with-param >
< /xsl:call-template>
< /xsl:variable>
< xsl:if test="$Name3Test != ''" >
<xsl:value-of select="$Name3Test"/ >
</xsl:if >
<!-- OVSD Call 324728 Begin -- >
< /xsl:otherwise>
< /xsl:choose>
< /Name3>
< /xsl:if>
< /xsl:for-eac
please advice its so urgent i have a production issue
i know there is a function substring
thanks
Hi,
this implies that there is an error in your mapping.
pls check it in the Interface mapping by hitting the test tab
enter some valid data in to source and then test it.
But before you test it make sure that you are filling in all those values in the fields which are used with the string funcions if any.
One more thing make sure that ur using as
>><b><xsl:value-of select='$vABNNameValue' /></b>
Ranjit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have a look at this
http://www.w3schools.com/xpath/xpath_functions.asp#string
i guess this might be useful to you :
<b>replace(string,pattern,replace) </b>
Returns a string that is created by replacing the given pattern with the replace argument
Example: replace("Bella Italia", "l", "")
Result: 'Bea Itaia'
in your case
<b>replace("someA.B.Nssss","A.B.N","")</b>
I think it would work. try this....
PS: award points if answer helps you.
thanks,
Pooja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok I got it
simply use:
xsl:value-of select=$vABNNameValue
in spite of:
>>xsl:value-of select="concat('A.B.N. ',$vABNNameValue)"/
Ranjit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
Renjit
I did the same as u mentioned
but now there is an error in the java Application</SAP:Category>
<SAP:Code area="MAPPING">STREAM_TRANSFORMATION_EX</SAP:Code>
<SAP:P1>com/xxx/xi/utils/schema/SchemaUtilOrders</SAP:P1>
<SAP:P2>ValidationParsingException: ERRORS : cvc-complex~</SAP:P2>
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Java mapping of application triggered an exception</SAP:Stack>
thanks
If you know the positions of your 'A.B.N' string in your field value, then you can use substring and contact functions to get the desired result.
e.g
<xsl:element name="FIELD">
<xsl:value-of select="substring(FIELD,start,end)"/>
</xsl:element>
thanks,
Pooja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can u pls clarify a little more as to wht u exactly are up to?
do u want to eliminate 'A.B.N.' from
>>>xsl:value-of select="concat('A.B.N. ',$vABNNameValue)"/
or what?
Ranjit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.