cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Header text wrapping

Former Member
0 Kudos

Hello,

I would need your help in one of my ongoing issue with ALV. I have an ALV with 11 columns and i need to show all of them inside window size. But the problem is that headers for all those columns are large and currently it is with huge width. I would want to make those headers as wrapped to solve this issue.

I have been searching on forums to find a solution to fix this issue, but still not able to.

I have now set my table size as fixed, but i can only see partial of the header text.

Can you please help me out here by guiding me about steps to solve this issue? should the table size be kept fixed?

Also please tell me how to check the PDF output of the end ALV result, currently it is showing an error message at the top of ALV if i click on 'Print version' with a pointer to RFC destination not maintained for SALV*.

Thanks in advance,

Chandru

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Header text wrapping in the table/ALV is only available as of NetWeaver 7.01. You can set this option with the following code:

data l_header type ref to cl_salv_wd_column_header.
  data l_column type ref to cl_salv_wd_column.
  l_column = l_table->if_salv_wd_column_settings~get_column( 'CREATED_BY' ).
  l_header = l_column->get_header( ).
  l_header->set_header_text_wrapping( abap_true ).

As far as your PDF question - I would assume your basis team hasn't configured the connection to the Adobe Document Services (which runs on the J2EE engine). It is a web service call to the ADS that is necessarily to do this rendering. The necessary setup steps are documented in the IMG. If you go to the reference IMG the configuration node can be found under:

SAP NetWeaver->Application Server->Web Dynpro ABAP->Setup Printing for Web Dynpro ABAP ALV

Former Member
0 Kudos

Hi Thomas,

Thanks for your inputs.

I checked in my system with above code and i got an error.

I checked the class CL_SALV_WD_COLUMN_HEADER and i dont find any method by name set_header_text_wrapping().

It means my SAP installation is not the latest and does not contain this option.

Can you please let me know what could be done to solve this issue? Do i need to raise an OSS note for this? or we have an existing note to solve this purpose?

Please guide.

Thanks,

Chandru

Former Member
0 Kudos

HI,

If you are not on current /latest version and latest patch then ask your basis team to upgrade to the latest ones..

Then you will not require any note for this..

Regards,

Lekha.

Former Member
0 Kudos

Hi Lekha,

Thanks for you reply.

I am trying to contact my Basis team about the issue. But i am not sure if a patch can be upgraded only for this particular issue.

Meanwhile, is it possible to solve this issue by an OSS note? do we have an existing note?

Thanks,

Chandru

Former Member
0 Kudos

Applying the OSS note will not solve the issue....becaouse the method itself is not available...

Former Member
0 Kudos

Hi Lekha,

Thanks for your reply.

Can you provide me information about the Support pack needed to add this funtionality?

I need to pass this information to my Basis team to get this functionality added. Please help me out with the exact information.

Thanks a lot!

Chandru

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

As I stated in my original reply, this is a new feature in NetWeaver 7.0 Enhancment Package 1. There is no OSS note, patch or support package that will add this functionality. Only going to NetWeaver 7.0 Enhancement Package 1 will add this new feature.

Former Member
0 Kudos

Thank you Thomas and Lekha!

I am working with my Basis team to find a solution for this issue, else i would have consider using shorter texts for the reporting.

I have another issue with regard to ALV error message display. Please provide me your suggestions.

I want the ALV output to be displayed to only certain set of people when they try to access. I have a check in place and will display error message using method Report_error_message of interface if_wd_message_manager.

But i have an issue; i do this check at the initial point of WDINIT method of Comp Controller. When there is an error, it is showing Error at the top of page. But it is also showing Blank and Raw ALV below it.

ALV here contains some of the fields which need to be disables, Texts are coming from DDIC etc..

Is there any way to make this ALV not visible/not generated when there is a Error message? Is this Dynamic programming?

Please help me out.

Thanks,

Chandru

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Easiest solution is to probably just control the Visible property on the ViewContainerUIElement that holds the ALV.

Former Member
0 Kudos

Hi All,

I have a requirement on ALV GRID Header text wrapping. Is there any way how to do this? Appreciated if someone answers this.

Thanks,

Krishna.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi All,

>

> I have a requirement on ALV GRID Header text wrapping. Is there any way how to do this? Appreciated if someone answers this.

>

> Thanks,

> Krishna.

Well, the source code for activating Header Text Wrapping is already listed above in an answer. Also the system requirements for such code to work is also listed - NetWeaver 7.01. What additional information were you seeking?

0 Kudos

Hi THomas,

I am the new one in abap coding and i want to wrap the alv header. So please clarify whether following code is used for webdynpro only or it can be apply to simple ALV coding.

and what kind of declaration is required for l_table as i am getting following error

Field "L_TABLE" is unknown. It is neither in one of the specified
tables nor defined by a "DATA" statement. .

data l_header type ref to cl_salv_wd_column_header.

  data l_column type ref to cl_salv_wd_column.

  l_column = l_table->if_salv_wd_column_settings~get_column( 'CREATED_BY' ).

  l_header = l_column->get_header( ).

  l_header->set_header_text_wrapping( abap_true ).

Answers (0)