Trigger SAP job

Hi Experts,
I have a requirement to trigger SAP job whenever there is a new file in a network folder which is outside SAP. File name is like worklistYYYYMMDDHHMMSS.CSV. Timing of this file creation are unpredictable.
Also, this new file should be passed to SAP job for running.
Do you have any idea about possible solution? Can we user Event based trigger (SAPEVT command)?
Please let me know the details.
Many thanks,
Apps

Hi
You can do it in this way.
Creat a program in ABAP which picks up the file from Application Server
Put all the reocrds in an internal table and post it in SAP.
This program will be batch program and it will run once in every hr and
it will store the last captured file name in a Z table so whenever it picks up new file it will
compare the name old file and if they are not same delete the old file name and insert the new file name in the Z table.
Your batch program can pick up the file name from this Z table.
Hope it is useful.
Regards
Neha

Similar Messages

  • Batch File to trigger SAP job

    Hi all,
    Please can anyone advice on how to write a batch file to trigger the sap job. For example: If file exists in an external folder (e.g. C:\Temp), a command will trigger to run the SAP job.
    Many thanks,
    Shashi

    You could do this.
    Check if file exists.
    Do something when it does.
    Move file to another directory and rename file with data/time stamp
    Renamed file give history of activity
    Schedule this program to run every X amount of time
    data: w_result type c.
    data: w_file type string value 'C:\temp\test_down.spf'.
    data: w_file_size type i.
    call method cl_gui_frontend_services=>file_exist
      exporting
        file                 = w_file
      receiving
        result               = w_result
      exceptions
        cntl_error           = 1
        error_no_gui         = 2
        wrong_parameter      = 3
        not_supported_by_gui = 4.
    if w_result ne 'X' .
    else.
      write: / w_file.
      write: / 'File exists'.
    Do something when it does.
    Move file to another directory and rename file with data/time stamp
    Renamed file give history of activity
    endif.
    flush needed for some methods of class cl_gui_frontend_services
    call method cl_gui_cfw=>flush
      exceptions
        cntl_system_error = 1
        cntl_error        = 2
        others            = 3.
    Bruce

  • How to Trigger a Job from se38 Report

    Hi,
    I need to trigger a job from an se38 report program.
    Currently the code I'm using is:
      SUBMIT YARTZ_SPOOL
             USER SY-UNAME
             VIA JOB 'YARTZ_JOB2'
             NUMBER 1
             TO SAP-SPOOL
             SPOOL PARAMETERS l_print_parms
             WITHOUT SPOOL DYNPRO
             AND RETURN.
    But the SY_SUBRC return I get is 8 which stands for 'Error In job Scheduling'
    Is the method used correct?
    Or am i going wrong in scheduling the job? As far as Job scheduling goes, I used the Date/Time schedule and scheduled it at a time 20 minutes later.
    Thanks.

    Hi,
    use the code
      IF p_bjob = 'X'.
        CONCATENATE sy-cprog sy-datum sy-uzeit
                    INTO jobname SEPARATED BY '_'.
        CALL FUNCTION 'JOB_OPEN'
          EXPORTING
            jobname          = jobname
          IMPORTING
            jobcount         = jobcount
          EXCEPTIONS
            cant_create_job  = 1
            invalid_job_data = 2
            jobname_missing  = 3
            OTHERS           = 4.
        CALL FUNCTION 'GET_PRINT_PARAMETERS'
          IMPORTING
            out_archive_parameters = arc_params
            out_parameters         = print_params
            valid                  = valid
          EXCEPTIONS
            archive_info_not_found = 1
            invalid_print_params   = 2
            invalid_archive_params = 3
            OTHERS                 = 4.
        IF valid = chk.
          SUBMIT YARTZ_SPOOL
                          WITH <selection-screen parameters if any>
                          AND RETURN
                          USER               sy-uname
                          VIA JOB            jobname
                          NUMBER             jobcount
                          TO SAP-SPOOL
                          SPOOL PARAMETERS   print_params
                          ARCHIVE PARAMETERS arc_params
                          WITHOUT SPOOL DYNPRO.
          CALL FUNCTION 'JOB_CLOSE'
            EXPORTING
              jobcount             = jobcount
              jobname              = jobname
              strtimmed            = 'X'
            EXCEPTIONS
              cant_start_immediate = 1
              invalid_startdate    = 2
              jobname_missing      = 3
              job_close_failed     = 4
              job_nosteps          = 5
              job_notex            = 6
              lock_failed          = 7
              invalid_target       = 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.
          ELSE.
            MESSAGE i029 WITH jobname.
          ENDIF.
        ELSE.
          MESSAGE s000 WITH text-003.
          STOP.
        ENDIF.
      ENDIF.
    reward points if useful
    regards,
    Anji

  • Where to find entry level sap jobs with a Terp10 Certification

    Hello I am a soon to be college graduate graduating this December.
    My question is with a Terp10 certification and no work experience what can I expect from the job market. Are there companies that hire college graduates with no SAP work experience? Are there any resources that help graduates find entry level SAP jobs.

    Hi ,
    Welcome to the World of SAP !
    As a fresher there are lot of options to start the career in SAP domain . As a fresher doing a certification *** training with out any prior experience , the opportunities for getting a job will be very less. SAP is a Enterprise business software which has the Technical ( ABAP,BASIS .......) Functional (SD,PP,MM,FI,...) Techno Functional modules . Choose a very option to get started . Getting a right career is not a tough job for you , search in web , read about sap , lot of online information ,forums available . choosing a career is a brainstorming work , my suggestion drop the idea of doing certification , as you are a fresher and very difficult to get a job without any experience . Please check the links to get start . good luck
    SAPEDU Twitter account http://twitter.com/sapedu
    SAP Education Facebook page http://www.facebook.com/SAPEducation
    Education@SAP LinkedIn group http://www.linkedin.com/groups?gid=1856570
    Want to switch to SAP consultancy The specified item was not found.
    Career Switch in the SAP World The specified item was not found.
    What would I do if I were a SAP newbie? Must read career advice for all beginners - check out this blog
    HELP@ SAP : http://help.sap.com/
    Online Knowledge Products : https://websmp202.sap-ag.de/okp
    Knowledge burst - Business Rule Frame work BRF  : http://www.sdn.sap.com/irj/bpx/education?rid=/media/uuid/50879cee-f9b5-2e10-039e-b2d6c4b10e6b
    Regards,
    S.Rajeshkumar

  • Help Required Regarding - SAP Job names using R3 data flows

    We are calling a set of SAP Jobs using R3 data flows in data services. When ever a job fails we first kill the active SAP jobs by logging into SAP and then restarting the Jobs.
    There are about 100 odd SAP jobs that we call using these Data services Jobs so we wanted to kill the jobs using a reusable code on the SAP side by passing the Job name just before every R3 flows just incase its still in active status.
    So wanted to know if there are any short cuts to retrive the set of associated SAP job names because it will be a tedious process to hardcode the SAP job names and pass them as parameters for all the 100 + SAP job names in the custom defined resuable code.
    Any help or advice on this please !!

    The program is not meeting the expectations
    and the problem is due to reflection.Do we know this for certain?
    ... my application gets the class name, field name
    etc. from an XML file so i don't know their method names
    beforehand .
    Now since every class instance corresponds to a row
    in the database and i have to call get and set
    methods of each class instance so the performance
    keeps on degrading as the number of columns and rows increase .
    Can somebody suggest some improvement regarding this
    and regarding creating multiple instances of the same object Class.forName() will be using a hash already, so there is probably not much room for improvement.
    Class.newInstance() probably does not take significantly more processing than a simple "new Fubar();".
    Umpteen reflective method invokations (one per column) for each row/instance - Are you saying these are the problem?
    You can test this easy enough.
    If you comment out the reflective method invocations and leave the rest of your code untouched,
    does your application processing speed up significantly?

  • Trigger a job using an event through a process chain

    Hi,
    After the success of 5metachain, I am using AND condition
    My requirement is as follows, it should trigger a job which needs to be after AND condition,
    I have created an event using sm64. Basically the client wants to trigger the job using the event through the process chain. I have tried test scenariou2019s using ABAP program (Process type) in the process chain but it is failing. Is there any other way to trigger a job using an event through a process chain? If ABAP program is the only option, can you please specify what all needs to be filled in the variant?
    Regards.
    Jerry

    Hi,
    Create a program like below,
    CALL FUNCTION 'BP_EVENT_RAISE'
      EXPORTING
        EVENTID = 'EVENT WHICH YOU HAVE CREATED'
    EXCEPTIONS
       BAD_EVENTID                  = 1
       EVENTID_DOES_NOT_EXIST       = 2
       EVENTID_MISSING              = 3
       RAISE_FAILED                 = 4
       OTHERS                       = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    search and include the program name which you have created above in the "ABAP program" process type which you are going to include in the process chain.
    Include the event which you have created in the start condition of the job.
    Note: No need of give any variant, because here we are calling only one function in this program.
    Regards,
    Sridevi.

  • Submit a SAP job and it is erroring out as "instance/client not found"

    I am trying to submit a SAP job and it is erroring out as "instance/client not found"
    as soon as I  enter the instance/client value and click on next  I am getting this error
    please help

    Hi,
    Then maybe there is a problem with another parameter, and the error is obscured by this error message.
    You did specify valid values for all other parameters ?
    Maybe you can try the following:
    - create a simple job in SAP, you do not have to execute it only save it
    - import this job using RSI_IMPORT_CCMS_JOBS and specify the exact job name
    - run the imported job (it will have the same name as in SAP) and see if this works
    - if this works, try your job again directly from CPS and compare your parameters with those on the imported job (especially which ones are filled or not filled, that sometimes is more important than the exact value chosen)
    Regards,
    Anton.

  • Reg: Long running SAP job SAP_XMB_PERF_AGGREGATE

    Hello,
    Above mentioned SAP job is running for days. I tried with changing parameters In integration engine administration SXMB_ADM for Category PERF there is a paramter DAYS_TO_KEEP_DATA.
    Created the Index too in Table SXMSPFAGG. But still the job is taking very long time.
    could any one faced same kind of issue and fixed with different solutions, pls
    FYI - My system -- SAP XI 3.1 SPS23.
    Thanks
    Vivekanandan

    Hi
    Check this link
    http://help.sap.com/saphelp_nw04/helpdata/en/8b/08b140cbe49d2ae10000000a155106/frameset.htm
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/58c5f542-0801-0010-228b-c27a7b3c2752?quicklink=index&overridelayout=true    (Check 48th page onwards).
    Regards
    Ramesh

  • Trigger sheduled job

    Hi all,
    I need to trigger or release sheduled job when particular file is present in folder.
    I mean for example..
    I have sheduled a job ZFCP0001A01...I want to trigger job if ZFCP.TXT file is present in particular folder. If file is not present, then dont trigger job.
    Does anyone has program which i can shedule everyday to trigger above job if file present.
    Many Thanks
    Shiva

    Hi shiva,
    It is possible.
    Just create one event for job that you are going to monitor..i.e file placing in a folder.
    then by using SM36/SM37 u can schedule your job ZFCP0001A01 based on Job Start condition after event in SM37.  you need to configure it.
    Pls check with your basis people to create that event.
    Reward points if my reply helps u
    ~Lakshmiraj~

  • How to trigger a Job on cancellation of another Job ?

    Hi Friends,
    I have a requirement stated as below.
    We need to trigger a Job (JobB) on cancellation of another Job (JobA). This needs to happen on a periodc basis.
    If JobA is success then we dont need to run JobB.
    Could you please let me know how to acive this.
    Regards,
    Ravi Kasnale

    Try this,
    goto SM36 & create a job say job name "Job_test"
    Define a Job Step,
    choose an ABAP program say Zjob_start
    before this step Write an ABAP program "Zjob_start" which can,
    check status of "JobA"
    Use FM's mentioned by other members in this post.
    Check the status of JobA
    If its cancelled start your new job.
    by some FM's  mentioned by other members in this post.
    The start conditions for Job_test should be "After Job"
    & mention JobA in the parameter unchecking the checkbox & finish.
    Try, this may work.

  • Sap job to delete OS level files

    Hello SAP Admins,
    I have a question: is there a sap job that can delete files from OS level, to prevent the file system to become full.
    Thank you
    Chris

    Hi Chris,
    As such there is no standard job to remove OS level files.
    You may write some abap program which contains execution of OS level commands.
    You may schedule this ABAP program based on your requirement to cleanup the files at OS level.
    We had done it for cleaning up interface files at one of our customers.
    Hope this helps.
    Regards,
    Deepak Kori

  • How to Add Steps to an SAP Job

    Hi Gurus,
    I want to add two new Abap steps in an SAP Job
    Ex:  ZSAPPEW1 : SAP Job
    I had 7 Abap steps in this job
    I want to edit this job and add two more steps after 5th Abap Program /Step
    May I know how to do this without creating a new job ?
    Regards
    Sandeep

    Go to SM37 >> Select Job name >> Change mode >> STEP >> Create step (Add other steps)
    OR
    Create a new job with all steps and remove the old one.
    Regards,
    Nick Loy

  • Progam name through sap job name ?

    Hi All,
    I am functional consultant. In my client system sap auto generate a file at night & saved this file on different non-sap server.
    Now we are facing error, data that we are sending from sap is not matching to recieving server(showing less qty in non-sap server).
    I have only sap job name. Can anybody tell me how to see the program name for the same or where I can see the data in sap that is transfering to non-sap.
    Point will be awarded on prompt reply.
    Thanks inadvance
    Regards
    San
    Edited by: Sanjay  Nair on Oct 10, 2008 1:34 PM

    Use to code SM37 , Give the job name and give username as * then execute . On the generated list choose the checkbox then click step you will get a a table like below....
    No. Program name/command Program ty. Spool list Parameters     User    Lang.
    1  XXXXXXXXXXXXXXXXXX     ABAP                 &0000000000009 USername EN
    Where XXXXXXXX is the program name.

  • Re:SAP Job sites i.e. walkins, applying online etc...

    Hi friends,
    pls send me SAP Job sites i.e. walkins, applying online etc...

    hi find this
    http://walkin.wordpress.com/2007/07/25/walkin-interview-proteans-bangalore/
    www.mywalkin.com
    http://www.chalowalkin.com/

  • How to schedule a job to trigger SAP IE send the message

    Hi XIer,
    Our scenario:
    I created a report to use ABAP client proxy to trigger a message in SAP R3. I can see this message has generated in SXMB_MONI in SAP IE(not in XI IE)&#65292;but the message status is <message released( commit successful )>, but not send, so I go to SMQ2 inbound queue, and execute the message which pending there waiting for trigger. Then the message successful send out.
    My question will be: I believe there will be some background job to do this job to trigger the messages lay in the inbound queue, but I don't know which report will do this job, is there any one can give some hits? thank you very much for your time. : )

    Hi -
    Have you registered the queues on the R/3 side?   In SAP R/3's SXMB_ADM-->Manage Queues, then select "Register Queues" and "Execute Action" button.
    Shouldn't need to schedule a job to trigger the send.
    Regards,
    Jin

Maybe you are looking for

  • Problem with Speaker and Headset in Windows Vista

    Hi, I just got my Macbook Pro 13" and having problem with speaker and headset when working with Windows Vista (I have installed the driver from bootcamp). The sound very weak if I play music from Itunes or youtube even the volume already full and if

  • IPhone 4s does not sync purchased items' play count?

    I recently bought a new album using my iPhone, and subsequently synced. Now, looking at my recently played, I can see items I've played over the last several days, but not this album. I really want this album to sync play counts as I really like havi

  • How to STOP OS X from automatically changing between language input methods

    I want to know if there is a way in OS X Leopard to stop the system from automatically changing the language input method. I use English and Japanese on my computer, but this would apply to anyone using more than one input method. For example, when I

  • Word 2000 with SolMan and EWA issues

    Hi, Having a number of issues. It seems since updating SolMan to SP24 EHP1 i cannot open EWA reports in Word 2000 (updating to latest version is out of the question due to business politics). I have tried a number recomendations from OSS notes but no

  • Cache-flush VM-related performance issue

    Dear forum, I've got a peculiar performance issue going on with the BDB pagecache being flushed to disk. I've managed to reproduce the issue perfectly on three out of three quite different systems that I've tried on, so it is at least quite well-defi