Skip to Content
0
Former Member
May 29, 2008 at 09:09 AM

Trouble with decimal delimiter in VC

16 Views

Hi Guys!

I've got quite strange problem.

Visual Composer seems to incorrectly deal with decimal delimiters.

Just a quick exapmle.

I'm trying to implement incoming invoice creation in VC. To post invoice I use standard BAPI (BAPI_INCOMINGINVOICE_CREATE). To get purchase order information I use standard BAPI (BAPI_PO_GETDETAILS). [Here is|http://www.dennisk.org/tmp/SAP/po_sap.jpg] how purchase order looks like in SAP. [Here's|http://www.dennisk.org/tmp/SAP/inv_creation_port.jpg] how invoice creation screen looks like in Internet Explorer.

After deployment I was able to post invoice, but there was no financial information (gross value, net prices, etc.), [Here's screenshot|http://www.dennisk.org/tmp/SAP/inv_created_sap.jpg] . Then I noticed, that if invoice contains only integer number (without any digits after decimal point) - invoice can be posted with that financial info.

Then I tried at some custom model to do something with NET_PRICE field, I entered formula for that field ( NVAL(NSTR(@NET_PRICE,'10,2')) ). After that I was able to transfer net price, but it was rounded (no decimal digits again). [Here's screenshot|http://www.dennisk.org/tmp/SAP/cust_bapi_result_formula.jpg].

Then I tried to enter another formula for GROS_VALUE ( NVAL(REPLACE(@GROS_VALUE, '.', ',')) ). After that gross value was passed, but it was wrong (from 2542.37 it became 254237.00) [Here's screenshot|http://www.dennisk.org/tmp/SAP/vc_cust_module2.jpg].

The main question is - what is happening with decimal delimiters in VC and how to make them working?

One more things. This behavior occurs even if data is transfered directly from BAPI to BAPI in VC.

Thanks in advance for help and support!

Regards,

DK