EXCEL attachment as EMAIL to USER - When USER executes REPORT in BACKGROUND
Hi Friends,
I have 10 records in Internal Table. In BACK GROUND execution, I have to send this 10 records as EXCEL attachment through EMAIL to the USER who executed in background.
How to do this? Thanks in advance.
Regards,
Viji.
hi,
the following excerpt converts to excel:
REPORT ZEX_DATATOEXCEL .
Parameters: P_file like RLGRAP-FILENAME.
data : begin of int_head occurs 0,
Filed1(20) type c, " Header Data
end of int_head.
data : begin of int_data occurs 0,
Field1(20) type c, " Data
Field2(20) type c,
Field3(20) type c,
Field4(20) type c,
end of int_data.
int_head-Filed1 = 'Sales Ord'.
APPEND int_head.
CLEAR int_head.
int_head-Filed1 = 'Sold-to-Party'.
APPEND int_head.
CLEAR int_head.
int_head-Filed1 = 'Purchase Ord'.
APPEND int_head.
CLEAR int_head.
int_head-Filed1 = 'Ship-to-Party'.
APPEND int_head.
CLEAR int_head.
int_data-field1 = '1JOHN'.
int_data-field2 = '2TOM'.
int_data-field3 = '3BRAD'.
int_data-field4 = '4PETER'.
Append int_data.
Clear int_data.
CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
EXPORTING
file_name = p_file " path offile where u need to download
* CREATE_PIVOT = 0
* DATA_SHEET_NAME = ' '
* PIVOT_SHEET_NAME = ' '
* PASSWORD = ' '
* PASSWORD_OPTION = 0
TABLES
* PIVOT_FIELD_TAB =
data_tab = int_data "internal table with data
fieldnames = int_head "internal table with header
EXCEPTIONS
file_not_exist = 1
filename_expected = 2
communication_error = 3
ole_object_method_error = 4
ole_object_property_error = 5
invalid_filename = 6
invalid_pivot_fields = 7
download_problem = 8
OTHERS = 9
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
got it from
http://abaplovers.blogspot.com/2008/05/abap-internal-table-to-excel-sheet.html.
then you can export to spool and mail it.
ags.
Similar Messages
-
Change in Normal list when i execute Report in Background.
Hi all ,
When we execute the Report in background a normal list will be displayed in the spool. In that Normal
list is it possible to shift the columns that are displayed at the last to be displayed at the beginning.
Regards ,
MurthyHi,
Yes you can do that.
You can determine the program is runing in background mode by using system variable SY-BATCH = 'X'.
If SY-BATCH = 'X'.
Then you can shift the column of internal table.
Endif. -
Time out when run execute report on Webgui or transaction iView
Dear All,
We found the error as bellow when we execute report that load huge size of data so it would like many time to get it.
500 Connection timed out
Error: -5
Version: 7000
Component: ICM
Date/Time: Thu Mar 6 19:33:49 2008
Module: icxxthr_mt.c
Line: 2698
Server: irpc16_QAS_50
Error Tag: {-}
Detail: Connection to partner timed out after 60s
Anyone please tell us about the way to edit timeout of webgui or iView.
Thank you very much,
Anek.Dear Krishna
It's helpful.
Goto rz10 transcation
Choose: Instance profile
Select: extended maintaince
Click: change
Set value for parameter 'icm/keep_alive_timeout'
If there is not parameter 'icm/keep_alive_timeout', create it.
Save it.
Restart SAP.
Please tell me how to give point for you.
Thank you for ur reply,
Anek. -
How to kick guest user when user quota has exhausted
Hi,
I have wlc and acs v4.0. Currently, I am using layer 3 security with web authentication and has been succesfully integrated with ACS for authentication. User quota has been set so that when user has reached its quota, may not be able to log in again. But problem occurs when the user has not logged out, it still can connect to network although its account at ACS shows disabled because of its quota limitation. So, is it a way to kick the user out, when the user has reached its quota ?
Radius accounting has been properly set. and AAA override has been set on appropriate wlan ssid.
Regards,
Suwandythanks for your reply.
do you mean "allow AAA override" ? If so, I have tried it and it works for changing user session by radius server. But the problem is, radius server do not send the user-session parameter dynamically. How can the radius send/calculate the remaining session time to wlc ? -
Hi Friends,
I'm using FM SO_NEW_DOCUMENT_ATT_SEND_API1, to send my internal table contents as excel attachment via e-mail. I'm receiving the xls attachment via e-mail. I'm using cl_abap_char_utilities=>newline to pass internal table contents line by line. This is working fine.
But from second line onwards, the lines are right aligned. For eg. contents_bin-line is 255 character length. If the internal table line is just 100 characters, it is leaving the 1st 155 character space and starting from 101st caharacter space. I need the line to start from 1st character space.
How shall i do this?..
Please help me on this.
Regards,
Subbu.Hi ,
Use class cl_abap_char_utilities=>cr_lf as shown below .
CONSTANTS: c_cret TYPE c VALUE cl_abap_char_utilities=>cr_lf . " for carriage return
You can use class CL_BCS also for sending attachment thr mail.(Optional)
Regards
Chetan -
Problems when scheduling a report in background
Hi Guys
I have a report that has a lot of columns so i have created a display variant with 22 cols. When I run this report online (foreground) It picks up my variant and I can see all 22 cols. The problem is when I schedule this in background it does not display all the cols, the last three cols get cut off.
Any idea why this is happening?
Thanks
Sameeryou have to change the format in SPAD.
Go to transaction SPAD -> FULL ADMINISTRATION -> DEVICE TYPES -> FORMAT TYPES and there you can see all the available formats. Create a new format Z_65_700 in the similar manner with X_255... with a different number of columns (700) and save it.
Then in the tab DEVICE/SERVERS go to OUTPUT DEVICES and type your printer -> ENTER -> then from the Menu GOTO device type -> then there is a button FORMATS where you can see all the existing formats (plus the one you have just ctreated). Find it and choose it. Then save.
Now you have attached the new format to your printer.
The next step is simple.
You can do it the way you described, but there is also another way. Run your program with F9 and not F8 from the selection screen. It will ask you for printers, formats etc. There you will first select the appropriate printer and then (after ENTER) you have to go down to formats and select the new format. Do not print it immediatelly, click only the NEW SPOOL REQUEST checkbutton. This will create a new spool request.
If you go to SP01 you will find the number of your finished job. If you click the abap list button it will only show you collumns with up to 255 characters.
But if you take the spool number and put it as a parameters to the zzz program , it will show everything.
Source:
Spool List output display > 255 char when the rpt is run in Background -
Error when executing report in background
Hi experts,
I developed a new report. In that report I am getting data from KRMI transaction. For getting data from KRMI I have all the program and transaction and function modules under KRMI transaction to Z program, transcation and function modules and by using Call Transaction on ZKRMI and using Import and export parameters I am fetching data from KRMI transaction.
By doing this I dont have any problem while executing report online and when I am executing this report in back ground I am not getting in the above mentioned case.
Can anyone advise me in solving the issueAs already said....the import and export wont work in background...however what you can do is import and export in shared buffer
Please refer this below thread for how to proceed on this...
Re: Problem with export/import in back ground
Check the below link for information on shared buffers
http://help.sap.com/saphelp_webas630/helpdata/en/c4/3a6dbb505211d189550000e829fbbd/frameset.htm -
Problem to spool when Executing reports in background
Hi experts,
I executed reports in backgroud , but when i checked in SM37 the generated spool not given proper layout format.
This problem occurs when report having more columns.
plz help me earliest.
Regards,
jyotsnaHi jyotsna,
this happens with ALV output because the output format is determined at runtime.
You can control the print format used: Just fromyour reports list in online mode, choose PRINT. A Popup should come up letting you specify the printer, number of copies, pages to be printed and so on.
At the bottom of the popup you have the Properties button. This button opens the overview sceen for all the available print parameters. Double-Click the Format section, choose a format you want to use.The the Specifications button takes you to another screen. Here you can choose 'Valid for this report only' and Check the Background checkbox.The push the 'Copy settings' button. Then Enter to close all the popups. This should help. Additionally you can set a default layout variant for your list to be used.
For this, in the ALV list, use Menu Settings-Layout-Layout Management. Here yu can set a default variant.
Regards,
Clemens -
Cannot send email via ActiveSync when user connect from Internet (Exchange 2010 SP3 RU5)
Hi All.
This is the first time I encounter this kind of issue, whenever user connect from the internet they cannot send email from their Phone or Windows Mail App, but they can retrieve email
But when they connect from Internal Network they can send email. I already test ActiveSync from internet using www.testexchangeconnectivity.com and it pass all tests.
I also check the Firewall and all the necessary ports already opened (we even open all ports) , the default TTL on the firewall 3600 second.
From what I read ActiveSync use some kind of HTTP POST or in MS terminology "PING" command, but still have no idea what kind of configuration that should be made to the Firewall so it can pass this "PING" command. Because from what I
see in Android Logcat the problem always related to this PING command
10-07 08:12:38.714 I/Exchange(31971): Interrupt with reason 1
10-07 08:12:38.714 I/Exchange(31971): Ping task ending with status: -1
10-07 08:12:38.904 D/Exchange(31971): created outputstream
10-07 08:12:39.204 W/Exchange(31971): IOException sending mail
10-07 08:12:39.204 E/Exchange(31971): Generic error for operation SendMail: status 200, result -100
10-07 08:12:39.204 W/Exchange(31971): Aborting outbox sync for error -99
10-07 08:12:39.274 I/Exchange(31971): Ping task starting for 3
10-07 08:12:39.304 D/SyncManager(644): failed sync operation [email protected] u0 (com.android.exchange), com.android.email.provider, USER, latestRunTime 71219435, EXPEDITED, reason: 10040, SyncResult: stats [ numIoExceptions: 1]
10-07 08:12:39.304 D/SyncManager(644): not retrying sync operation because SYNC_EXTRAS_DO_NOT_RETRY was specified [email protected] u0 (com.android.exchange), com.android.email.provider, USER, latestRunTime 71220078, EXPEDITED, reason: 10040Hi ronaldosy,
How about the work flow of Outlook or OWA on PC internally/externally?
If only phone has this issue, I suggest ask ActiveSync Forum for help so that you can get more professional suggestions. For your convenience:
http://social.technet.microsoft.com/Forums/exchange/en-US/home?forum=exchangesvrmobility
Best Regards,
Allen Wang -
IOS4.0.2 won't open excel attachment from email
I can open the PDF file, but not the excel file. When I click on the .xls attachment from my email, it brought me to the home screen. Does anyone know what I need to setup in order to be able to view the excel file?
Motion can't find a framework it needs in order to launch. That could be because the framework is missing or because permissions are set incorrectly.
To fix this problem, try repairing permissions. If that doesn't work, reinstall Final Cut Studio or copy the file /System/Library/PrivateFrameworks/Helium.framework/Frameworks/HeliumRender.fram ework/Versions/A/HeliumRender from another computer with the SAME version of Final Cut Studio. Then repair permissions again. -
How do I save excel attachment from email
Hello... My received email attachment is an excel file but read as PDF format when opened from my iPad. Do i need Iwork apps to save it as excel file or is there any other way I can do it.
You use apps to do this. Look at Documents to Go, or Office2HD. Used with the superb free Cloud service Dropbox either of these will work for you.
In the email, you can just 'Open with ...' (one of the apps) and then save either locally or to Dropbox which will sync the file to all your laptops and desktops too. -
I need to connect to 2 different SQL server without creating linked server for generating report. Is it possible in SSRS 2008 report service?
Yes possible
You would just required created two data sources which points to both your SQL Servers. And inside report you can create datasets based on each of these data sources to retrieve and display the data from them. In cases where you would require merging the
data from both the systems you can use functions like Lookup, LookupSet etc. Reports created in SSRS can be rendered in a variety of formats like Excel, PDF, CSV etc
see
http://www.allaboutmssql.com/2013/08/ssrs-example-for-lookup-lookupset-and.html
http://www.sqlcircuit.com/2012/03/ssrs-2008-r2-lookup-how-to-use-multiple.html
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Adding a description to a user when user creating
Hi All,
Is there any possibility of adding a Description to a user at the time of creation
ThanksNo - there is no COMMENT capability for users.
See the SQL Language doc for CREATE USER.
http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_8003.htm -
Excel Attachment via Email into PI
I have a shipping partner that says they can only email me a large Excel file for the requested delivery information (for R3 update). I want to have the entire process automated.
I have seen a couple threads concerning using Conversion Agent or a writing a java module in order to parse an Excel document. But from what I have seen in blog 1967, doing it with Java for a large Excel file seems like it would be a large pain.
Any suggestions or recommendations (Java module versus Conversion Agent or other)?
Thanks,
KeithHi Keith !
It depends on the complexity of the excel file itself, and also on the availability of the conversion agent tool and the knowledge in java development. Using Conversion Agent you will need almost none development (depending on the sheet).
Also another idea could be, that if the sender uses Excel, the also can export the file as CSV or XML, allowing you to read it from a standard adapter into XI.
Regards,
Matias
ps: please award points if helpful. -
How to create spool when running a report in background
hi folks,
i am running a bdc report in bkgrnd... and i want all the success and eror messages to be displayed in a spool... plz explain with example as to how this can be achieved .Hello Nishant,
You could use this sample code to create the spool.
DATA : X_NAME LIKE TSP03D-NAME,
X_DEST LIKE TSP03D-PADEST VALUE 'LOCL',
X_ROWS LIKE SXPCKLSTI1-BODY_NUM VALUE 0,
X_STARTROW LIKE SXPCKLSTI1-BODY_START VALUE 1,
X_PAGES LIKE RSPOTYPE-PAGES VALUE 1,
X_PAGES_1 TYPE P DECIMALS 2,
X_RQTITLE LIKE SXPCKLSTI1-OBJ_DESCR,
X_RQCOPIES TYPE I VALUE 1,
X_RQOWNER LIKE TRDYSE01CM-USERNAME,
X_IMMEDIATE LIKE PRI_PARAMS-PRIMM VALUE ' ',
X_RQID LIKE TSP01-RQIDENT,
I_CONTENTS LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
X_PAGES = 1.
X_RQOWNER = SY-UNAME.
X_DEST = 'LOCL'.
X_STARTROW = 1.
X_RQCOPIES = 1.
X_IMMEDIATE = ' ' .
I_CONTENTS-LINE = 'I Got your Childhood PHOTO'.
APPEND I_CONTENTS.
CALL FUNCTION 'RSPO_SX_OUTPUT_TEXTDATA'
EXPORTING
name = x_name
DEST = X_DEST
ROWS = X_ROWS
STARTROW = X_STARTROW
PAGES = X_PAGES
RQTITLE = X_RQTITLE
RQCOPIES = X_RQCOPIES
RQOWNER = X_RQOWNER
IMMEDIATELY = X_IMMEDIATE
IMPORTING
RQID = X_RQID
TABLES
<b> TEXT_DATA = I_CONTENTS</b> <b>Your Message Table</b>
EXCEPTIONS
NAME_MISSING = 1
NAME_TWICE = 2
NOT_FOUND = 3
ILLEGAL_LAYOUT = 4
INTERNAL_ERROR = 5
SIZE_MISMATCH = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.
ENDIF.
WRITE: X_RQID
If useful reward.
Vasanth
Maybe you are looking for
-
Syncing iPhone and Outlook Calendar - bug?
I have an issue syncing my iPhone 3G Calendar with Outlook's Calendar (Outlook 2007). In general, the sync works fine, but: If I delete the current (ie first) instance of a repeating event in Outlook, when I sync, my iPhone will still display ALL ins
-
How can I use my remote, without using Media Sourc
I have an audigy2ZS Platinum Pro, and I hate the mediasource remote plugin, I was much happier with my Remote Center, that was on my Audigy Platinum.. Is there anyway to get remote center on this model, or do I have to use media source?
-
Apple Ipod ....a mistak
I wanted to make a good present for my dad so 3 weeks ago i bought a new ipod with color display ! after week apple release a new one the famous ipod with video ? If you go to apple forum you can see how many people are dissapointed from a brand that
-
How to connect sql server using oracle Client
Hi, I am working in oracle9i and windows os 32 bit. I need to connect SQL server 2000 from my oracle client.. I heard about heterogeneous connectivity ... Please expalin me the steps what to add and how to connect the sql server... Regs....
-
Help: Clips rendered in AE turn blue when changing clip speed and exporting in Premiere Pro
Hi I've been having this problem in Premiere Pro CS5 (I'm just not sure with CS4 & ealier versions).. ok the problem is that in Premiere Pro CS5 when I change the speed of a clip that is rendered in After Effects and export it either in AVI or in MOV