Application Development 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: 

Output Format for Currency

Former Member
0 Kudos

Hi There,

I have set defaults as '1,000.00' for currency output in the own data but in the output of report it is showing like '1.000,00'.

PS: there is no formating statement in the program as well.

Any advice friends, how can I make it in required format.

Regards,

Shabbar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI ali ,

yeah u can do thi sin scripts ..

take a look at this ..

Country-Dependent Formatting: SET COUNTRY The formatting for certain field types depends on the country settings. These field types include, for example, date fields and number fields that include either a decimal point or the ‘thousands’ separator character. The formatting options defined in the user master record are usually the ones used here. To choose a formatting option other than the one specified in the user master record, use the SET COUNTRY control command. The country-dependent formatting options are stored in the T005X table. Syntax: /: SET COUNTRY country_key You can enter the country key either as a literal value enclosed in quotes or as a symbol.

/: SET COUNTRY 'CAN' /: SET COUNTRY &country_key& Use a blank country name to revert to the setting found in the user master record: /: SET COUNTRY ' ' This SAPscript command actually calls the corresponding ABAP command internally. This guarantees the effect of the SAPscript command to be identical with that of the ABAP command

regards,

VIjay

Message was edited by:

vijay k

10 REPLIES 10

Former Member
0 Kudos

hI

Check your user paramters: System->User Profile->Own Data

Go to Defaults Tab

Max

Former Member
0 Kudos

Hello Ali,

Use <b>Write to</b> command.

Vasanth

Former Member
0 Kudos

Hi,

goto system->userprofile->owndata.

goto defaults tab.

check if the currency type u want is matching with the one selected there.

regards,

keerthi.

0 Kudos

Hi,

I am already done with the user settings in the own data.

also, the write to statement is not working as it is only to mention the decimal places in case of currency.

any other suggestions?

regards,

shabbar

former_member181962
Active Contributor
0 Kudos

Try this way:

write v_quant currency <Currency>.

Regards,

Ravi

Former Member
0 Kudos

U can use the statement

WRITE lval to lcval USING EDIT MAST 'RR_,___.__'.

Former Member
0 Kudos

Hi,

Are you using SET COUNTRY in your program..As this might override the user settings...

Thanks,

Naren

Former Member
0 Kudos

HI CHECK THIS CODE ..

DATA: num1 TYPE p  DECIMALS 4 VALUE '12.3456',
      num2 TYPE p  DECIMALS 0 VALUE '123456'.

SET COUNTRY 'US'.

WRITE: 'USD', num1 CURRENCY 'USD', num2 CURRENCY 'USD',
     / 'BEF', num1 CURRENCY 'BEF', num2 CURRENCY 'BEF',
     / 'KUD', num1 CURRENCY 'KUD', num2 CURRENCY 'KUD'.

u can use this method ..

0 Kudos

Hi,

This set country command seems working for only standard abap list output. but I am working on sapscript forms. Can I use the Set Country statement in sapscript or is there any other way around?

Regards,

Shabbar

Former Member
0 Kudos

HI ali ,

yeah u can do thi sin scripts ..

take a look at this ..

Country-Dependent Formatting: SET COUNTRY The formatting for certain field types depends on the country settings. These field types include, for example, date fields and number fields that include either a decimal point or the ‘thousands’ separator character. The formatting options defined in the user master record are usually the ones used here. To choose a formatting option other than the one specified in the user master record, use the SET COUNTRY control command. The country-dependent formatting options are stored in the T005X table. Syntax: /: SET COUNTRY country_key You can enter the country key either as a literal value enclosed in quotes or as a symbol.

/: SET COUNTRY 'CAN' /: SET COUNTRY &country_key& Use a blank country name to revert to the setting found in the user master record: /: SET COUNTRY ' ' This SAPscript command actually calls the corresponding ABAP command internally. This guarantees the effect of the SAPscript command to be identical with that of the ABAP command

regards,

VIjay

Message was edited by:

vijay k