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 Issue in Hierarchical ALV

Former Member
0 Kudos
114

Hi Guys,

I am using SALV_DEMO_HIERSEQ_SIMPLE in my program.

From the output I need to print box by box in new pages.

ie if there are 5 boxes in the output,I need to print them in 5 pages.

There is a option to print complete output,but I did not find any where how to print box by box.

How to do this.

Thanks in Advance,

Prasad.

5 REPLIES 5

Former Member
0 Kudos
79

Guys Any Idea.

Or else can I do it in another way.

My Final ITAB looks some thing like below.


PN   TKNUM     POSNR    BRGEW    VOLUM
1         1111        10             100           50
1         1111        20             100           50
1         1112        10             100           50
2         1211        10             100           50
2         1211        20             100           50
3         1311        10             100           50

My print is dependent on PN value

For same PN I should get print in one page and if the PN changes it should print in second page and so on.....

NOTE: My PN has many values this is only the sample data I have provided.

Thanks,

Prasad.

daniel_carvalho
Active Contributor
0 Kudos
79

Hello Prasad,

I think you should do the following:

1) Use the method GET_PRINT to obtain the object related with the class CL_SALV_PRINT (Settings for ALV Print).

2) Then with the obtained object (from CL_SALV_PRINT), execute the method GET_PRINT_CONTROL). You are going to receive in your program a parameter like ALV_S_PCTL structure.

3) Inside ALV_S_PCTL structure there are two other structures: PRI_PARAMS and ARC_PARAMS. You can choose PRI_PARAMS.

4) Not sure about the print complete output is the correct description of what you are looking for but I believe this is the structure you were thinking about.

5) After that, uses the SET_PRINT_CONTROL method of the CL_SALV_PRINT class object.

Hope it helps you.

Regards,

Daniel.

0 Kudos
79

Hi daniel,

Thanks for your response.

Is there any example program for this.

Thanks,

Prasad.

0 Kudos
79

Hi Daniel,

How to call this method in my Program.

Thanks,

Prasad.

Former Member
0 Kudos
79

I have resolved it in another way....