2005 Nov 25 9:28 AM
Hi,
I am working with the standard application log (SBAL) and use the functionality of function group SBAL_CNTL to create control for my message display functionality.
Then I tried to optimize the column width of the displayed grid by setting the attribute "cwidth_opt" of the display profile to "X".
My problem is, that the columns are much too small to display all of the content. This seems to happen, since no messages are in the log, when the corresponding control is created.
Even if I create the log first and then the control, I still have the problem, since messages can be added or deleted.
My question is: how can I optimize the column width of the grid that is used by the application log after the control has been created?
Best regards,
Fabian
2005 Nov 25 10:21 AM
Hi Fabian,
I think again you can follow the global assign approach as follows,
FIELD-SYMBOLS: <fs_lout> TYPE BAL_S_LOUT.
****Get the current log container
ASSIGN ('(SAPLSBAL_CNTL)<d>') TO <fs_lout>.
****<d>-grid is the grid control object.
Then use GET_FRONTEND_LAYOUT method of the grid to get it first, mark CWIDTH_OPT = 'X' and then call SET_FRONTEND_LAYOUT method.
Check whether you might need a REFRESH_TABLE_DISPLAY method call..
Hope this helps..
Sri
2005 Nov 25 10:08 AM
hi
in layout assign
GS_LAYOUT-CWIDTH_OPT = 'X'.
this will optimize. If no data is there it will be the length you specified in fieldcatalog. if some data is there what ever max it will display upto that.
are you editing after display.
please let me know.
regards
vijay
2005 Nov 25 10:21 AM
Hi Fabian,
I think again you can follow the global assign approach as follows,
FIELD-SYMBOLS: <fs_lout> TYPE BAL_S_LOUT.
****Get the current log container
ASSIGN ('(SAPLSBAL_CNTL)<d>') TO <fs_lout>.
****<d>-grid is the grid control object.
Then use GET_FRONTEND_LAYOUT method of the grid to get it first, mark CWIDTH_OPT = 'X' and then call SET_FRONTEND_LAYOUT method.
Check whether you might need a REFRESH_TABLE_DISPLAY method call..
Hope this helps..
Sri