cancel
Showing results for 
Search instead for 
Did you mean: 

Alignment required in to display the Amount field

Former Member
0 Kudos

Hi Friends,

kindly help me facing problem in to display the amount using decimal places also

nedd to display the Pretax and aftertax amount for that purpose

written below code .

it is picking amount fields but the amount is printing like this

pretax aftertax

$ 34.67 $ 0.00

$ 21.64 $ 120.90->

I need to display amount fields in order like, thens, hundreds, thousands like.

read table lt_final into ls_final with key bplan = 'PRD'.

if ls_final-pretx = 'X'.

pretax = ls_final-eecst.

write pretax to lv_pre. "#EC UOM_IN_MES

concatenate c_dollar lv_pre into lv_dollar.

shift lv_dollar right deleting trailing space.

*Pretax totals

lv_pretax = lv_pre.

read table out_pay1 with key name = 'PRETAX'.

check sy-subrc = 0.

out_pay1-value = lv_dollar.

modify out_pay1 index sy-tabix.

clear out_pay1.

else.

aftertax = ls_final-eecst.

write aftertax to lv_after.

concatenate c_dollar lv_after into lv_dollar1.

shift lv_dollar1 right deleting trailing space.

  • Aftertax totals.

lv_aftertax = lv_after.

read table out_pay1 with key name = 'AFTERTAX'.

check sy-subrc = 0.

out_pay1-value = lv_dollar1.

modify out_pay1 index sy-tabix.

clear out_pay1.

endif.

Thanks,

Sai

Accepted Solutions (0)

Answers (4)

Answers (4)

prakashjasti
Contributor
0 Kudos

Try to print the amount column in right alignment by taking font style as right aligned

satyajit_mohapatra
Active Contributor
0 Kudos

Not able to figure out the exact requirement..............But you can try condensing the amount fields by placing (C) after the amount field. Sometimes, the alignment issues occur due to lengthy amount fields.

Former Member
0 Kudos

Hi Daya,

I would like to print two amount values with decimals.

like : like Pretax after tax

$ 0.00

$ 3.45 $ 120.67

$ 0.00 $ 0.00

I created using right justification one paragraph format with two tabs

60.00 ch Right

68.00 ch Right

But my program output is comming like this.

any one please help me.

Program output:

Pretax after tax

$ 0.00

$ 3.45 $ 120.67

$ 0.00 $ 0.00

Thanks,

Sai

Former Member
0 Kudos

Hi,

Could you please be more precise in your question?

Give an example of the format you want the amount to come.

Thanks,

Daya.