Skip to Content

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

Negaive Amount

Dear All

I am facing a strange issue first time. I have data type

like

DATA: AMT LIKE BSEG-NETWR.

AMT = 232323.233-

Figure in variable AMT is in negative.

But when i use Write statement to print it on list negative sign is not appearing.

Write:\ AMT.

I also tried AMT = AMT * -1.

But not working.

Tags:
replied

Hi,

Please try this ..

DATA :v_data TYPE p DECIMALS 2,

l_str TYPE string,

l_str1 TYPE string,

l_str2 TYPE string.

v_data = '-300'.

l_str = v_data.

CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'

CHANGING

value = l_str.

MOVE l_str to v_data.

SPLIT l_str at '.' INTO l_str1 l_str2.

WRITE: / l_str1.

Regards,

Murali

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