cancel
Showing results for 
Search instead for 
Did you mean: 

Sapscript - SUMMING command

Former Member
0 Kudos

Hi Guys,

I am summing up amount in sapscript, but I would like to change the output.

I used the PERFORM... command and the CHANGING value is declared in DEFINE command. Heres the code.

DEFINE &TOTAL& = ' '

PERFORM GET_TOTAL IN PROGRAM ZPM_PO_SUBROUTINE_POOL

USING &EKPO-EBELN&

CHANGING &TOTAL&

ENDPERFORM

The &TOTAL& contains 8364.00

Is there a way that it could be like this? 8,634.00

There's no comma in the output, I would like the output to have commas.

Thanks..

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In your layout before displaying use the command

/: SET COUNTRY ' '.

If this doesnt work use

/: SET COUNTRY 'SG'

Else, in your subroutine use this bfore passing to the out_tab (layout)

write var1 to var2 currency 'SG'. (var1 is of currency type and var2 is of char type)

regards,

Narendra.

Former Member
0 Kudos

Hi,

I have already put SET COUNTRY but it doesnt work.

Former Member
0 Kudos

Then try out the write option that was mentioned. It works..

Regards,

Narendra.

Former Member
0 Kudos

Hi,

Thanks. It works.

Former Member
0 Kudos

Hi Tin,

Can you provide me the code you have written in subroutine pool?Please.One of my requirement is also same.

Thanks.

Answers (0)