on 11-22-2009 7:49 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
>
> 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?
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 ).
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.