Text above an ALV-Grid print-out
It is possible to set a Text above an ALV-Grid print-out?
hii
yes you can print header in ALV & it will come in print out.use following code
DATA: i_listheader TYPE slis_t_listheader WITH HEADER LINE,
w_date like sy-datum.
move:
'H' TO i_listheader-typ,
TO i_listheader-info.
* text-021 TO i_listheader-info.
APPEND i_listheader.
WRITE sy-datum TO w_date.
move:
'S' TO i_listheader-typ,
'Execution date' TO i_listheader-key,
w_date TO i_listheader-info.
APPEND i_listheader.
MOVE:
'S' TO i_listheader-typ,
'Execution user' TO i_listheader-key,
sy-uname TO i_listheader-info.
APPEND i_listheader.
Move:
'Discription' to i_listheader-key,
'Tolling Production Variance' to i_listheader-info.
APPEND i_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_listheader[].
<REMOVED BY MODERATOR>
thx
twinkal
Edited by: twinkal patel on Jun 12, 2008 2:51 PM
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 1:33 PM
Similar Messages
-
Displaying Total Text in an ALV Grid
Hi Experts,
Please suggest me how to display the Total text in the alv grid using CL_SALV_FACTORY method.
Example Output:
Field1 Field2 Field3
a b 100
b c 100
Total 200
Regards,
Sunil KumarHi Avinash,
It will not work since am using cl_salv_factory method. whatever links you have sent are using reuse_alv_grid_display or set_first_table_display.
Regards,
Sunil Kumar -
'TOTAL' text display in ALV GRID output
Hi,
My requirement is to display 'TOTAL' text at the end of the ALV report alongwith Totals for the respective columns.
I've used Classical method(i.e. used ALV GRID FM) to display the report.
For Totals I've used 'DO_SUM', option and for text populated 'TOTALS_TEXT' field, but still its not showing the desired text.
I've tried most of the solutions provided on SDN, and they are not working.
So, plssss help me to find out correct solution.
Thanks in Advance!!!!!!
Thanks & regards,
Amithi,
i hope this code will exactli fulfil ur requirement.
type-poolS: slis.
TYPES: BEGIN OF S_TAB,
F1 TYPE CHAR5,
F2 TYPE I,
F3 TYPE I,
END OF S_TAB.
TYPES: BEGIN OF sf_TAB,
f0 type char10,
F1 TYPE CHAR5,
F2 TYPE I,
F3 TYPE I,
END OF Sf_TAB.
DATA: IT_TAB TYPE TABLE OF S_TAB,
WA_TAB TYPE S_TAB,
IT_FIN TYPE TABLE OF Sf_TAB,
WA_FIN TYPE Sf_TAB.
data: fcat type slis_t_fieldcat_alv,
wa_fcat type slis_fieldcat_alv,
layout type slis_layout_alv,
it_sort type SLIS_T_SORTINFO_ALV,
wa_sort type SLIS_SORTINFO_ALV.
FREE IT_TAB. CLEAR WA_TAB.
WA_TAB-F1 = 'A1'.
WA_TAB-F2 = '10'.
WA_TAB-F3 = '20'.
APPEND WA_TAB TO IT_TAB.
CLEAR WA_TAB.
WA_TAB-F1 = 'A1'.
WA_TAB-F2 = '10'.
WA_TAB-F3 = '20'.
APPEND WA_TAB TO IT_TAB.
CLEAR WA_TAB.
WA_TAB-F1 = 'A2'.
WA_TAB-F2 = '15'.
WA_TAB-F3 = '30'.
APPEND WA_TAB TO IT_TAB.
CLEAR WA_TAB.
WA_TAB-F1 = 'A3'.
WA_TAB-F2 = '15'.
WA_TAB-F3 = '40'.
APPEND WA_TAB TO IT_TAB.
CLEAR WA_TAB.
WA_TAB-F1 = 'A3'.
WA_TAB-F2 = '20'.
WA_TAB-F3 = '60'.
APPEND WA_TAB TO IT_TAB.
CLEAR WA_TAB.
LOOP AT IT_TAB INTO WA_TAB.
wa_fin-f0 = 'Total'.
wa_fin-f1 = wa_tab-f1.
wa_fin-f2 = wa_tab-f2.
wa_fin-f3 = wa_tab-f3.
append wa_fin to it_fin.
clear wa_fin.
ENDLOOP.
Define Imacro.
wa_fcat-fieldname = &1.
wa_fcat-tabname = &2.
wa_fcat-reptext_ddic = &3.
wa_fcat-col_pos = &4.
WA_FCAT-DO_SUM = &5.
WA_FCAT-NO_OUT = &6.
append wa_fcat to fcat .
clear wa_fcat.
end-of-definition.
imacro 'F0' 'it_fin' '' '1' '' 'X'.
imacro 'F1' 'it_fin' 'PO Document' '2' '' ''.
imacro 'F2' 'it_fin' 'TOTAL' '3' 'X' ''.
imacro 'F3' 'it_fin' 'Space' '4' '' ''.
****************DEFINE LAYOUT
layout-zebra = 'X'.
layout-colwidth_optimize = 'X'.
layout-no_totAlLine = 'X'.
WA_SORT-SPOS = 1.
WA_SORT-fieldname = 'F0'.
wa_SORT-UP = 'X'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_GRID_TITLE = 'SALES ORDER DETAILS'
IS_LAYOUT = layout
IT_FIELDCAT = fcat
IT_SORT = IT_SORT
TABLES
T_OUTTAB = IT_FIN
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Cheers,
Rudhir -
Hi Experts,
I am having problem while taking print out of Alv report format. In that report, 1 column contains Unit Values.
Eg. Unit value - 'LE' , AFTER USING CONVERSION EXIT LOGIC it is converted into 'AU' which is finally displayed in the Alv -Report display format.
while taking Print-out of that report , that field Unit Value 'AU' is Shown in this format "****'.
Please give me your Valuable Suggestions.
Thanks and Regards
BalaNarasimman Mwhile defining filed catalog define the data type also
clear l_fieldcat.
l_fieldcat-fieldname = 'MEINS'.
l_fieldcat-datatype = 'UNIT'.
l_fieldcat-no_out = ' '.
l_fieldcat-do_sum = 'X'.
l_fieldcat-seltext_l = 'UOM'.
append l_fieldcat to p_fieldtab.
may be it would help.
anya -
Hi,
I have developed a ALV report .
I also want to take the print out of this report.
How can i do this.Hi,
Refer this code
DATA : wa_variant TYPE disvariant, "Work area for variant
wa_variant1 TYPE disvariant, "Work area for variant
wa_layout TYPE slis_layout_alv, "Work area for layout
wa_print TYPE slis_print_alv, "Work area for print
*& Form sub_alv_display *
This form displays the output using REUSE_ALV_GRID_DISPLAY *
function module *
FORM sub_alv_display .
*--Local Internal Table
DATA : li_sort TYPE slis_t_sortinfo_alv.
*--Define print list
wa_print-no_print_listinfos = c_chk.
wa_print-no_coverpage = c_chk.
*--If the No zero stock lines is checked in the selection screen
IF p_sline IS NOT INITIAL.
DELETE i_final WHERE einme = c_zero.
ENDIF.
IF NOT i_final[] IS INITIAL.
*--Call the function module to display the ALV report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
is_layout = wa_layout
it_fieldcat = i_fieldcat
i_default = c_chk
i_save = c_save
is_variant = wa_variant
it_events = i_events
is_print = wa_print
it_sort = li_sort
TABLES
t_outtab = i_final
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.
ELSE.
*--No data found for the given selection criteria.
MESSAGE i001.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. "sub_alv_display
Regards,
Prashant -
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 -
Hello Experts,
I have an ALV Grid where the last column is displayed as push buttons. When i click on a pushbutton, a text editor is opened up using ABAP OO. Now, I enter the text and SAve it. A standard text is created against the selected row in ALV Grid. Then I come back to the alv grid and click on another button of some different row. Again the text editor opens up with the previous text. I nter the new text and click on save. However, this time the standard text is not created. I have am making the container and text editor free as i click on 'back'. Still the data is not getting refreshed.
Please, let me know where m i going wrong.
Regards,
SonalHi Sonal,
I have faced similar issue with respect to module pool with container on the screen.
Try using the following on back action....
call method wf_init_edit->delete_text. (wf_init_edit -> editor reference - type ref to cl_gui_textedit )
Also we can free the container using
call method wf_init_cont->free. (wf_init_cont -> container reference - type ref to cl_gui_custom_container )
Hope it helps.
Regards,
Byju -
Hi Gurus,
I have a problem with ALV PRINT. Here i am printing out put directly from ALV with out display. I want the out put to be fit in A4 sheet. My out put is having 11 coloumns. PLease help me how i can do that.Hi Ashish,
display once. Create a layout that fits on desired paper size (organize columns displayed and column width required). Save as layout, set this as default layout.
Thats it.
Regards,
Clemens -
95% of text is missing in the print out, but logos print fine
Hello,
I have a printing problem with my DeskJet F4184 Series All-in-One printer and I am hoping someone can help me resolve this issue.
When I print out a page, it will print out any pictures or logos, but not the majority of the text. I thought it might be a black ink issue, so I converted the whole text into blue, and printed it again. But to no avail. Any ideas what could be going on?
Thanks,
HandanOK, have you installed any fonts lately?
Open Mail>Preferences>Fonts & Colors, what is the message font & fixed width font sent to, try changing them & see what shows up.
Also, I can't delete an email.
At this point I think you should get Applejack...
http://www.macupdate.com/info.php/id/15667/applejack
After installing, reboot holding down CMD+s, (+s), then when the DOS like prompt shows, type in...
applejack AUTO
Then let it do all 6 of it's things.
At least it'll eliminate some questions if it doesn't fix it.
The 6 things it does are...
Correct any Disk problems.
Repair Permissions.
Clear out Cache Files.
Repair/check several plist files.
Dump the VM files for a fresh start.
Trash old Log files.
First reboot will be slower, sometimes 2 or 3 restarts will be required for full benefit... my guess is files relying upon other files relying upon other files! :-)
Disconnect the USB cable from any Uninterruptible Power Supply so the system doesn't shut down in the middle of the process. -
Writing text above multiple ALV list
Hi,
I have multiple ALV lists and want to add a different text above each one. How can this be achieved? I am using sort to separate the lists. thanks
sort-fieldname = 'MATNR'.
sort-up = 'X'.
sort-group = '*'.
APPEND sort TO it_sort.
CLEAR sort.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = it_fieldcat
it_sort = it_sort
TABLES
t_outtab = it_data
EXCEPTIONS
program_error = 1.
Edited by: Hin Lai on Jan 7, 2011 9:40 PMWell, why not debug FBL5N and see how that transaction does this?
Hmmm....
Debugging may not help. The separate lists are handled by the display variant. You should be able to do the same thing if all of your lists use the same field catalog and are in the same or can be put in the same table.
Rob
Edited by: Rob Burbank on Jan 7, 2011 5:36 PM -
Page Number in ALV Output (print out)
Hi,
I would like to print the Page numbers in the Printout of ALV Display.
How can solve this ?
Regards,
Ram.Hi ,
If you are ALV grid or List then
In the eevnt TOP of page check sy-ucomm for print and then increment the pages by using sy-pagno and fill listheader table and reuse_commentary_write
check the code below .
IF sy-ucomm = 'PRIN'.
t_listheader1[] = t_listheader[].
DELETE t_listheader1 WHERE key = c_page.
CLEAR v_htext.
IF v_pagno4 = sy-pagno.
Write top of page
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_listheader.
Please reward if useful. -
ALV Grid with out data in editable mode
Hi,
I need an ALV Grid , which only contains empty cells. User should be able to enter data in the cells later.
Thanks
SatyaREPORT sapmz_hf_alv_grid .
TABLES: zsflight.
G L O B A L I N T E R N A L T A B L E S
DATA: gi_sflight TYPE STANDARD TABLE OF sflight.
G L O B A L D A T A
DATA: ok_code LIKE sy-ucomm,
g_wa_sflight LIKE sflight.
Declare reference variables to the ALV grid and the container
DATA:
go_grid TYPE REF TO cl_gui_alv_grid,
go_custom_container TYPE REF TO cl_gui_custom_container.
S T A R T - O F - S E L E C T I O N.
START-OF-SELECTION.
SET SCREEN '100'.
*& Module USER_COMMAND_0100 INPUT
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0100 OUTPUT
MODULE status_0100 OUTPUT.
Create objects
IF go_custom_container IS INITIAL.
CREATE OBJECT go_custom_container
EXPORTING container_name = 'ALV_CONTAINER'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_custom_container.
PERFORM load_data_into_grid.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Form load_data_into_grid
FORM load_data_into_grid.
Read data from table SFLIGHT
SELECT *
FROM zsflight
INTO TABLE gi_sflight.
Load data into the grid and display them
CALL METHOD go_grid->set_table_for_first_display
EXPORTING i_structure_name = 'SFLIGHT'
CHANGING it_outtab = gi_sflight.
ENDFORM. " load_data_into_grid -
How do I transfer texts to desktop pc to print out?
How do I transfer texts to desktop pc to print?
never heard of something like this or an app that does that, what I know is that the new mac os mountain lion that was recently announced by apple comes with imessages for mac, probably from there maybe you could print it, or take screen shots, I doubt it that theres an app that can see your text messages, apple would never allow this, because it would also be known as a spyware, other people could read your messages, but if your iPhone is jailbroken, then theres probably an app for that in the cydia store
-
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 guys,
When I execute my report I can see all fields ok, but when I decide to print it the columns and fields are been displaced. I tried to fix with the fielcatalog but it isn't possible. Can anybody help me?
Thanks a lot
Best regards.
AnaHi Menegazzo Marco ,
I call the alv :
***fieldcatalog***
LS_FCAT-COL_POS = '1'.
LS_FCAT-FIELDNAME = 'BUKRS' .
LS_FCAT-TABNAME = 'BKPF'.
LS_FCAT-INTTYPE = 'C' .
LS_FCAT-OUTPUTLEN = '4' .
LS_FCAT-COLTEXT = 'Sociedad ' .
LS_FCAT-SELTEXT = 'Sociedad ' .
LS_FCAT-JUST = 'X'.
LS_FCAT-COL_OPT = ' '.
APPEND LS_FCAT TO PGT_FIELDCAT .
CLEAR LS_FCAT.
LS_FCAT-COL_POS = '2'.
LS_FCAT-FIELDNAME = 'BELNR' .
LS_FCAT-TABNAME = 'BKPF'.
LS_FCAT-INTTYPE = 'C' .
LS_FCAT-OUTPUTLEN = '10' .
LS_FCAT-DD_OUTLEN = '10'.
LS_FCAT-COLTEXT = 'Nº doc. Contable' .
LS_FCAT-SELTEXT = 'Nº doc. Contable' .
LS_FCAT-JUST = 'X'.
LS_FCAT-COL_OPT = ''.
APPEND LS_FCAT TO PGT_FIELDCAT .
CLEAR LS_FCAT.
LS_FCAT-COL_POS = '3'.
LS_FCAT-FIELDNAME = 'GJAHR' .
LS_FCAT-TABNAME = 'BKPF'.
LS_FCAT-INTTYPE = 'N' .
LS_FCAT-OUTPUTLEN = '4' .
LS_FCAT-COLTEXT = 'Ejercicio' .
LS_FCAT-SELTEXT = 'Ejercicio' .
LS_FCAT-JUST = 'X'.
LS_FCAT-COL_OPT = ' '.
APPEND LS_FCAT TO PGT_FIELDCAT .
CLEAR LS_FCAT.
**end fieldcatalog**
*layout**
PGS_LAYOUT-CWIDTH_OPT = 'X'.
PGS_LAYOUT-COL_OPT = 'X'.
*end layout**
*print*
GS_PRINT-NO_COLWOPT = 'X'.
*end print*
CALL METHOD GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'S_ALV'
IS_LAYOUT = GS_LAYOUT
IS_PRINT = GS_PRINT
CHANGING
IT_OUTTAB = LT_ALV[]
IT_FIELDCATALOG = GT_FIELDCAT
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
*--Exception handling
ENDIF.
Thanks a lot.
Maybe you are looking for
-
Mini-DVI to mini-Display port connector?
Is Apple releasing a cable that connects mini-dvi to mini-display port? My company today told me that I will get a new Macbook Pro with a mini-display port built in, but I ordered a cinema display directly from Apple. I plan to connect the new Macboo
-
Purchase order price variance and quantity variance
Hi All , I am working on a report development where we need price change , value change and quantity change in the report along with net value (ekpo-netwr) . Can anybody suggest me tables in ECC where the changes (price,quantity and total v
-
I am intending to convert my complete iPhoto Library to slideshows in iDVD for ready access. I'm not looking for a best route, this has been well covered elsewhere. For 99.9% of my collection I will use them in only two ways, slideshow in iDVD, print
-
Two task communication protocol error
I have a Database Data block. I want to i retrieve the records with execute query and save the item after changes. when i do this for the second time connection between ORacle Server and Forms Runtime is last. Message comming is Two task communicatio
-
Good evening. I'm having trouble saving information in a form. The form is from a DMV website. When I save it, it shows me a page directing me to download a version of Adobe that I've already downloaded.