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

Number format problem.

former_member205645
Participant
0 Likes
1,166

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 ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,107

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.

7 REPLIES 7
Read only

Former Member
0 Likes
1,107

hiii

you can use this function module to convet it CONVERT_NUMBER.

thanks

Read only

0 Likes
1,107

Can you give me a example of the function module call please ?

Read only

Former Member
0 Likes
1,108

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.

Read only

Former Member
0 Likes
1,107

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

Read only

Former Member
0 Likes
1,107

You can first check the decimal notation format in tcode SU01.

Make the notation which has the dot as well..

Hope this helps!

Read only

Former Member
0 Likes
1,107

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

Read only

former_member205645
Participant
0 Likes
1,107

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.