Print in alv
Re: Printing in ALV
Posted: Jan 29, 2008 10:18 AM in response to: J Are Edit E-mail this message Reply
hi,
i have got one problem can any body help me out....my requirement is
if an alv output(oops or normal ) has 30 coloumns in the output,
if i give print option in the output(in alv tool bar)and in spool if i check it has only 13 coloumns generated other coloumns are not at displayed. how to get all the coloumns print in the spool if alv has more than 30 coloumns.
one thing is we can set the printer configuration by using spad transaction before it gets printed but how to do it programatically in alv itself as u alv pop up to select for setting printer properties before printing how to do that.
regards,
narsimha.
Hi Dana,
This thread answers ur question..
alv REPORT PRINTING
cheers,
Prashanth
P.S Please mark helpful answers
Similar Messages
-
Unable to print Complete ALV report
Hi All,
I have made an Object Oriented ALV report .
When I try to print the ALV output I get a warning message "Unable to print last 25 records ."
Any suggestions to remove that message !
Regards,
Mukul Sharma.This could be an Formscentral issue, the expected behavior is when you click "generate summary report" button, if the form has no responses, it will show "your form has no responses." UI with Test Form button. if the form has at least one response, the report should be generated for you.
One of such templates is "Training Feedback", "generate summary report" button is on Summary Report tab since this template only have plain text field and an data field.
Would you mind share your form with me([email protected]) if you don't see upon "expected" behavior.
Thanks,
Pengpeng Sun -
Re: Increasing Column Header Length While Printing in ALV Grid
Hi
For some column headers in a report, the translations in Turkey are more than 40 characters, because of which while executing the report in TR language, the column header is getting truncated.
So, I would like to know if we can increase the column header length while printing the ALV Grid(OO ALV) output.
Or else, Is there any way where we can divide the column header into 2 rows.
Please let me know.
Thanks and Regards,
Vishwa.Jose and Sivaram,
Thanks for replying.
The problem we have is with the column headers, there is a limit of 40 characters for the column header in ALV reports. So, increasing the outputlen also did not help.
Regards,
Vishwa. -
Problem in Printing the ALV list
Hi,
I have one problem with printing the ALV list. While printing the ALV list(thro Print Icon on application Tool bar) ,Fist page of my print out contains some other inforamtion.
inforamtions included two tables
first table contains Sort Criteria, Ascdg, Descnd, Subtotal columns.
And second table contains Data statistics , number of
columns.
But from Second page onwards , my alv list printed correctly .
How can i avoid the First page inforamtion and
what is the Reason of coming like this?
Thanks,
Neptune.MI assume you are using function module Reuse_alv_grid_display or reuse_alv_list_display for ALV.
If this is the case, there is a parameter called IS_PRINT that you need to supply while calling the function module.
you can for exapmle declare
data:
printstruc type SLIS_PRINT_ALV.
printstruc-NO_PRINT_LISTINFOS = 'X'.
call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IS_PRINT = printstruc
There are many other flags in is_print structures that you can use to manipulate the printing.
Cheers! -
Can I print an ALV in double-sided?
Hi!
Can I print an ALV in double-sided on the page?
Thanks very much!Hi,
the function has parameter IS_PRINT which is a reference to SLIS_PRINT_ALV, which in time has, among others, structure PRI_PARAMS. Some of the many fields that the structure has are PDEST, LINCT, LINSZ and PAART, which can help to determine the output device and format.
As previously stated, your printer must be able to print double-sided and it must be recorded as output device in SAP (trans. SPAD). If you don´t understand this point, never mind since it is more as task for system admin. than for a programmer.
When creating the output device (device class = Standard printer), there´s folder Output Attributes which has field Print Mode. The options for this field are Default, Simplex, Duplex and Tumble Duplex. So, entry duplex does what you pretend. -
How to print multiple ALV Grids with only one print dialog?
Hi,
I have a report that has multiple ALV grids in splitter containers. The users want to be able to print those ALVs by pushing only one print button. I got it to work (parameter IS_PRINT and method SET_FRONTEND_PRINT before calling SET_TABLE_FOR_FIRST_DISPLAY) but I can't find a way to avoid that the printer dialog pops up for every grid I print.
I tried to use the function module approach with REUSE_ALV_LIST_DISPLAY but have the same issue. Any thoughts?
Thanks,
GuentherHi Peluka,
Well, that's exactly what I am doing. Putting one central button in the app is not the problem; the issue is that the print dialog (to select the printer) pops up for every individual ALV grid. E.g. if I place 4 ALV grids on my screen and trigger their print from a central button, I am getting 4 print dialogs.
Cheers,
Guenther -
Print using ALV method-set_table_for_first_display
Hi ,
I have developed a report with ALV output , using the method -set_table_for_first_display.
But now I am asked to change it to print the output also in 8/11" sheet.
Please suggest how I can do it.
Thanks & Regards,
RamanaPrint function on the ALV toolbar? Is it there? Or, what I have done upon occasion is put a checkbox on selection panel to indicate printout desired. The loop through the table that is used for the ALV display and output a list report.
-
Hi ,
I am trying to print the contents from the ALV Container,This is a pop-up screen
displaying details of the line selected in the ALV report.
Standard tool bar print button is available, and it works, but I also have the print icon in bottom of the screen , which should print the container contents.
Not sure what custom code shd go in for printing,
Looked into the std BCALV * programs, but no luck so far.
Appreciate any help.
Thank you
LalithaHi Joseph,
in my case these are the settings...
Just change your spool settings also ..
in my case
SAP Cover Page System Administrator: Default Settings
OS Covert Sheet System Administrator: Default Settings
ALV statastics NO
i think for your case ALV statastics is markes as YES is it true.
Can you change the settings.
Regards
Vijay -
Hi Friends,
I am facing a problem while printing a report from ALV grid .. The report display is coming perfectly based on the SORT criteria .. but while trying to print or print preview or Download to Excel the sorting is not working .. If any one know how to print the report as it look like the screen display ..Please let me know..
Thanks in advance..
Regards.
ElangoHi Vinni,
Thanks for your repaly , I am using 4.7.
Function module used to display grid is REUSE_ALV_GRID_DISPLAY and for
build the field catlog I am using REUSE_ALV_FIELDCATALOG_MERGE
function module .
Regards,
Elango -
Logo disapearing after printing in alv report
Hi Techis
I uploaded a logo in alv grid display and its showing fine but when i print the report it is disapearing from Printed document.
pls help it out.
Regards
Santosh L.Hi Santhosh,
Now am strucked with the same problem regarding the logo during printing. While printing the report the alv is not coming in printout. I also done the logo uploading through OAER. But it is not coming in printout. Please give me the solution how you got the logo while printing.
Thanks
Ravi -
Logo is not printing in ALV report
Hi all,
I have to print logo in the O/P list of an ALV report. for this i have written the code like......
FORM TOP-OF-PAGE.
wa_listheader-typ = 'H'.
wa_listheader-info = 'This is an ALV report'.
append wa_listheader to it_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader
I_LOGO = 'ENJOY'.
endform.
and i have passed this TOP-OF-PAGE to I_CALLBACK_TOP_OF_PAGE .Here my problem is the logo and list heading also not getting printed in the o/p, but list is coming...pls help me out...
Thanks & Regards.
Laxman.P
B'lore.
ENDFORM.Hi,
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = i_repid
i_callback_user_command = 'USER_COMMAND_PERNR'
it_fieldcat = header
is_layout = gt_layout
i_callback_top_of_page = 'TOP-OF-PAGE1'
i_grid_title = xyz
it_sort = gt_sort[]
i_default = 'X'
i_save = 'U'
is_variant = gt_variant
it_events = gt_events
tables
t_outtab = t_output.
clear t_output.
Form TOP-OF-PAGE1
form top-of-page1.
data: header type slis_t_listheader,
wa type slis_listheader. "infield like wa-info, nline type n.
TITLE AREA
wa-typ = 'S'.
wa-info = text-h04.
append wa to header.
wa-typ = 'S'.
write sy-datum to wa-info mm/dd/yyyy.
concatenate text-h03 wa-info into wa-info separated by space.
append wa to header.
wa-typ = 'S'.
concatenate text-h02 sy-uname into wa-info separated by space.
append wa to header.
wa-typ = 'S'.
concatenate text-h01 sy-repid into wa-info separated by space.
append wa to header.
********" LOGO
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = header
i_logo = 'ENJOYSAP_LOGO'.
*********" LOGO
endform.
refer this report
<b>
BALVST03_GRID</b>
<b>Reward points</b>
Regards -
How to print several ALV one one page
Hi.
This is my first post here. I have a problem, because I want to print one one page for example 2 alv grid or other component based on containers (like charts). This is big problem for me.
If anybody has any idea, please help me.
Thanks for help -
DanielHi Daniel,
Welcom to SDN.
You need to use ALV Block for displaying multiple grids in one page.
REUSE_ALV*BLOCK*APPEND
http://www.geocities.com/mpioud/Z_ALV_LIST_BLOCK.html
Or use OO ALV Grid Controls and display two grids in one screen. A example of the same is shown below
http://www.geocities.com/mpioud/Z_DEMO_2_ALV_LIST.html
http://www.geocities.com/mpioud/Z_ALV_GRID_AND_POPUP.html
Refer the sample code:
CLEAR w_event.
w_event-name = slis_ev_top_of_page.
w_event-form = 'TOP_OF_PAGE'.
APPEND w_event TO i_events1.
CLEAR w_event.
w_event-name = slis_ev_top_of_page.
w_event-form = 'XTOP_OF_PAGE'.
APPEND w_event TO i_events2.
DATA: lv_repid LIKE sy-repid.
lv_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = lv_repid
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'PF_STATUS'.
*-- Vendor Schedule List
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
it_fieldcat = i_field_cat1
is_layout = w_lay_out1
i_tabname = '<I_TABLE>'
it_events = i_events1
TABLES
t_outtab = <i_table>.
*-- Error Lsit display
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
it_fieldcat = i_field_cat2
is_layout = w_lay_out2
i_tabname = 'I_ERROR'
it_events = i_events2
TABLES
t_outtab = i_error[].
w_print-reserve_lines = 2.
w_print-no_print_listinfos = c_x.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXPORTING
is_print = w_print.
ENDFORM. " f0504_create_list
*-- Top of Page
FORM top_of_page.
WRITE: sy-title.
ENDFORM.
FORM xtop_of_page *
FORM xtop_of_page.
WRITE: 'Error Records'.
ENDFORM.
<b>Reward points if this Helps.
Manish</b> -
Grand Total Text is not printing in ALV
Hi all,
I am not able to print Grand Total text in my report
I am not doing subtotal, i am using only grand totals.
So i have used in the following way
WA_FIELDCAT-DO_SUM = GC_X.
GS_LAYOUT-TOTALS_ONLY = GC_X.
GS_LAYOUT-TOTALS_TEXT = 'Totals'(049).
i am using using ALV GRID DISPLAY FM...its displaying the total amount, buts text is missing...
Can any one tell me what else i have to pass in the layout or fieldcatlog or FMHi AMR,
If you use REUSE_ALV_GRID_DISPLAY function module, i think Total text does not come .but if u use REUSE_ALV_LIST_DISPLAY function module Total text comes .
Check this sample program it let u know ..
"Types
TYPES:
BEGIN OF t_pa0008,
pernr TYPE pa0008-pernr,
lga01 TYPE pa0008-lga01,
bet01 TYPE pa0008-bet01,
END OF t_pa0008.
"Work areas
DATA:
w_pa0008 TYPE t_pa0008.
"Internal tables
DATA:
i_pa0008 TYPE STANDARD TABLE OF t_pa0008.
PARAMETERS:
list TYPE c RADIOBUTTON GROUP gr1,
grid TYPE c RADIOBUTTON GROUP gr1.
" ALV Declarations
" Types Pools
TYPE-POOLS:
slis.
" Types
TYPES:
t_fieldcat TYPE slis_fieldcat_alv,
t_events TYPE slis_alv_event,
t_layout TYPE slis_layout_alv,
t_sort TYPE slis_sortinfo_alv,
t_keyinfo TYPE slis_keyinfo_alv.
" Workareas
DATA:
w_fieldcat TYPE t_fieldcat,
w_events TYPE t_events,
w_sort TYPE t_sort,
w_layout TYPE t_layout,
w_keyinfo TYPE t_keyinfo.
" Internal Tables
DATA:
i_fieldcat TYPE STANDARD TABLE OF t_fieldcat,
i_events TYPE STANDARD TABLE OF t_events,
i_sort TYPE STANDARD TABLE OF t_sort.
START-OF-SELECTION.
PERFORM get_data.
END-OF-SELECTION.
PERFORM build_fieldcatalog. "Fieldcatalog
PERFORM build_events. "Events table
PERFORM buid_layout. "Layout structure.
PERFORM build_sort_tab. "To sort table and get subtotal
PERFORM display_data.
*& Form get_data
FORM get_data.
DATA:l_0008 TYPE pa0008 OCCURS 0 WITH HEADER LINE.
SELECT pernr lga01 bet01
FROM pa0008
INTO CORRESPONDING FIELDS OF l_0008
WHERE begda LE sy-datum
AND endda GE sy-datum.
w_pa0008-pernr = l_0008-pernr.
w_pa0008-lga01 = l_0008-lga01.
w_pa0008-bet01 = l_0008-bet01.
APPEND w_pa0008 TO i_pa0008.
CLEAR w_pa0008.
w_pa0008-pernr = l_0008-pernr.
w_pa0008-lga01 = l_0008-lga02.
w_pa0008-bet01 = l_0008-bet02.
APPEND w_pa0008 TO i_pa0008.
CLEAR w_pa0008.
w_pa0008-pernr = l_0008-pernr.
w_pa0008-lga01 = l_0008-lga03.
w_pa0008-bet01 = l_0008-bet03.
APPEND w_pa0008 TO i_pa0008.
CLEAR w_pa0008.
w_pa0008-pernr = l_0008-pernr.
w_pa0008-lga01 = l_0008-lga04.
w_pa0008-bet01 = l_0008-bet04.
APPEND w_pa0008 TO i_pa0008.
CLEAR w_pa0008.
ENDSELECT.
ENDFORM. "get_data
*& Form build_fieldcatalog
FORM build_fieldcatalog.
PERFORM build_fcat USING:
"Field Int.Table Text
'PERNR' 'I_PA0008' 'PERNR', "Remove this if u dont want in the item table as well as it is there in the header table
'LGA01' 'I_PA0008' 'LGA01',
'BET01' 'I_PA0008' 'BET01'.
ENDFORM. "build_fieldcatalog
*& Form build_events
* text
FORM build_events.
CLEAR:
w_events, i_events[].
w_events-name = 'TOP_OF_PAGE'.
w_events-form = 'TOP_OF_PAGE'.
APPEND w_events TO i_events.
CLEAR w_events.
ENDFORM. "build_events
*& Form display_data
* text
FORM display_data.
DATA:
l_program TYPE sy-repid VALUE sy-repid,
l_fm TYPE RS38L_FNAM.
IF list = 'X'.
l_fm = 'REUSE_ALV_LIST_DISPLAY'.
ELSEIF grid ='X'.
l_fm = 'REUSE_ALV_GRID_DISPLAY'.
ENDIF.
CALL FUNCTION l_fm
EXPORTING
i_callback_program = l_program
is_layout = w_layout
it_fieldcat = i_fieldcat
it_events = i_events
it_sort = i_sort
TABLES
t_outtab = i_pa0008.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. "display_data
*& Form build_fcat
FORM build_fcat USING l_field l_tab l_text.
w_fieldcat-fieldname = l_field.
w_fieldcat-tabname = l_tab.
w_fieldcat-seltext_m = l_text.
IF l_field = 'BET01'.
w_fieldcat-do_sum = 'X'.
ENDIF.
APPEND w_fieldcat TO i_fieldcat.
CLEAR w_fieldcat.
ENDFORM. " build_fcat
*& Form top_of_page
* text
FORM top_of_page.
DATA :
i_header TYPE slis_t_listheader,
w_header LIKE LINE OF i_header.
DATA:l_date1 TYPE datum,
l_date2 TYPE datum.
w_header-typ = 'S'.
w_header-info = sy-title.
APPEND w_header TO i_header.
CLEAR w_header.
w_header-typ = 'H'.
w_header-info = sy-repid.
APPEND w_header TO i_header.
CLEAR w_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_header
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "top_of_page
*& Form BUILD_sort_tab
FORM build_sort_tab .
CLEAR :i_sort[],w_sort.
w_sort-spos = 1.
w_sort-fieldname = 'PERNR'.
w_sort-tabname = 'I_PA0008'. "header table
w_sort-up = 'X'.
w_sort-subtot = 'X'.
APPEND w_sort TO i_sort.
CLEAR w_sort.
ENDFORM. " BUILD_sort_tab
*& Form buid_layout
FORM buid_layout .
w_layout-totals_text = 'Total'.
w_layout-subtotals_text = 'S.Total'.
ENDFORM. " buid_layout
Regards,
Venkat.O -
When 'PRINT' in ALV report using FM
Hi
I am getting an error when trying to execute and print option in the selection screen. my client system version is 4.6C
in the dump the error at :
I am using FM at my report.
set_auto_redraw(cl_gui_alf_grid_base)
can you provide code for when 'PRINT' rs_selfild (dynamic form) for resue*grid_display
ThanksHi Dana,
This thread answers ur question..
alv REPORT PRINTING
cheers,
Prashanth
P.S Please mark helpful answers -
Hi All,
I have a lengthy list in ALV output with 15 columns. How can I print it properly?
What are the settings to be maintained
Thanks
RickyHi ricky,
you don't have many chances to 'compress' the ouput. And if you have too much information in the print list, nobody will look at it.
Try to reduce the number of columns according to business requirement. Save this as standard layout.
Or ask your company to order a to buy an oversized format printer and have the proper formats defined.
Or Convert print output to PDF where you can scale it.
Regards,
Clemens
Maybe you are looking for
-
How to backup files to ensure future access and use using a different mac
I recently attempted access backed up data on my LaCie drive from a different Mac notebook. I was blocked. I didn't write down the message, but it essentially advised that the data was locked and I wasn't allowed access. I wasn't given a chance to en
-
Change Page info in InDesign CS4
Typically the page information is appeared at the bottom of every pdf pages while exporting from InDesign CS2-CS4 or PS through PDF. I want the same to be appeared at the top of the PDF page while converting PS through PDF or Exporting PDF from ID. P
-
I get this error weekly. Support will state the error is fixed. I am able to make purchases again, and then the error eventually comes back. Any help?
-
Odd fail with com.oreilly.servlets on tomcat 4.1
I've got a page that uses the com.oreilly.servlets package on tomcat 4.1. It is failing at the point where I first create my MultipartRequest but the error stack doesn't make any reference to the com.oreilly.servlets package, it just says: root cause
-
Creating interfaces in oracle apps 11i
Hello everyone, I'm new to oracle apps and getting trained in supply chain management(PO,INV,OM). Could you pls post some doc's or sample code for creating interfaces between apps modules. For example PO to AP, OM to AR. thanks in advance, vr