2008 Aug 11 11:31 AM
Hello Gurus, i have a problem when trying to show a number in a text type screen field. The number in the database is for example 13.222,00. After the select where i`m using the same type for the variable, preis will have the value 13222,00 without the dot.
data preis like ekpo-netpr.
select single netpr from ekpo into preis
WHERE ebeln = GODYNPRO-PO_NUMBER.
My request is to show the number including the dot no matter what.
Can anyone help ?
2008 Aug 11 11:34 AM
Hi,
Pass the number in to the char field and concatenate dot at the last.
concatenate w_char '.' into w_result.
then you will get dot at the last.
Hope it helps you.
You can first check the decimal notation format in tcode SU01.
Make the notation which has the dot as well..
Hope this helps!
2008 Aug 11 11:32 AM
hiii
you can use this function module to convet it CONVERT_NUMBER.
thanks
2008 Aug 11 11:39 AM
Can you give me a example of the function module call please ?
2008 Aug 11 11:34 AM
Hi,
Pass the number in to the char field and concatenate dot at the last.
concatenate w_char '.' into w_result.
then you will get dot at the last.
Hope it helps you.
2008 Aug 11 11:38 AM
change the type to character and then pass it to a currency field. if u need
get it in a character type field.
Regards
Anbu
2008 Aug 11 11:39 AM
You can first check the decimal notation format in tcode SU01.
Make the notation which has the dot as well..
Hope this helps!
2008 Aug 11 11:40 AM
Hi,
This might be because SAP processing currency in some different way.
Try using FM
CURRENCY_AMOUNT_SAP_TO_DISPLAY to convert currency as displayed and stored in database.
FYI, you can use FM
CURRENCY_AMOUNT_DISPLAY_TO_SAP to convert currency you are displaying to format SAP is storing in DB.
Regards,
Mohaiyuddin
2008 Aug 12 8:42 AM
I`ve got the solution
data: temp like ekpo-netpr,
temp_t type char20.
GET PARAMETER ID 'PRT' FIELD temp_t.
temp = temp_t.
write temp to temp_t DECIMALS 2.
condense temp_t.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |