2007 Oct 18 6:56 AM
I have a currency field in ALV, and I set the currency key for this field,
gr_fieldcat-cfieldname = 'WAERS'.
gr_fieldcat-datatype = 'CURR'.
gr_fieldcat-ctabname = 'ITAB_RESULT'.
please see the following info:
step 0, the original amount is 13.45
step 1, run program, now display the amount correctly, 1.345
step 2, save the layout as 'layout1'
step 3, quit the program
step 4, run program again, now the amount is correct:1.345
step 5, choose the layout 'layout1'
step 6, now, the amount is incorrectly, it is 13.45
it seems the currency key doesn't work now. but I don't know why.
can anybody tell me the reason? thank you!!
2007 Oct 18 7:14 AM
Add in field catelog....
CLEAR gs_fcat.
gs_fcat-fieldname = 'CURRENT'.
gs_fcat-ref_table = 'ITAB_RESULT'.
gs_fcat-coltext = 'currency'.
gs_fcat-seltext = 'currency'.
gs_fcat-col_pos = 1.
gs_fcat-outputlen = 13.
gs_fcat-no_zero = abap_true.
gs_fcat-datatype = 'CURR'.
gs_fcat-do_sum = abap_true.
APPEND gs_fcat TO gt_fcat.
Message was edited by:
Minal Nampalliwar
2007 Oct 18 9:13 AM
2007 Oct 18 11:12 AM
can anybody help me?
it always displays correctly. but if I save a variant and then choose this variant later, the currency cannot be displayed correctly.
2007 Oct 18 11:14 AM
2007 Oct 18 11:23 AM