03-07-2013 12:15 PM
Hello Experts,
I am using editable ALV.
code for field catalog is:
gs_fldcat-fieldname = 'ZZYEAR4'.
gs_fldcat-tabname = 'ITAB'.
gs_fldcat-ref_fieldname = 'ZZYEAR4'.
gs_fldcat-ref_tabname = 'ZFI_FISCAL_YR'.
gs_fldcat-col_pos = 1.
gs_fldcat-seltext_m = fy1.
gs_fldcat-edit = 'X'.
gs_fldcat-do_sum = 'X'.
append gs_fldcat to gt_fldcat.
clear gs_fldcat.
Based on some logic column header must be dynamically set for this i am passing variable fy1 in seltext_m field.
As the ALV is editable for column of type 'currency' I am passing reference table and field name also for that column.
Problem is ALV is displaying with text as maintained in reference field but not as in seltext_m field.
How can I maintain dynamic column headers.
Please help.
03-07-2013 3:34 PM
Hi,
Hi, assuming that you are building your ALV via FM REUSE_ALV_GRID_DISPLAY and using type pool SLIS, try passing the fy1 variable to seltext_s, seltext_l and reptext_ddic too.
The ALV won't necessarly display the medium length column description.
Also your fy1 variable must be of char type.
Regards,
Andrei
03-07-2013 3:15 PM
I am not sure whether i understand correctly... correct me if I am wrong..
In the codes provided by u...you are displaying the fiscal year. So why passing reference fieldname and tablename for this column....?
Pass the reference field name and reference table name for the currency column!
Also...try out cfieldname and ctabname fields of fieldcatalog.....it should do the trick for currency fields.
Sorry if my understanding was wrong.
03-08-2013 9:10 AM
Hi,
I am passing reference field name and table name because editable field in ALV is decimal(13,2) type.
If I stop passing these values editable field is behaving strangely as:
if I enter 5000 then upon clicking enter it converts to 50.00 due to this logic build on this field value showing wrong figures.
03-07-2013 3:34 PM
Hi,
Hi, assuming that you are building your ALV via FM REUSE_ALV_GRID_DISPLAY and using type pool SLIS, try passing the fy1 variable to seltext_s, seltext_l and reptext_ddic too.
The ALV won't necessarly display the medium length column description.
Also your fy1 variable must be of char type.
Regards,
Andrei