How to send the report output to the application server in a excel file

Advertisement

Hello,
how to send the report output to the application server in a excel file.
and the report runs in background.
Thanks in advance.
Sundeep

Advertisement

Dear 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 *

November 30, -0001

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

How to send a report output as a FAX ?

Hallo Experts, How to send a report output as a FAX ? Suppose if I have all the data in an internal table, I will show it as a normal list OR ALV list output. In the application tool bar I should have a button, and by clicking it the output should go

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 si

Fax the report output

Hi all, I want to fax the report output to vendors. I created a calssical report. I need to sane that to some vendors...Can anyone help me with that? Thanks, PranavHi Pranav, Did you get any break through in sending the fax. If so pls share the detai

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: ================

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

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 follo

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

How to automatically maximize report output on HTML page

Hi, I am using Oracle Database 10g and Oracle Developer Suite 10.1.2 on Windows XP. I am using Run_Report_Object() and Web.Show_Document() respectively to call the Report from Oracle Form. Well, it showed normally. However, the Window is not maximize

How to Generate HTML Report Output in Excel

Dear Experts, How to convert HTML report output in Excel. I have reports which output is coming in HTML format & the same I want to use in Excel. So tell me how I can covert the same in Excel. Thanks Sudhirhello, in your case, you might want to make

How to send a SmartForm output as Email to external id?

I want the Smartform output to email to extrenal email-id. I don't want the Smartform output as any kind of attachment, but the Smartform output needs to be shown on the main email body. Can anyone pls. help me out?First, thanks for your responses. I

How to retrieve complete report output in HTML format

Hi, I'm looking for how to retrieve complete report output in HTML format. I have tried the following and it only give me first page of the report output where in the actual report output should be 5 pages. Is there something I'm missing. CallbackOpt

How to send an analog output signal on same axis running a stepping motor umi 7764/ PCI7334

I am running a single axis stepping motor (which is working fine) but for the application I need to be able to turn on and off a 5 volt laser.  It notes in the manual for the UMI 7764  that the the analog output can be used as a general-purpose volta

How to send puchase report in email ?

how to send puchase report in email ?Search SCN, you will get lot of post for this. Here is an example. http://scn.sap.com/thread/321890Read other 3 answers

I want the report which gives the material having Shelf life.

I want the report which gives the material having Shelf life, but without batch management in the master . Thanks in adavnce... VikrantHi, Report MB5M can be used for this.Read other 3 answers

App for streaming the audio output of the Mac via blouetooth to iphone

HI, Looking for an app that streams the audio output of the Mac via blouetooth to iphone. ThxPlease pardon the intrusion- Hi, roaminggnome! Congratulations on advancing to Level 4! At the Water Cooler in the Level 4 Lounge, we are throwing virtual co

Passing values to subreport in SSRS throwing an error - Data Retrieval failed for the report, please check the log for more details.

Hi, I have the subreport calling from the main report. The subreport is based on MDX query agianst the SSAS cube. some dimensions in cube has values 0 and 1. when I try to pass '0' to the sub report as the parameter value, it gives an error "Data Ret

FM to upload the Internal table data into application server.

Hi,   Could you please give me Function module to Upload the Internal table data into Application server ie., in Tcode AL11. I know for downloading the Application server file into itab is "SUBST_GET_FILE_LIST" FM and using open dtaa set we get

How to send the Report output thru email

Dear All, Is there a way to send the output of a abap report thru mail. I am sure it is there. My report output is as following. Emp Code : A01234 Name: XYZ Email-ID: [email protected] Dear XYZ, You have Rs....... as outstanding. Please clear all due

Send the report output in Email in the case of  HR ABAP

Hi     how can i send the output of report in email when i am doin the HR ABAP report .           This report will be sheduled to run automatically every day. If any body can help please send the answer. Thanks.hi, u have to use excel sheet attachmen