Skip to Content
0
Former Member
Apr 13, 2009 at 03:18 PM

Script Output

13 Views

Hi Experts,

In Script form i have 4 columns like credit2008,debits2008, credit2009, debit2009

if no datas any one these column that column has '-' at the last place example

credit2008 debits2008 credit2009 debit2009

20,0000.90 - 98,0000.80 -

this is the actual program but ineed the '-' should be placed in 3rd digit from right.

like credit2008 .

-

plz see the actual program

FORM convert_amount USING p_amt1

p_amt2.

IF p_amt1 = 0.

p_amt2 = '-'.

ELSEIF p_amt1 < 0.

WRITE p_amt1 TO p_amt2.

REPLACE '-' IN p_amt2 WITH ' '.

CONDENSE p_amt2.

CONCATENATE '(' p_amt2 ')' INTO p_amt2.

CONDENSE p_amt2.

ELSE.

WRITE p_amt1 TO p_amt2.

CONDENSE p_amt2.

ENDIF.

ENDFORM.

Plz advice me .

Raja