2014 Aug 17 3:20 PM
I have developed a Report in ABAP which has a selection screen and 2 radiobuttons
Foreground
Background
The report basically reads a TXT file from Desktop and calls a standard BAPI.
In foreground, I have no issues i.e. I browse the call from desktop and call GUI_UPLOAD and so on
However, in background, I am confused how to proceed??
Please note: Report is still running in foreground mode i.e. i am browsing the file. Its just that i have selected background Radiobutton
Can anyone tell me how to proceed i.e. to execute in background.
Do I need to submit the same program via JOB_OPEN JOB_CLOSE in background and then exit??
Please advice
2014 Aug 17 3:28 PM
Hi Razdan,
You can try a different logic while running in background –
For instance try to upload the file in application server using CG3Z. And write a separate logic to access the file from application server instead of desktop , while running in background.
2014 Aug 17 3:34 PM
Hi Praveen,
thanks for quick reply...
See point is,.. file is at my desktop only.... so when i selected Background radiobutton.
I uploaded the file in application server...but report is still executing in foreground mode only.... which i dont want..
so once i uploaded the file...What shud i do next??
shud i submit the same program this time as background job and now i can read the file frm application server??
2014 Aug 17 3:52 PM
As far as I know, this could not be achieved with the same report and same logic.
When you run the report in FOREGROUND, you select the F4 help to get the file from desktop. Here you are linking your PC (Presentation server/layer) to ABAP (application layer). Your GUI FM does it for you.
But when you run it in background, you wont be able to pass the link between PC and your ABAP report, as you were doing with F4 in foreground mode.
WHat you could do, store the file on application server directories (AL11)., use open data set, red data set to get the file content.
~Lokesh
2014 Aug 17 3:57 PM
Hi Lokesh,
u r right... i am doing F4 help as i am executing report in foreground mode.
I selected the background radiobutton.
Now i will upload this file from presentation server to application server.
then next what?
suppose after uploading in application server.
can i resubmit the same program as background job via job_open, job_close..
this time i am reading the file from application server which i hav just uploaded in last step
and then exit the program so that no further processing...
Or do u know any FM which can upload the file from desktop in background mode too??
2014 Aug 17 5:15 PM
Hi Razdan,
If want to schedule the background job through the program, then you can try method explained in below links. Here you might have to create a separate program to submit.
https://help.sap.com/abapdocu_70/en/ABAPSUBMIT_VIA_JOB.htm
http://scn.sap.com/thread/590077
Another approach would be like below
Please note that , here you need to upload the file separately to app. Server using , tcode - CG3Z or any other FM. And in the program you can use open dataset to access the file in the app. Server.
2014 Aug 17 5:21 PM