Download Excel when program is run in background
Hi all,
I need help urgently in downloading my report into an excel file automatically when my report is has completed its run in background.
Appreciate if help can be provided.
Many thanks in advance.
Check out the sample program of the provided link ..
http://www.sap-img.com/abap/download-in-background-in-excel-format.htm
Similar Messages
-
ALV List export to Excel when program is run in background
Hello,
I am running into an issue with a custom ALV report which contains an export to Excel option on the input screen. However, when I attempt to run the report in background due to high volume of records/expected performance constraints, the job fails to produce a spool when the "export to Excel" option is selected. When I deselect that option, the background job successfully generates a spool, which I can then export to Excel (albeit the formatting will not look the same).
Is the above an accurate statement or does anyone know of a way where either;
1) The background job can create and store the Excel output into a cached directory?
2) The spool generated, when exported to Excel, can match the format of the foreground Excel output?
Thanks in advancce.Check out the sample program of the provided link ..
http://www.sap-img.com/abap/download-in-background-in-excel-format.htm -
Is it possible to download to excel when a report running in background
Dear All,
I tried to execute one ALV report in foreground and background. In foreground the report is giving excel download but in background no excel download is coming. Is there any specific reason for that?
Thanks and regards,
AtanuAtanu dey,
If you wnat to download excel in back ground
You have to download in application server only.
EX:
DATA : v_filepath(80) VALUE '/data/sapdata/inc/error_log/pme_br/',
c_coma VALUE ',' .
OPEN DATASET v_filepath FOR OUTPUT IN TEXT MODE.
IF sy-subrc EQ 0.
LOOP AT i_errors_bat.
CONCATENATE i_errors_bat-plant c_coma
i_errors_bat-zzvendor c_coma
INTO v_string.
TRANSFER v_string TO v_filepath.
ENDLOOP.
CLOSE DATASET v_filepath.
Note : you can download in presentation server also.
but it requires lot of authorizations and have to use
FTP commands.
Reason is Apllication server in back ground has to
recognize the from which system request came.
Better go for OPEN DATA sets.
Don't forget to reward if useful..... -
How to download file to local system when report is run in background?
Hello all,
Can anybody tell me how can we donwload file into local machin when the program is running in background?
thanksHi,
We can't communicate with presentation server while processing in background.
if needed we can do this by creating RFC destination and doing some setting in Desktop system.
[Reference document|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2]
Regards,
Amal -
Getting the variant name when the report program is run in background
Hi All,
How to get the variant name for the report program when run in background? My requirement is to create an email attachement with the name 'variant.XLS', where variant = selection screen variant, when the report program is run in background. The system field SY-SLSET holds the variant name only when run online.
Any pointers to this will be highly appreciated.
Thanks and regards,
Nilesh.Hello Nilesh,
Please find the algo:
1. Call the FM: GET_JOB_RUNTIME_INFO to get the background job details.
2. Select data from TBTCP using these details:
DATA:
FP_EVENTID TYPE BTCEVENTID
FP_EVTPARM TYPE BTCEVTPARM
FP_ACTIVE TYPE BTCXPGFLAG
FP_JOBCNT TYPE BTCJOBCNT
FP_JOBNM TYPE BTCJOB
FP_STEPCNT TYPE BTCSTEPCNT.
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
EVENTID = FP_EVENTID
EVENTPARM = FP_EVTPARM
EXTERNAL_PROGRAM_ACTIVE = FP_ACTIVE
JOBCOUNT = FP_JOBCNT
JOBNAME = FP_JOBNM
STEPCOUNT = FP_STEPCNT
EXCEPTIONS
NO_RUNTIME_INFO = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* Error calling FM: GET_JOB_RUNTIME_INFO
ENDIF.
DATA: FP_VARIANT TYPE BTCVARIANT.
SELECT JOBNAME JOBCOUNT STEPCOUNT VARIANT
FROM TBTCP
INTO TABLE L_IT_TBTCP
WHERE JOBNAME = FP_JOBNM
AND JOBCOUNT = FP_JOBCNT
AND STEPCOUNT = FP_STEPCNT.
IF SY-SUBRC = 0.
SORT L_IT_TBTCP BY JOBNM JOBCNT STEPCNT.
READ TABLE L_IT_TBTCP INTO L_WA_TBTCP INDEX 1.
IF SY-SUBRC = 0.
FP_VARIANT = L_WA_TBTCP-VARIANT.
ENDIF.
ENDIF.
Hope this helps.
BR,
Suhas -
How can I read the EXCEL file while Program is running in background.
Hi all Expert,
How can I read the EXCEL file while Program is running in background.
Thanksyou need to place ur excel file on application server and follow this thread: Reading an Excel file from the application server?
loots of information if you can search forum.. thanks -
ABAP program to run in Background job
Hi,
We have a custumized program (SO Creation) calling some functions (like: WS_QUERY, WS_UPLOAD, WS_DOWNLOAD, CREATE_TEXT and CALL TRANSACTION VA01) and can only run thru dialog process (foreground). Is it possible to convert it to something that can run thru background job?
Please help.
Thanks.Hi Deo ,
Unfortunately cl_gui_frontend_services will not work in background.
Please have a look at following information about cl_gui_frontend_services :
The class CL_GUI_FRONTEND_SERVICES contains static methods for the following areas:
File functions
Directory functions
Registry
Environment
Write to / read from clipboard
Upload / download files
Execute programs / open documents
Query functions, such as Windows directory, Windows version, and so on
Standard dialogs (open, save, directory selection)
To Use this, you should be bit familier with OO ABAP Concepts. So I will suggest you to go through with OO concepts of ABAP. It will be of great help to you.
Regards,
Nikhil -
How to reopen window in a program which runs in background
Hello,
I created a program, which runs in the background(when you start it, doesn't open a window). It has a notify icon and by double click opens a window. I open the window with ShowDialog() method. After I close it, I cannot reopen it. It says: "Cannot
set Visibility or call Show or ShowDialog after window has closed". What should I do?
Thanks!When you say you can't re-open it.
Exactly what are you doing to show and hide it?
And what do you do to show it again?
Actually, I can probably guess roughly what you're doing.
Are you trying to show a window you closed without instantiating it again?
Are you effectively doing something like:
Window win = new MainWindow();
win.Show(); ....
win.Close();
win.Show();
Because you should do
Window win = new MainWindow();
win.Show();...
win.Hide();
win.Show();
Once you close it, that's it you're done with that window. It's on the garbage heap waiting for the garbage collector to come along and recycle it.
It is no more.
Either hide() rather than close() or instantiate a new object each time.
Hope that helps.
Recent Technet articles: Property List Editing;
Dynamic XAML -
How to Identify program is running in background or Foreground mode?
Hello Experts,
I have developed on Z report and from this report BDC for Transaction CO11 is runnning using CALL TRANSACTION statement.
On Selection screen there is a option for selecting the BDC mode either in Background or Forground or Error mode.
My question is:- how do I recognize this selected BDC mode in the function exit ZXMBCU02.
This exit triggers when transaction CO11 runs.
Because based on the selected BDC mode i have to apply some logic in this exit.
Please suggest.
Regards,
JageshHi Jagesh...
You can do the following..
1. Export the Batch Input Mode in to ABAP memory using the EXPORT statement.
2. Import that value in the user exit.
3. To execute your code only if its batch input mode, use the field SY-BINPT.
You can also check if this structure "BDCRUN" is used in that program, b'cas this is contained in the VA01 an VA02 transacation, this would contain all the data.
CALL FUNCTION 'BDC_RUNNING'
IMPORTING
bi_info = bi_info
EXCEPTIONS
OTHERS = 1.
bi_info will contain all the data.
GET PARAMETER ID 'SD_BACKGROUND_DEBUG' FIELD background_debug.
Best Regards,
Pradeep. -
Maximum Line Width when Report is running in background
Hello Experts,
I have written a ABAP program and user is running in background. My output is of width of 599 characters. But wehn the user is running in the background, it is showing a warning that last 345 columns won't be displayed.
What is the maximum width, that is allowed for report being displayed in background.
Kindly help and points will be rewarded. its really urgent.
Thanks in advance.
Thanks and Regards,
SaurabhHey Saurabh,
I am facing the same problem. I have a report which has 406 characters. It is displayed correctly when executed in foreground but only 255 characters when executed in background.
You have resolved this issue. Can you please provide me the solution to execute it in background and get the complete output.
Regards,
Anosh -
How to find whether a program is running in background
Hi,
I have a requirement to find out whether a program is being executed in background. If the same program is executed manually then it should not execute, the time when the same program is being executed in background.
Please suggest.
Thanks.
Marked as a question
Message was edited by: Rich HeilmanYou can put a lock on the program inside the program, so that when it is run it puts a lock entry in SM12, then anyone trying to run it will get a message saying that the program is locked. USe the TRDIR lock object.
report zrich_0001 .
data: repid type sy-repid.
repid = sy-repid
call function 'ENQUEUE_E_TRDIR'
EXPORTING
* MODE_TRDIR = 'X'
NAME = repid
* X_NAME = ' '
* _SCOPE = '2'
* _WAIT = ' '
* _COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 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.
Welcome to SDN
Regards,
Rich Heilman -
Need certain LED's to turn on when program is run
Guys,
Attached is an instrument .vi that I have been working on. I was wondering if someone could open it and make the following changes. I need the following things to turn on when the program is run:
2nd LED of the "Wheel" Button
3rd LED of the "SYNC" Button
2nd LED of the "MODE" Button
1st LET of the "MEASURE" Button
If someone could help me with this I'd really appreciate it....
Attachments:
New Focus Optical Chopper (Group 8).vi 65 KBWhy don't you just manually click them on in edit mode, then make the current values default and save the VI?
LabVIEW Champion . Do more with less code and in less time . -
Just bought new laptop and can't install Firefox. The program will run until it gets to 99% completion, then Internet Explorer pops up and says it's timed out.
It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files.
You can try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
See http://kb.mozillazine.org/Unable_to_save_or_download_files -
Trigger programs to run in background
hello experts,
In my program I have,
do 2 times.
SUBMIT <PROGNAME> USING SELECTION-SET 'VARIANT'.
enddo.
its just running once. if i have 2 submits to run 2 different programs its still running just the first one .how can I make my program to run both the programs one after another.plz advise!!!
regards,Have u used the RETURN statement addition with SUBMIT
SUBMIT REPORT AND RETURN.
Have a look at this link.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba50d35c111d1829f0000e829fbfe/frameset.htm
Regards,
Lakshman. -
How to see if invisible program is running in background?
Hello,
I'm trying to help my friend who has an iMac running Snow Leopard (10.6.8). Her email and Facebook keep getting "hacked", and even though she changes the passwords to long and complex things that nobody could ever guess, someone is still able to figure out her passwords. The only way we think this could be happening is if someone broke into her home and put some type of "keystroke capture" program so that they could look at it while she's at work and get her passwords that way. We simply can not come up with any other way that her passwors are being discovered, and unfortunately we think it's a jealous ex-wife that is doing this.
I seem to recall in Snow Leopard that there is a way to see what is running in order to see how much memory is being taken by each task or program on the computer, but I don't recall where to go on the computer to monitor that information. Can someone please point me to where that information is, and if you have any other advice on how to check to see if a program is running without her knowledge, I would sure appreciate any input.
Thank you very much!Great---thank you very much. I actually do recognize everything there, so we are baffled as to what's going on.
Thanks again!
Maybe you are looking for
-
Error while installing Oracle 10g on Fedora Core 1
Error while installing Oracle 10g on Fedora Core 1. After 40% of the Installation is thru, the progress bar is showing 40%, it gives error "Not connected to Oracle" and the installation has to be terminated. We have tried by using the on-line procedu
-
Server 2003 VPN clients can't verify username and password
Hi, Hoping someone can help or point me in the right direction. I have a Windows Server 2003 R2 standard SP2 running RRAS. It has Dual NIC's and is configured for PPTP VPN. I am using a BT Business Hub 5 for internet access and using the BT Static IP
-
there are songs in my itunes music folder that did not show up in itunes after i transfered from pc to pc. when i click on file>add file to library and select missing tracks nothing happens. any suggestions?
-
Hi, I have an jsp with a form inside. The form request is handled by a servlet. But when running the jsp from Netscape4, there are no parameters sent with the request object. Why is this? With the Internet Explorer I have no problems. The parameters
-
Can you alter default values for Shape Layers?
Specifically, I want the default Trim Paths 'Trim Multiple Paths' set to 'Individually' and default Stroke Line Cap and Line Join set to 'Round Cap' and 'Round Join' respectively. I know I can copy and paste these properties from elsewhere but I am a