cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve negative sign with JCO?

Former Member
0 Kudos

Hi,

I have an issue while reading table S066 and especially field OEIKW. I never get the negative sign...

Here is a part of my code:

String oeikw = table.getField("OEIKW").getString();

Does anyone have an idea?

thanks in advance.

Stephane.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

The type Binary Coded Decimal(BCD) is taken as Bigdecimal in java. In the followed document it is termed as the same and in the standard code of my application also it is retrieved as same.

Hope it works for u.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8798be90-0201-0010-d093-85f72877...

Regards,

Sateesh Chandra

Former Member
0 Kudos

Hi,

I tried but unfortunately nothing new.

It looks like the root cause is somewhere else...

thanks for your interest.

Regards,

Stephane.

Former Member
0 Kudos

Hi,

try to achieve in different ways.

like

table.getString(FIELDNAME);

table.getValue(FIELDNAME);

and typecast to string.

Also you can get the type of the value with getType() method.

Regards,

Sateesh Chandra

Former Member
0 Kudos

Hello,

I get the same results with the 3 different ways and the type returned by the RFC with JCO is BCD whereas it is a CURR in SAP.

Have you ever heard about such kind of issue?

I have read on the web (http://help.sap.com/saphelp_nw04/helpdata/en/a5/3ec9ea4ac011d1894e0000e829fbbd/content.htm)

that CURR should never be used as is but I dont know whether JCO supports BAPICURR_D or BAPICUREXT, if this can help...

I am a bit new to SAP so I apologize if my explanation is not good.

thank you.

Regards,

Stephane Decoppet.