cancel
Showing results for 
Search instead for 
Did you mean: 

sign

Former Member
0 Kudos

Hi,

i am using a dataobject in my print program to get the negative values of amount of a certain quantity. This negative value is then used in my form to get the final display as described below. But i am not getting the negative sign in that value. What could be reasons and possible solution?

ELSEIF BKPF-BLART ='Z2'. "If the document type is 'Z2' all the quantities will be negative

CLEAR: G_TOT_AMT, G_TOT_GST2, G_TOTAL.

LOOP AT T_BSEG1.

G_Z2 = T_BSEG1-DMBTR * -1.

G_TOT_AMT = G_TOT_AMT + G_Z2.

ENDLOOP.

LOOP AT T_BSEG1.

G_COUNT = SY-TABIX.

G_GST2 = ( T_BSEG1-DMBTR / G_TOT_AMT ) * T_BSEG3-GST.

G_TOT_GST2 = G_TOT_GST2 + G_GST2.

PERFORM SUB_WRITE_FORM.

ENDLOOP.

G_TOTAL = G_TOT_AMT + G_TOT_GST2.

WRITE G_TOTAL TO G_CURR_TOTAL CURRENCY 'AUD'.

CONCATENATE '$' G_CURR_TOTAL INTO G_CURR_TOTAL.

CONDENSE G_CURR_TOTAL NO-GAPS.

PERFORM SUB1_WRITE_FORM.

In the Form:

/E ELEDATA

LI ,,&G_COUNT&,,&T_BSEG1-SGTXT&,,&G_GST2&,,&T_BSEG1-DMBTR&

TZ ,,Total for Items,,&G_TOT_GST2&,,&G_TOT_AMT&

GT ,,Total Amount (including GST),,&G_CURR_TOTAL&

REGARDS,

VISHWANATH

Accepted Solutions (0)

Answers (1)

Answers (1)

raguraman_c
Active Contributor
0 Kudos

Hi,

Try this function module in your print program

CLOI_PUT_SIGN_IN_FRONT - Move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all character fields), not right justifed as numbers normally are.

I couldn't get y its not printing. but this might solve your problem.

Feel free to revert back.

--Ragu