Automatic notification containing the report output
Hi,
I need to send an automatic notification containing the report output and a link to the SAP screen containing the report output to sap inbox.
The notification contains a link to the report output screen.
When user clicks on it(link), it takes him to the SAP report output screen which contains only the customers that the credit rep is assigned to..
I had done this using BDC , if itu2019s possible without BDC or Webdynpro and Workflow please let me know.
Thanks for your help.
Shilp....
Hi
Your pgm is not passing anything in obj_descr in packing list for excel file. If you pass a name your excel file will have that.
Regards
Sathar
perform send_file_as_email_attachment
tables it_message
it_attach
using p_email
'Example .xls documnet attachment'
'XLS'
'PO'
' ' *------> no value*
changing gd_error
gd_reciever.
form send_file_as_email_attachment tables pit_message
pit_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription *----> no value*
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
t_packing_list-obj_descr = ld_attdescription.
Similar Messages
-
Oracle Apps.XML reports ending with warning when the report output contains
Hi I have XML reports. When we run these reports as concurrent program through Oracle Apps. window and if the report output contains special characters(like Chineese data) in between of English, then the concurrent program is ending with warning. If we remove special characters then it is working fine or when we run the report query directly from backend it is working fine.
We are importing this data from legacy system into oracle apps. and we can't control these characters or decode them with some other charactes.
Can any one guide me how to get the XML report output with special characters.
Thanks in advance.
Chandra Babu Lankipalli.Hi Hussein,
The concurrent program is ending with Warning. It is unable to publish output file.
For the same when we remove special characters and run the program it is completing and generating the
output. The log fine is as follows when the data file contains special characters.
Custom Application: Version : UNKNOWN
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
XXFA_AR_WIN_EXCEPTION module: XXFA AR Wintrack Customer Interface Exception Report
Current system time is 23-MAR-2009 05:33:19
+-----------------------------
| Starting concurrent program execution...
+-----------------------------
Arguments
P_CUST_ERRORED='3'
P_CUST_SUCCESS='0'
P_CUST_TOTAL='3'
P_REQUEST_ID='4661283'
P_USER_NAME='SYSADMIN'
APPLLCSP Environment Variable set to :
XML_REPORTS_XENVIRONMENT is :
/d01/oracle/fadevora/8.0.6/guicommon6/tk60/admin/Tk2Motif_UTF8.rgb
XENVIRONMENT is set to /d01/oracle/fadevora/8.0.6/guicommon6/tk60/admin/Tk2Motif_UTF8.rgb
Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
American_America.UTF8
Report Builder: Release 6.0.8.25.0 - Production on Mon Mar 23 05:33:19 2009
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Enter Username:
Start of log messages from FND_FILE
End of log messages from FND_FILE
Executing request completion options...
------------- 1) PUBLISH -------------
Beginning post-processing of request 4661284 on node FAHQSNA01SFTD03 at 23-MAR-2009 05:33:20.
Post-processing of request 4661284 failed at 23-MAR-2009 05:33:21 with the error message:
One or more post-processing actions failed. Consult the OPP service log for details.
------------- 2) PRINT -------------
Not printing the output of this request because post-processing failed.
Finished executing request completion options.
Concurrent request completed
Current system time is 23-MAR-2009 05:33:21
Thanks in advance.
Chandra -
How to configure notification emails for reports output or alerts for all users in r12
Hi,
I need to configure notification emails. I have provided settings in OAM-> Workflow and SMTP IP address in settings and only Outbound. I am able to test for my user ID.
I want to know how to redirect emails or alerts for users like when a user runs a report he should get notification email in his outlook about the report output and details. In settings it only points for one replyto field. How do I mention all user ID's?
Regards,
MohammedHi Mohammed,
You may check on XML bursting for XML based reports.
In addition, also see links:
http://oracle.anilpassi.com/email-output-of-concurrent-program-request.html
Anil: Oracle Apps Concurrent program Output as Email
Oracle ERP World: Email the output of a concurrent program as Attachment
Also see:
How to Redirect Output from Printer to Mail Message after Running Report (Doc ID 1036586.6)
Thanks &
Best Regards, -
I want to print the LOGO on the report output
Hi ,
i want to print the LOGO on the report output. How can tyhis possible ?using "SMWO" to upload LOGO image.
add a customer "customer control" named P1 using "SE51"
the following program for your reference:
=============================================
REPORT ytest17.
DATA ok_code TYPE sy-ucomm,
save_code TYPE sy-ucomm.
DATA container TYPE REF TO cl_gui_custom_container.
DATA picture TYPE REF TO cl_gui_picture.
DATA init.
CALL SCREEN 100.
MODULE user_command_0100 INPUT
MODULE user_command_0100 INPUT.
save_code = ok_code.
CLEAR ok_code.
CASE save_code.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. "user_command_0100 INPUT
MODULE status_0100 OUTPUT
MODULE status_0100 OUTPUT.
IF init IS INITIAL.
DATA url(255).
CLEAR url.
CREATE OBJECT container
EXPORTING container_name = 'P1'.
CREATE OBJECT picture
EXPORTING parent = container
EXCEPTIONS error = 1.
IF sy-subrc NE 0.
ENDIF.
PERFORM load_pic_db CHANGING url.
CALL METHOD picture->load_picture_from_url
EXPORTING
url = url.
IF sy-subrc NE 0.
ENDIF .
init = 'X'.
ENDIF.
ENDMODULE. "status_0100 OUTPUT
*& Form
text
FORM load_pic_db changing p_url.
data query_table like w3query occurs 1 with header line.
data html_table like w3html occurs 1.
data return_code like w3param-ret_code.
data connect_type like w3param-cont_type.
data connect_length like w3param-cont_len.
data pic_data like w3mime occurs 0.
data pic_size type i.
refresh query_table.
query_table-name = '_object_id'.
query_table-value = 'TESTPIC'.
append query_table.
CALL FUNCTION 'WWW_GET_MIME_OBJECT'
TABLES
query_string = query_table
html = html_table
mime = pic_data
changing
return_code = return_code
content_type = connect_type
content_length = connect_length
EXCEPTIONS
OBJECT_NOT_FOUND = 1
PARAMETER_NOT_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
pic_size = connect_length.
ENDIF.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'image'
subtype = cndp_sap_tab_unknown
SIZE = pic_size
DATE =
TIME =
DESCRIPTION =
LIFETIME = cndp_lifetime_transaction
CACHEABLE =
SEND_DATA_AS_STRING =
FIELDS_FROM_APP =
tables
data = pic_Data
FIELDS =
PROPERTIES =
COLUMNS_TO_STRETCH =
changing
url = url
EXCEPTIONS
DP_INVALID_PARAMETER = 1
DP_ERROR_PUT_TABLE = 2
DP_ERROR_GENERAL = 3
OTHERS = 4
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.
*& Module CANCEL INPUT
text
module CANCEL input.
LEAVE PROGRAM.
endmodule. " CANCEL INPUT
============================================= -
PAYABLES NOT GETTING THE REPORT OUTPUT IN PDF AFTER APPLYING RUP5 R12
Hi All,
RDBMS:10.2.0.3.0
Oracle Apps :12.0.4
OS:AIX 5.3
Problem Description:
We are presently facing an issue in Payables not getting the report output in PDF esp for the reports "Invoice Register", Invoice Hold Report and also other reports. We were able to generate the reports till our last test performed on last Thursday. This instance was cloned over the last weekend and probably the new upgrade to RUP5 R12,would have impacted it.
Concurrent Programs submitted are completed normal but on clicking "view output" results in Blank PDF output.
The error message what was shown is as below:
"Adobe Reader could not open 'AcrC.tmp' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)".
Where could we locate ther above 'AcrC.tmp' of Adobe Reader..
could anyone please share such an experience encountered for resolution..
Would appreciate an early response..
Thanks for your time!
Regards,I suggest you speak to your DBA/sysadmin. This is not likely to be a reports problem.
Check that you can see the output from apps through the viewer (the report may not hav output anything)
Check whether you can print anything on that printer from apps.
May also be worth checking to see if you can print to another printer from this report. -
Need to Print the Report Output
Hi,
I want to print the report output. How to install a printer in Oracle Appls. If i give number of copies 1 or morethan 1(from SRS Window)...the report is completed-warning. pls advice
Thanks in advance.Hi,
I changed the printer to Epson LQ2170 and Epson LQ2180 but since I don't know the initialization and reset parameter (already search for the manual but couldn't find it, downloaded from Epson's website but couldn't find it either) so I register it with LQ1070. I'd tested to print the reports directly from Reports Builder 6i and it printed just as I wanted to but when I tried to print from oracle apps it only printed up to about 3/4 width of the paper. I tried to change the report's height and width, paper size, orientation but no luck. What should I do? Thanks -
SAP WEBGUI - How to download the report output to Excel ?
Hi Folks ,
We have generated a report in standard SAP GUI 7.1 . But our requirement is to view the report in SAP WEBGUI and download as EXCEL .
We can view the report output in SAP WEBGUI , but could find an option to download as excel !
Is there any option in webgui ?
Please provide you valuable inputs !
Thanks.,
V.RangarajanHi V.Ranjarajan,
Have you created an ALV report?
If yes, there are many ways to download the output to excel:
Go to Menu -> Export - > Local File... , local file button, etc.
In SAP CRM 7.0 there is a std functionality to even download search result list to excel.
Hope this helps!
Regards,
Saumya -
How to download the report output into PDF format
Hi friedns
from the report output when user clicks download button
it has to download to PDF format
how to do this
thanks in advance
venuhi venu,
check this sample code
Save Report Output to a PDF File
This report takes another report as input, and captures the output of that report. The output is then converted to
PDF and saved to a local file. This shows how to use some of the PDF function modules, as well as an easy way to
create PDF files.
Source Code Listing
report zabap_2_pdf.
*-- Enhancements: only allow to be run with variant. Then called
*-- program will be transparent to users
*-- TABLES
tables:
tsp01.
*-- STRUCTURES
data:
mstr_print_parms like pri_params,
mc_valid(1) type c,
mi_bytecount type i,
mi_length type i,
mi_rqident like tsp01-rqident.
*-- INTERNAL TABLES
data:
mtab_pdf like tline occurs 0 with header line,
mc_filename like rlgrap-filename.
*-- SELECTION SCREEN
parameters:
p_repid like sy-repid, " Report to execute
p_linsz like sy-linsz default 132, " Line size
p_paart like sy-paart default 'X_65_132'. " Paper Format
start-of-selection.
concatenate 'c:\'
p_repid
'.pdf'
into mc_filename.
*-- Setup the Print Parmaters
call function 'GET_PRINT_PARAMETERS'
exporting
authority= space
copies = '1'
cover_page = space
data_set = space
department = space
destination = space
expiration = '1'
immediately = space
in_archive_parameters = space
in_parameters = space
layout = space
mode = space
new_list_id = 'X'
no_dialog= 'X'
user = sy-uname
importing
out_parameters = mstr_print_parms
valid = mc_valid
exceptions
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
*-- Make sure that a printer destination has been set up
*-- If this is not done the PDF function module ABENDS
if mstr_print_parms-pdest = space.
mstr_print_parms-pdest = 'LOCL'.
endif.
*-- Explicitly set line width, and output format so that
*-- the PDF conversion comes out OK
mstr_print_parms-linsz = p_linsz.
mstr_print_parms-paart = p_paart.
submit (p_repid) to sap-spool without spool dynpro
spool parameters mstr_print_parms
via selection-screen
and return.
*-- Find out what the spool number is that was just created
perform get_spool_number using sy-repid
sy-uname
changing mi_rqident.
*-- Convert Spool to PDF
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid= mi_rqident
no_dialog = space
dst_device = mstr_print_parms-pdest
importing
pdf_bytecount = mi_bytecount
tables
pdf = mtab_pdf
exceptions
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
call function 'DOWNLOAD'
exporting
bin_filesize = mi_bytecount
filename = mc_filename
filetype = 'BIN'
importing
act_filename = mc_filename
tables
data_tab = mtab_pdf.
FORM get_spool_number *
Get the most recent spool created by user/report *
--> F_REPID *
--> F_UNAME *
--> F_RQIDENT *
form get_spool_number using f_repid
f_uname
changing f_rqident.
data:
lc_rq2name like tsp01-rq2name.
concatenate f_repid+0(8)
f_uname+0(3)
into lc_rq2name separated by '_'.
select * from tsp01 where rq2name = lc_rq2name
order by rqcretime descending.
f_rqident = tsp01-rqident.
exit.
endselect.
if sy-subrc ne 0.
clear f_rqident.
endif.
endform." get_spool_number
Regards,
Naveen -
Send the Report output to email from spool
Hi All,
The following process which i am doing to send the report output(Executed in background) to my mail id.
I ran the report in Background and got the output in the spool. i opened the spool from the transaction SM37 and send the output to my external mail id via the following process
click Spool Request->forward-> send SAP data
here i am getting one POP up in there i gave my mail id and tick the check box on Express and click copy.
Now i received the output in my mail .
By doing the above process in the Quality server i am receiving the output in the mail as a PDF format that is correct.(Output is also correct).
But when i execute the same in production server i am receiving the output in the mail as HTML format. (output and format is totally wrong). I want to know why its coming as HTML format instead of PDF format.
Kindly help me regarding this.. Any configuration is there? If yes please let me know soon..
Regards,
Navaneeth...Hi,
use scon, double-click on SMTP, select internet
and compare the types of you both SAP-Systems.
Hope it helps.
Regards, Dieter -
How to store the report output in app server local directory
Dear All,
I would like to store the reports output in the app server folder. How do i achieve?
I am using reports10g, app server 10g. I am using web.show_document to call the reports. I would like to the achieve the same using this web.show_document built in.
Thanks
BalajiHi,
using desname pointing to an path on the apps-server the output is stored there. But when opening before in browser, then this document is stored in temporary folder on the client and you can't store them then to the apps server (if you not map the apps server or use web dav to do that).
Regards
Rainer -
Need to send the report output in email body.
Hi Friends,
I need to send the report output in body of the email but not as an attachment.
Requesting your suggestions. Please elaborated answers are expected.
Thanks & Regards,
S.Suresh Babu.If you are looking for same output to be available in the email body, i think this is not possible.
If you are just concentrated on the data, then you can do as below.
1. In your custom program, submit the actual report program via spool and by making use of that spool, read the spool content (We have function modules which can download the content from spool to the internal table), and by making use of this internal table, build the actual internal table as required which will be passed to email function module lets say SO_OBJECT_SEND etc..
2. You can make use of even LIST_TO_MEMORY and LIST_FROM_MEMORY function modules as well instead of spool, if you have data in the final internal table.
I am not sure, how can we handle in terms of logos if any.....or the data in the top of page related things...... -
How to write the code to send the report output to the local file.
dear all,
how to write the code to send the report output to the local file.
Thanks & Regards,
Jyothi.Hi,
Try this , it will display report and download the file as well. Just vhange the path and execute
TYPE-POOLS : SLIS.
DATA : IT_SCARR TYPE TABLE OF SCARR,
IT_FCAT TYPE SLIS_T_FIELDCAT_ALV.
SELECT *
FROM SCARR
INTO TABLE IT_SCARR.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
* I_PROGRAM_NAME =
* I_INTERNAL_TABNAME =
I_STRUCTURE_NAME = 'SCARR'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_INCLNAME =
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = IT_FCAT
* EXCEPTIONS
* INCONSISTENT_INTERFACE = 1
* PROGRAM_ERROR = 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.
CALL FUNCTION 'REUSE_ALV_LIST_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 =
* IS_LAYOUT =
IT_FIELDCAT = IT_FCAT
* 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
* IR_SALV_LIST_ADAPTER =
* IT_EXCEPT_QINFO =
* I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_SCARR
* 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.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
* BIN_FILESIZE =
FILENAME = 'C:\Documents and Settings\sap\Desktop\Hi.xls' " Change path
* FILETYPE = 'ASC'
* APPEND = SPACE
* WRITE_FIELD_SEPARATOR = SPACE
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = SPACE
* WRITE_LF = 'X'
* COL_SELECT = SPACE
* COL_SELECT_MASK = SPACE
* DAT_MODE = SPACE
* CONFIRM_OVERWRITE = SPACE
* NO_AUTH_CHECK = SPACE
* CODEPAGE = SPACE
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = SPACE
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* IMPORTING
* FILELENGTH =
CHANGING
DATA_TAB = IT_SCARR
* EXCEPTIONS
* FILE_WRITE_ERROR = 1
* NO_BATCH = 2
* GUI_REFUSE_FILETRANSFER = 3
* INVALID_TYPE = 4
* NO_AUTHORITY = 5
* UNKNOWN_ERROR = 6
* HEADER_NOT_ALLOWED = 7
* SEPARATOR_NOT_ALLOWED = 8
* FILESIZE_NOT_ALLOWED = 9
* HEADER_TOO_LONG = 10
* DP_ERROR_CREATE = 11
* DP_ERROR_SEND = 12
* DP_ERROR_WRITE = 13
* UNKNOWN_DP_ERROR = 14
* ACCESS_DENIED = 15
* DP_OUT_OF_MEMORY = 16
* DISK_FULL = 17
* DP_TIMEOUT = 18
* FILE_NOT_FOUND = 19
* DATAPROVIDER_EXCEPTION = 20
* CONTROL_FLUSH_ERROR = 21
* NOT_SUPPORTED_BY_GUI = 22
* ERROR_NO_GUI = 23
* others = 24
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
EXPORTING
DOCUMENT = 'C:\Documents and Settings\sap\Desktop\Hi.xls' "Change path
* APPLICATION =
* PARAMETER =
* DEFAULT_DIRECTORY =
* MAXIMIZED =
* MINIMIZED =
* SYNCHRONOUS =
* OPERATION = 'OPEN'
* EXCEPTIONS
* CNTL_ERROR = 1
* ERROR_NO_GUI = 2
* BAD_PARAMETER = 3
* FILE_NOT_FOUND = 4
* PATH_NOT_FOUND = 5
* FILE_EXTENSION_UNKNOWN = 6
* ERROR_EXECUTE_FAILED = 7
* SYNCHRONOUS_FAILED = 8
* NOT_SUPPORTED_BY_GUI = 9
* others = 10
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
How to increase the font size of the report output in the printout.
Hi Team,
i have a requirement like to print the report output as a direct print from an internal table.I am using the below mentioned code, the output is printing fine but the Font size of the output text is so small so i need to increase the font size of the text of output data.
call function 'GET_PRINT_PARAMETERS'
exporting
immediately = 'X'
line_count = 65
line_size = 320
mode = 'CURRENT'
no_dialog = ' '
release = 'X'
user = sy-uname
importing
out_parameters = st_param
exceptions
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
if sy-subrc eq 0.
new-page print on parameters st_param no dialog.
could you please suggest me how to increase the font size while printing the report output..
Thanks in Advance.
Puneet.hey,
in our system when we click on print. on widow is coming.
there is a properties button.
we click on it.
there FORMAT----AND then we select forat from there and then printing .
not sure. but check on ur system. is there properites button.
HI,
READ THIS,
You can specify attributes such as the character width and font size in the device type formatting yourself.
contact ur basis team .
in the report PRINT-CONTROL SIZE option is there. try to find more o this. -
How to send the report output to the application server in a excel file
Hello,
how to send the report output to the application server in a excel file.
and the report runs in background.
Thanks in advance.
SundeepDear Sundeep.
I'm providing you with the following piece of code ... Its working fine for me ... hopefully it suits your requirement ...
D A T A D E C L A R A T I O N *
TYPES: BEGIN OF TY_EXCEL,
CELL_01(80) TYPE C,
CELL_02(80) TYPE C,
CELL_03(80) TYPE C,
CELL_04(80) TYPE C,
CELL_05(80) TYPE C,
CELL_06(80) TYPE C,
CELL_07(80) TYPE C,
CELL_08(80) TYPE C,
CELL_09(80) TYPE C,
CELL_10(80) TYPE C,
END OF TY_EXCEL.
DATA: IT_EXCEL TYPE STANDARD TABLE OF TY_EXCEL,
WA_EXCEL TYPE TY_EXCEL..
E V E N T : S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Here you populate the Internal Table.
Display - Top of the Page.
PERFORM DISPLAY_TOP_OF_PAGE.
E V E N T : E N D - O F - S E L E C T I O N *
END-OF-SELECTION.
SET PF-STATUS 'GUI_STATUS'.
E V E N T : A T U S E R - C O M M AN D *
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'EXPORT'.
Exporting the report data to Excel.
PERFORM EXPORT_TO_EXCEL.
ENDCASE.
*& Form DISPLAY_TOP_OF_PAGE
text
--> p1 text
<-- p2 text
FORM DISPLAY_TOP_OF_PAGE .
SKIP.
WRITE: /05(128) SY-ULINE,
/05 SY-VLINE,
06(127) 'O R I C A'
CENTERED COLOR 1,
132 SY-VLINE.
WRITE: /05(128) SY-ULINE,
/05 SY-VLINE,
06(127) 'Shift Asset Depreciation - Period/Year-wise Report.'
CENTERED COLOR 4 INTENSIFIED OFF,
132 SY-VLINE.
WRITE: /05(128) SY-ULINE.
E X C E L O P E R A T I O N
CLEAR: IT_EXCEL[],
WA_EXCEL.
PERFORM APPEND_BLANK_LINE USING 1.
WA_EXCEL-cell_02 = ' XYZ Ltd. '.
APPEND WA_EXCEL TO IT_EXCEL.
CLEAR: WA_EXCEL.
WA_EXCEL-cell_02 = 'Shift Asset Depreciation - Period/Year-wise Report.'.
APPEND WA_EXCEL TO IT_EXCEL.
PERFORM APPEND_BLANK_LINE USING 1.
ENDFORM. " DISPLAY_TOP_OF_PAGE
*& Form APPEND_BLANK_LINE
text
-->P_1 text
FORM APPEND_BLANK_LINE USING P_LINE TYPE I.
DO P_LINE TIMES.
CLEAR: WA_EXCEL.
APPEND WA_EXCEL TO IT_EXCEL.
enddo.
ENDFORM.
*& Form EXPORT_TO_EXCEL
text
--> p1 text
<-- p2 text
FORM EXPORT_TO_EXCEL .
DATA: L_FILE_NAME(60) TYPE C.
Create a file name
CONCATENATE 'C:\' 'Shift_Depn_' SY-DATUM6(2) '.' SY-DATUM4(2)
'.' SY-DATUM+0(4) INTO L_FILE_NAME.
Pass the internal table (it_excel which is already populated )
to the function module for excel download.
CALL FUNCTION 'WS_EXCEL'
exporting
filename = L_FILE_NAME
tables
data = IT_EXCEL
exceptions
unknown_error = 1
others = 2.
if sy-subrc <> 0.
message e001(ymm) with 'Error in exporting to Excel.'.
endif.
ENDFORM. " EXPORT_TO_EXCEL
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When you click the button - Export to Excel ( GUI-Status) you'll be able to export the content of the Internal Table to an Excel file .......
Regards,
Abir
Don't forget to award Points * -
Publishing the report output to PDF and Excel
Hi,
Is there any way to get the Report title, Report run date, Page numbers when we export the report output to Excel or PDF.Hi
I am assuming you are working in 2004s
<u><b>Exporting to PDF</b></u>
For page numbering, add the following parameter to the export command, which defaults the footer to the page numbering
<bi:FOOTER_RIGHT value="PAGEOFPAGES" />
Report Run Date ... we have included this in a text element in our report, and made sure that element is part of the export command. The text element we have used is configured as a Generic Text Element and uses the LAST_REFRESHED property
Report Title ... this is done in the same way, but uses the QUERY_DESCRIPTION property.
<u><b>Exporting to Excel</b></u>
As mentioned already, there is no sense in including page numbers when exporting to Excel, as everything is shown on 1 sheet.
Report Title and Report Run Date are included in the export the same way as above.
Hope this helps.
Cheers,
Andrew
Maybe you are looking for
-
Aurora crashes every time I try to open it
I have just installed Aurora (firefox-9.0a2.en-GB.win32.installer.exe) and it crashes each time, even after a restart. I am not able to start it in safe mode.
-
Deployment problem (plss help)
I got the following error while deployment Module named 'portalEAR' failed to deploy. weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved Webapp Library references for "weblogic.servlet.internal
-
945GCM5-F V2: memory problems/queries
EDIT: I've got a problem with Windows Vista Ultimate SP2 x64 look... CCleaner says I have 4GB.... CPU-Z says I have 4GB... p.s. BIOS Says that I have 3072MB.....! On POST and on BIOS -> System Information.... What can I do for this
-
The font of text marker insertion is different from before
A strange behaviour from a while: the default font of text marker insertion is different from before. I don't remember what font was before, but surely not the one of now. I think it's probably due to "firefox" installation (it has caused also a syst
-
I have a late 2010 Macbook Air (no dvd slot) and just purchased a new iMac. How do I migrate my info from the laptop to the desktop. Thanks.