cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Script Formatting Dec Values

Former Member
0 Kudos

Hello All,

I am printing some decimal data in my sap script(10,200.30).However this depends on user specific settings.If the user specific setting is changed (10.200,30) value appears different.Is there any command in Script through which i can control just as date (SET DATE MASK).

Please let me know.

Thanks in advcance.

Regards

Amruta

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can use /: SET COUNTRY country_key.

Svetlin

Former Member
0 Kudos

Hello Svetlin,

Thanks for the reply.

I have kept my user setting to 1.234,5.I have checked T005X table.The Decimal notation is 1,234.5 for the country which i have selected.

I have used the command .

However even after that i am still getting the same output(1.23,5)Is there any thing additional that needs to be done?

Regards

Amruta

Former Member
0 Kudos

You can write a subroutine which will find out user setting based upon the user id using table USR01 (USR01-DCPFM) and then set the formats during runtime accordingly. Call this routine in layout before printing the Quantity. So it will get the output format during runtime and will display accordingly.

Former Member
0 Kudos

Hi Amruta,

Pls verify that you had given '' when using the set country command like ...

/: SET COUNTRY 'IN'

Thanks & Regards,

Renjith.

Former Member
0 Kudos

Thanks Renjith and Ashish,

Firstly I have too many fields for formatting.So subroutine op[tion for each field is not preffered option.However, as Renjith you have mentioned I am using same way with '' for country.Still it is not overriding the user master data option.

I am using it in Printwork bench in text elements .

Former Member
0 Kudos

Just to try this out - can you see if the quantity is to be passed to a character variable and use this in display.