cancel
Showing results for 
Search instead for 
Did you mean: 

what is the function module that displays negative numerical number in abap?

Former Member
0 Kudos

; eg in abap -45 is displayed as 45- ,so how to display -45?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member183164
Active Participant
0 Kudos

Hi,

Check the FM: CLOI_PUT_SIGN_IN_FRONT

You can try this below code also:

SHIFT amount RIGHT DELETING TRAILING '-'.

SHIFT amount LEFT DELETING LEADING ' '.

CONCATENATE '-' amount INTO amount.

Regards,
Kiran

former_member358139
Discoverer
0 Kudos

Hi,

Use the below function module to change the opposite sign symbol..,

REPORT  z_demo_jg1.

PARAMETERS p_amount(10) TYPE c OBLIGATORY DEFAULT '100.15-'.

WRITE:/ 'BEFORE:', p_amount.

CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
  CHANGING
    value = p_amount.

WRITE:/ 'AFTER:', p_amount.

Thanks,
Patan.