03-07-2013 12:12 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 in column of type 'currency' I am passing reference table and field name.
Problem is ALV is now 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 1:15 PM
Hello,
I think you have not searched the forum correctly.
This is very basic. Why you are passing reference field and table name if you want to display as dynamic?
Keep only seltext_m.
Thanks,
Abhijit
03-07-2013 1:15 PM
Hello,
I think you have not searched the forum correctly.
This is very basic. Why you are passing reference field and table name if you want to display as dynamic?
Keep only seltext_m.
Thanks,
Abhijit
03-07-2013 2:38 PM
Hello Abhilit,
Thank you for replying.
I am passing reference field and table because editable column in alv grid is of type currency and if I don't pass reference field and reference table then editable field is behaving strangely as:
if I had entered 5000 in editable cell then after pressing 'enter' it changes to 50. Due to this, logic built on this field is calculating wrong figures.
Hope I this answers your concern.
Regards,
Shubh
03-08-2013 6:39 AM
Hello,
Don't give reference field name and reference table name instead of this use field name and Tabname (Your final output table which will be used in Reuse_alv_grid_display or Reuse_alv_list_display).
ls_fieldcat-fieldname = 'Your field Name".
ls_fieldcat-tabname = 'Final Table' .
ls_fieldcat-scrtext_l = text-027.
APPEND ls_fieldcat TO gt_fieldcat.
CLEAR ls_fieldcat.
Hope this will work.
Thnaks,
Abhijit
03-13-2013 3:38 PM
Hi,
Field scrtext_l is not present in field catalog table. I am using SLIS_T_FIELDCAT_ALV as a table type.
I found the solution,actually I was passing values to only seltext_m, but values need to be passed to seltext_l,seltext_m,_seltext_s,reptext_ddic
Regards,
Shubh
03-14-2013 7:19 AM
03-07-2013 3:04 PM
03-12-2013 11:31 AM
Hi Shubham,
Are you using two fieldcatalog ?i.e.
-> First one to add all the dynamic data to be shown fieldcatalog,and then reuse inorder to create
dynamic internal table.
->Second one to use in REUSE_ALV_GRID_DISPLAY.
If you are doing so,then might be you have misse to append scrtext_m ,to second fieldcatalog from first fieldcatalog.
Regards,
Roma Jhamb