Skip to Content

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

remove negative and adding ( )

Hi experts,

I have variable v_var(12) type p decimals 4.

The default value is 152.26-.

I need to remove the negative and the output should be like this ( 152.26 ).

I tried to concatenate but it is giving error.

Please guide me.

Thank you very much.

regards,

s.saravannan

Tags:
Former Member
Former Member replied

Hi,

If you want to remove the negative sign then you can use the ABS keyword as mentioned earlier in the response...

If you want to concatenate then you need to move this value into a field having data type CHAR....

Use the following code:

DATA tmp type string.

MOVE v_var to tmp.

CONCATENATE '(' tmp ')' INTO tmp SEPERATED BY SPACE.

Hope this helps..

Regards,

Kunjal

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