ALV output to be printed in a specified layout
Hi All,
I have a ALV output, and I have a print Icon on the application tool bar, when I click on the print icon, the output should go to the printer in 80 character format.
plz let me know if there is any function module for this.
plz do the needful.
Thanks in advance
Regards,
Narendra
Hi Narendra,
Are you using REUSE_ALV_LIST_DISPLAY fm?
If so then try using SET_PRINT_PARAMETERS fm before the above fm call and then leave the printing to standard List->Printe Menu option.
See if this helps..
Sri
Similar Messages
-
ALV output to be printed in smartform
Dear Experts,
There is a report which uses ALV using webdynpro ABAP. Say the report has 5 columns A, B, C, D, and E.
There is also a custom button on ALV 'Print' which calls the smartform to display the output of the ALV( All columns ).
Now the requirement is, user may hide any of the columns in ALV, say, user chosen to hide B, and D columns. So ALV displays A, C, and E columns respectively.
When the user presses the 'Print' button smartform should display only the columns selected by the end user on the webdynpro screen. In this case it is A, C and E columns.
Now is there any way to cpature the list of columns selected by the user or hidden by the user before we process the smartform.
If there is any please let me know.
Thanks in advance!
Regards,
ShashiDear Experts,
Awaiting for any replies on this.. Please help in case of any information on this.
Thanks in advance!
Regards,
Shashi -
ALV Output need to send to Printer
Hi Folks,
I need to send the ALV output to the printer. I built the ALV in OOps. The printer button is enabled in the scrren and when I give print it is goint to dump
Below I have pasted the dump.
Help me to solve this.
Points will be rewarded.
Regards,
Raj.
Short text
Field symbol has not yet been assigned.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLKKBL" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
You attempted to access an unassigned field symbol
(data segment 81).
This error may occur if
- You address a typed field symbol before it has been set with
ASSIGN
- You address a field symbol that pointed to the line of an
internal table that was deleted
- You address a field symbol that was previously reset using
UNASSIGN or that pointed to a local field that no
longer exists
- You address a global function interface, although the
respective function module is not active - that is, is
not in the list of active calls. The list of active calls
can be taken from this short dump.
rigger Location of Runtime Error
Program SAPLKKBL
Include LKKBLF01
Row 1,315
Module type (FORM)
Module Name CHECKBOX_OUT
ource Code Extract
ine SourceCde
1285 "<<Unicode/Doublebyte 1
1286 else.
1287 write at (rs_fieldcat-outputlen) <hf> as icon no-gap quickinfo
1288 rs_fieldcat-tooltip.
1289 endif.
1290
1291 g_tabname = l_tabname.
1292
1293 format hotspot off.
1294 *End of Orginalcoding 4.6c
1295
1296 endform. " HEADER_FIELD_OUT
1297 &----
1298 *& Form CHECKBOX_OUT
1299 &----
1300 * text *
1301 ----
1302 form checkbox_out using rs_layout type kkblo_layout
1303 r_tabname type stack-i_tabname
1304 r_sum type c.
1305
1306 data: l_mark(1) type c.
1307
1308 if not rs_layout-box_tabname is initial and
1309 rs_layout-box_tabname ne r_tabname.
1310 format color off.
1311 write at (2) space no-gap.
1312 exit.
1313 endif.
1314
>>>>> if not r_sum is initial or <box> = '-'.
1316 format color off.
1317 write at (2) space no-gap.
1318 else.
1319 format color off.
1320 if <box> = ' ' or <box> = 'X'.
1321 g_mark = <box>.
1322 if rs_layout-no_input = 'X'.
1323 write g_mark as checkbox no-gap input off.
1324 else.check these parts in ur method:
I_SAVE = <var. of type CHAR01 >
I_DEFAULT = <var. of type CHAR01 >
IS_LAYOUT = <structure of type LVC_S_LAYO >
IS_PRINT = <structure of type LVC_S_PRNT > -
Output has to print from the executable program
Hi All,
I have 'zaap01' executable program. once provided the materil,plant, batch. the out put directly has to print(Via Printer) as well as when I'm getting alv grid.. can u help me how to proceed.
Thanks,
srii.Hi Sridhar
Users can print the ALV output on a printer or they can view the printout on the screen. You are able to change the look of these printouts by making various settings in the list-type ALV outputs using the ALV object model.
You can make the following settings for the printout of the ALV output:
· Output additional information
· Output standard title of the program
· Determine that the ALV be called in print mode
· Take actual list size into consideration during printing
· Optimize Column Width in the Printout
· Reserve Rows for Event END_OF_PAGE
Methods
Function-Output of list information
Class-CL_SALV_PRINT
Method-SET_LISTINFO_ON
Function-Check whether list information are being output
Class-CL_SALV_PRINT
Method-IS_LISTINFO_ON
Function-Output selection information
Class-CL_SALV_PRINT
Method-SET_SELECTIONINFO_ON
Function-Check whether selection information is being output
Class-CL_SALV_PRINT
Method- IS_SELECTIONINFO_ON
Function-Output additional information on a separate page
Class-CL_SALV_PRINT
Method- SET_COVERPAGE_ON
Function-Check whether additional information is being printed on a separate page
Class-CL_SALV_PRINT
Method- IS_COVERPAGE_ON
Output Standard Title of the Program
The standard title of the program comprises the current date, the title of the ALV output and the page number. You are able to show the standard title.
Methods
Function-Output standard title of the program
Class- CL_SALV_PRINT
Method
SET_REPORT_
STANDARD_HEADER_ON
Determine that the ALV Be Called in Print Mode
You are able to print the ALV output directly without having to first display it on the screen.
Methods
Function-Print ALV output directly
Class- CL_SALV_PRINT
Method- SET_PRINT_ONLY
Function-Check whether ALV output is being printed directly
Class- CL_SALV_PRINT
Method- IS_PRINT_ONLY
Take Actual List Size into Consideration During Printing
You can use the application to determine how wide the list should be in the printout. If the width of the ALV output has changed (for example because the user is showing columns), it can be that the page is not big enough to show all the information. You are able to set that ALV determine the current size before printing and then changes the print parameters accordingly.
Methods
Function
-Take actual list size into consideration during printing
Function
Class- CL_SALV_PRINT
Method- SET_PRINT_PARAMETERS_ENABLED
Function
-Check whether the list size can be adapted
Class- CL_SALV_PRINT
maethod-
IS_PRINT_PARAMETERS_
ENABLED
Regards.
Eshwar. -
Running BDC from my Editable ALV output
Hi All,
I want to run a bdc for my ALV output. Here the problem is the layout is editable so the values can be changed. I want to pick the values which is modified in my ALV output then using that i should run my BDC Program.
How to catch the input given in my ALV output.
Thank in advance.
Arun.Hi, check following link:
[https://wiki.sdn.sap.com/wiki/display/ABAP/Editable%20ALV%20through%20OOPS|https://wiki.sdn.sap.com/wiki/display/ABAP/Editable%20ALV%20through%20OOPS] -
Hi All,
Thanks in advance.
I have requirement to have a checkbox on the selection screen to print.
If the check box is checked the report has to print the ALV output with page number
on the printer given on the selection screen .
Can anyone please suggest me how this can be done.
Thnanks,
Gayatri Hemnur
Moderator message: please research yourself first, look for available information and solutions.
Edited by: Thomas Zloch on Dec 15, 2010 3:29 PMHi,
I think you are talking about line-size.
... LINE-SIZE col
Effect
Creates a report with col columns per line.
If the LINE-SIZE specification is missing, the line length corresponds to the current screen width. The system field SY-LINSZ contains the current line size for generating lists. The maximum width of a list is 1023 characters. You should keep lists to the minimum possible size to improve useability and performance (recommendation: LINE-SIZE < 132). For very wide lists (LINE-SIZE > 255), you should consult the notes for using LINE-SIZE
greater than 255.
Notes
The specified LINE-SIZE must not appear in quotation marks.
If the you want the report list (i.e. the output) to be printable, do not define a LINE-SIZE with a value greater than 132 because most printers cannot handle wider lists. You cannot print lists wider than 255 characters at all using the standard print functions. To print the contents of the lists, you need to write a special print routine that arranges the data in shorter lines (for example, using the PRINT ON addition in the NEW-PAGE statement.
At the beginning of a new list level, you can set a fixed line width for the level using the ... LINE SIZE addition to the NEW-PAGE statement.
Example
REPORT ZREPNAME LINE-SIZE 132.
Kindly reward points by clicking the star on the left of reply,if it is useful. -
Creating Format type for printing ALV output.
Dear Friends,
I am using a format type for printing ALV output print which displays 65 rows and 255 columns on DINA4 page. I want to create a format type which will print 65 rows and 310 columns on 'LEGAL' page format .
So plz suggest the ways along with help links if any.
Regards,
Madan.Hi Mandan,
As long as I know the maximum column for printing is 255.
Might be you can split your output into 2 rows...
Regards, -
Hi together,
after migration of our SAP-system in a Unicode one, I changed the device type to an Unicode-device type.
But now, when I print a ALV list, the output at the printer is wrong. There's nothing "like a table" - everything is displaced, nothing in columns...
How can i fix this?
Thanks in advance
MichaelHi together,
just wanted to know if anybody got a solution for my problem...
To make it more specific:
I printed out 10 rows of the table VBRK. On my unicode-device type it looks like this:
Faktura____|_FkArt_|_FkTyp_|_VBTyp_| ...
884064014___|_F2____|_L___|_M____|_EUR____| ....
884054014___|_G2_____|_A __|_O____|_EUR____| ....
And one the non-Ucidode one:
Faktura____|_FkArt_|_FkTyp_|_VBTyp_| ...
884064014_|_F2____|_L_____|_M_____| EUR | ....
884054014_|_G2____|_A_____|_O_____| EUR | ....
So, I mean, non unicode looks like a tyble, unicode not! What I have to do? -
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 -
Need to sent alv output as html or as pdf attachment in mail
+Hello
I want to send an ALV output as attachement in html or as pdf format. how to do that? line size is greater than 600(nearly 40 fields).
+please help me in this query.
Regards
Guruvayurappan
Moderator Message: Please search before posting your question. Thread locked.
Edited by: Suhas Saha on Dec 29, 2011 4:57 PMHi,
For sending the ALV output as PDF attachment, you can create a spool (proper page size in print parameters) and convert the spool to PDF using the FM CONVERT_ABAPSPOOLJOB_2_PDF and then send the same as attachment in mail.
For send the data as HTML attachment, try the below FMs
WWW_ITAB_TO_HTML_HEADERS & WWW_ITAB_TO_HTML_LAYOUT to create the HTML layout
WWW_ITAB_TO_HTML to create the HTML for the actual data.
Hope this helps you.
Regards,
Sachinkumar Mehta -
How to download the blocked ALV output to PDF file.
How to download the blocked ALV output to PDF file.
I am able to download the BLocked ALV output in PDF format,
but the each bolck in ALV is displaying different pages of PDF.
In my report I have 4 block in 1 page, I am able to see the output in PDF but in different page.
How to avoid the Page-break in PDF.
Thanks,
Ravi Yasoda.hi,
I believe that your have 4 containers on the screen with individual ALV display. in this case, there is no way to get combined PDF output to my knowledge.
However you can use Smartform/Sapscript as output which would allow you to display ALV in blocks and also print it in one.
Regards,
Nirmal -
How to send ALV output data into Excel sheet format via Mail to the user?
Hi friends,
I have a doubt ie,
How to send ALV output data into Excel sheet format via Mail to the user?
regards
MoosaHi,
Provide the output internal table to the objbin in the below FM
Send Message
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = i_docdata
put_in_outbox = c_x
TABLES
packing_list = i_objpack
object_header = i_objhead
contents_bin = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
and specify the document type
i_objpack-doc_type = 'XLS'.
and try.
Regards,
Nandha -
Regarding ALV output to Excel file download
Hi all,
i had a requirement when downloading the ALV output to the Excel file it should ask for the password.if the user enters the password then this pass word shuld be assigned to the Excel file that was downloaded.
Can i know how this can be implementedHi,
Using EXCEL_OLE_STANDARD_DAT you can specify the PASSWORD & PASSWORD OPTION.
Regards,
Sharat -
I appreciate if anyone can let me know how to get the ALV output to an EXCEL file.I have done it thru list->export. Is there any other way?
Hi Deepti,
1) Once you have alv report displayed in the screen.
2) Click button 'View' ( next to print button) on application toolbar
3) Select Excel in Place
4) This will download the same format as of Report
I hope your ALV have all the Standard functions in Toolbar. If not copy the status from and get the function as mentioned above.
Program - SAPLSALV
Status - STANDARD
OR For downloading into Excel sheet use EXPORT->LOCAL FILE->Spread sheet
If you want to do programatically then:
Refer the link:
http://www.sap-img.com/abap/download-to-excel-with-format-border-color-cell-etc.htm
Please use the following FM
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
I_FIELD_SEPERATOR =
I_LINE_HEADER =
i_filename =
I_APPL_KEEP = ' '
tables
i_tab_sap_data =
CHANGING
I_TAB_CONVERTED_DATA =
EXCEPTIONS
CONVERSION_FAILED = 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.
Another FM
MS_EXCEL_OLE_STANDARD_DAT
A simple option:
a) form download_file .
call function 'WS_EXCEL'
importing
filename = excel_name
tables
data = itab.
Reward points if this Helps.
Manish -
Alv output- download to excel file
Hi
I have ALV report. My requirement is
For example i have 10 records in my ALV output.
I want to download first 5 data to excel file.
so i need to select the data and click the button download in alv screen. I created the download button in ALV screen.
how to write coding for thisHi Kumar K,
U can do it by feeling another internal table from the final internal table which u displayed...
suppose u want the record 5 to 12 then
LOOP AT itab FROM 5 TO 12.
Append itab to itab2.
ENDLOOP.
So now Itab2 contains record 5 to 12...
Logic:
Create one Custom Button ... Now For Sy-ucomm of that button... provide popup window with FROM and TO parameters...
Then using Loop... Endloop... select that much records form internal table to another internal table say itab2...
Now using GUI_DOWNLOAD or WS_DOWNLOAD or any other FMs and pass the internal table to this FM...
For more information on LOOP Syntax...
LOOP AT itab - cond
Syntax
... [FROM idx1] [TO idx2] [WHERE log_exp].
Extras:
1. ... FROM idx1
2. ... TO idx2
3. ... WHERE log_exp
Effect
The table rows to be read in a LOOP-loop can be limited by optional conditions; if no conditions are specified , all rows of the table are read.
Addition 1
... FROM idx1
Effect
The specification FROM is only possible with standard tables and sorted tables. This specification only accepts table rows starting from table index idx1. For idx1, a data object of the type i is expected. If the value of idx1 is smaller or equal to 0, then it will be set to 1. If the value is larger than the number of table rows, the loop is not passed through.
Addition 2
... TO idx2
Effect
The specification TO is only possible with standard tables and sorted tables. The specification only accepts table rows after table index idx2. For idx2, a data object of the type i is expected. If the value of idx2 is smaller or equal to 0, then the loop will not be passed. If the value is larger than the number of table rows, then the value will be set to the number of rows. If idx2 is smaller than idx1, then the loop is not passed as well.
Addition 3
... WHERE log_exp
Effect
WHERE can be specified with all table-types. After WHERE, you can specify any logical expression log_exp in which the first operand of any singular comparison is a component of the internal table. For this reason, all logical expressions are possible except for IS ASSIGNED, IS REQUESTED and IS SUPPLIED. Dynamic specification of a component through bracketed character-type data objects is not possible. Loops at sorted tables must have compatible operands of the logical expression. All rows are read for which the logical expression is true.
Notes
The logical expression specified after WHERE is analyzed once at entry into the loop. Possible changes of the second operand during loop processing are not taken into account.
While with standard tables all rows of the internal table are checked for the logical expression of the WHERE- addition, with sorted tables and hash tables (as of Release 7.0) you can achieve optimized access by checking that at least the beginning part of the table key in sorted tables and the entire table key in hash tables is equal in the logical expression through queries linked with AND. Optimization also takes effect if the logical expression contains other queries linked with AND with arbitrary operators.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
Maybe you are looking for
-
Why can I not rent a transformers movie
Why can I not rent a transformers movie
-
User working across multiple domians remotely
Hi I am after some advice. I support multiple schools and have a few members of staff that work across all sites. The schools all have their own domain and the users need to access data at both sites. I am wondering how anyone else has allowed staff
-
Final Cut Pro 5.1 project files backwards compatibility
I have just installed Final Cut Studio HD (universal) onto my new Macbook Pro 2ghz. I also run an iMac G5 2ghz which has been my main editing platform for the last year or so. I decided to port some of my current projects over onto my MacBook Pro and
-
HOW TO DELETE A ISSUE IN SOLMAN
Sir, I Have Created 2 issues which are similar.i want to delete this issue. please explain how to do it regards amey
-
Anyway to restore Dropbox connectivity to iOS 5.1.1 for iPad 1
Hi all, I mistakenly thought I'd do a full restore on my old iPad and I'd get everything back. BIG MISTAKE!!! A lot of apps have been removed prior to IOS7 (I thought I was given the option to restore to the last available version - but not for eve