Application Development and Automation 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: 
Read only

Thousand seperator

SrihariNerella
Participant
0 Likes
2,051

Hi,

I am working on Vendor Balances .I got the balance of all vendors but problem is i want the separator of thousand .

For example 200000.34 i want to show this one as 2,00,000.34

548435265.67 i want to show this one as 54,84,35,265.67

For this any function module is availble .Please give your suggestion.

Regards

Nandan.

Hi,

I am working on Vendor Balances .I got the balance of all vendors but problem is i want the separator of thousand .

For example 200000.34 i want to show this one as 2,00,000.34

548435265.67 i want to show this one as 54,84,35,265.67

For this any function module is availble .Please give your suggestion.

Regards

Nandan.

14 REPLIES 14
Read only

Former Member
0 Likes
2,001

Dear Hari,

You can achive this with ur system setting or with help of ur functional consultant.

Rgds,

Kiran

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
2,001

Check user setting in SU3

Read only

Former Member
0 Likes
2,001

Hi Nandan,

You can achieve this by changing the settings in the user profiles,,, or at SU01 TCode,,,

If still you have the same problem then pass the reference filed & Table for the vendor balances field,,,

Thanks & regards,

Dileep .C

Read only

0 Likes
2,001

HI,

Thanks for your quick reply . I check the usersetting that same as our format . I am using Bapi for getting vendor balance on particular date .In the bapi i am getting balance with out comma . There is no function module for changing value with thosand seperator .

Regards

Nandan

Read only

0 Likes
2,001

Hi,

Declare a Variable with currency type and pass teh value that you get from the BAPI to it. This might help you out.

Thanks,

Prashanth

Read only

0 Likes
2,001

Hi Prasanth,

Thanks for your reply .It's not working .

Regards

Nandan.

Read only

0 Likes
2,001

Hi,

What is the BAPI that you are using?

Prashanth

Read only

0 Likes
2,001

Hi,

I am using the fallowing bapi .

CALL FUNCTION 'BAPI_AP_ACC_GETKEYDATEBALANCE'

EXPORTING

COMPANYCODE = '1000'

VENDOR = VENDOR

KEYDATE = KEYDATE

  • BALANCESPGLI = ' '

  • NOTEDITEMS = ' '

  • IMPORTING

  • RETURN =

TABLES

KEYBALANCE = KEYBALANCE

.

LOOP AT KEYBALANCE.

KDMBTR = KEYBALANCE-LC_BAL.

KWRBTR = KEYBALANCE-T_CURR_BAL.

CUR = KEYBALANCE-CURRENCY.

ENDLOOP.

balance = kdmbtr.

I taken balance as dmbtr .

But it is not showing .

Regards

Nandan.

Read only

0 Likes
2,001
   

select single * from usr01 where bname = sy-uname.

if usr01-dcpfm = 'X'.
right_decimal = '.'. 
wrong_decimal = ','.
else.
right_decimal = ','.
wrong_decimal = '.'.
endif.

now use this statement .
loop at itab. " if u see the separators here for the field 
replace wrong_decimal with right_decimal into itab-field .  "<------\
write itab-field. 
endloop.

here itab-field is ur currency or quantity field .

and then check the o/p .

for initial testing use write statement on the currency field and check the o/p . alter the o/p using hte above logic .

ex : write itab-field to gv_field .

First see the o/p and then modify the logic as per ur requirement.

Br,

Vijay.

Read only

0 Likes
2,001

Hi,

I am getting the value like 5345678.00 i want in this format 5,345,678.00 .

Regards

Nandan

Read only

0 Likes
2,001

write itab-field will give u the output .

from 5345678.00 to 5,345,678.00 .

Tell me ur o/p after write statement .

br,

vijay.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,001

Hello Srihari,

I think you have to use the WRITE .. TO ... CURRENCY stmt.

LOOP AT KEYBALANCE.
KDMBTR = KEYBALANCE-LC_BAL.
KWRBTR = KEYBALANCE-T_CURR_BAL.
CUR = KEYBALANCE-CURRENCY.
ENDLOOP.

" balance = kdmbtr.

WRITE KDMBTR TO BALANCE CURRENCY CUR.

Please note that the thousands separator will be displayed based on the currency key.

BR,

Suhas

Read only

Former Member
0 Likes
2,001

data: p1 type p DECIMALS 2.

p1 = '3121212.22'.

write p1. ---u will the required format.

Tried like this?

Read only

SimoneMilesi
Active Contributor
0 Likes
2,001

As told by sniper and Veranji, use the WRITE command.

If you want to put in output, simply

write: balance.

If you need the value into a internal table,

write balance to itab-balance_c.

where itab-balance_c is declare as char (lenght usually is 18 or 20).