BACKGROUND JOB & APPEND FILE?

Hi
    I have a requirement  , i have created a program  and taking its output in text file
through direct execution, using FM gui_download . and i want to schedule it to execute after every 15 minute.and Append the same text file with new values and old values should remain in the text file .Is this possible
Please tell me 1.How to schuled a background job to execute after every 15 min ?
                      2. How to append the textfile on my desktop with new value?.
Thanks & Regards
Lalith

1.
Create a Variant for the Program and
Schedule JOB in background:
Go to SM36 create a Job
enter Program and Variant for that program in STEP..
click on Start Condition
Click on DATE and TIME enter date scheduled Start and END times
click on Period Values
Click on HOURLY/WEEKLY etc
CLick on RESTRICTIONS also to use further criteria.
so your job will be scheduled and run as per your requirement.
and in SM37 Transaction check the status of that JOB
Check this link for scheduling jobs..
http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm
2. As per will smith.. you cannot schedule gui_downlaod in back ground job...
you can use OPEN DATASET in text mode appending addition. But this file will be on application layer..
CALL METHOD cl_gui_frontend_services=>gui_download
  EXPORTING
    filename = gd_file
    filetype = 'ASC' " DAT,WK1
    Append   = ' '   "if mode = A then this would be X
  CHANGING
    data_tab = it_uctable
  EXCEPTIONS
    OTHERS   = 1.
Award points if helpful

Similar Messages

  • What data is stored in the CC Background Job Spool File?

    What information is stored in the location referenced in the CC Configuration/Miscellaneous setting of 'Background Job Spool File Location'?  Our test and production versions of this system are configured the same, with both pointing to the same location on their respective servers.  However the test location shows a virsa/bgJobSpool folder in it containing multiple files while our production system shows this location as empty.
    Both versions seem to be working OK.  We are running backgrounds jobs in each (risk analysis, management reviews, rule generation, etc.) and seeing results.
    We updated to the GRC 5.2 a few months ago and are currently on SP9.  This issue came up during a system audit, so we need to come up with an explanation for the differences.
    Thanks.

    I had reviewed that SAP note previously, but it does not seem to help any with our situation.  We are running ad hoc background risk analysis jobs frequently and can always see the results.  Everything seems to work fine from the application side, we just don't see the logs where we thought they should be over on the server.
    From the outside, it looks like maybe it is ignoring the configuration setting and is still using the default location for the log.  Does it need to be on the same drive as the application?  I believe our application and the default location are both on our E drive, but we want to put the location for this and the Alert Log on the D drive.
    Thanks.

  • Background job and file transfer

    Hello
    I am looking for a way to transer a file that is created in an overnight background job on our R/3 Enterprise (Basis 6.20) to an ITS server within the same network. As no one is logged in at the time of creation of the file I cannot use the usual gui_controls. I cannot find an FM that will initiate a login on a Windows server and transfer a file. Should I script it on the AIX host? Has anyone done this before? Any ideas?
    Thanks for your interest and answers.
    Harry

    Will it be possible for you to try with the Function Modules FTP_CONNECT, FTP_COMMAND, and FTP_DISCONNECT.
    I could see more explanations in these links.
    FTP upload
    /people/thomas.jung3/blog/2004/11/15/performing-ftp-commands-from-abap
    Need to send data as files from SAP to other systems.
    Regd: Funxn Module  FTP_CONNECT
    rgds
    TM.

  • BDC in background job with file upload

    I create one report BDC for Mass Upload, in the foreground i select the file and its working fine. when i am assigning  to background the job is create and released but the code is not execute. when i see the logs it show the error "there is no file".
    what is the problem?
                 i create variants and i declare it in the job creation. i thing the file path is the problem. the file is in presentation server while assign to background job it can't able to pick the file.
                 My requirement is, i need to pick a file for my network path and upload it to the sap database using BDC. can any one help pls!!!
    Edited by: sudhakar.ssm on Jul 19, 2010 1:10 PM

    Mr . Bala Duvvuri
    i know that but my requirement is different. i need to open a file in my network path, there it have a folder called DATA there every day they put a file. i need to upload it into sap Database. for that can u help me... when i search it in google it say i need to create a interface code with RFC Destination....         
               like that can u gave me a solution pls...

  • Reg: File Extraction from SAP Queries via background job

    Hi ,
    Is it possible to Extract a file to the presentation Server by running the ABAP Query's through SQ01 as a back ground job to generate a file automatically without running it manually.
    I have tried recording the query's thru SQ01 with the File store Option to download it to Excel on the Presentation server.I have used CAll Transaction for SQ01 in the Zprg and submitted that Query to be able to download that Query in the mentioned path .The Zprg was executed via Background job.The file is extracted to the presentation server when the Zprg was executed via Foreground,but its not getting Downloaded to Excel Via Back ground job.
    Please provide me the solution.
    Thanks in advance,
    Prem

    Hi
    u cannot get file in presentation server.. in background..
    if you are scheduling any background jobs it should be out of any gui interface.. like gui_dowload , gui_upload// ur need to replace then with cl_gui_fronend_services Class
    or u have a option of writing file to application server in background using open dataset syntax.

  • Has anyone put the RAR Background Job Spool on a different server?

    We are on GRC 5.3 SP 13.
    Has anyone put the RAR Background Job Spool File Location (assigned in the Miscellaneous configuration section) on a server different than the one that the GRC Frontend/Java system is on?
    I currently have it assigned to a folder on the GRC server, but it is running out of space.  I am having a problem getting the users to delete old reports as they say they need to keep them for internal Audit controls.  They are also resisting downloading the reports (more work for them).  I have been told that we cannot easily increase the file space on the GRC server (would basically have to purchase more storage and rebuild the server).
    I was thinking about moving the folder over to our virtual storage area, were file size can be more easily expanded.  I haven't found any documentation that says the folder has to be on the GRC server, but I also haven't seen any examples of where it has been put on a different server.
    Has anyone done this, and did you run into any problems?
    Thanks.

    Hello Bob,
    I got your point. Probably there's no recommendation about this, because the recomended practise is to delete or archive the spools as suggested in note : Note 1511027 - Periodic clean up of spool files
    If you have a requirement to keep these files "online", I think the option to save them to a network drive is fine. I haven't tried it for this specific scenario. You have to take into account:
    - Specific user to connect to FileServer
    - Availability of the FileServer. If the FS is down, the RAR job will cancel.
    - Performance. I mean, write to a local disk is not the same to write to a network drive. This point is very difficult to measure,   because it depends on a lot of things like network speed, server load, etc.
    Maybe someone has already implemented it and gives you more hints.
    Cheers,
    Diego.

  • Can ABAP proxy to consume WSDL file be run as background job for every10min

    Hi all,
    I have a requirement where I need to build an interface which gatheru2019s the purchase order details and send to external third party software in their required format (as an XML file).
    So I should be the first point of contact and should trigger the interface each time a purchase order is generated.
    So I am thinking that I should develop a background job for every 10 minutes which will look for new purchase orders and gathers the information of the purchase orders and send them to external third party software in their required format.
    I have gone through all the SAP forums and e-Learning but still I have confusion in regards to how is it possible technically? Can some one guide me with some information on the same.
    I have a little bit of confusion and want to know few things.
    1)     Should I create a web service or should I consume a web service?
    2)     If I need to consume a web service, then can I write an ABAP proxy to be run in background fro evry 10 minutes? I mean can we run ABAP proxy as a batch job in the background?
    3)     Is there a difference between consuming an XML file and WSDL File?
    Any Help will be highly appreciated.
    Regards,
    Jessica.

    There are two options (as I know) to generate XML file.
    1. Use XML TRANSFORMATION to get the XML string based your TRANSFORMATION. You can input your data and get back the XML string. Download this string to a file
    Test XML generation program is:
    types: begin of ty_data,
           num   type i,
           end   of ty_data.
    DATA: itab TYPE standard table of ty_Data,
          la_data like line of itab,
          xmlstr TYPE string.
    DO 3 TIMES.
      la_data-num = sy-index.
      APPEND la_data TO itab.
    ENDDO.
    CALL TRANSFORMATION ztest_np1
      SOURCE table = itab
      RESULT XML xmlstr.
    CALL FUNCTION 'DISPLAY_XML_STRING'
      EXPORTING xml_string = xmlstr.
    My ZTEST_NP1 transformation. To create a transformation, click on the transformation in the "CALL TRANSFORMATION ztest_np1" statement. Select Simple transformation type.
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="table"/>
      <tt:template>
        <table>
          <tt:loop ref=".table">
            <item>
              <tt:value ref="NUM"/>
            </item>
          </tt:loop>
        </table>
      </tt:template>
    </tt:transform>
    XML string is like:
      <?xml version="1.0" encoding="utf-8" ?>
      <table>
      <item>1</item>
      <item>2</item>
      <item>3</item>
      </table>
    To use this option, you have to create a transformation and than use it to generate the XML string.
    Check this SAP Help
    http://help.sap.com/saphelp_nw04s/helpdata/en/e3/7d4719ca581441b6841f1054ff1326/frameset.htm
    2. You can concatenate and create an XML string and download that string into a file.
    Regards,
    Naimesh Patel

  • Background Job : To download file to windows server

    Hi Gurus,
    Here we have to develop a program thats creates a csv file in a network shared folder( a windows folder), We have to schedule it as a background process. We cant use gui_upload function module, since it doesnt support background jobs.
    Please share your ideas.
    Any idea about ftp?
    Thanks in advance,
    Anuroop

    hi,
    I think you can have a network shared folder on application server.
    you said that it is a comma separated file.
    1) Using TCODE CG3Z, upload the flat file to application server , remember to copy the path (it contains file path aswellas name).
    2) Using DATASET read the filepath along with the name and read each line into workarea and split at ',' into fields.
    3) Then append those fields to internal table.
    using the FMs job_open, job_submit and job_close you can go for background scheduling.
    Please go through the following link for sample code on FTP.
    http://abap4.tripod.com/FTP_Using_SAP_Functions.html
    Reward points if helpful.
    Thanks and regards

  • System exception while deleting the file from app server in background job

    Hi All,
    I have a issue while the deleting the file from application server.
    I am using the statement DELETE DATASET in my program to delete the file from app server.
    I am able to delete the file from the app server when i run the program from app server.
    When i run the same report from background job i am getting the message called System exception.
    Is there any secuirity which i need to get the issue.
    Thank You,
    Taragini

    Hi All,
    I get all the authorization sto delete the file from application serever.
    Thing is i am able to run the program sucessfully in foreground but not in the background .
    It i snot giving any short dump also just JOB is cancelled with the exception 'Job cancelled after system exception ERROR_MESSAGE'.
    Can anybody please give me suggestion
    Thanks,
    Taragini

  • Can we run in Background job which can pick a file from front end ?

    Hi All,
    I would like to run a report in Background job , for this i need to pick a file from front end services(Local drive or share folder)
    Is there any alternate FM=>GUI_UPLOAD  to upload data from front end services or any other solution for this?
    I am getting error=> "No batch" and " Cannot perform frontend function in batch input mode"
    Could you please help on this ?
    Thanks for your help in advance.
    Regards,
    Prasad.

    Hello Prasad,
    IF you keep your file on a shared folder on your front end, you can access it via OPEN DATASET if your application server has access to that path.
    You can test it out by asking Basis to try and access your front end file from the app server itself.

  • Ctrl-c in bash kill openbox started from rc file as background job

    Hi,
    Ctrl-c in bash kill openbox started from rc file as background job.
    strange, isn't it ?

    I want to have openbox in the job list of a bash. as if my xinitrc was "exec xterm" and I manualy enter the "openbox &" commande in the xterm window. I suppose this is a common wish : telling bash to read from file then from keyboard, but that not exactly what bashrc do.
    "ps j" for openbox started in bashrc
    PPID   PID     PGID  SID   TTY       TPGID STAT UID    TIME COMMAND
    1769  1773  1773   845 pts/0     1752 S     1000   0:00 xterm -e bash  --rcfile ~/bin/xsession.sh
           1  1780  1773   845 pts/0     1752 S     1000   0:00 /usr/bin/dbus-launch --sh-syntax --exit-with-session
    1773  1783  1783  1783 pts/2     1805 Ss    1000   0:00 bash --rcfile ~/bin/xsession.sh
    1783  1795  1783  1783 pts/2     1805 S     1000   0:00 /usr/bin/openbox --startup /usr/lib/openbox/openbox-autostart OPENBOX
    1783  1805  1805  1783 pts/2     1805 R+    1000   0:00 ps j
    "ps j" for openbox started by keyboard or PROMPT_COMMAND
    1718  1722  1722   845 pts/0     1701 S     1000   0:00 xterm -title Login -e bash  --rcfile ~/bin/xsession.sh
           1  1729  1722   845 pts/0     1701 S     1000   0:00 /usr/bin/dbus-launch --sh-syntax --exit-with-session
    1722  1732  1732  1732 pts/2     1747 Ss    1000   0:00 bash --rcfile ~/bin/xsession.sh
    1732  1744  1744  1732 pts/2     1747 S     1000   0:00 openbox
    1732  1747  1747  1732 pts/2     1747 R+    1000   0:00 ps j
    ps have PGID equal to the bash TPGID, so it is foreground. openbox from PROMPT_COMMAND have his own PGID, so it is background. openbox from bashrc share PGID wish bash ... so if bash do not consume Ctrl-c signal openbox receive it ? I assume it is some things like this, but why ? INVOCATION and JOB CONTROL sections in bash manpage do not seems describe this, so that's a strange behaviour.

  • Update table form local file as background Job

    Hi Expert,
         I have a requirement to update a database table through Text file in a background. I am trying to do through OPEN Database to upload the file to Application server and then triggerind a event for background job. please provide method to update the table in background job.
    Regards,
    Kapil.

    hi,
    if i have understood you can try this:
    1) create a custom event with transaction SM62.
    2) schedule the update job ( with the update program in its step )  trigging the event set in (1) .
    3) execute the program that upload the local file from presentation server to application server  .  The last istruction of this program has to be the call ot the custom event using BP_event raise fn module in the uplaoad is ok..
    4) if the event has been raised, the background job has been executed.
    Regards, luigi.

  • Create a Excel File in a Background Job

    Hi SAP Gurus,
    I am trying to create an Excel file using a background job but it is not possible.
    In foreground mode i get a file.
    Can someone give an explanation for that? Or someone have a workaround ??
                   Best Regards
                          João Fernandes

    João,
    If you have successfully demonstrated that SAP can write an output to an excel file, then it can do this in background as well as foreground.  The problem is probably not with the fact that it is 'Excel', but that it is trying to write a file in the background to a destination file location that is unknown to the system.
    Generally, without special setup, SAP software is unaware of most file locations that are outside of the SAP system itself.  When you log on through the SAP Gui, the SAP back end can "learn" about certain additional file locations through your PC setup and the SAPGUI session.  This 'knowledge' is lost as soon as you commit your program to a background process.
    Talk to your Basis person, and tell him what you wish to do.  This functionality is possible to do, but probably not in the way you are expecting.
    Best Regards,
    DB49

  • Regarding Background Job scheduling for file to file scenario

    Hi Guru's
    Good morining all of u
    I have one doubt on ...
    can we do background job scheduling for file to file scenario?
    Please give me response as early as possible.
    thanks and regards
    sai

    background jobscheduling for file adapter...
    you can schedule the file adapter according to your requirement as follows:
    In the  Communication Channel Monitoring Locate the link Availability Time Planning,  In Availability Time Planning, choose the Availability time as daily and say create, give the time details, select the communication channel in your case file adapter , goto the Communication Channels tab and filter and add the respective channel, save it
    /people/shabarish.vijayakumar/blog/2006/11/26/adapter-scheduling--hail-sp-19-

  • How to schedule the background job if report have Presentation server files

    Hi All,
    I have searched the forums and found , the way for the scheduling the background job if report selection screen have the presentation server file input.
    1. Using the Open data set method.
    And my client is not OK with Open dataset way, it there any other way to do this, As we are using the EXCEL file.
    Thanks and Regards,
    Bharani

    Hi,
    As said above it is generally not possible. Since your client most obviously doesn't like graphical background I would recomend storing data as till now, but show it with your own report in more userfriendly way. For example:
    - as ALV Grid
    - in excel with use of OLE either as embedded in SAP or new window (check transaction OLE for example)
    - with use of webdynpro
    BR
    Marcin Cholewczuk

Maybe you are looking for