Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Decimal quantities at PO

Former Member
0 Kudos

Hi.

I have a problem with the quantities that arrive from the PO tp its output form.

The vendor's country should "decide" its format (dots or commas).

Couldn't find any notes about it.

Anybodey has an idea ????

Thanks all,

Rebeka

2 REPLIES 2

0 Kudos

hi,

Use SET COUNTRY cntry.

Refer this code.

DATA: dat TYPE sy-datum VALUE '20020127',

num TYPE p LENGTH 8 DECIMALS 2 VALUE '1234567.89',

t005x_wa TYPE t005x,

t005x_tab TYPE SORTED TABLE OF t005x

WITH NON-UNIQUE KEY xdezp datfm.

SELECT *

FROM t005x

INTO TABLE t005x_tab.

DELETE ADJACENT DUPLICATES FROM t005x_tab.

LOOP AT t005x_tab INTO t005x_wa.

SET COUNTRY t005x_wa-land.

WRITE: / num, dat.

ENDLOOP.

Best Regards,

Surendar Reddy.

Edited by: suredarreddy pulimamidi on Feb 2, 2009 2:46 PM

Former Member
0 Kudos

If commas and Decimals are your problem then you just condense the quantity by using

CONDENSE <qty> statement.

This will give you the quantity as 3534.12.

If you want to set it according to the Country then you should first identify the Countries for vendors which you will be using for printing and then try using the code as given by Mr.Surendar