Skip to Content
author's profile photo Former Member
Former Member

ALV Header text wrapping

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Nov 22, 2009 at 09:12 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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 ).

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.