can somebody here tell me how to manipulate the headings of WebUI table columns at runtime? I need to add dynamic information to the columns titles which are calculated depending on the result list of the table.
Is there any way to realize this?
Would be great, if somebody could give me a hint!
Thanks and best regards,
Refer to the document http://scn.sap.com/docs/DOC-29972
thanks for your post. I checked this method but unfortunately this does not exactly help to solve my problem. My concrete requirement is to determine the column title label and not the technical name as this label is language dependent and can also be manipulated on design layer level.
I need to concatenate an existing column title label with a calculated number of line entries for a certain object type listed in the table.
The result list table contains 100 opportunities and I count how many opportunities have the status "Lost". If there are 20 opps in this status I want to place this sum in the column title label. The label before manipulation may be "Status" and after the planned manipulation ist may be "Status: 20 lost".
I hope this explanation helps to understand my requirement.
I also checked the context node controller class interface method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS( ) but did not really find a ways to facilitate this method to realize my flexible column naming.
I think if you have the information of the label to be modified like 'Status 20 lost' instead of 'Status' ( you can use the same logic in .htm page and identify the new column title), then you can use the code in the document.
ls_config = cl_bsp_dlc_table_utility=>conf_xml_to_abap( lv_xml_inp ).
if you check the field ls_config-COLUMNDEFINITION which is a table type stores all column field names along with its column TITLE ( initially like 'Status') which stores title text . So all you need to do is modify this TITLE value ( like 'Status 20 lost') for the field name .
Then you convert back the modified table content to xml and pass it to config tag.