# Move Minus Sign from Right to Left of Negative Number in SAP Smartform

In ABAP when displaying or printing negative numeric value the minus sign is on the right of the value instead of left of the number. So ABAP developers or Smartform developers are required to format negative numbers and move minus sign from right to left of the number before printing it.

This ABAP tutorial includes a following methods :

**number format option** for SAP Smartform to shift the negative sign from right to the left of the number

**ABAP codes** to move minus sign from right to the left of the negative number

**ABAP function module CLOI_PUT_SIGN_IN_FRONT** to set negative sign to the left side of the number value

As best practice to print negative values with minus sign leading the value instead of trailing is to format negative numeric values according to your requirements.
And the solution is as simple as using the **(<C) formatting option** in the Text control where you print the numeric value.

Here is ABAP code block which can help you convert a numeric value into string, condense string value to remove leading spaces and then move minus sign to left from right of negative number value.

Please note that the following ABAP code reads numeric value into a local variable.
Then checks if it is a negative number or not. If it has a negative numeric value then multiplies with -1 in order to take the absolute value of the numeric data.
After making the number positive, the ABAP code saves it into a character variable which is used to display numeric value on Text object on SAP Smartform document.
We've now get rid of the minus sign of the number value.
Using SHIFT ... LEFT DELETE LEADING ' ' statement the leading space characters are cleared.
If the original number value is negative, as last step of the ABAP script, the minus sign "-" is added in front of the character value by using CONCATENATE command.

This is how ABAP developers can move minus sign from right of the negative number to left side by using ABAP code and display value on a Text object on SAP Smartform document.

You can create a form method in order to simplify this ABAP code block for using every numeric value you print on your SAP Smartforms output documents.

Using ABAP function module **CLOI_PUT_SIGN_IN_FRONT** is an other option to bring the minus sign to front of the negative number value.

In order to use the CLOI_PUT_SIGN_IN_FRONT function module, ABAP developers should store the numeric value in a character like CLIKE data type.
Here is an example where you can use the codes in your ABAP programs.

The output of the above ABAP sample report is as seen in below screenshot