‎2010 Apr 13 6:41 AM
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
‎2010 Apr 13 8:04 AM
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
‎2010 Apr 13 6:53 AM
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( ).
‎2010 Apr 13 8:04 AM
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