Skip to Content

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

How to move negative sign to the front?

Hi,

I have a string ' 23.45-'. It is a negative value. How do i present it in '-23.45' ?

I don't have the function module CLOI_PUT_SIGN_IN_FRONT in the system.

How to achieve that?

Regards,

Rayden

Tags:
Former Member
Former Member replied

Hi

Do like this.

DATA: TEXT1(1) TYPE C,

VALUE(5) type c.

value = '90-'.

SEARCH VALUE FOR '-'.

IF SY-SUBRC = 0 AND SY-FDPOS <> 0.

SPLIT VALUE AT '-' INTO VALUE TEXT1.

CONDENSE VALUE.

CONCATENATE '-' VALUE INTO VALUE.

ELSE.

CONDENSE VALUE.

ENDIF.

Regards

Haritha.

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