Ooalv top-of page printing
hi,
i got one object in that OOALV is USED.
in the output of OOALV Grid its displaying all selection parameter elements.
like i have selection parameter plant,werks,batch,postind date and posting time.
in output its displaying plant,werks and batch low and high valuesbut not posting date and time.
can any one tell me that its not displaying and where i have to write the code.
they used OOALV fieldcatalog abd GRId to display data.
Thanks and regards
suneetha
Hi suneetha ,
just go through this coding where i have used top-of page in Grid FM
i think might be useful to you
TABLES: afko, " Order Header
afpo, " Order Item
aufk, " Order Master
resb,
afvc, " Order Operation w/i an Order
afvv, " Qty/Dates/values in an Operation
crhd, " Work Center
mara, " Material Master
makt, " Material Description
ausp, " Characteristic Values
cabn, " Characteristic
plpo, " Task list-operation/activity
plfl. " Task list - sequences
TYPE-POOLS:slis.
DATA:check(1).
TYPES:BEGIN OF t_afko,
check,
aufnr TYPE afko-aufnr,
gltrp TYPE afko-gltrp,
gstrp TYPE afko-gstrp,
gamng TYPE afko-gamng,
plnbez TYPE afko-plnbez,
END OF t_afko.
DATA:i_afko TYPE STANDARD TABLE OF t_afko,
w_afko LIKE LINE OF i_afko.
DATA:i_afko1 TYPE STANDARD TABLE OF t_afko,
w_afko1 LIKE LINE OF i_afko1.
DATA:ponum TYPE afko-aufnr,
stdate TYPE afko-gltrp,
fidate TYPE afko-gstrp,
quanty TYPE afko-gamng,
mater TYPE afko-plnbez,
descr TYPE makt-maktx,
index TYPE sy-index,
count(3) VALUE '0'.
TYPES:BEGIN OF t_final,
check,
aufnr TYPE afko-aufnr,
gltrp TYPE afko-gltrp,
gstrp TYPE afko-gstrp,
gamng TYPE afko-gamng,
plnbez TYPE afko-plnbez,
maktx TYPE makt-maktx,
END OF t_final.
DATA:i_final TYPE STANDARD TABLE OF t_final,
w_final LIKE LINE OF i_final,
i_final1 TYPE STANDARD TABLE OF t_final,
w_final1 LIKE LINE OF i_final1.
TYPES:BEGIN OF t_crhd,
objid TYPE crhd-objid,
arbpl TYPE crhd-arbpl,
END OF t_crhd.
DATA:i_crhd TYPE STANDARD TABLE OF t_crhd,
w_crhd LIKE LINE OF i_crhd.
TYPES:BEGIN OF t_afvc,
aufpl TYPE afvc-aufpl,
arbid TYPE afvc-arbid,
END OF t_afvc.
DATA:i_afvc TYPE STANDARD TABLE OF t_afvc,
w_afvc LIKE LINE OF i_afvc.
TYPES:BEGIN OF t_item,
matnr TYPE resb-matnr, " Component Matl Number
maktx TYPE makt-maktx, " Matl Desc for Component
bdmng TYPE resb-bdmng, " Component Req'd Qty
END OF t_item.
DATA:i_item TYPE STANDARD TABLE OF t_item,
w_item LIKE LINE OF i_item.
TYPES:BEGIN OF t_resb,
matnr TYPE resb-matnr,
bdmng TYPE resb-bdmng,
END OF t_resb.
DATA:i_resb TYPE STANDARD TABLE OF t_resb,
w_resb LIKE LINE OF i_resb.
DATA:i_makt TYPE STANDARD TABLE OF makt,
w_makt LIKE LINE OF i_makt.
TYPES:BEGIN OF t_aufk,
aufnr TYPE aufk-aufnr,
auart TYPE aufk-auart,
werks TYPE aufk-werks,
END OF t_aufk.
DATA:i_aufk TYPE STANDARD TABLE OF t_aufk,
w_aufk LIKE LINE OF i_aufk.
DATA:***_qty TYPE co_menge VALUE 0,
lines TYPE i,
v_aufnr TYPE afko-aufnr.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS:
p_werks TYPE aufk-werks OBLIGATORY MEMORY ID wrk, " PLANT
p_auart TYPE aufk-auart OBLIGATORY, "ORDER TYPE
p_arbpl TYPE crhd-arbpl OBLIGATORY. "Work center
SELECT-OPTIONS:
s_plnbez FOR afko-plnbez, "material
s_gstrp FOR afko-gstrp OBLIGATORY, "ORDER BASIC START DATE
s_gltrp FOR afko-gltrp OBLIGATORY, "ORDER BASIC FINISH DATE
s_gstrs FOR afko-gstrs, "ORDER SCHEDULE START DATE
s_gltrs FOR afko-gltrs. "ORDER SCHEDULE FINISH DATE
SELECTION-SCREEN END OF BLOCK b1.
*ALV data declarations
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid,
t_heading TYPE slis_t_listheader.
DATA: it_events TYPE slis_t_event,
wa_events LIKE LINE OF it_events.
CLEAR: wa_events.
REFRESH: it_events.
wa_events-name = 'TOP-OF-PAGE'.
wa_events-form = 'top-of-page'.
APPEND wa_events TO it_events .
CLEAR wa_events.
DATA:lst TYPE slis_t_listheader,
wst like line of lst.
wst-typ = 'H'.
wst-info = 'PRODUCTION ORDERS SELECTION'.
APPEND wst TO lst.
*Start-of-selection.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM get_events.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
FORM build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
I.e. Field type may be required in-order for
the 'TOTAL' function to work.
fieldcatalog-fieldname = 'CHECK'.
fieldcatalog-seltext_m = 'SELECTION'.
fieldcatalog-col_pos = 1.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-input = 'X'.
fieldcatalog-edit = 'X'.
fieldcatalog-checkbox = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'AUFNR'.
fieldcatalog-seltext_m = 'PO NUMBER'.
fieldcatalog-col_pos = 2.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'GSTRP'.
fieldcatalog-seltext_m = 'BASIC START DATE'.
fieldcatalog-col_pos = 3.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'GLTRP'.
fieldcatalog-seltext_m = 'BASIC FINISH DATE'.
fieldcatalog-col_pos = 4.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'GAMNG'.
fieldcatalog-seltext_m = 'PO QUANTITY'.
fieldcatalog-col_pos = 5.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'PLNBEZ'.
fieldcatalog-seltext_m = 'MATERIAL'.
fieldcatalog-col_pos = 6.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MAKTX'.
fieldcatalog-seltext_m = 'MATERIAL DESCRIPTION'.
fieldcatalog-col_pos = 7.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
FORM build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for when double
"click(press f2)
gd_layout-zebra = 'X'.
gd_layout-group_change_edit = 'X'.
gd_layout-header_text = 'helllllo'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
FORM display_alv_report.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
it_events = it_events
i_save = 'X'
is_variant = z_template
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.
ENDFORM. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT objid arbpl FROM crhd INTO TABLE i_crhd WHERE arbpl = p_arbpl.
IF NOT i_crhd[] IS INITIAL.
SELECT aufpl arbid
FROM afvc INTO TABLE i_afvc
FOR ALL ENTRIES IN i_crhd
WHERE arbid = i_crhd-objid.
ENDIF.
IF NOT i_afvc[] IS INITIAL.
SELECT aufnr gltrp gstrp gamng plnbez
FROM afko INTO CORRESPONDING FIELDS OF TABLE i_afko
FOR ALL ENTRIES IN i_afvc
WHERE aufpl = i_afvc-aufpl
AND gstrp IN s_gstrp
AND gltrp IN s_gltrp.
SORT i_afko BY aufnr.
ENDIF.
IF NOT i_afko[] IS INITIAL.
SELECT aufnr auart werks FROM aufk INTO TABLE i_aufk
FOR ALL ENTRIES IN i_afko
WHERE aufnr = i_afko-aufnr
AND auart = p_auart
AND werks = p_werks.
ENDIF.
IF NOT i_afko[] IS INITIAL.
SELECT * FROM makt INTO TABLE i_makt
FOR ALL ENTRIES IN i_afko
WHERE matnr = i_afko-plnbez
AND spras = sy-langu.
SORT i_makt BY matnr.
ENDIF.
LOOP AT i_aufk INTO w_aufk.
w_final-check = check.
READ TABLE i_afko INTO w_afko
WITH KEY aufnr = w_aufk-aufnr BINARY SEARCH.
w_final-aufnr = w_afko-aufnr.
w_final-gltrp = w_afko-gltrp.
w_final-gstrp = w_afko-gstrp.
w_final-gamng = w_afko-gamng.
w_final-plnbez = w_afko-plnbez.
READ TABLE i_makt INTO w_makt WITH KEY
matnr = w_afko-plnbez BINARY SEARCH.
w_final-maktx = w_makt-maktx.
APPEND w_final TO i_final.
CLEAR w_final.
ENDLOOP.
ENDFORM. " DATA_RETRIEVAL
*& Form top_of_page
text
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = lst
I_LOGO =
I_END_OF_LIST_GRID =
ENDFORM. " alv_top_of_page
*& Form get_events
text
FORM get_events.
CLEAR : wa_events, it_events[].
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = it_events.
READ TABLE it_events WITH KEY name = slis_ev_top_of_page
INTO wa_events.
IF sy-subrc EQ 0.
MOVE 'TOP_OF_PAGE' TO wa_events-form.
MODIFY it_events FROM wa_events INDEX sy-tabix.
ENDIF.
ENDFORM. "get_events
regards
Naveen Khan
Similar Messages
-
ALV- top-of-page: print varaibale in right corner,...
Hi,
In ALV (REUSE_ALV_GRID_DISPALY), i've requirement to print shop name at the top right corner of the top-of-page and sy-datum at top left corner.
How can I print a varaible at top right corner in top-of-page of ALV? and
how to print page no in ALV top-of-page?
How can I set portrait format to print the ALV?
regards,
Ravipls ignore
pk
Edited by: kishan P on Mar 9, 2009 6:01 PM -
TOP OF PAGE printing according to SORT - ALV main internal table
Hi guys
I manage to solve my previous issues but 1 minor problem here
Lets say I have an itab which has 3 records
Sales Order | Purchase No, | Distributor
1 | 123 | abc
1 | 123 | abc
2 | 456 | TGIF
I'm using FM REUSE_ALV_BLOCK_LIST_APPEND to display the ALV
its working for the main INTERNAL TABLE but when it comes to top of page, it doesn't follow the sort
I want it to print
Sales Order: 1
Purchase No: 123
Distributor: abc
TABLE 1
Sales Order: 2
Purchase No: 456
Distributor: TGIF
TABLE 2
But now its printing
Sales Order: 1
Purchase No: 123
Distributor: abc
TABLE 1
Sales Order: 1
Purchase No: 123
Distributor: abc
TABLE 2
Sales Order: 2
Purchase No: 456
Distributor: TGIF
TABLE <empty table>
My codes was working previously but its not longer the same.
READ TABLE it_report INTO l_report INDEX SY-tabix
WRITE: text-003, "Sales Order Number
AT 22 l_report-ebeln.
WRITE: / text-004, "Purchase Order Number
AT 25 l_report-purch_no.
WRITE: / text-005, "Distributor Number
AT 22 l_report-kunnr.
WRITE: / text-006, "Ship to Name
AT 16 l_report-wename1.
WRITE: / text-007, "Order Date
AT 14 l_report-vdate.
WRITE: / text-008, "Delivery Date
AT 17 i_vdatu.
Can anyone help me out here? How do I make it print just like the SORT for ALV?Refresh the work areas then it work fine
-
How To Print Field Value in TOP-OF-PAGE During Line Selection.
How To Print Field Value in TOP-OF-PAGE During Line Selection when double click on field.
(If my memory serves me well (not used for long time ago)
Assign values to system fields sy-tvar0 - sy-tvar9, they will replace the placeholders "&0" through "&9" in the list headers and column headers.
TOP-OF-PAGE DURING LINE-SELECTION.
WRITE: / 'Interactive Report &3'.
WRITE record-vbeln TO sy-tvar3.
Regards,
Raymond -
How to print the top of page part along with the ALV list and generate PDF
HI all,
I have created one ALV by using oops concept .
and also am able to get the top of page where I have One standard logo on the right hand side
and some details on the left side .
Now my requirement is to while printing the list the logo and other top of page details should appear
In the PDF output but currently while am pressing the print preview button only the alv data is coming
am already using the method
handle_top_of_page
FOR EVENT print_top_of_page
OF cl_gui_alv_grid,
may be am missing something ... How to get the top of page along with the logo printed ?Hi Surya,
After generating the grid display click on print button,
a spool number is generated. capture the spool number and convert it to pdf using the fm:
CONVERT_ABAPSPOOLJOB_2_PDF and save the file
Hope this will solve your problem.
Regards,
R K. -
How to Print the space in Top-of-Page in ALV output
Hi gurus,
I had a problem in Printing the Spaces in Top-of-Page.
My Requirement is like.
Material no: (space with 18 char) to 5235268
but it is coming like .
Material no: to 5235268
i wrote the code like this.
form Top_of_page.
IF s_matnr IS NOT INITIAL.
wa_header-typ = 'S'.
wa_header-key = 'Material No:' .
IF s_matnr-high IS INITIAL.
MOVE s_matnr-low TO wa_header-info.
ELSE.
CONCATENATE s_matnr-low ' to ' s_matnr-high INTO wa_header-info SEPARATED BY space.
ENDIF.
APPEND wa_header TO tb_header.
CLEAR wa_header.
ENDIF.
Thanks & Regards,
Anil.Hi Anil ,
If u concatenate anything with space , your space will be lost.
Give a try for this if your s_matnr-high is initial.
data : c(21) type c.
IF s_matnr-high IS INITIAL.
Concatenate '(19 spaces )to' into C. concatenate C s_matnr-low into wa_header-info SEPARATED BY space.
endif.
<b>Please Note i wanted to put spaces at "(19 spaces)to" but posting this message is removing those spaces so have put it in words.</b>you have to take Variable c with first 19spaces and then 'to' as shown.
Here the Variable C is with 21 length for 18 spaces , one space to separate the 18 spaces from 'to' , and then 2 chars for 'to'.
I hope this will help you.
Regards,
AShwini -
Print Apps won't print with C510a eStation. Prints thin line at top of page.
My C510a eStation printer will not print using the Print Apps. It just prints a thin line at top of page. Everything works fine until I print.
All other print functions work. It prints from computer via WiFi. It prints when I send an email to it. It copies via the Zeen. It just won't print using the Print Apps.
Does anyone else have this problem? What is the solution?
12/23/2010 3:00PM. I just got off the phone with an HP engineer. She said that the eStation is still in the TESTING phase and to call to report problems so they can improve the product. (I would have thought the product would have been fully tested before being released to the public!)
She had me reset the Zeen display by holding down the volume keys while powering up. This erased everything that had been done on the Zeen by me and resulted in no HOME screens, which will have to be set up by me. The only app at the bottom of the blank home page was Yahoo!. Even the printer app was missing. I had to move it from the app tray to the home page. Now, I have to spend hours, again, setting up the Zeen.
After the reset, the printer apps seem to work now. The Zeen will copy using the printer app. My computer still seems able to print and scan to/from the eStation.
The eStation C510a eStation printer and Zeen display are very exciting. However, they are not for someone not willing to spend the time to get it to work properly. If you have a cell phone, be prepared to use up a lot of minutes while on support.
The HP engineer said that it will soon have a new release of Android operating on the Zeen which will allow it to be faster.
This question was solved.
View Solution.I have decided to return this printer to the store as it just has too many problems. HP has essentially told me they will not issue updates to solve the problems. I hate this, as I really loved the product.
-
How to make top of page in alv to be printed.
hello expert:
i used following function to output alv.
but after been printed into spool, i cannot find the top of page.
how to set the print parameter to print the top of ALV.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = w_repid
i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
is_layout = wa_layout
it_fieldcat = it_fieldcat
TABLES
t_outtab = it_comp
EXCEPTIONS
program_error = 1
OTHERS = 2.
thank you and best regards,
Kevin GaoCALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
i_bypassing_buffer = 'X'
I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'HTML_TOP_OF_PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = 'HTML_TOP_OF_PAGE'
I_CALLBACK_HTML_END_OF_LIST = ' '
i_structure_name = <DYN_WA>
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
is_layout = gds_layout
it_fieldcat = gdt_field_cata
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = gdt_sortinfo
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
i_save = 'X'
is_variant = gt_var
it_events = gdt_eventcat
IT_EVENT_EXIT =
IS_PRINT = gds_print
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = <dyn_table>
EXCEPTIONS
program_error = 1
OTHERS = 2 .
*& Form html_top_of_page
FORM html_top_of_page USING document TYPE REF TO cl_dd_document.
DATA: text TYPE sdydo_text_element.
CALL METHOD document->add_gap
EXPORTING
width = 100.
text = 'Company Code Data'.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'HEADING'.
CALL METHOD document->new_line.
CALL METHOD document->new_line.
CALL METHOD document->new_line.
text = 'User Name : '.
CALL METHOD document->add_text
EXPORTING
text = text
sap_emphasis = 'Strong'.
CALL METHOD document->add_gap
EXPORTING
width = 6.
text = sy-uname.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->add_gap
EXPORTING
width = 50.
text = 'Date : '.
CALL METHOD document->add_text
EXPORTING
text = text
sap_emphasis = 'Strong'.
CALL METHOD document->add_gap
EXPORTING
width = 6.
text = sy-datum.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->add_gap
EXPORTING
width = 50.
text = 'Time : '.
CALL METHOD document->add_text
EXPORTING
text = text
sap_emphasis = 'Strong'.
CALL METHOD document->add_gap
EXPORTING
width = 6.
text = sy-uzeit.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->new_line.
CALL METHOD document->new_line.
ENDFORM. "HTML_TOP_OF_PAGE -
ALV print issue in top-of-page
Hi,
I have developed a alv report using REUSE_ALV_GRID_DISPLAY function module. I am using top-of-page event in events table to output top-of-page details. It is showing output correctly on screen but when I do a print preview, it is showing only the grid details and no header info from top-of-page. Please advise what can be the issue? I might be missing some parameter somewhere..I am creating my field catalog manually w/o reference to a structure or internal table..can this be a issue..
Thanks in advanceHave you passed the program name in parameter I_CALLBACK_PROGRAM
DATA:f_repid TYPE sy-repid.
f_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = f_repid " Program name -
How to print top of page while displaying data in ALV Grid ........as i m passing subroutine for top of page' in parameter i_callback_html_top_of_page
i_callback_html_top_of_page is different than i_callback_top_of_page...
if you want to use callback_html you will need to define a form routine something like this:
form html_top_of_page using r_top type ref to cl_dd_document.
data: text type sdydo_text_element.
* data: s_table type ref to cl_dd_table_element.
* data: col_key type ref to cl_dd_area.
* data: col_info type ref to cl_dd_area.
data: a_logo type ref to cl_dd_area.
data:
l_string_with_html type string, "WA Html String Handling
l_text_wa(20) type c. "WA String Handling
call method r_top->initialize_document.
** Set Background Color on TOP-document = small white square works well
* this should be a graphic stored in BDS
call method r_top->set_document_background
exporting picture_id = 'SmWhiteSquare'.
** split TOP-Document to make space for the logo on the right
call method r_top->vertical_split
exporting split_area = r_top
split_width = '70%'
importing right_area = a_logo.
** and add a Company logo - stored in BDS as above
call method a_logo->add_picture
exporting picture_id = 'YourLogoHere'.
** fill TOP-Document space on the left with data
* first the title
text = sy-repid. " 'Var with My report name'.
call method r_top->add_text exporting text = text
sap_style = 'HEADING'.
call method r_top->new_line.
* your code here (may list report selections params or whatever)...
endform. -
Print with write statements from webynpro does not trigger top-of-page
Print launched from webdynpro application via application server created with write statements does not trigger top-of-page event. When print is done from sapgui it works ok. The idea is to reuse backend print which was created for sapgui with abap list made application log in webdynpro application.
Hi,
here a short extract like i do it:
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION .
METHODS:
HANDLE_PRINT_TOP_OF_PAGE
FOR EVENT PRINT_TOP_OF_PAGE OF CL_GUI_ALV_GRID,
ENDCLASS. "LCL_EVENT_HANDLER DEFINITION
* Event-Händer Implementierung
CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
METHOD HANDLE_PRINT_TOP_OF_PAGE.
PERFORM PRINT_TOP_OF_PAGE.
ENDMETHOD.
ENDCLASS.
CREATE OBJECT GR_EVENT_HANDLER.
SET HANDLER
GR_EVENT_HANDLER->HANDLE_PRINT_TOP_OF_PAGE FOR GR_ALVGRID_LEFT.
CALL METHOD GR_ALVGRID_LEFT->SET_TABLE_FOR_FIRST_DISPLAY
FORM PRINT_TOP_OF_PAGE.
LINSZ = SY-LINSZ - 16.
WRITE: / 'Report: ', SY-REPID,
AT LINSZ 'Datum:', SY-DATUM.
WRITE: / 'Benutzer: ', SY-UNAME,
AT LINSZ 'Zeit: ', SY-UZEIT.
ENDFORM.
hope it helps.
Regards, Dieter -
Print and print priview of top-of-page event
Hi,
i used oops to display top of page using document class, i am printing or print priview, it is not showing. please tell how to print this html document. i am succesfully displaying html document in grid display, while printing the list, it will not printing, please tell me solution.
Thanks
Sudhakar
Sample code:
CREATE OBJECT g_document
EXPORTING
style = 'ALV_GRID'.
CREATE OBJECT g_docking
EXPORTING
repid = g_repid
dynnr = '0100'
ratio = 95.
extension = 700
side = cl_gui_docking_container=>dock_at_top.
IF sy-subrc <> 0.
ENDIF.
CREATE OBJECT g_splitter
EXPORTING parent = g_docking
rows = 2
columns = 1.
CALL METHOD g_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = g_htmlc.
CALL METHOD g_splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = g_alvc.
CALL METHOD g_splitter->set_row_height
EXPORTING
id = 1
height = 14.
CREATE OBJECT g_grid0100
EXPORTING
i_parent = g_alvc.
CREATE OBJECT g_event_receiver.
SET HANDLER g_event_receiver->handle_top_of_page FOR g_grid0100.
SET HANDLER g_event_receiver->handle_top_of_list FOR g_grid0100.
CALL METHOD g_document->initialize_document.
CALL METHOD g_grid0100->list_processing_events
EXPORTING
i_event_name = 'TOP_OF_PAGE'
i_dyndoc_id = g_document.
gs_print-reservelns = 2.
PERFORM build_fieldcatalog.
PERFORM build_layout.
g_save = 'A'.
gs_variant-report = g_repid.
CALL METHOD g_grid0100->set_table_for_first_display
EXPORTING
is_layout = gs_layout
is_variant = gs_variant
i_save = g_save
is_print = gs_print
CHANGING
it_outtab = gt_alv0100
it_fieldcatalog = gt_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
CLASS LCL_event_handler IMPLEMENTATION
CLASS lcl_event_reciever IMPLEMENTATION.
METHOD handle_top_of_page.
DATA: l_date(10) TYPE c,
l_text TYPE sdydo_text_element.
WRITE sy-datum TO l_date.
CONCATENATE 'Report Date: ' l_date INTO l_text.
CALL METHOD e_dyndoc_id->add_text
EXPORTING
text = l_text
sap_fontsize = cl_dd_area=>strong.
CALL METHOD e_dyndoc_id->new_line.
CALL METHOD e_dyndoc_id->add_gap
EXPORTING
width = 8.
IF g_htmlv IS INITIAL.
CREATE OBJECT g_htmlv
EXPORTING
parent = g_htmlc.
ENDIF.
CALL METHOD g_document->merge_document.
g_document->html_control = g_htmlv.
CALL METHOD e_dyndoc_id->display_document
EXPORTING
reuse_control = 'X'
parent = g_htmlc
EXCEPTIONS
html_display_error = 1.
ENDMETHOD. "handle_top_of_page
METHOD handle_top_of_list.
ENDMETHOD. "handle_top_of_list
ENDCLASS. "lcl_event_reciever IMPLEMENTATIONHi,
While using OOPS for ALV, the top-of-page and end-of-page will not show at display, but while printing it, then it will be printed properly, try to take the printout and observer.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 2:08 PM -
HPLJ 4250 printing black line inch size across top of page.
HPLJ 4250 printing black line inch size across top of page. The Maintenance Kit and the toner have been changed, the option in the menu to clean fuser has also been done. The black line is intermittent so it hard to work out what to do next.
Thanks for the tip Mikey - however the same thing happens with the thin black lines when I print on 'normal' A3 paper too. On normal A4 paper it's fine, no lines, but when I print to A3 I get the lines - on both kinds of paper.
I've attached a couple of (awful-looking) scans to help illustrate my point. -
Missing top of page when printing to C4280 via Bonjour
We have two PowerBooks that are identical. We have an HP C4280 printer hooked up to one, and share it using Bonjour. When I try to print a legal sized PDF file, the first half-inch or so at the top of the page is missing, almost like the margin has disappeared. I saw something similar happen using Pages and business card stock. That problem mysteriously disappeared a day later.
Is there something about the C4280 and problems with not aligning the tops of pages correctly? I am stumped!
Thanks!HP must have release a driver update because we no longer encounter the problem.
-
TOP of Page doesnt come up properly in the second document printing
Dear Experts,
Currently i'm developing Purchase Order Form using Sapscript. Actually i copied from the standard PO Form 'MEDRUCK' and made some modifications.
The printer type i'm using is Lexmark 4227 Plus.
I already set the Top Of Page in the Printer.
1. Before printing the 1st PO, I push the button 'Start' in the printer,
so the continuous paper will go in the correct start position
( correct Top of Page).
2. I print the first PO, it's ok for all pages ( can be more 1 pages ).
3. When i print the second PO, the paper wont go to the correct start position ( correct Top of Page ). Basically it can be adjusted manually by pressing the button 'Start', like the point 1.
But, practically more than 1 user will print their PO almost in the same time. So it's not possible to manually adjust the paper position everytime their will print 1 PO document.
Please advise.
Regards,
HaryTo open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
If you see a warning then you can confirm that you want to access the about:config page.<br />
*Use the Filter bar at the top of the about:config page to locate a preference more easily.
*Preferences that have been modified show as bold (user set).
*Preferences can be reset to the default via the right-click context menu if they are user set
*Preferences can be changed via the right-click context menu: Modify (String or Integer) or Toggle (Boolean) or by double-clicking the line with the pref
See also:
*http://kb.mozillazine.org/about:config
Maybe you are looking for
-
BroseForDirectory() crashes Indesign.
Hi All, when i am trying to call browseForDirectory() method from my extension it carshes the indesign, I am a newbee in extension development, please suggest. I am also handling select and cancle events in my code. for reference i am also posting th
-
Hi i have the nokia 201 asha,ive noticed on my fone in the menu section theres a @button for mail it says,is this where i can access my emails im with hotmail.co.uk,i understand i have to have paid for data access in my payg provider giffgaff,or is t
-
Raw file rendering problems with Canon EOS 5D in Aperture 3
Since upgrading to Aperture 3, I have had serious problems with the rendering of Canon EOS 5D (not Mark II/III) RAW files. With Aperture 2, both the preview and full-sized images looked basically the same as the original images as displayed on the ca
-
Hello, I have been using Mixradio. It's a great app. Purchased some albums too with my credit card. Since yesterday I can't buy anything however the card is right. Could you please help? Thanks Viktor Moderator's note: New thread created. We also pro
-
My ipad is frozen because of an icloud issue. what to do?
my ipad is frozen. I cannot click on unlock button or the message from icloud indicating back up problem. What shall I do?