Report directly to the printer
Hi
i'm trying to run a report directly to the printer. Report is running but scaling is not happening. Following is the URL which i'm using to run the report. This will run not an issue if i try to increase or decrease the scaling, (start-->controlpanel-->printer-->printing preference-->advanced tab-->scaling)
this will not work.
http://<hostname>/reports/rwservlet?report=test.rdf&destype=printer&desformat=pdf&server=<servername>
thanks in advance
Check out the orarrp utility (Oracle Reports Remote Printing Utility) on Metalink, note 277431.1.
It may be easier in the end to set up printers on the OAS. I guess that client PC's are using network printers, or are the really using printers connected directly to the PC?
Similar Messages
-
Print a report directly to the printer
I need to print a report directly to the printer in Oracle Forms and Report 11g without a preview in the browser
Hello,
<p>You can use this Java Bean</p>
Francois -
Not able to take print a report directly to the printer
Hi All,
Can anyone help me to print a report directly to the printer?. Currently, I am viewing the reports in the screen and then taking print of that report. If anyone knows the solution for this, please give me the feedback immediately. It is very urgent.HI ALL
i have the same problem plz tel me som solution 4 it
thanx in advance -
Can't print the report directly on the printer?
Dear All,
My client encounter a problem of printing a report directly to the printer. He is using developer 6i with OAS. His application is going to deploy on the web. He wants the report printed out directly on the "HP Laser Jet Printer" after the user has made the selection and clicked the "Print" button from the forms 6i. However, he got the error saying that
"Oracle Report Server OWS Cartridge - Report Job has terminated with error
Report Server Replies:
Rep-0713: invalid printer name 'HP4050' specified by parameters DESNAME."
And here is the parameter string passing into the report server:
http://epmsdevs2.eway:9002/rwows/rwows60?report=epms1271.rdf+userid=epmsdev/epmsdev@dev+desformat=landscape+destype=printer+desname=HP4050+server=RepServer
Is there anyone can show me some light on it?!
Any help and idea is appreciated in advance!!!
sheetaHi!
If reports are run in web env. then
you can print reports directly on
printer defined on m/c where report server
is running, not on client m/c. If you want
to print on client m/c then define that
printer on report sever m/c and make sure
report server can access that printer.
Nirali -
When send the report directly to the printer from Oracle IDS 9i
Hi.....
I m using Oracle IDS 9i, Oracle AS 9i and Database 9i for my new project.But i m facing a problem when i m trying to show a report from oracle IDS 9i.When i send the report directly to the printer without showing it,then the printer connected to the application server is working.But the printer connected to with PC(From where a send the command) is not working but printer connected with AS is working,but not that one which one i m wanting.....Why this problem is happening?Can anyone help me?
KSINote:It is always better to have network based printers rather then PC shared printers. What that means is your printer is not connected to a PC. It has a direct connection to the network via NIC. You would then setup the printer on your AS in the printers setup. If the AS is rebooted you do not need to authenticate the printer shares again with a network based printer.
If I understand you correctly, you have a printer connected to your AS(application server) and a printer connected to your PC. You can submit a report direct to the printer connected to the AS but cannot send a report direct to your printer connected to your PC.
From the symptoms you described, the problem is usually associated with the AS not being able to see the printer shared on your PC. You either have the address to your printer address defined wrong or your AS is trying to direct a job to your printer but doesn't have rights to do it.
First, Try to print a notepad job to your printer attached to your PC from the AS. This will tell you if you have access to do so or not.
- If it can't, you need to figure out why? This has nothing to do with oracle.
Second, thing to check is your Oracle "Report Queue Manager" on the AS. Make sure that you can submit a report manually from the Report Queue Manager. If it fails the "Report Queue Manager" will give you useful errors as to why it failed. This will help you isolate the problem.
Third, Once you can submit a job from the reports queue manager manually to your shared printer you should be able to submit from your application direct. If it still does not work your address to the printer is incorrect. Try submitting manually through the reports queue manager again. When selecting printer you will be given a list of accessible printers from the AS. Select the one connected to your PC. Once selected the full network address will appear. Copy and use this as the printer location in your job submission through your application.
That's it... Where using this right now and it works great. Hope this helps.
Eric. -
How to send a report DIRECTLY to the printer (Linux App. Svr.)?
Here is the problem:
-- We have Windows clients / Linux App Server / Forms 10g R2.
-- Printers are attached to the Windows clients.
-- When we want to send DIRECTLY to the printer, we have to write data into a text file (using TEXT_IO) &
-- print the same using command HOST('lp -d '||<printer IP of logged in user>t||' '||<file name>,NO_SCREEN).
-- Our normal reports are displayed as PDFs.
Is there a way to directly send the PDF to the printer without having to re-write the report to a text file?? Then we can just use the PDF output and don't have to do any code changes (i.e. redo every report).
Edited by: user12240205 on May 16, 2011 5:59 AM
Edited by: user12240205 on May 16, 2011 5:59 AMInoL wrote:
Use destype=printer.
The printer on the Windows client has to be defined as a network printer and be known on the Linux server.
Other options:
- use the orarrp utility
- if you call your Reports from Forms, you can use a Java bean
http://forms.pjc.bean.over-blog.com/article-6621538.html
Thank you for the quick response. Can u please tell us how to make the printer "known" as a Linux server?? Will a normal network admin know how to do this or is it an Oracle developer's task? -
Printing a report directly to the printer on the client machine
Hi All,
I am migrating reports from 6i to 10g, all these reports are called from menu and some from forms. There are some reports which are directly sent to the printer for printing. My question is when we run those reports that are sent directly to the printer from OAS, Can we make it refer to the printer set up on the client machine?. Can any one let me know regarding this?.
Regards,
Prasad.Check out the orarrp utility (Oracle Reports Remote Printing Utility) on Metalink, note 277431.1.
It may be easier in the end to set up printers on the OAS. I guess that client PC's are using network printers, or are the really using printers connected directly to the PC? -
How can I send a 10g report direct to the printer?
Hi!
I've got a form that calls n-times then same report, with different parameters.
Actually, I generate a pdf and then, the user could print it.... but it is not a good idea, I want to send the output direct to the printer.
do I have to register the printer name in any config file?
If I run my report with then following URL:
http://rx26201:7778/reports/rwservlet?report=test&DESTYPE=PRINTER&DESNAME=hplj_206
I got the following error:
REP-713: Invalid printer name 'hplj_206' specified by parameter DESNAME.
Can anybody help me with this?
Thanks a lot!
CarolinaHi Carolina
You should give a little more information for example the platform (O/S), application etc.
Anyway, the printer should be configured and appear when "lpstat" is run assuming this is a unix like environment.
Hope this helps
Graeme -
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. -
How I can send a report directly to the printer "EPSON TMU 220" from form11
Dear,
I have a problem with Oracle Forms11g, I need send a report to the printer EPSON TMU-220 (Pos of sale printer) in the client machine.
Please, help.
Thanks
JCDear,
The problem is:
I need to send the report directly to printer. All other reports work fine with other printers in the network.
But the EPSON TMU-220, (I changed the card connection from COM to USB, and nothing)
Please, help me.
JC -
Printing APEX reports directly to the printer
Hi All,
Last few days I have been following forum quite often to get the post which could match my requirements, but in vain. I would appreciate if I can get assistance with this.
I want APEX application to print a specific report (when 'print' clicked) to printer directly instead of showing the PDF itself.
As a matter of fact this system will be hosted on a TOUCH SCREEN system for users, and the requirement says it should be as user friendly (as much as it can). I want few reports which as specific to that employee to be printed directly without showing the details to the user.
I already have Print server configured (BI publisher)
Thank You in advance.
Afaq Ayub
[http://www.afaqayub.com]Thanks for your comment. May be i phrased my statement wrong. As you said, definitely this is not the solution but a work around to my problem using 3rd party. This is the reason why i did not mention this solution on forum and said that its a "*work around*". This was a requirement and I had to get it any how quickly (time constraint) using free application. Meanwhile, i am also looking around if something like this could be done in Web Pages. Please let us know when you come up with solutions.
-
Report OutPut directly to the printer by selecting in the selection screen
Hi Guys,
Can any one help,
How to give Report output (ALV report ) directly to the printer by selecting the printer name in the selection screen .
Sap Version is ECC 6.0.
Thanks In advance
praveen khi,
u can do it using submit statement.
SUBMIT TO SAP-SPOOL
Basic form
SUBMIT rep ... TO SAP-SPOOL.
Extras:
1.... DESTINATION dest ... COPIES cop
... LIST NAME name
... LIST DATASET dsn
... COVER TEXT text
... LIST AUTHORITY auth
... IMMEDIATELY flag
... KEEP IN SPOOL flag
... NEW LIST IDENTIFICATION flag
... DATASET EXPIRATION days
... LINE-COUNT lin
... LINE-SIZE col
... LAYOUT layout
... SAP COVER PAGE mode
... COVER PAGE flag
... RECEIVER rec
... DEPARTMENT dep
... ARCHIVE MODE armode
... ARCHIVE PARAMETERS arparams
... WITHOUT SPOOL DYNPRO
2. ... SPOOL PARAMETERS params
... ARCHIVE PARAMETERS arparams
... WITHOUT SPOOL DYNPRO
3. ... Further parameters (for passing variants)
are described in the documentation for SUBMIT
The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Missing print parameters with SUBMIT.
Effect
Calls the report rep with list output to the SAP spool database.
Additions
... DESTINATION dest(output device)
... COPIES cop(number of copies)
... LIST NAME name(name of list)
... LIST DATASET dsn(name of spool dataset)
... COVER TEXT text(title of spool request)
... LIST AUTHORITY auth(authorization for display)
... IMMEDIATELY flag(print immediately ?)
... KEEP IN SPOOL flag(keep list after print ?)
... NEW LIST IDENTIFICATION flag(new spool request ?)
... DATASET EXPIRATION days(number of days list
retained)
... LINE-COUNT lin ( lin lines per page)
... LINE-SIZE col(col columns per line)
... LAYOUT layout(print format)
... SAP COVER PAGE mode(SAP cover sheet ?)
... COVER PAGE flag(selection cover sheet ?)
... RECEIVER rec(SAP user name of
recipient)
... DEPARTMENT dep(name of department)
... ARCHIVE MODE armode(archiving mode)
... ARCHIVE PARAMETERS arparams(structure with archiving
parameters)
... WITHOUT SPOOL DYNPRO(skip print control screen)
With the parameters IMMEDIATELY, KEEP IN SPOOL, NEW LIST IDENTIFICATION and COVER TEXT, flag must be a literal or character field with the length 1. If flag is blank, the parameter is switched off, but any other character switches the parameter on. You can also omit any of the sub-options of PRINT ON. mode with SAP COVER PAGE can accept the values ' ', 'X' and 'D'. These values have the following meaning:
' ' : Do not output cover sheet
'X' : Output cover sheet
'D' : Cover sheet output according to printer setting
armode with ARCHIVE MODE can accept the values '1', '2' and '3'. These values have the following meaning:
'1' : Print only
'2' : Archive only
'3' : Print and archive
arparams with ARCHIVE PARAMETERS must have the same structure as ARC_PARAMS. This parameter should only be processed with the function module GET_PRINT_PARAMETERS.
Effect
Output is to the SAP spool database with the specified parameters. If you omit one of the parameters, the system uses a default value. Before output to the spool, you normally see a screen where you can enter and/or modify the spool parameters. However, you can suppress this screen with the following statement:
... TO SAP-SPOOL WITHOUT SPOOL DYNPRO
You could use this option if all the spool parameters have already been set!
reward points if hlpful.
Note
When specifying the LINE-SIZE, you should not give any value > 132 because most printers cannot print wider lists.
Addition 2
... SPOOL PARAMETERS params(structure with print
parameters)
... ARCHIVE PARAMETERS arparams(Structure with archive
parameters)
... WITHOUT SPOOL DYNPRO(skip print parameters
screen)
Effect
Output is to the SAP spool database with the specified parameters. The print parameters are passed by the field string params which must have the structure of PRI_PARAMS. The field string can be filled and modified with the function module GET_PRINT_PARAMETERS. The specification arparams with ARCHIVE PARAMETERS must have the structure of ARC_PARAMS. This parameter should only be processed with the function module GET_PRINT_PARAMETERS. Before output to the spool, you normally see a screen where you can enter and/or modify the spool parameters. However, you can suppress this screen with the following statement:
... WITHOUT SPOOL DYNPRO
Example
Without archiving
DATA: PARAMS LIKE PRI_PARAMS,
DAYS(1) TYPE N VALUE 2,
COUNT(3) TYPE N VALUE 1,
VALID TYPE C.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING DESTINATION = 'LT50'
COPIES = COUNT
LIST_NAME = 'TEST'
LIST_TEXT = 'SUBMIT ... TO SAP-SPOOL'
IMMEDIATELY = 'X'
RELEASE = 'X'
NEW_LIST_ID = 'X'
EXPIRATION = DAYS
LINE_SIZE = 79
LINE_COUNT = 23
LAYOUT = 'X_PAPER'
SAP_COVER_PAGE = 'X'
COVER_PAGE = 'X'
RECEIVER = 'SAP*'
DEPARTMENT = 'System'
NO_DIALOG = ' '
IMPORTING OUT_PARAMETERS = PARAMS
VALID = VALID.
IF VALID <> SPACE.
SUBMIT RSTEST00 TO SAP-SPOOL
SPOOL PARAMETERS PARAMS
WITHOUT SPOOL DYNPRO.
ENDIF.
Example
With archiving
DATA: PARAMS LIKE PRI_PARAMS,
ARPARAMS LIKE ARC_PARAMS,
DAYS(1) TYPE N VALUE 2,
COUNT(3) TYPE N VALUE 1,
VALID TYPE C.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING DESTINATION = 'LT50'
COPIES = COUNT
LIST_NAME = 'TEST'
LIST_TEXT = 'SUBMIT ... TO SAP-SPOOL'
IMMEDIATELY = 'X'
RELEASE = 'X'
NEW_LIST_ID = 'X'
EXPIRATION = DAYS
LINE_SIZE = 79
LINE_COUNT = 23
LAYOUT = 'X_PAPER'
SAP_COVER_PAGE = 'X'
COVER_PAGE = 'X'
RECEIVER = 'SAP*'
DEPARTMENT = 'System'
SAP_OBJECT = 'RS'
AR_OBJECT = 'TEST'
ARCHIVE_ID = 'XX'
ARCHIVE_INFO = 'III'
ARCHIVE_TEXT = 'Description'
NO_DIALOG = ' '
IMPORTING OUT_PARAMETERS = PARAMS
OUT_ARCHIVE_PARAMETERS = ARPARAMS
VALID = VALID.
IF VALID <> SPACE.
SUBMIT RSTEST00 TO SAP-SPOOL
SPOOL PARAMETERS PARAMS
ARCHIVE PARAMETERS ARPARAMS
WITHOUT SPOOL DYNPRO.
ENDIF. -
Send 10g reports directly to the default printer of the client machine
Hello..
We are using Oracle DS10g and Forms & Reports service 10g. When the user clicks on the report button I want to send the report directly to the default printer installed in the client machine. In this case the printer name may vary and I cannot parameterize the DESNAME parameter. How do i know what is the default printer? Any clue as to how can achieve the desired result?
ThanksIf you use webutil in your shop. You can use the CLient_win_api_environment.read_registry to get the default printer. In the run_report_object, desname gets set to the default printer.
This can also be found in metalink.
V_PRINTER := CLIENT_WIN_API_ENVIRONMENT.READ_REGISTRY('HKEY_CURRENT_USER\software\Microsoft\Windows NT\CurrentVersion\Windows','Device',TRUE);
V_PRINTER_LENGTH := LENGTH(V_PRINTER);
V_PRINTER_BLANK := INSTR(V_PRINTER, ',');
IF V_PRINTER_LENGTH > 0 AND V_PRINTER_BLANK = 0 THEN
:P_OUTPUT_FILE := V_PRINTER;
ELSIF V_PRINTER_LENGTH > V_PRINTER_BLANK THEN
:P_OUTPUT_FILE := SUBSTR(V_PRINTER, 0 , (INSTR(V_PRINTER, ',')-1 ));
END IF; -
Hi Guys
Could anyone correct me how can I print directly to the printer from this program ,I am getting short dump error when I select the radio button printer and execute it.
Rgds
PEoops sorry here it is below
REPORT Z_ESLP_ZTCODE LINE-SIZE 132 .
*TABLES
TABLES : AGR_TCODES,
AGR_USERS,
TSTCT,
T16FW,
T16FD.
type-pools: slis. "ALV Declarations
CONSTANTS MARK VALUE 'X'.
TYPES: BEGIN OF T_DISP,
AGR_TCODES TYPE AGR_TCODES-TCODE , " Transaction code A
AGR_NAME TYPE AGR_TCODES-AGR_NAME, " Role Name B
AGR_UNAME TYPE AGR_USERS-UNAME, " Short User Name B
TTEXT TYPE TSTCT-TTEXT, " Description Name C
TEXTC TYPE USER_ADDR-NAME_TEXTC, " Long User Name
SPRSL TYPE TSTCT-SPRSL , " Language c
TEL_EXTENS TYPE USER_ADDR-TEL_EXTENS , " Extension
DEPARTMENT TYPE USER_ADDR-DEPARTMENT , " Department Name B
FRGGR TYPE T16FW-FRGGR,
FRGCO TYPE T16FD-FRGCO,
OBJID TYPE T16FW-OBJID,
FRGCT TYPE T16FD-FRGCT,
SPRAS TYPE T16FD-SPRAS,
END OF t_disp.
DATA: it_disp TYPE STANDARD TABLE OF t_disp INITIAL SIZE 0,
wa_disp TYPE t_disp.
DATA: params like pri_params,
days(1) type n value 2,
count(3) type n value 1,
valid type c.
*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,
gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
parameter: p_trigr type c default space.
SELECTION PARAMETER CRITERIA
SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME.
SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:
P_TCODE FOR AGR_TCODES-TCODE , "OBLIGATORY, "no-extension no intervals,
U_NAME FOR AGR_USERS-UNAME,
R_NAME FOR AGR_USERS-AGR_NAME .
SELECTION-SCREEN END OF BLOCK BLK1.
SELECTION-SCREEN BEGIN OF BLOCK BLK2 WITH FRAME TITLE TEXT-002.
SELECTION-SCREEN END OF BLOCK BLK2.
SELECTION-SCREEN END OF BLOCK BLK.
SELECTION-SCREEN BEGIN OF BLOCK radio WITH FRAME.
PARAMETERS :
scr RADIOBUTTON GROUP rbg1 ,
Pr RADIOBUTTON GROUP rbg1 .
SELECTION-SCREEN END OF BLOCK radio.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform build_events.
perform build_print_params.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
form build_fieldcatalog.
fieldcatalog-fieldname = 'AGR_UNAME'.
fieldcatalog-seltext_m = 'User'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'TEXTC'.
fieldcatalog-seltext_m = 'Name'.
fieldcatalog-outputlen = 60.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AGR_NAME'.
fieldcatalog-seltext_m = 'Role Name'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AGR_TCODES'.
fieldcatalog-seltext_m = 'Trans Code'.
fieldcatalog-col_pos = 3.
fieldcatalog-outputlen = 20.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'TTEXT'.
fieldcatalog-seltext_m = 'Description'.
fieldcatalog-outputlen = 70.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT PRINTER SETUP
PRINTER SETUP
form printer_setup.
DATA:L_PARAMS TYPE PRI_PARAMS,
L_VALID TYPE C.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
IMMEDIATELY = ' '
LINE_SIZE = 220
RELEASE = 'X'
MODE = 'CURRENT'
NO_DIALOG = ' '
IMPORTING
OUT_ARCHIVE_PARAMETERS =
OUT_PARAMETERS = L_PARAMS
VALID = L_VALID
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4.
IF SY-SUBRC eq 0.
ENDIF.
"But it will take default printer from user settings
NEW-PAGE PRINT ON PARAMETERS L_PARAMS NO DIALOG.
write : 'print is on'.
NEW-PAGE PRINT OFF.
DATA: PARAMS LIKE PRI_PARAMS,
ARPARAMS LIKE ARC_PARAMS,
DAYS(1) TYPE N VALUE 2,
COUNT(3) TYPE N VALUE 1,
VALID TYPE C.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING DESTINATION = 'LOCL'
COPIES = COUNT
LIST_NAME = 'Z_ESLP_ZTCODE'
LIST_TEXT = 'SUBMIT ... TO SAP-SPOOL'
IMMEDIATELY = 'X'
RELEASE = 'X'
NEW_LIST_ID = 'X'
EXPIRATION = DAYS
LINE_SIZE = 79
LINE_COUNT = 120
LAYOUT = 'X_44_120'
SAP_COVER_PAGE = 'X'
COVER_PAGE = 'X'
RECEIVER = 'SAP*'
DEPARTMENT = 'System'
SAP_OBJECT = 'RS'
AR_OBJECT = 'TEST'
ARCHIVE_ID = 'XX'
ARCHIVE_INFO = 'III'
ARCHIVE_TEXT = 'Description'
NO_DIALOG = ' '
IMPORTING OUT_PARAMETERS = PARAMS
OUT_ARCHIVE_PARAMETERS = ARPARAMS
VALID = VALID.
IF VALID <> SPACE.
SUBMIT RSTEST00 TO SAP-SPOOL
SPOOL PARAMETERS PARAMS
ARCHIVE PARAMETERS ARPARAMS
WITHOUT SPOOL DYNPRO.
ENDIF.
endform. " BUILD_LAYOUT
*& 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' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
is_variant = z_template
tables
t_outtab = it_disp
exceptions
program_error = 1
others = 2.
if sy-subrc EQ 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 lfa1 table and populate itab it_lfa1
form data_retrieval.
CASE MARK.
WHEN scr.
SELECT AGR_TCODESTCODE AGR_TCODESAGR_NAME AGR_USERSUNAME TSTCTTTEXT USER_ADDR~NAME_TEXTC
INTO TABLE IT_DISP
FROM AGR_TCODES
INNER JOIN AGR_USERS
ON AGR_TCODESAGR_NAME = AGR_USERSAGR_NAME
INNER JOIN USER_ADDR
ON AGR_USERSUNAME = USER_ADDRBNAME
INNER JOIN TSTCT
ON AGR_TCODESTCODE = TSTCTTCODE
where
agr_tcodes~tcode in p_tcode
and
agr_users~uname in u_name
and
agr_tcodes~agr_name in r_name
and
TSTCT~SPRSL EQ 'E'.
WHEN pr.
perform printer_setup.
ENDCASE.
*lifnr
*between '0000100001' AND '0000150000'.
endform. " DATA_RETRIEVAL
Release memory no longer required.
free: it_lfa1 .
Form TOP-OF-PAGE *
ALV Report Header *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = 'Transaction codes by User and Role Name ' .
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_disp lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Transaction Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform.
FORM USER_COMMAND *
--> R_UCOMM *
--> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Check function code
CASE r_ucomm.
WHEN '&IC1'.
Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'TCODES'.
Read data table, using index of row user clicked on
READ TABLE it_disp INTO wa_disp INDEX rs_selfield-tabindex.
Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_disp-tcode.
Sxecute transaction zven, and skip initial data entry screen
CALL TRANSACTION 'Z' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM.
*& Form BUILD_EVENTS
Build events table
form build_events.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gt_events[].
read table gt_events with key name = slis_ev_end_of_page
into ls_event.
if sy-subrc = 0.
move 'END_OF_PAGE' to ls_event-form.
append ls_event to gt_events.
endif.
read table gt_events with key name = slis_ev_end_of_list
into ls_event.
if sy-subrc = 0.
move 'END_OF_LIST' to ls_event-form.
append ls_event to gt_events.
endif.
endform. " BUILD_EVENTS
*& Form BUILD_PRINT_PARAMS
Setup print parameters
form build_print_params.
gd_prntparams-reserve_lines = '3'. "Lines reserved for footer
gd_prntparams-no_coverpage = 'X'.
endform. " BUILD_PRINT_PARAMS
*& Form END_OF_PAGE
form END_OF_PAGE.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
write: sy-uline(50).
skip.
write:/40 'Page:', sy-pagno .
endform. -
Print directly to the printer from Oracle 9I
Please it is possible to print directly to the printer from Oracle 9i without having to show the report on the web.
Please it is possible to print directly to the printer from Oracle 9i without having to show the report on the web.
Maybe you are looking for
-
Changing the mountain picture in CRM Web UI(CRM 2007)
Hi All, I am trying to change the mountain pic in crm web ui just below the SAP CRM logo. I am on CRM 2007. I have already changed the pic in se80 as we do for the company logo in place of the SAP CRM logo. se80>>BSP Application>>THTMLB_STYLES>>MIMEs
-
Windows 8.1 not activating - very slow response from HP
Sir/Madam, For past 4-5 days, i have been calling every day to HP regarding my windows activation issue.(every 10 mins a pop up shows " windows about to expire")PC settings show my windows will expire on 16th Dec if activation not done. 1. On the fir
-
Why throw exception when input Chinese in JTextField for Applet
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at java.util.Hashtable.get(Unknown Source) at javax.swing.KeyboardManager.registerMenuBar(Unknown Source) at javax.swing.JMenuBar.addNotify(Unknown Source) at java.awt.Container.ad
-
When a PO is created from ME57/ME59, the PO text from the material master is not carried over in to the PO. But For the same materials when a PO is created from Me51n it does get copied in to the PO. I tried changing settings in 'copying rules for it
-
Transport set : Migration in progress
Dear all, I'm stuck with a transport set that is in status : "Migration In Progress" First the db import stalled (no conspicuous lock in the db). All db objects had actually been correctly imported. I had to interrupt the import script. I can't delet