on 11-27-2006 12:28 PM
Hi All,
I have a small problem with printing a variable which holds currency data.
The thing is in perticular requirment i have to print a currency value which
doesn't contain ( , Comas ) Eg:- 12223434
I want it to be 1,22,23,434...
I have taken it as charecter type and made some split and concatenate
operations and managed but , it is not behaving as per the jusification
that to be printed in the script.
Please help me ...It's a Production Issue.
Thanks,
Zia.
Message was edited by:
zakir ahmed
Hi,
Can you please try
<b> write <fieldname> currency <currencyvariable>.</b>
You need to get the currency depending on the country. Foreg: Japan doesnt require decimals in currency amount.
Thanks,
Rashmi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you try by creating one more variable of 'CURR' type. It would be better if you know any such field in any of the table in your system as in that case you won't need to mention currency reference.
Data : lv_curr type <table-fld_curr> .
lv_curr = your_variable
now print lv_curr.....hope it works....
Regards,
Shikha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check user settings of profile.
other wise use SET-COUNTRY = SPACE.
before printing the value
just check whether it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Call a PERFORM from your SAPSCRIPT and pass the field to which the thousand separator needs to be added and add the following code in the FORM routine in your Z program.
CONSTANTS : lc_regex TYPE string VALUE '([0-9])(?=([0-9])+(?![0-9]))',
lc_new TYPE string VALUE '$1,'.
*
Insert thousand separator for the value
REPLACE
ALL OCCURRENCES OF
REGEX lc_regex
IN field_str WITH lc_new.
<b>Where field_str(of type c/string) is the field passed from the SAP SCRIPT</b>.
Even if its of currency type, move it to a field of type c and then use it as above.
Reward points if you find this useful.
Regards,
Kayal Priyadarshini
Message was edited by:
Kayal Priyadarshini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use this one to Leading Sign to the Left <b>&symbol(<)&</b>
Omitting the Separator for Thousands use <b>&symbol(T)&</b>
Regards
Sudheer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If your problem is with the justification of the value instead of how to insert the comma's then try increasing the size of the cell you are putting the value in. The justification is often lost when the engine is unable to fit the amount in the cell width. Beware that the width of the amount being printed may contain some invisible part which you may limit by limiting the output length at time of print.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.