cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to pass negative value for a currency field.

former_member644654
Participant
0 Kudos

Hi All,

I've a scenario which is RFC to JDBC.

I've a currency field which has the value like "34.15 -" and I'm unable to pass this through XI where I've declared the data type as XSD:STRING.

Kindly let me know how to pass this currency field.

Thanks in Advance,

Sreedhar.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

What do you mean by "unable to pass" ? Mapping raises errors ? JDBC insertion fails ? Anyway, a "xsd:decimal" type would have been more appropriate for such type of values

Chris

former_member644654
Participant
0 Kudos

What do you mean by "unable to pass" ? Mapping raises errors ? JDBC insertion fails ? Anyway, a "xsd:decimal" type would have been more appropriate for such type of values

Hi Chris,

The JDBC insertion fails.

I've changed the data type to XSD:DECIMAL but still it gives an error "Missing Expression".

Sreedhar.

Former Member
0 Kudos

Are you using "XMLSQL" statement ... Could you post an example of your XML payload ?

Chris

former_member644654
Participant
0 Kudos

Hi Chris,

Please find the sample payload below:

- <item>

<VKORG>US01</VKORG>

<VBELN>7096000481</VBELN>

<FKDAT>2009-10-27</FKDAT>

<ERDAT_VBAK>2009-10-27</ERDAT_VBAK>

<AUART>ZOR</AUART>

<AUDAT>2009-10-27</AUDAT>

<VBTYP />

<ERDAT_VBRK>2009-10-27</ERDAT_VBRK>

<FKART>RE</FKART>

<NETWR>35.14-</NETWR>

<MWSBK>0.00</MWSBK>

<TOTAL>35.14-</TOTAL>

<WAERK>USD</WAERK>

<VBELV>7000010691</VBELV>

</item>

Sreedhar.

former_member200962
Active Contributor
0 Kudos
<NETWR>35.14-</NETWR>

If it is not affecting the business can you convert the above value to be represented as -35.14

Source --> Replace (- with empty emtry) --> Concat (first input to concat will be -) --> Target

maybe the way the negative value is being passed is causing some problem.

Regards,

Abhishek.

Former Member
0 Kudos

What are the ABAP types used for these 2 fields ?

Answers (2)

Answers (2)

Former Member
0 Kudos

If you have declared it as string, then it should pass through XI.

Where are you getting this error?

May be you can find out how JDBC expects this field to be...and then handle it in mapping

Former Member
0 Kudos

If you have declared it as string, then it should pass through XI.

Where are you getting this error?

May be you can find out how JDBC expects this field to be...and then handle it in mapping