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: 

Dynamic Alv Alignment problem in Print preview (SALV)

VenkatRamesh_V
Active Contributor
0 Kudos

Dear Experts,

I am using Salv Method to display the report.

Both display and print preview looks different by alignment and some contents are not displayed fully.

Display

Print preview.

Declared dynamic fields  with of reference table (makt) and field name (Maktx).

gr_columns->set_optimize( lv_true ).

Kindly guide me.

Regards,

Venkat.

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

SALV is using the total of all columns length to determine the page layout (like X_65_80 or X_65_255). You can influence this by getting the print object using the GET_PRINT. Use the method SET_PRINT_CONTROL to set the format for the page.

Also, you should break the hierarchy which you print at the bottom of the page. When you concatenate each value to make the string, just check the length of the string, if it is more than few (like 80 char), start a new string .

Regards,
Naimesh Patel

4 REPLIES 4

naimesh_patel
Active Contributor
0 Kudos

SALV is using the total of all columns length to determine the page layout (like X_65_80 or X_65_255). You can influence this by getting the print object using the GET_PRINT. Use the method SET_PRINT_CONTROL to set the format for the page.

Also, you should break the hierarchy which you print at the bottom of the page. When you concatenate each value to make the string, just check the length of the string, if it is more than few (like 80 char), start a new string .

Regards,
Naimesh Patel

0 Kudos

Hi Naimesh,

Thank you for replying.

I already used set_optimize but in print preview column is not optimized.


Regards,

Venkat

0 Kudos

Hello,

Try to add LINE-SIZE width in your report

Ex : REPORT Zxxxxx LINE WIDTH 150.

Regards

Thierry

0 Kudos

I think, the SET_OPTIMIZE will only effect the columns not the Long Text in the End of the page. Try setting up the print layout with wider page layout.

Regards,
Naimesh Patel