*M ove minus sign from end to begining of number value *i .e. from 100.00- to -100.00 * check if negative amount IF p_amount LT 0. SHIFT p_amount RIGHT DELETING TRAILING '-' . SHIFT p_amount LEFT DELETING LEADING ' ' . CONCATENATE '-' p_amount INTO p_amount. ELSE . SHIFT p_amount LEFT DELETING LEADING ' ' . ENDIF . |
*S ame thing can be achieved by using the FM CLOI_PUT_SIGN_IN_FRONT. *E x: 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 for sharing this Information,
ReplyDeleteGot to learn new things from your Blog on Sap abap.
http://thecreatingexperts.com/sap-abap-training-in-chennai/
Both online and classroom training is provided.
Contact 8122241286