cancel
Showing results for 
Search instead for 
Did you mean: 

decimal places restriction as well as condense

Former Member
0 Kudos

HI All,

I have a table in my smart form , I have a currency column & description column in my table. I have restricted my currency field to only 2 decimal places by using &field(.2)&, It is working fine but my problem is it is printing one line down to the next description column......if i tried with &field(C)&....it is working fine....but i want to use both (.2) & (C).......

Can anyone help me......

Accepted Solutions (0)

Answers (5)

Answers (5)

0 Kudos

Hi

Give the refernce currency for the net amount in the curr/quantity field of global definitions.

your problem of restricting the decimal places and the width would be solved.

Regards,

Vishwanath

Former Member
0 Kudos

Hello,

Plz us the function for making round off:

LOOP AT IT_FINAL.

NAMT = IT_FINAL-NETMT.

CALL FUNCTION 'HR_IN_ROUND_AMT'

EXPORTING

AMOUNT = NAMT

RNDOFF = 100

RNDLMT = 'N'

IMPORTING

RETAMT = AMT.

IT_FINAL-R_NETAMT = AMT.

MODIFY IT_FINAL TRANSPORTING R_NETAMT .

ENDLOOP.

Than plz make append your internal table in the driver program itself for yr smartform as given below:

Loop At it_final.

move-corresponding it_final TO it_final2.

move-corresponding it_final TO it_final3.

APPEND it_final2.

APPEND it_final3.

Thanks & Regards,

Akg

Former Member
0 Kudos

Hi Visnusree,

you must Declare variable of decimal 2 and condense that variable.

Thanks

Dnyaneshwar.

Former Member
0 Kudos

Hi

This is because of the width. If the width is less to accomodate the currency, to avoid this please increase the width of the currency fields till gets moved to normal position.

Accordingly adjust other columns also.

Shiva

Former Member
0 Kudos

Even tho (.2C) works, you should increase the space you got for that field, like proposed.

Cause this amount can actually get bigger, and you probably dont want it to move down to next line when you got it with 5 digits or more.

madhu_vadlamani
Active Contributor
0 Kudos

Hi Visnusree,

There are some options. 1) create you own character formats.2) Increase the space for that field.

Regards,

Madhu.