Trigger Process chains only once in a day

Hi All,
I have a requirement where a process chain triggers on arrival of some files.Now I want this chain to trigger only once in a day even if file arrives before the start of next day.How can i acheive this.
Reagrds,
Raj

Hi,
Please use below:
REPORT  ZCHECKPCNEW.
TABLES : RSPCLOGCHAIN.
DATA : IT_TAB TYPE TABLE OF RSPCLOGCHAIN,
       WA_TAB TYPE RSPCLOGCHAIN.
FIELD-SYMBOLS <FS> LIKE LINE OF IT_TAB.
PARAMETERS :LV_CHAIN TYPE RSPCLOGCHAIN-CHAIN_ID.
SELECT * FROM RSPCLOGCHAIN INTO TABLE IT_TAB
WHERE CHAIN_ID  = LV_CHAIN
AND DATUM = SY-DATUM.
SORT IT_TAB DESCENDING BY DATUM ZEIT.
READ TABLE IT_TAB INDEX 1 ASSIGNING <FS>.
IF SY-SUBRC = 0.
  IF <FS>-ZEIT < SY-UZEIT.
  MESSAGE E000(SABAPDOCU) WITH 'Error'.
  ELSE.
  MESSAGE I162(00) WITH 'Successful'.
  ENDIF.
ELSE.
MESSAGE I162(00) WITH 'Successful'.
ENDIF.
-Vikram

Similar Messages

  • PI Interface Posting Files - Trigger Process Chain Issue

    Dear Reader,
    Situation -
    We get multiple flat files from source system via PI interface. To process this in BW 7.0 side we have created the web service interface. In the function module we have written a code to trigger process chain, once a data is posted.
    Issue -
    As there are multiple files being posted, the PC runs on completion of the every single post, which is not desired. We need to run the process chain only once at the end of all the files being posted.
    Notes -
    1. Number of files keep varying.
    2. Clubbing all the files in a single file and then posting it would cause performance issues.
    Request your help in find a way like -
    1. A file being posted of name, say 'START PC', which can be trapped in the funciton module and controll the PC call.
    2. <any Other idea>
    regards,
    vinay gupta

    Hi Dhanya,
    This is the code i have in the ABAP program in the process chain. I just included the API_SEMBPS_POST part, but still it doesn't work. Please give me your email address so that i can send some screenshots.
    REPORT  ZHTEST.
    DATA: l_subrc TYPE sy-subrc.
    DATA: ls_return TYPE bapiret2.
    CALL FUNCTION 'API_SEMBPS_POST'
    IMPORTING
       E_SUBRC         = l_subrc
       ES_RETURN       = ls_return.
    CALL FUNCTION 'RSAPO_CLOSE_TRANS_REQUEST'
      EXPORTING
        I_INFOCUBE               = 'ZMAP_TAB'
    EXCEPTIONS
      ILLEGAL_INPUT            = 1
      REQUEST_NOT_CLOSED       = 2
      INHERITED_ERROR          = 3
      OTHERS                   = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • How to Trigger process chains??

    hi all
    How to Trigger process chains??
    Can anybody step by steps??
    thanks
    Senthil

    The background control options are available to directly schedule the start process. You can start the start process immediately , that is when activating the process chain, for a specified time, or after a particular event. When you activate the process chain, the start process is scheduled in the background as defined in your selections.
    You can also trigger the start of a process chain via a meta chain. A meta chain is when a process chain, to which you set this start condition, is fixed to another process chain. The process chain is started directly by this meta chain.
    When you start the start process via a meta chain, it is not scheduled after you activated the related process chain. The process is only started when the meta chain, to which it is linked, is running.
    The remaining chain processes, that is the application processes and the collection processes, are scheduled to wait for an event.
    The start process has the following special features:
    Only the start process can be scheduled without a predecessor process.
    The start process can not be a successor to another process.
    Only one start process is allowed for each process chain.
    One start process can only be used in an individual process chain

  • FI, GL datasources support delta only once in a day

    Hi All,
    Please tell me in BW these FI,GL datasources like...(0FI_GL_4, 0FI_AP_4, 0FI_AR_4)supports delta only once in a day??/  ...
    Please tell me why delta load possible one time only  in a day??/.
    Regards,
    Venkatesh.

    Hi ,
    For general -Ledger data source,  the delta process uses a lower interval setting of one hour (this is the default setting).Ok so after every hour the delta come. In this way, the system always transfers all postings made between one hour before the last delta upload and the current time.
    Please folow the below link for more details :
    http://help.sap.com/saphelp_nw70/helpdata/EN/45/757140723d990ae10000000a155106/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/e8/747140723d990ae10000000a155106/frameset.htm
    Thanks,
    Deepak

  • Password self-service errors -  Password can be changed only once in a day

    Hi experts,
    We've been using password resets without issues for several months. Recently we upgraded from version 5.3 SP12 to SP14.
    I've read the CUP release note that explains that how password resets now validates against the ABAP system parameter for login/password_change_waittime.
    The errors we are experiencing happen even when the users' password is reset for the first time in a day.
    Error message:
    X Unable to reset password in the following system(s): ECDCLNT100. Password can be changed only once in a day
    Please advise if you have experienced this error, if there is a resolution, and/or if there is a way to disable the parameter check.
    FYI - We are only using password resets in our non-production systems and are not concerned with multiple daily password resets.
    Thanks.

    Hello
    Are you using PSS with a CUA system?
    Then you can try to upgrade the CUA to virsanh sp16.
    or maybe this note: 1552707
    KSM

  • Only Once in A day

    Can anbody help me to write the code for following task
    i have to create a program Zabc which can be run only once in a day
    if you run Zabc second time you should get message that you can run this program only once in a day
    very urgent

    hi
    good
    if you are running the program manually than it is not possible to fulfill your requirement, yes if you r scheduling the job once in a day than it will run once in a day but if someone run the same report manually than you cant do anything, or if anybody from different id try to schedule the job second time in a same day than you might dispaly a error message, for that you can refer the table TBTCS which will help you to give the details of the user who has again schedule the job int he same day and by giving a condition you can display a message for the user other than your username.
    thanks
    mrutyun^

  • Trigger process chains from UNIX

    Hi,
    I just wanted to know how can we trigger Process chains from UNIX Server.
    Any pointers will be appreciated.
    Thanks

    I suggest to use the sapevt.exe.
    With it you can trigger an event in the SAP system with the execution of a simple command file (.bat for ex.)
    So the event will start the chain as you require.
    You can find more info for sapevt in:
    http://help.sap.com/saphelp_nw04/helpdata/en/fa/096e6b543b11d1898e0000e8322d00/frameset.htm
    Regards,
    Sregio
    Did you try that?
    Message was edited by: Sergio Locatelli

  • Process chain in BW for specific day starting programm in ERP

    Hi guys,
    I have created a process chain in BW which works fine.
    Now I have to think about to include a step in this process chain which starts for one specific day one program in ERP.
    When this program in ERP is finished with updating data the process chain should continue and then the ERP data should be uploaded in BW.
    For example. Every 10th of a month a program in ERP should be started for the last day of the month before (for example 31.1.11). The program runs about 7 hours. When the program is finished the process chain shoul continue.
    Is that possible to handle with process chains?
    Thank you in advance!

    Hi,
    1. Make your existing chain as local chain.
    2. Create a process chain PC1 with a start variant and add above local chain.
    3. Schedule PC1 every day and restrict it not to run on 10th day of every month.
    4. Create a program or function module in ECC to execute your logic.(last day of last month as range).
    5. create a event in ECC.
    6. create a back ground job with step1 as program and step2 as event created in step 5.
    7. Create process chain PC2 in BI with start variant with event created in step 5.
    8. schedule the back ground job created in step 6 in ecc to run on evry 10th day of the month.
    If you do not want 2 pcs you can create only one PC based on variant from ECC. Add lIF condition in your ECC program
    to check if it is 10th of the month or not. If it 10th day execute your logic else complete the program with out executing any logic.
    so that back ground job will trigger step 2 (which is event) which will inturn trigger BI load.
    Thanks,
    Kalyan.
    Edited by: Kalyan.Undavally on Feb 8, 2011 6:30 PM

  • ABAP code to trigger Process Chain (Weekdays)

    Dear experts,
    I have a process chain which is triggered after an event in BW which is executed after a job in R3 is finished. This job in R3 is executed all days after another event.
    I would like this process chain to be executed only from Monday to Friday. What ABAP code should I write in the function module which triggers the BW event in order to execute it only the days I really need to?
    Thanks in advance for your help!
    Best regards,
    Cecilia

    Hello Surendra,
    Thakns as well for your help, but my problem is that I don't know any ABAP. With help of SDN posts I've been able to create the program in R3 which calls a FM in BW. My issue now is that I need the exact code which triggers my function module only from Moday to Friday......
    The FM I have created in BW which triggers the event is the following (here I suppose I will need a code which says something like, if today is Monday to Friday trigger the event, if not, do not do anything):
    FUNCTION Z_BW_EVENT_RAISE_PEDIDOS.
    ""Interfase local
    *"  IMPORTING
    *"     VALUE(EVENTID) LIKE  TBTCO-EVENTID
    *"  EXPORTING
    *"     VALUE(RESULT) TYPE  CHAR2
    *"  EXCEPTIONS
    *"      BAD_EVENTID
    *"      EVENTID_DOES_NOT_EXIST
    *"      EVENTID_MISSING
    *"      RAISE_FAILED
    *"      OTHERS
    *data: eventid LIKE TBTCO-EVENTID.
    *data: RESULT    type CHAR2.
    call function 'BP_EVENT_RAISE'
    EXPORTING
    eventid = eventid
    EXCEPTIONS
    bad_eventid = 1
    eventid_does_not_exist = 2
    eventid_missing = 3
    raise_failed = 4
    others = 5.
    if sy-subrc eq 0.
    result = 'OK'.
    endif.
    ENDFUNCTION.
    *& Title: Raise Event for BW                                           *
    Best regards,
    Cecilia

  • Scheduling process chain 3 specific times a day

    Hi ,
    my requirement is to schedule a process chain 3 times a day.
    i have gone through the forum and got the solution EVENTS.
    please provide me how to do this in detail like step by step.
    how to create a event in SM64 and how we will define the time there.
    and creating a ZPROGRAM with the function module (please provide step bystep).
    thanks
    Sridhar

    You create user events in SM62.  In SM62, next to "User even names", click on <b>Maintain</b> and press Enter.  Click on the Create icon to create a new event (let's call it ZEVENT).
    Next, in your process chain, change the Start variant to be scheduled "After event", and put in ZEVENT for the event name.  Also, click on the "Periodic job" at the bottom.  This will automatically reschedule the jobs for the process chain after it executes.
    Next, create an ABAP program (let's call it Z_EVENT_RAISE) to call the function module BP_EVENT_RAISE.  You're code can look like this:
    REPORT Z_EVENT_RAISE.
    PARAMETERS: P_EVENT LIKE TBTCO-EVENTID.
    CALL FUNCTION 'BP_EVENT_RAISE'
    EXPORTING
    EVENTID = P_EVENT.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    This ABAP program will prompt for an event name, so you will need to create a variant (let's call it ZEVENT) which will save the value of the event name (also ZEVENT).  You will need the variant name to be able to trigger the event in a batch job.
    Now all you need is the batch job.  Use tcode SM36 to create a batch job where you call the ABAP program (Z_EVENT_RAISE) using the variant (ZEVENT).
    Note, SM64 only triggers an event manually.
    Does this help?
    Oh, and you can copy this job to schedule it three times a day.
    Message was edited by:
            Geo

  • Process chain 3 times schedule a day

    Hi Experts,
    In my requirement is to schedule the process chain 3 times a day but different times like 5am, 12pm, and 4pm.
    Could you please anyone reply to step by step procedure.
    Advance thanks
    Regards,
    Sathis

    Hi,
    1)You can make the process chain to be trigered by an event.
    You create user events in SM62. In SM62, next to "User even names", click on Maintain and press Enter. Click on the Create icon to create a new event (let's call it ZEVENT).
    Next, in your process chain, change the Start variant to be scheduled "After event", and put in ZEVENT for the event name. Also, click on the "Periodic job" at the bottom. This will automatically reschedule the jobs for the process chain after it executes.
    Next, create an ABAP program (let's call it Z_EVENT_RAISE) to call the function module BP_EVENT_RAISE. You're code can look like this:
    codeREPORT Z_EVENT_RAISE.
    PARAMETERS: P_EVENT LIKE TBTCO-EVENTID.
    CALL FUNCTION 'BP_EVENT_RAISE'
    EXPORTING
    EVENTID = P_EVENT.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.[/code]
    This ABAP program will prompt for an event name, so you will need to create a variant (let's call it ZEVENT) which will save the value of the event name (also ZEVENT). You will need the variant name to be able to trigger the event in a batch job.
    Now all you need is the batch job. Use tcode SM36 to create a batch job where you call the ABAP program (Z_EVENT_RAISE) using the variant (ZEVENT).
    Note, SM64 only triggers an event manually.
    and you can copy this job to schedule it three times a day.
    2)In the Start process of your process chain, select Direct Scheduling and then click the Change Selections icon. This will bring you to the Start Time window where you can put in the Date/Time you want to start your process chain. At the bottom of this window, click on the Periodic job box and you will notice another icon way at the bottom called Period Values. Click this to determine what frequency the job should be rescheduled (ie. daily, weekly, etc.).
    3)you can do this by right-clicking on the start process, selection "Maintain Variant", choose "Direct Scheduling". Next select "Change Selections", pick your date and time, set your period values and you're done.
    Hope this helps.
    Regards
    CSM Reddy

  • Trigger process chain using event

    Hi all,
    I’d like to know if someone ever faced this kind of situation.
    I have a process in R/3 and it must run every day, and when it’s finished I have to start a process chain in BW.
    I thought to do this using events. So, I created a Job that executes this process and added a step( an ABAP program ) that generates an event in a target system, BW.
    The program is this one:
    PARAMETERS:
        p_eventi   TYPE btceventid,
        p_eventp   TYPE btcevtparm,
        p_server   TYPE btcserver.
    Obligatory parameter: EventID.
    EventID should be an existing event already defined in transaction
    SM64 or using CREATE method of class CL_BATCH_EVENT:
    p_eventi   = 'SAP_TEST'.
    Optional parameters: event parameter and target server.
    p_eventp = 'Event parameter'.
    p_server    = ''.
      CALL METHOD cl_batch_event=>raise
        EXPORTING
          i_eventparm                    = p_eventp
          i_server                       = p_server
          i_eventid                      = p_eventi
        EXCEPTIONS
          excpt_raise_failed             = 1
          excpt_server_accepts_no_events = 2
          excpt_raise_forbidden          = 3
          excpt_unknown_event            = 4
          excpt_no_authority             = 5
          OTHERS                         = 6.
      CASE sy-subrc.
        WHEN 0.
          EXIT.
        WHEN 1 OR 2 OR 3.
    Raise failed.
        WHEN 4.
    Event does not exist.
        WHEN OTHERS.
    Raised failed due to unknown reason.
      ENDCASE.
    The execution of the job appears to be OK, but I checked the log at SM62 and couldn’t find any entrie, and the process chain didn’t start too.
    I created the event at BW and R/3 side,  informed the variant with event / server in R/3, etc.
    I’m missing some step??
    Best Regards,
    Tomas

    This is what this note does.  From R/3, it will trigger an event in BW.
    You can also read this post:
    Triggering a Process Chain From R/3 pgm
    Hope this helps.

  • Trigger process chain

    Hi, all
    A process chain which is scheduled periodly since the year 2005 stopped these days.
    I activate it and schedule it manually , after click the "active and schedule ",it asked
    me to shoose the server ,there is just one application server in our BW3.5 system ,
    so I chose it. but after that ,an error happened "the target is invalid" .when I check
    the job details ,I can see there is no target server parameter for it.
    Then what is the key reason ?

    Hello,
    Select the process chain. In the menu options at the top click on Process Chain -> Attributes -> Background Server.
    Once you do that the initial server will be set as default.
    Hope it helps.
    Regds,
    Shashank

  • Trigger Process Chain through the Web

    Hi,
    I am trying to allow the users to control when they trigger a process chain through the web.
    The users have a number of integrated planning sheets, which they access and input, once they are happy with the inputs, then they want to trigger the process chain to carry out additional loads.
    I am using function module RSPC_CHAIN_ACTIVATE_REMOTE to trigger the process chain, when I test this with the chain set to direct scheduling it works fine.
    I have set a planning function to call RSPC_CHAIN_ACTIVATE_REMOTE, with the process chain in question.  Now when I run it with the chain set to direct scheduling it repeatedly calls the process chain over and over again, like it is in an endless loop.
    When I try setting the chain to Meta Chain or API nothing happens.
    Does anyone have any ideas why I can't get this to work through the web?
    Thanks
    D

    CALL FUNCTION 'RSPC_API_CHAIN_START'
        EXPORTING
          i_chain       = 'YOUR PROCESS CHAIN NAME'
        EXCEPTIONS
          error_message = 1.
       IF sy-subrc <> 0.
          CALL FUNCTION 'BALW_BAPIRETURN_GET1'
           EXPORTING
            type             = sy-msgty
            cl               = sy-msgid
            number           = sy-msgno
            par1             = sy-msgv1
            par2             = sy-msgv2
            par3             = sy-msgv3
            par4             = sy-msgv4
           IMPORTING
            bapireturn       = p_return.
          RAISE STREAM_FAIL.
       ELSE.
         RAISE STREAM_SUCCES.
         RETURN.
       ENDIF.

  • Trigger Process Chain Via R/3

    Hi All
    I need to trigger a process chain in BW using a RFC program or FM from R/3, as we have a situation where once R/3 jobs are completed the RFC program should trigger the start variant of the process chain.
    Please provide a sample code if you have.
    Any kind of ideas are appreciated.
    Thanks
    Chris

    Hi Chris,
    check out this link
    Triggering a Process Chain From R/3 pgm and
    Triggering Process chain from r/3
    Hope this helps
    Janardhan KUmar
    Message was edited by: Janardhan
            Janardhan Karmala

Maybe you are looking for

  • Remote networking mac desktop to mac laptops

    Hi We are a small business trying to setup a network between our office Mac desktop and our two mac laptops. All are using OSX 10.8.2. We thought that there should be a way to remotely log into the mac desktop in the office, when we are working away

  • TS3212 Why can I not download the new Itunes because im on 10.5.8?

    I have just purchased the new iphone 5 when i have gone to plug into my itunes to transfer previous details on my macbook pro its says download the new itunes when i go to do that it says My mac needs to be OS 10.6 my mac is 10.5.8? How do i do this?

  • Can receive, can't send email

    I apologize, I know there are other thread's about this problem, which I have read and tried to use the advice given. No such luck. As my topic describes I have no trouble receiving emails, but every time I send it says "The connection to the server

  • Problem saving Reader extended PDF with Javascript functions built in

    Afternoon I have created an interactive PDF in Livecycle with built in Javascript functionality.  I need users to be able to complete and save the PDF so have saved it as a Reader extended PDF.  The problem I'm having is that when a user completes th

  • Configuration Status of an order

    Hi All,   Does anybody have an idea where does configuration status of an order gets stored(Table) ??