cancel
Showing results for 
Search instead for 
Did you mean: 

Centering Header text of table column group

Former Member
0 Kudos

Hi,

I am using table column group property inside a Table property. I have to center the column header text but i am not finding any appropriate property to center it. Kindly Can any one help me on this?

Thanks,

Pavan.

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Pavan,

Unfortunately, we do not have a provision for column group header alignment.

But, I would suggest a work around solution,

  • Take a snap shot of group header cell background and edit the image with the group header text as below

    

  • Now, create the mime object in the WD component and user the mime object name for the property IMAGE SOURCE of column group caption ui element
  • The output would be as below

    

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

@Kiran: i tried that option but dint work out for me. It was removing the blank spaces when displaying.

@ Ramakrishnappa.. Yeah, it is very unfortunate that SAP has not provided such a simple feature. Thanks for the Suggestion. Just to add to ur comments, we can also use the standard icon ICON_SPACE and pass it to image source to get blank space for aligning the Header Text.

former_member184578
Active Contributor
0 Kudos

Hi,

Did you directly entered the text in the text property of the header caption like below? If so it will not work, if not which version you are on!

You have to bind the text to an attribute and then set the text with spaces in coding. I have tried it and it's working. here is the reference:

before:

After:

Regards,

Kiran

Answers (1)

Answers (1)

former_member184578
Active Contributor
0 Kudos

Hi,

There is no property for header text to align in center. One option is bind the text to an attribute in context of type string and then set the text in WDDOINIT method by inserting some leading space.

lv_text = '         Header '.  " give spaces as required till it appears at center.

then bind this to the header text.

hope this helps,

Regards,

Kiran