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: 

Printing format control in ALV TREE

Former Member
0 Kudos

Hello there,

I searched all over SDN but I couldn't find a solution for my problem ! It would be nice of you if you can help me sort it out.

I'm using an ALV TREE :

DATA: gv_tree TYPE REF TO cl_gui_alv_tree

CALL METHOD gv_tree->set_table_for_first_display

EXPORTING

is_hierarchy_header = gv_hierarchy_header

it_list_commentary = gv_report_title

i_save = 'A'

is_variant = gv_variant

CHANGING

it_outtab = gt_output_empty "Must be empty

it_fieldcatalog = gt_fieldcat.

I need to change printing format from X_65_255 to X_44_120.

In this method, there is no IS_PRINT to insert the new format (it exists only for GRID).

Do you have any idea?

8 REPLIES 8

Former Member
0 Kudos

Hi,

You can do it changing the value of the var system SY-PAART, hope it helps you.

Regards,

Felipe Simionatto

Former Member
0 Kudos

Thanks for your answer Felipe!

But it doesn't work...

Any other ideas? Anyone?

Tarick.

Former Member
0 Kudos

I could not find a way to do it in CL_GUI_ALV_TREE but you can use CL_GUI_ALV_GRID and the same method SET_TABLE_FOR_FIRST_DISPLAY in this class you can pass the print parameters to IS_PRINT (the component is PRINT_CTRL).

Revert back if it works.

Regards,

Felipe Simionatto

Edited by: fsimionatto on Sep 9, 2010 4:13 PM

Former Member
0 Kudos

Hi Felipe!

I know it works perfectly for CL_GUI_ALV_GRID but in my case I'm printing an ALV TREE so I can only use CL_GUI_ALV_TREE. Do I have any other choice?

Thanks again!

Tarick.

0 Kudos

Hi!

You can work with SET_HEIGHT and SET_WIDTH methods to change dimensions (and maybe the print layout)

Former Member
0 Kudos

Hi Simone!

I tried but it doesn't work. The format is still X_65_255. Is there any way to change this default setting?

Thanks!

Tarick.

0 Kudos

You cannot change your dynpro size? Or set in your report the layout format (REPORT.....)?

I know these are obvious suggestions, but it's all i got.

Former Member
0 Kudos

Hi again!

In fact, the print output with format X_65_255 is very small that's why I need it in X_44_120. The dynpro is not a problem.

Thanks!

Tarick.