Print Issue - ALV Grid
Hi,
When taking the printout of an ALV Grid where different colors are used for displaying dates or currencies, a / is coming on top of those columns.
Could some one help me in removing the /'s and keep the colors as it is.
Best Regards,
Kumar
hi paul,
thanks for the link, but unfortunately, this site is blocked here. If you want to have a look at the code that i wrote, you can check the standard program for transaction MB51. In the main program pls search for the subroutine build_runtimetable. Double click on that form and u will see where the field catalog is getting filled up.
There please check for the field MSEG ERFMG and the value at last column +, which is at column 30. the table rtt is used to fill field catalog.
Please check it and help me.
Best Regards,
Kumar
Similar Messages
-
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. -
Hi,
I am using ALV List and ALV grid in one of my custom reports.
There is no issue with ALV List when I print the report after running the program.
But when I use ALV Grid , the report runs good and when I try to print the report I get short dump "OBJECTS_NOT_CHARLIKE" in program "LKKBLF99" of the main program "SAPLKKBL".
I am using the function module "REUSE_ALV_GRID_DISPLAY" to run the report using ALV Grid and I get the above short dump when I try to print the report.
Can anyone help me please?
Thanks,
Ashok.Hai Ashok
Try with the following Code
*& Report ZALV_GRID *
REPORT ZALV_GRID .
TABLES: MARA.
TYPE-POOLS : SLIS.
Data declaration
DATA: BEGIN OF I_MARA OCCURS 0.
INCLUDE STRUCTURE MARA.
DATA: END OF I_MARA.
DATA: V_REPID LIKE SY-REPID.
selection-screen
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
SELECT-OPTIONS : S_MATNR FOR MARA-MATNR.
PARAMETERS: P_MTART LIKE MARA-MTART DEFAULT 'ROH'.
SELECTION-SCREEN END OF BLOCK B1.
initialisation
INITIALIZATION.
S_MATNR-LOW = '1400'.
S_MATNR-HIGH = '1500'.
APPEND S_MATNR.
V_REPID = SY-REPID.
start-of-selection
START-OF-SELECTION.
SELECT * FROM MARA
INTO TABLE I_MARA
WHERE MATNR IN S_MATNR AND
MTART = P_MTART.
CHECK SY-SUBRC = 0.
end of selection
END-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ' '
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME = 'MARA'
IS_LAYOUT =
IT_FIELDCAT =
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = I_MARA
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.
Thanks & Regards
Sreenivasulu P -
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 -
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 -
Hello All,
I want to print data on an alv grid to spool according the current layout using code.
Can anyone give me suggestion, maybe some sample code?
Thanks in advance,
AlexHi,
I have 2 ALV grid in the screen and pront to spool of both ALV's using OOp.
Please find sample code. Whenever report runs in the background i simply call this print subroutine after creating fieldcatalog, layout, sorting table etc.
FORM list_append TABLES ut_table
USING u_no TYPE char1
u_tabname TYPE slis_tabname.
IF u_no CA '13'.
MOVE 'TOP_OF_PAGE' TO ls_event-name.
CONCATENATE 'TOP_OF_PAGE' u_no INTO ls_event-form.
APPEND ls_event TO lt_events.
ELSE.
MOVE 'TOP_OF_LIST' TO ls_event-name.
CONCATENATE 'TOP_OF_LIST' u_no INTO ls_event-form.
APPEND ls_event TO lt_events.
ENDIF.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
it_fieldcat = lt_fieldcat
is_layout = ls_layout
i_tabname = u_tabname
it_events = lt_events
it_sort = lt_sort
* i_text =
TABLES
t_outtab = ut_table
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2
OTHERS = 3.
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. " LIST_APPEND
* Form f_list_display
FORM f_list_display.
DATA ls_print TYPE slis_print_alv.
ls_print-no_print_selinfos = 'X'. " Display no selection infos
ls_print-no_print_listinfos = 'X'. " Display no listinfos
ls_print-reserve_lines = 2. " Lines reserved for end of page
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXPORTING
i_interface_check = ' '
is_print = ls_print
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.
ENDFORM. " F_LIST_DISPLAY
May this will help you.
aRs
Message was edited by:
aRs -
Hi experts,
When I'm printing ALV table, fonts are that small, that it is difficult to read the text. Any ideas how can control this?
Thanks in advance,
MichalhI,
you can do this if you have the class CL_DD_DOCUMENT
for reference check the example in SE38
DD_STYLE_TABLE
Or
Use the IT_SORT paramter of the ALV function module..
define an internal table of type it_sort in your program..
for this pass the field name 'PERNR' AND append it...
and give this table to the FM.....
data:
t_sort type SLIS_T_SORTINFO_ALV,
w_sort type slis_sortinfo_alv.
w_sort-fieldname = 'PERNR'.
w_sort-up = 'X'.
append w_sort to t_sort.
w_sort
You will get the required output...
you may increase font size using CL_DD_DOCUMENT only for grid header and bottom area, it will not have any effect on the cells.
Inside the cells, the font and it's size is derived from SAPGUI settings (and monitor size).
In the cells you can set standard character atrributes color, intensied and inverse.
Regards
vasu -
Subtotal text print in alv grid report
HI all,
I am trying to print the text for the column e.g. "SUBTOTAL TEXT" when i click on event button on the tool bar.
total is getting generated but text is not printing i am giving the code what i had written please tel me what changes should be done in this code .
***********Code
FORM sub_get_event .
CONSTANTS : c_formname_subtotal_text TYPE slis_formname VALUE 'SUBTOTAL_TEXT'.
DATA: l_s_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 4
IMPORTING
ET_EVENTS = i_event
EXCEPTIONS
LIST_TYPE_WRONG = 0
OTHERS = 0.
Subtotal
READ TABLE i_event INTO l_s_event
WITH KEY name = slis_ev_subtotal_text.
IF sy-subrc = 0.
MOVE c_formname_subtotal_text TO l_s_event-form.
MODIFY i_event FROM l_s_event INDEX sy-tabix.
ENDIF.
ENDFORM. " sub_get_event
*& Form subtotal_text
Build subtotal text
P_total Total
p_subtot_text Subtotal text info
FORM subtotal_text CHANGING
p_total TYPE any
p_subtot_text TYPE slis_subtot_text.
Material level sub total
IF p_subtot_text-criteria = 'KWMENG'.
p_subtot_text-display_text_for_subtotal = 'Total '(009).
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = it_repid
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE' "#EC *
IS_LAYOUT = it_lay
IT_FIELDCAT = it_fldct[]
IT_EVENTS = i_event
TABLES
t_outtab = it_outtb
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.
ENDFORM. "Alv_Display
Thank you,
Supriya.in order to get the subtotals and subtotal texts you need to have sort option. without sort option it is not possible to trigger this event.
first populate the sort table then it will tirgger. check this thread for sample code
Re: SubTotal Text in ALV? -
Change of list printing to ALV grid printing
Hi everybody
I have requirement to convert the following code to Grid display
can any body help me out in this.
NEW-PAGE PRINT ON
NO DIALOG
LINE-COUNT 58
LINE-SIZE 170 LAYOUT 'X_58_170'
NEW LIST IDENTIFICATION 'X'
KEEP IN SPOOL 'X'
NEW-SECTION
IMMEDIATELY P_ERRLP
DESTINATION P_DEVICE
SAP COVER PAGE 'X'
LIST NAME 'ZFFR070E'.
advance thanksYou can do that
See this thread
CL_ALV_GRID header
Here the data is being displayed in the header, instead you can display in the bottom container rather than top container and display the grid in the top container.
Regards,
Ravi
Note : Please mark all the helpful answers -
Hi, how to set printer to alv grid, please check my code
Hi,
Iam giving my code, please observe...
DEFAULT PRINTER NAME "A909".
NOW IAM SETTING OT "LP01".
GS_PRINT-PRINT = 'X'.
P_PRINTR = 'LP01'.
CALL FUNCTION 'UPDATE_DEFAULT_PRINTPARAMS'
EXPORTING
USER = SY-UNAME
DESTINATION = P_PRINTR
IMMEDIATELY = ' '
RELEASE = 'X'
NEW_LIST_ID = 'X'.
SY-BATCH = 'X'
CALL METHOD GO_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK = G_CONSISTENCY_CHECK
I_STRUCTURE_NAME = 'KNA1'
IS_VARIANT = GS_VARIANT
I_SAVE = 'A'
I_DEFAULT = 'X'
IS_LAYOUT = GS_LAYOUT
IS_PRINT = GS_PRINT
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING = GT_EXCLUDE
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = ITAB2[]
IT_FIELDCATALOG = GT_FIELDCAT
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4
After running this program iam getting the default printer spool request number 'A909', Iam not getting printing form 'LP01'.
Need is to send the print to given printer (LP01), here printer may varry accoring to the selection. So nee is to set the printer that which has choosen.
Please give me the valuble solution as early as possible.
Please solve this as early as possible.Hi Ravi,
You can choose for the print version to be created as a PostScript file instead of a PDF document. The PostScript file is then sent directly to a printer of your choice
If you do not specify an output device here, a PDF file is generated and displayed on the screen.
You use the methods of the interface class IF_SALV_WD_PDF_SETTINGS for this (implementing class CL_SALV_WD_CONFIG_TABLE).
<b>Function</b> <b>Method</b>
Set ALV output to be printed immediately --> SET_PRINT_IMMEDIATE
Check whether the ALV output is to be printed immediately --> GET_PRINT_IMMEDIATE
Set printer --> SET_PRINTER
Get printer --> GET_PRINTER
See the below for SAP link
http://help.sap.com/saphelp_nw04s/helpdata/en/43/27472def40601ee10000000a422035/content.htm
see the thread also
Re: How to set the printer in set_table_for_first_display
mark all the helpful answers
Regards
Sudheer -
Greetings,
I am printing the ALV grid in the background using non OO processing.
It, of course, switches automatically to the ALV list when it prints... but... does anyone know how to shut off the "Sort criteria" and the "Data statistics" tables when printing?
These 2 tables are printing in front of the ALV list... on page 1.
Thanks,
Doug -Never mind.
<print_structure>-NO_PRINT_LISTINFOS = 'X' -
Need to display texts on to the ALV grid using SALV
Hi evryone,
There is a requirement to print an ALV grid containing the row titles and their subsequent values. The display shouild look like as below
Summary ItemsA cost 111111
ItemsB cost 222222
ItemC cost 333333
New items
ItemD cost 111111
ItemE cost 222222
ItemF cost 333333
Total 666666 666666
The headings pertaining to ItemA to itemB should come in a single column and their subsequent values as shown above. The total should be displayed below the corresponding block of items. Can anyone please suggest me the way we can acheive this using SALV and container concept.Sorry my earlier did not get displayed as expected. Please find below the format how the ALV should get displayed.
Summary -
ITEMA----
1111
ITEMB----
2222
ITEMC----
3333
ITEMD----
1111
ITEME----
2222
ITEMF -
3333
Total--6666--
6666
Please ignore the dots here they are just written to indicate spaces between the texts. The text summary and the texts "ItemA, B, C etc" should have 1 coulmn gap and the prices for the first item block should have 1 column block from the texts and the prices for second Item block should have a 2 coulumn block from the texts and total value should be displayed below each block.
Edited by: Phaniacumen on May 8, 2010 1:59 PM -
Issue with ALV grid print preview/spool
Hello everyone,
I am working on a report and I am having some issues with ALV grid. Currently in our DEV and QA environments the user can run the report, view the ALV grid, and print the grid without any issues.
However this isn't the case in the Prod environment. The user is able to run the report and view the grid without any issues. But when they click print preview or click print, the spool is incorrect. It shows the proper values from the grid, but the first field is reduced in length. Rather than showing a numeric field of length 10 it shows 99999999# or 99999999...
The programs are identical through every environment, including user parameters, formats, and spool settings. I have been told printing grids may have some issues, does anyone have any advice or dealt with this issue before?
I appreciate the help.
Thanks,
CI was waiting to hear from the functional team on the matter and no one has mentioned any more issues. I am assuming the problem is solved. I just noticed the thread was still un-answered and wanted to give an update.
Thank you for you help Vijay.
Regards
C -
Print Issue with Sorted ALV Grid
Hi Team,
I am using ALV display for my Program. Iam using REUSE_ALV_GRID_DISPLAY. Also i have a Sorting condition for my ALV grid. So iam filling the Sort table & passing it to the Function module. The data is displayed correctly with Sorting as required in the Output.
Now the issue is with: Print from this ALV. When we try to print the data, The requirement is that the Print should be same as how it is displayed in the ALV. "Grouped Columns"..... But now, the Print is that all the data is filled in all the columns. But user wants the Print also to appear same as it is shown in a Sorted ALV display.(With some similar column data missing in succeding sort columns until new entry starts)
Please suggest a solution to acheive the same.
Thanks & regards,
ChaitanyaLook at Q#19 in the note 1009650. Merging functionality is available only for ALV grid display.
Related Note: 447055
Work around would be to display the excel in the SAP window (Excel in Place) and print it from Excel. Read the following thread to make the necessary settings to make it work. Download Report exactly same as seems with Layout set !!
Edited by: Jeevan Sagar on Jan 19, 2012 12:38 AM -
Printing Page numbers in ALV grid with oops
Hi ,
I have a ALV grid display with OOPS , there are also fields in top of page and end of page that go along with the print. I want to print the page numbers also . If I give a variable and increment it along with every call to top of page , then if a second print is issued, the variable can not be cleared out. Is there any other way.
Thank you .Regarding ALV Grid Control using OOPs concepts
Please give me reward point if it is useful.
Thanks
Murali Poli
Maybe you are looking for
-
Hi, we need to know how get the page id of the actual page of the portal in a pl-sql procedure, we have read some post about it but neither goes in a pl-sql. Actually we are using the following code: p_reference_path := p_portlet_record.reference_pat
-
Satellite A300-1mz Can I use the recovery disks after a HDD upgrade?
I'm upgrading the hard drive of my *toshiba a300-1mz*, but I'd be sure that I can use the *recovery disks* maked at the first boots for the s.o. (vista) I expect your support... thank you very much...
-
Acrobat XI Pro - can't edit a form from another version of Acrobat?
I've got a form I'm trying to edit to see how something worked with a form field. However, I can open it just fine in XI Pro, but when I do a Forms/Edit I get the following popup message: "This form cannot be edited in Acrobat. Please use Adobe Live
-
Maven scripts for deploying WAR into Weblogic
Hello Folks, I would need some help in deploying EAR/WAR into weblogic server. I already have maven scripts for building but not for deploying. your help is appreciated. Thanks.
-
Firefox volume goes down when i close my laptop
whenever i close my laptop the firefox plugin container's volume goes down to 2 in the windows mixer. Is there a way to fix this?