2009 Jun 11 5:45 AM
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.
2009 Jun 11 5:50 AM
Dear Hari,
You can achive this with ur system setting or with help of ur functional consultant.
Rgds,
Kiran
2009 Jun 11 6:14 AM
2009 Jun 11 6:14 AM
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
2009 Jun 11 6:23 AM
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
2009 Jun 11 6:26 AM
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
2009 Jun 11 7:37 AM
Hi Prasanth,
Thanks for your reply .It's not working .
Regards
Nandan.
2009 Jun 11 7:39 AM
2009 Jun 11 7:47 AM
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.
2009 Jun 11 8:00 AM
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.
2009 Jun 11 8:13 AM
Hi,
I am getting the value like 5345678.00 i want in this format 5,345,678.00 .
Regards
Nandan
2009 Jun 11 9:18 AM
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.
2009 Jun 11 9:27 AM
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
2009 Jun 11 7:37 AM
data: p1 type p DECIMALS 2.
p1 = '3121212.22'.
write p1. ---u will the required format.
Tried like this?
2009 Jun 11 9:22 AM
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).
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |