Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

optimum column width in standard application log control (SBAL)

fabiankegel
Employee
Employee
0 Kudos
267

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos
107

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

2 REPLIES 2

former_member188685
Active Contributor
0 Kudos
107

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

Former Member
0 Kudos
108

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