Print ALV Report
I am using class CL_SALV_TABLE to generate an ALV report.
When the report is printed, I want to be able to display the report name, date and time and page number. How to do this?
Try this way
data: lr_display_settings type ref to cl_salv_display_settings,
l_title type lvc_title.
l_title = text-t01. " Your title ie report name & date & time
lr_display_settings = gr_table->get_display_settings( ).
lr_display_settings->set_list_header( l_title ).
gr_table->display( ).
a®
Similar Messages
-
Hi everyone,
I have a report that was created with ALV, everything works fine until we print.
When we print the report, it is printed in one page and that's ok, but the size is reduced, I mean the size is very small, any idea why we have this issue?.
Thanks
Eduardo Campos.HI Hduardo Campos,
For printing ALV report or Normal report we need separte format while printing.
Please fallow the fallowing steps to achieve your requirement.
Steps:
1. You have to create your own page format.
SPAD-> Full Administration -> Device Types -> Page Formats -> Define the respective Page formats
2. You have to define your own format type and attach the newly created page format to that.
3. while creating the format type using existing script code from other formats.
( Here while wrting the script just test the font & font size as per your requirement)
4. While ALV report printing select the Format option and enter your newly created format name( If you are not seeing report format option then select the properties option then select the report format then enter the required format name)
fallow the above steps, so that you will able to print ALV report successfully.
Still if you are facing any problem, let me know i will send you the detailed screen shots for the same.
Right now in my current project i am using the same procedure and succesfuuly achieved the results.
Regards,
Rajani -
Printing ALV report by suppressing print dialog box
Hi,
I want to print a alv report by passing value in IS_PRINT export parameter which is working prefectly. But I want to suppress the dialog box which is appearing while printing and printing should go to spool directly is it possible.Hi,
You could try something like:
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
no_dialog = 'X'
IMPORTING
out_parameters = ls_params
valid = lv_valid
EXCEPTIONS
OTHERS = 1.
NEW-PAGE PRINT ON PARAMETERS ls_params NO DIALOG.
* Display Table
lr_table->display( ).
hope it helps,
Kr,
m. -
Column heading change in print ALV report
Hi,
when i see ALV report output that time column heading is correct. but when i see print preview it's give another column heading.
like
column heading - Delivery Challan no it's come in print preview only delivery.
Thanks in Advance.
regards.
Sam.Hi,
thanks.
I have already use this in report.
like.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS.
WA_FIELDCAT-FIELDNAME = 'VBELN'.
WA_FIELDCAT-REF_TABNAME = 'LIPS'.
WA_FIELDCAT-SELTEXT_M = 'DELIVERY CHALLAN NO'.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO T_FIELDCAT.
Regard
Sam -
Run time error while printing ALV report
Hi,
At the time of printing a report output we get a dump GETWA_NOT_ASSIGNED.
The printer used here is LOCL.
The length of the report increases dynamically according to no. of months given in range.
In report , there are 3 static columns & no. of columns increases by 2 for each month. System is printing the report for 1 month ie. (3+2) columns . but if no. of months increased to 2 ..... no. of columns also increases by 2.... in this case system is giving dump.
Please help.
Thanks in advance,
VijetaHi
1. check the fieldcat ( ie. CURR field without WAERS field.. )
2. check if you want to use colours at calling the ALV.. but you don´t fill the deep structure for the colours...
bestreg Robert -
How to remove "Records passed" list when printing ALV report
Hi all,
I have developed an ALV report, in which I have used reuse_alv_list_display functional module to print the output. After pressing print button, when I view the output in spool request transaction, an additional list with Number of records passed and "Calculated total records" is displayed. How to remove this additional list.
I am using Get_print_paramaters FM to print.
Thanks,
rajanHi
Suppress the messages of the FM by commenting the exceptions and message statement
Regards
Shiva -
Print alv report directly to spool from a badi method
Hallo !
I am trying to save a log in spool on converting process
I am doing on Idoc data in Method of Badi implementation
(badi : HRALE00OUTBOUND_IDOC).
The spool request is created but the list there contains
no data.
Here is the code I put in the badi method :
DATA: LS_PRINT TYPE SLIS_PRINT_ALV,
LV_REPID LIKE SY-REPID,
LS_LAYOUT TYPE SLIS_LAYOUT_ALV,
LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
LS_FIELDCAT LIKE LINE OF LT_FIELDCAT.
LV_REPID = SY-REPID.
SET LS_LAYOUT :
CLEAR LS_LAYOUT.
SET LS_PRINT :
CLEAR LS_PRINT.
LS_PRINT-PRINT = 'N'.
SET LT_FIELDCAT :
REFRESH LT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MESSAGE'.
LS_FIELDCAT-SELTEXT_L = 'MES'.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
CREATE LOG IN SPOOL :
SY-BATCH = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = LV_REPID
IS_LAYOUT = LS_LAYOUT
IT_FIELDCAT = LT_FIELDCAT[]
I_DEFAULT = 'X'
I_SAVE = 'X'
IS_PRINT = LS_PRINT
TABLES
T_OUTTAB = PT_LOG[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
I have to remark that when I call this code in
an ABAP-PI function the log is created successfully in spool.
But here I call it from a method of IDOC Badi exit -
and the list is empty ....
The two cases are in processes that run in batch ...
Maybe ALV function can't be called from a method ?
Maybe I should use Object-Oriented ALV ?
Or maybe I fill the ALV function parameters in a wrong way ?
I really appreciate your help ,
Thanks in advance -
Nitzan S.Hey,
I am not sure if from the ALV list the SPOOL will be created properly. You said the spool is created but the spool is empty.
A Work around could be create a classical report with WRITE statements and then SUBMIT that report exporting the list into memory or you can even read the spool then.
Regards,
Ravi
Note :Please mark the helpful answers -
Printing ALV Report output through Function Modules
Hi All,
I want to print my ALV Grid output through function modules/statement (not through print option in menu).
This is because, i am generating a PDF from spool when user clicks on a button. If any changes happened in the ALV output layout, they will be captured in spool through printing it.
So can you please tell me how to print the ALV Output through FMs or sending the ALV output to spool.
Thanks & Regards,
Senthil.
Edited by: senthil nathan on May 17, 2010 2:49 PMHi Dev,
Thanks for the reply.
I want to print the ALV when the user clicks on a button in toolbar. Lets say the user has made some changes to the layout, (E.g hiding a field) and when i print that output it should use the changed layout, If i use the FM suggested by you, i cant acheive this.
If you try to print this manually, the system uses the changed layout and not the original. Thats why i want to know FMs/statement to print.
Regards,
Senthil. -
Print ALV report Directly - without the Print Parameter POPUP
Hai All,
I want to print a ALV directly to the printer without the Print Paramter POPUP.
I passed on IS_PRINT parameters in the FM 'REUSE_ALV_LIST_DISPLAY'.
But still i am getting the popup.
How to do this.
It is urgent .
Kindly help me solving this.
Vikki.Hi,
i have passed IS_Print-Print = 'X'.
But even after that i am getting the print parameter popup.
IS there any other way to handle this. TO SUPPRESS THE PRINT PARAMETER POPUP.
Please guide me.
Waiting for ur replies.
Vikki. -
Print or download ALV report with sort options
Dear friends,
How i can download into excel or print ALV report with sort options, like customer name column with similar values should not repeat in the print out or download file.
Regards,
Praveen LoboHi Praveen,
Use this code, its working:-
*FOR SORTING DATA
DATA : it_sort TYPE slis_t_sortinfo_alv,
wa_sort TYPE slis_sortinfo_alv.
* SORT W.R.T. CUSTOMER NAME
wa_sort-spos = 1.
wa_sort-fieldname = 'NAME1'. "field customer name
wa_sort-tabname = 'IT_KNA1'. "internal table with records
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
CLEAR wa_sort.
"this will sort the ALV o/p for customer with same name
"now the name will not be repeated
"records with same name will be grouped
* DISPLAY RECORDS IN ALV GRID
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid "report id
it_fieldcat = it_field "field catalog
it_sort = it_sort "sort info
TABLES
t_outtab = it_kna1 "internal table
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
Edited by: Tarun Gambhir on Dec 31, 2008 1:13 PM -
Hi All,
can any one tel the solution fort me
is there any function module to print ALV report with out giving print option manually( user press print button)Hi,
execute that report and on output list GOTO LIST->PRINT.
OR
if u want to print the code itself then PROGRAM->PRINT.
In the output screen
GOTO LIST IN THE MENU
SELECT EXPORT IN IT
THEN SELECT EXPORT SPREAD SHEET
to get other basic format for the alv output.
-Thanks & Regards
Saurabh Goel -
how to print alv report(any fm)...hi ...urgent
Hi
http://help.sap.com/saphelp_erp2004/helpdata/en/88/efea8afed811d2b493006094192fe3/content.htm -
In ALV Report output heading is printing twice.
Hi Experts,
Im working on ALV Reports.
Im printing header text by using listheader and commentary write function module.
the problem is when i sort any column in ALV ouput the heading is printing twice.
Again if i sort the column the heading is printed is 4 times.
so if anybody knows the solution how we can avoid repetition of heading ,
Please reply me as soon as possible.
regards
Imrangs.Hi Noorie,
Thanks a lot.
Your answer is perfect.
Bye.
Regards,
Imran -
Reg : Print Issue in ALV Report
Hi Experts,
I have created an ALV Report for USER Requirement and it is working fine. While taking printout the SORTED Field is not working, it gets repeated in the Print... How to rectify..?hi,
did u use SORT-UP equal to 'X'?
wa_sort-up = c_x.
ags. -
Display/Print the Selection criteria entered by USER on the ALV Report o/p?
Hi Experts,
I hv a requirement of to print/display the Selection criteria entered by user in the selection screen.........on the top portion of the ALV report output lay out.
There is a FM for this purpose, but, I forgot its name!!
So, let me know the FM or FMs, so that, will choose, which is best one,
or the piece of code, which covers all select-option entries..........appreciated.
thanq
Edited by: SAP ABAPer on Sep 3, 2008 6:35 PMUse the Function RS_REFRESH_FROM_SELECTOPTIONS get the selection details, now format the data accordingly in the TOP_OF_PAGE using the calss CL_DD_DOCUMENT.
Check the below mention code.
REPORT ztest_page.
TABLES: sflight.
DATA : it_flight TYPE TABLE OF sflight WITH HEADER LINE.
DATA BEGIN OF it_sel_opt OCCURS 0.
INCLUDE STRUCTURE rsparams.
DATA END OF it_sel_opt.
SELECT-OPTIONS: s_carrid FOR sflight-carrid.
START-OF-SELECTION.
SELECT * FROM sflight INTO TABLE it_flight
WHERE carrid IN s_carrid.
END-OF-SELECTION.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = sy-repid
TABLES
selection_table = it_sel_opt
EXCEPTIONS
not_found = 01
no_report = 02.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_html_top_of_page = 'TOP_OF_PAGE'
i_structure_name = 'SFLIGHT'
TABLES
t_outtab = it_flight
EXCEPTIONS
program_error = 1
OTHERS = 2.
*& Form top_of_page
* text
* -->DOCUMENT text
FORM top_of_page USING document TYPE REF TO cl_dd_document.
DATA : dl_text(255) TYPE c. "Text
* Add new-line
CALL METHOD document->new_line.
CALL METHOD document->new_line.
CLEAR : dl_text.
* program ID
dl_text = 'Program Name :'.
CALL METHOD document->add_gap.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_heading_int.
CLEAR dl_text.
dl_text = sy-repid.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
CALL METHOD document->new_line.
CLEAR : dl_text.
dl_text = 'Selection Criteria'.
CALL METHOD document->add_gap
EXPORTING
width = 34.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
CALL METHOD document->new_line.
CLEAR : dl_text.
CONCATENATE 'SELECT Option' 'SIGN' 'OPTION' 'LOW' 'HIGH'
INTO dl_text SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
CALL METHOD document->add_gap
EXPORTING
width = 34.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
CALL METHOD document->new_line.
LOOP AT it_sel_opt.
CLEAR : dl_text.
CONCATENATE it_sel_opt-selname it_sel_opt-sign
it_sel_opt-option it_sel_opt-low it_sel_opt-high
INTO dl_text SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
CALL METHOD document->add_gap
EXPORTING
width = 34.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
CALL METHOD document->new_line.
ENDLOOP.
ENDFORM. "top_of_page
Maybe you are looking for
-
BUG in OCR in Acrobat 9.3 on MRC (Mixed Raster Content) PDFs
I have lots of (non-searchable) PDFs, that were generated from scanned images (1 image per page @ 400 dpi) using LuraDocument from www.luratech.de. The images are stored internally in the PDFs as MRC (Mixed Raster Content), that means, the PDF contai
-
How do I stop all of the Safari spam pop-ups?
Since I downloaded OS Yosemite, my Safari is constantly getting pop-up tabs with spam. It is very bad and Apple was not supposed to be susceptible to such virus issues. Someone please advise if you have the same happening and how to stop it. Can y
-
Freight Condition on Contract is copied to Release PO Header
Hello, We have a contract for raw materail with freight condition (value) attached to the line item not the header. When release purchase order is created the freight condition is copied over to the HEADER not the line item and Is distributing the
-
SQL to MSSQL (Bulk) Variable Error
Hello everybody, I created a mapping / interface, which takes a date variable. It is working with LKM SQL to SQL or LKM SQL to Multiconnect knowledge modules successfully. However, when I run it with LKM to MSSQL BULK knowledge module, it is failed.
-
Trying to add FK_constraints but could not understand what happened?
ALTER TABLE [PartyAddressHistory] ADD CONSTRAINT [FK_PartyAddressHistory_Address] FOREIGN KEY(AddressID)REFERENCES [Address](AddressID)----N sg 547, Level 16, State 0, Line 1 The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Pa