2010 Jan 13 5:44 PM
Hi SDN,
How can I format a field type float and display in alv grid, using the thousand separator?
Thanks.
Best regards,
Maria João Rocha
2010 Jan 13 8:09 PM
use a conversion exit, you will have to write one.
Regards,
Clemens
Hi SDN,
How can I format a field type float and display in alv grid, using the thousand separator?
Thanks.
Best regards,
Maria João Rocha
2010 Jan 13 5:47 PM
need to move the floating value to numeric type and display..
2010 Jan 13 8:09 PM
use a conversion exit, you will have to write one.
Regards,
Clemens
2010 Jan 13 10:20 PM
You can set the Edit Mask and Conversion Exit to convert the Float to Quantity.
ls_fcat-edit_mask = '==FLTQU'.
ls_fcat-convexit = 'FLTQU'.
Regards,
Naimesh Patel
2010 Jan 14 10:02 AM
Thanks for the replies.
Do you know any conversion exit foi a float bu with 2 decimals places?
The CONVERSION_EXIT_FLTQU_OUTPUT has 3 places for the decimals.
Best regards,
Maria João Rocha
2010 Jan 14 10:13 AM
Hi maria,
Try this way:-
DATA : v1 TYPE p DECIMALS 4 VALUE '12345.6789',
v2 TYPE p DECIMALS 2.
v2 = v1.
WRITE v2." ouptut : 12,345.68
2010 Jan 14 10:18 AM
Thanks Kumar ,
but i'm using alv grid, and the internal table to pass to the method grid_100->set_table_for_first_display, has many float fields.
Best regards,
Maria João Rocha
2010 Jan 14 10:26 AM
Hi,
Exit PROZA used in Domain IMA_PROZ used by data element IMA_PROZ_ALL has 2 decimals. But this exit is not correct because it does not use WRITE TO and thus does not create the right format. Look at this code to get a sample of how-not-to-create a conversion exit.
FUNCTION CONVERSION_EXIT_PROZA_OUTPUT.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(INPUT)
*" EXPORTING
*" VALUE(OUTPUT)
*"----------------------------------------------------------------------
DATA: L_OUTPUT13_2(8) TYPE P DECIMALS 2,
L_LEN TYPE I, L_BEGIN TYPE I.
L_OUTPUT13_2 = INPUT.
OUTPUT = L_OUTPUT13_2.
CONDENSE OUTPUT.
L_LEN = STRLEN( OUTPUT ).
IF L_LEN < 6.
CLEAR OUTPUT.
L_BEGIN = 6 - L_LEN.
OUTPUT+L_BEGIN(L_LEN) = L_OUTPUT13_2.
ENDIF.
ENDFUNCTION.
Regards,
Clemens
2010 Jan 14 10:41 AM
An example for what i need:
2.4356510000000000E+06 -> 243.651,00
Best regards,
Maria João Rocha
2010 Jan 14 10:54 AM
Hi Maria,
Try this
in Fieldcat:
W_FIELDCAT-outputlen = 20.
W_FIELDCAT-decimals_out = 2.
This should solve your issue.
Nag
2010 Jan 14 11:00 AM
Hi Naga Mohan Kummara
That way thousand separator is missing.
Best regards,
Maria João Rocha
2010 Jan 14 11:25 AM
Hi ,
Just have a look at following field catalog.
FS_FIELDCAT-FIELDNAME = 'TEST'.
FS_FIELDCAT-COL_POS = WC_COLUMN.
FS_FIELDCAT-OUTPUTLEN = 20.
FS_FIELDCAT-DECIMALS_OUT = 2.
FS_FIELDCAT-edit_mask = '==FLTQU'.
FS_FIELDCAT-TABNAME = 'INT_OUTPUT'.
Thousand separtor displaying correctly.. Give a try..
Nag
2010 Jan 14 11:35 AM
Hi Naga Mohan Kummara,
edit_mask = '==FLTQU', the data element OIO_QUANTITY in the conversion exit , has domain 'MENGE' with 3 decimals, i need the output with 2 decimals.
Best regards,
Maria João Rocha
2010 Jan 14 11:44 AM
2010 Jan 14 4:28 PM
Hi,
it works with fieldcat-edit_mask = '==DEC2'
Best regards,
Maria João Rocha
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |