Application Development and Automation 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: 
Read only

ALV : Containers

Former Member
0 Likes
493

Hi,

I created the custom containers side by side as per my requirement on the screen 100. and i designed the gui staus for this screen. here i provide the options back, cancel and print.

when i click on print, my output should be printed as like standard one.

i need the code for this scnerio. i check with some standard programs but i didn't undetstand that.

please help me.

Thanks and Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
451

Hi Raju,

data : gf_print type LVC_S_PRNT.

gf_print-PRNT_INFO = 'X'.

gf_print-PRNTLSTINF = 'X'.

gf_printPRNTSELINF = 'X'.

and pass this gf_print to every display Method

CALL METHOD me->set_table_for_first_display

EXPORTING

is_print = gf_print

and handle your code for printing, copy from SAPLSALV standard report.

Regards,

Pydi reddy

2 REPLIES 2
Read only

Former Member
0 Likes
451

Hi if u want to display, as per standard o/p, use FM cl_salv_table=>factory,

this method has a inbuilt ALV container , no need to design any...

EX : Program

REPORT yprg1.

DATA: gt_outtab TYPE TABLE OF knvv.

DATA: gr_table TYPE REF TO cl_salv_table.

DATA: column TYPE REF TO cl_salv_functions_list.

data: column1 TYPE REF TO cl_salv_columns_table ,

column2 TYPE REF TO cl_salv_column_table .

SELECT * FROM knvv INTO CORRESPONDING FIELDS OF TABLE gt_outtab PACKAGE SIZE 200.

ENDSELECT .

CALL METHOD cl_salv_table=>factory

IMPORTING

r_salv_table = gr_table

CHANGING

t_table = gt_outtab.

column = gr_table->get_functions( ).

column->set_all( 'X' ).

column1 = gr_table->get_columns( ) .

column2 ?= column1->get_column('KUNNR') .

column2->set_medium_text('Customer No') .

gr_table->display( ).

Read only

Former Member
0 Likes
452

Hi Raju,

data : gf_print type LVC_S_PRNT.

gf_print-PRNT_INFO = 'X'.

gf_print-PRNTLSTINF = 'X'.

gf_printPRNTSELINF = 'X'.

and pass this gf_print to every display Method

CALL METHOD me->set_table_for_first_display

EXPORTING

is_print = gf_print

and handle your code for printing, copy from SAPLSALV standard report.

Regards,

Pydi reddy