08-01-2007 3:50 PM
Hello friends,
I am using a grid alv to show some data, but when a column has negative number, they are shown without the sign (neither in the front, nor in the back), this is the code where I show the column
clear gt_fieldcat_data.
gt_fieldcat_data-fieldname = 'ZQTPRC'.
gt_fieldcat_data-seltext_m = 'QT disponible'.
gt_fieldcat_data-inttype = 'P'.
gt_fieldcat_data-outputlen = 18.
gt_fieldcat_data-decimals_out = '2'.
append gt_fieldcat_data.
what can I do so the negative number appear when it is negative. (it can be negative or positive)
Thanks for ur help !!!
Javier
08-01-2007 3:54 PM
Hi,
Are you sure that the data element of your data support negatives values ?
Have you checked in debug that your data are really regatives?
Mathieu
08-01-2007 3:56 PM
yes, i checked in the bug, and the variable contains the negative number, for example 6-, but it shows 6.
08-01-2007 3:57 PM
if the internal table is filled with negative sign... try this way... create a variable as char and move the value to this char value and try displaying in ur alv output... it will display..
08-01-2007 3:59 PM
HI,
Change the Field to String or Charecter then it will display the Negative sign
Regards
Sudheer
08-01-2007 4:02 PM
from which table in dictionary data is coming... or can you find the similar field in data dictionary will corresponds to your data
try to fill these fields
gt_fieldcat_data-ref_fieldname
gt_fieldcat_data-ref_tabname
just for example if I am displayng material in ALV then I will fill
gt_fieldcat_data-ref_fieldname = 'MARA'
gt_fieldcat_data-ref_tabname = 'MATNR'
08-01-2007 4:02 PM
Hi,
I think you must use a Character type to do this.
Try to move the value to this data and display it.
Regards.
Marcelo Ramos
08-01-2007 4:03 PM
hi,
pass "<b>-</b>________________" (thats 16 underscroes) to EDIT_MASK of field catalog for the required field.
Or
U can copy the fm CLOI_PUT_SIGN_IN_FRONT to CONVERSION_EXIT_SIGN_OUTPUT and activate it. Then in edit mask use this '==SIGN' or u can create one domain and refer the domain to that field. In that domain u set the convertion routine = SIGN
Thanks
Mahesh