Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SAP Script : using Perform to do Arthematic Operation

Dear All,

I am having a problem in SAP Script. I have 2 fields total and Tax, I have to perform a arthematic operation and get sub-total, Total - Tax. I am using below code but I am getting error as CONVT_NO_NUMBER. UNABLE TO INTERPRET ' 01500.00'as a number.

Please help me in this regard. please seee the code ..as I am a new-bie, I might making some silly mistake. Please look at this problem and suggest me.

I have been suggested by my friend to use ..Move but I am not sure ..how to do that. Please kindly spare some time.

/: PERFORM GET_SUBTOTAL IN PROGRAM ZGET_SUBTOTAL

/: USING &BSEG-WRBTR&

/: USING &BSEG-WMWST&

/: CHANGING &S_SUBTOTAL&

/: ENDPERFORM.

Sub-routine Program.

PROGRAM ZGET_SUBTOTAL.

FORM GET_SUBTOTAL TABLES INT_COND STRUCTURE ITCSY

OUT_COND STRUCTURE ITCSY.

DATA : W_WRBTR TYPE BSEG-WRBTR, " Total

W_WMWST TYPE BSEG-WMWST. " Tax

READ TABLE INT_COND INDEX 1.

W_WRBTR = INT_COND-VALUE.

READ TABLE INT_COND INDEX 2.

W_WMWST = INT_COND-VALUE.

OUT_COND-NAME = 'S_SUBTOTAL'.

OUT_COND-VALUE = W_WRBTR - W_WMWST.

MODIFY OUT_COND INDEX 1.

ENDFORM.

Thanking you.

With kind Regards

Venkat

Tags:
replied

Ok, but you need to make it as currency field with out commas and you will be able to do manipulations.

i think Rich's suggestion will work.

Regards

vijay

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question