‎2009 Jun 01 1:39 PM
Hi,
I have a some stupid problem wich I can not solve on my own 😕 I'm trying to change ALV header during runtime. I have an ALV grid with 7 columns. Each column header conatins name with corresponding date of a current week. I would like to change date period to previous week together with column names. I mean... when I click a button, grid column name's are changing... I simple tried something like this:
CLEAR ws_fieldcat[].
PERFORM build_fields.
lvc_s_stbl-row = 1.
lvc_s_stbl-col = 1.
CALL METHOD go_grid_plan->refresh_table_display
EXPORTING
is_stable = lvc_s_stbl.
but its dont work at all ! I mean even if ws_fieldcat table is filled with correct values column name are not changing 😕 Event if ws_fieldcate table is empty (perfom build_fields is commented out) header are not changing 😕 Propably I dont know something about OO programing or something like that because in most examples in the internet this lines works fine. I call this method from PBO. Thx a lot for help !
‎2009 Jun 01 1:48 PM
Use method [set_frontend_fieldcatalog|http://help.sap.com/saphelp_erp2004/helpdata/EN/0a/b5532dd30911d2b467006094192fe3/frameset.htm] before method [refresh_table_display|http://help.sap.com/saphelp_erp2004/helpdata/EN/0a/b5531ed30911d2b467006094192fe3/frameset.htm]
- use [get_frontend_fieldcatalog|http://help.sap.com/saphelp_erp2004/helpdata/EN/0a/b55303d30911d2b467006094192fe3/frameset.htm] to get the actual field catalog before updating your data
- Be aware that some changes may require the use of [set_table_for_first_display|http://help.sap.com/saphelp_erp2004/helpdata/EN/0a/b5533cd30911d2b467006094192fe3/frameset.htm]
Regards,
Raymond
‎2009 Jun 01 1:42 PM
Hi
The method refresh_table_display should be calles once, if you need to refresh the ALV you have to call the method for refreshing: REFRESH_TABLE_DISPLAY.
In PBO u can check the object for container if it's initial u can call method to display the list, else to refresh it.
Before refreshing the ALV u need to call the method to change the catalog table: SET_FRONTEND_FIELDCATALOG.
Max
‎2009 Jun 01 1:48 PM
Use method [set_frontend_fieldcatalog|http://help.sap.com/saphelp_erp2004/helpdata/EN/0a/b5532dd30911d2b467006094192fe3/frameset.htm] before method [refresh_table_display|http://help.sap.com/saphelp_erp2004/helpdata/EN/0a/b5531ed30911d2b467006094192fe3/frameset.htm]
- use [get_frontend_fieldcatalog|http://help.sap.com/saphelp_erp2004/helpdata/EN/0a/b55303d30911d2b467006094192fe3/frameset.htm] to get the actual field catalog before updating your data
- Be aware that some changes may require the use of [set_table_for_first_display|http://help.sap.com/saphelp_erp2004/helpdata/EN/0a/b5533cd30911d2b467006094192fe3/frameset.htm]
Regards,
Raymond
‎2009 Jun 01 2:17 PM