cancel
Showing results for 
Search instead for 
Did you mean: 

How to enforce position after decimal point

Former Member
0 Kudos

Hi,

i need to enforce a position after the decimal point in an SAPScript Form.

The Form is MEDRUCK_RV and the field ist RM06P-PRMG1.

I tried to enforce it with RM06P-PRMG1(Z9.1) but it doesn't work.

I need to cut the left-hand zeros and display one position after the decimal point.

Can someone help?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Seems its a character field . thats why may be it did not work. use some numeric variable.

Regards,

Nageswar

Former Member
0 Kudos

Hi,

Try this.

DATA : DFORMAT TYPE XUDCPFM,

L TYPE I.

SHIFT RM06P-PRMG1 LEFT DELETING LEADING '0'.

SELECT SINGLE DCPFM FROM USR01

INTO DFORMAT WHERE BNAME = SY-UNAME.

IF SY-SUBRC EQ 0.

IF DFORMAT EQ 'X'.

SEARCH RM06P-PRMG1 FOR '...'.

ELSE.

SEARCH RM06P-PRMG1 FOR ','.

ENDIF.

ENDIF.

IF SY-FDPOS NE 0.

L = SY-FDPOS + 2.

RM06P-PRMG1 = RM06P-PRMG1+0(L).

ENDIF.

Thank You,

Saritha

Former Member
0 Kudos

hm,

i will try this.

thanks!

Former Member
0 Kudos

Could nobody help me?

former_member187457
Active Contributor
0 Kudos

hi SG

i think for that u have to call routine in the script...

then write a routine program in se38....do editing in the program and pass the value to the script...

thnx

Rohit