2006 Jun 21 5:30 PM
Hi,
I have gone through the followiing query in SDN forums.
Can anyone help me to find relevant document which supports the statement that file on presentation server cannot be uploaded into internal table when the program is run in bakground mode .
Also I find many replies from the experts are from help.sap.com. Can anyone tell me the best way to search through help.sap.to find the correct documentation. I am always lost in searching through this.
Regards,
Ben.
Hi,
I have gone through the followiing query in SDN forums.
Can anyone help me to find relevant document which supports the statement that file on presentation server cannot be uploaded into internal table when the program is run in bakground mode .
Also I find many replies from the experts are from help.sap.com. Can anyone tell me the best way to search through help.sap.to find the correct documentation. I am always lost in searching through this.
Regards,
Ben.
2006 Jun 21 5:31 PM
Hi Daniel,
It can still be done.
If you want i can send you a document.
Give me your mail ID.
Regards,
Ravi
2022 Sep 16 2:03 PM
Please note that sharing email addresses publicly violates our rules of engagement (https://community.sap.com/resources/rules-of-engagement).
I have removed all comments with email addresses from this thread. If you'd like to exchange email addresses, please follow each other (which you can do via the "follow" button on a profile page). When members follow each other, they can exchange direct messages, through which they can share email addresses privately if they wish.
Kind regards,
--Jerry
2006 Jun 21 5:35 PM
Hi,
you cannot upload file from PC to ITAB in Background.
Regards
vijay
2006 Jun 21 5:37 PM
Daniel,
File located on the desktop can not be used for a background job. A background job cannot access your desktop.
Thanks,
2006 Jun 21 6:16 PM
Hi vijay,
Can you plz provide me the documentation regarding, Data upload from Presentation server in background job.
Thanks and regards.
vijay.
2006 Jun 21 5:53 PM
If you look at the help of OPEN DATASET, you will find the following paragraph.
<i>Notes
The system must be able to reach the file from the current application server. You cannot edit files from the current presentation server. If you need to do this, use the function modules GUI_DOWNLOAD and GUI_UPLOAD.</i>
2006 Jun 21 6:05 PM
Hi Srinivas,
Yes, He did say that the file has to be accessed from the application server. But nowhere he did mention wether it has to be an foreground or background process .
Regards,
Ben.
2006 Jun 21 6:06 PM
2006 Jun 21 6:08 PM
Hi Rich,
Can I use GUI_UPLOAD to transfer data from the presentation server to internal table and schedule the program in background ? Will that work or even this is also not posible ?
Regards,
Ben.
2006 Jun 21 6:12 PM
2006 Jun 21 6:13 PM
Hi,
Use GUI_UPLOAD to transfer data from the presentation server to internal table and then use OPEN DATASET to transfer the data from internal table to application server
Laxman
2006 Jun 21 6:13 PM
2006 Jun 21 6:21 PM
Hi Rich,
My requirement is like this : I have very huge text file which contains some 50,000 records . I WANT TO UPLOAD THIS INTO AN INTERNAL TABLE. Since the file is of huge size I want the program to scheduled to background.
Also I just want to look at the documentation which exactly explains this concept . I tried a lot surfing through help.sap.com but couldn't figure out .
Thanks,
Ben.
2006 Jun 21 6:53 PM
> Hi Srinivas,
>
> Yes, He did say that the file has to be accessed
> from the application server. But nowhere he did
> mention wether it has to be an foreground or
> background process .
>
> Regards,
> Ben.
For that you have to refer to how background processing is done in SAP. Here is the
<a href="http://help.sap.com/saphelp_46c/helpdata/en/a4/709855505711d189550000e829fbbd/frameset.htm">link</a> to help on that. Look at 'Background Processing' in this link.
2006 Jun 21 7:00 PM
With the RFC way, things to remember are one, you can only do this from THE desktop, not any desktop. Second, the PC has to be available. That is why this route may not be suitable. A better way would be what Rich specified, upload the file, and then switch to background mode for the rest of the processing.
2006 Jun 21 7:03 PM
2006 Jun 21 6:22 PM
2006 Jun 21 6:25 PM
2006 Jun 21 6:25 PM
2006 Jun 21 6:29 PM
2006 Jun 21 6:30 PM
Hi Rich,
the same Document you can see here too...
Regards
vijay
2006 Jun 21 6:35 PM
2023 Oct 16 1:18 PM
2023 Oct 17 2:23 PM
Hello,
While we're happy that you've come to SAP Community to get an answer to your question, you posted your question as an answer in an old thread. Posting in older threads is not the best way to get guidance.
If you're looking for help, you should ask a new question: https://answers.sap.com/questions/ask.html.
Best regards,
Anne
2006 Jun 21 6:39 PM
Hi,
you can pass data from presentation server to internal table. you can use submit report via job statement to run program in background
Regards,
Sudhakar
2006 Jun 21 6:46 PM
That's right, but the program execution must be initiated by the frontend(gui). I have done a program where the user uploads the data into memory, then fires the program to the background, once in the background the data is retrieved from memory and process continues. Works quite well, but still the user needs to execute the transaction to point to the file on the frontend.
Regards,
Rich Heilman
2006 Jun 21 6:57 PM
To illistrate this solution a little.... here are two programs, the first will get the data from the PC and submit a background job which will process it.
The first program.
report zrich_0001.
data: iflatf type table of string.
data: xflatf type string.
* Used to limit user commands on selection-screen
include rsdbc1xx.
* Selection Screen
selection-screen begin of block b1 with frame title text-002 .
parameters: p_file type localfile default
'C:Test.txt'.
selection-screen end of block b1.
* Events
at selection-screen output.
append 'PRIN' to current_scr-excl.
append 'SJOB' to current_scr-excl.
at selection-screen on value-request for p_file.
call function 'KD_GET_FILENAME_ON_F4'
exporting
static = 'X'
changing
file_name = p_file.
at selection-screen.
data: filename type string.
filename = p_file.
clear iflatf. refresh iflatf..
call method cl_gui_frontend_services=>gui_upload
exporting
filename = filename
filetype = 'ASC'
changing
data_tab = iflatf.
start-of-selection.
export iflatf to shared buffer indx(st) id 'ZRICHTEST'.
perform submit_job.
message s001(00)
with 'Job ZRICH_0002 has been scheduled and released'.
************************************************************************
* FORM submit_job *
************************************************************************
form submit_job.
data: l_valid,
ls_params like pri_params,
l_jobcount like tbtcjob-jobcount,
l_jobname like tbtcjob-jobname.
* Get Print Parameters
call function 'GET_PRINT_PARAMETERS'
exporting
no_dialog = 'X'
importing
valid = l_valid
out_parameters = ls_params.
ls_params-primm = space.
ls_params-prrel = space.
ls_params-prnew = 'X'.
* Open Job
concatenate sy-uname 'ZRICH_0002'
into l_jobname separated by '-'.
call function 'JOB_OPEN'
exporting
jobname = l_jobname
importing
jobcount = l_jobcount.
* Submit report to job
submit zrich_0002
via job l_jobname
number l_jobcount
to sap-spool without spool dynpro
spool parameters ls_params
and return.
* Schedule and close job.
call function 'JOB_CLOSE'
exporting
jobcount = l_jobcount
jobname = l_jobname
strtimmed = 'X'.
endform.
The second(submitted) program.
report zrich_0002 .
data: iflatf type table of string.
data: xflatf type string.
start-of-selection.
import iflatf = iflatf
from shared buffer indx(st) id 'ZRICHTEST'.
delete from shared buffer indx(st) id 'ZRICHTEST'.
loop at iflatf into xflatf.
write:/ xflatf.
endloop.
Regards,
Rich Heilman