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: 

sap script issue

Former Member
0 Kudos

Guy's

i have one problem ,i have one field rf140-wrshb,

it's value in print program is 110.00 ,but when

it goes to form it become 110,00 ,when same value

i pass from form to print program to same field

it go for a dump,

for example 110.00 will become 110,00

and 1100.00 will become 1.100,00 ,

<b>Note:</b> user can go for any user setting ,

can some one give me permanent fix for this issue

8 REPLIES 8

vinod_gunaware2
Active Contributor
0 Kudos

Check

System->user profile->Own data -> defaults.

Or use SET country command.

OR use write to currency command statement before sapscript.

Setting the User Decimals Format

Your screen and layout sets decimals are affected by :-

OY01 - Country Global Parameters -> Double click on the country code

SU01 - Maintain users -> Click Defaultsbutton

In the Decimal format section.

regards

vinod

rahulkavuri
Active Contributor
0 Kudos

use control command SET Country

You can set your own country using SET COUNTRY 'IN'.

country details are availiable in T005

Former Member
0 Kudos

hi goto table

<b>usr01</b>and get the

default decimal setting <b>dcpfm</b> for the user

accordingly

change ur code

0 Kudos

can u pls send me code ,which will help me in this regard

usr01

0 Kudos

Hi Sanju,

You don't have to change any code in your program.

After longin to SAP Click ->

System -> User Profile -> Own Data . Here click the "Defaults" Tab. There you will see the Decimal notation Radio button. Change it to your format "1,234,567.89" ( Select the Radio Button Net to that).

Save this and rerun your program.

Thanks

Govind.

Message was edited by: Govindarajan Seenivasan

0 Kudos

use this code in main program

select dcpfm 
  from  usr01
  into v_decimalformat
where bname = sy-uname.

case v_decimalformat.
when 'X'.
* Decimal point is period: N,NNN.NN
* modify ur decimal number into this format
when ' '.
*Decimal point is comma: N.NNN,NN
* modify ur decimal number into this format
when 'Y'.
*Decimal point is N NNN NNN,NN 
* modify ur decimal number into this format
endcase.

after cheking the default format convert ur number into that format & send it to the script

hope i'm clear enuff

get back to me in case of any problem

former_member181962
Active Contributor
0 Kudos

YOu Char type variables wherever applicable.

<i><b>write rf140-wrshb to v_wrshb.</b></i>

TRansfer the char type variables only between the print program and the form.

REgards,

Ravi

Former Member
0 Kudos

go to <b>Systems->User Profile->Own Data</b>. Then click on <b>Defaults</b> Tab. There, you can change the decimal setting to the required format in the <b>Decimal Notation</b> list box.

Regards,

Aswin