Skip to Content
0

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

Mar 09, 2017 at 11:30 AM

28

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

NazeerKhan Patan Mar 09, 2017 at 11:37 AM
0

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.
Share
10 |10000 characters needed characters left characters exceeded
Kiran Basavaraju
Mar 09, 2017 at 11:41 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded