Process Chain timing

Hi Guys,
Can any one help me to schedule process chain to repeat at different time intervals in a day(At 12:00 and 17:05) every day.
Thanks

Hi,
In RSPC, select Date/Time and set Periodic jobs. Else you write small program in BW and raise event at At 12:00 and 17:05, i.e. schedule this program  At 12:00 and 17:05 then automatically the Process chain will trigger.
Note:  Create Event in SM62 and then use it in PC.
REPORT  ZFM_EVT.
DATA: EVENTID LIKE TBTCJOB-EVENTID.
DATA: EVENTPARM LIKE TBTCJOB-EVENTPARM.
EVENTID = 'Z_TLB_ATTA'.
EVENTPARM = 'Z_TLB_ATTA'.
CALL FUNCTION 'RSSM_EVENT_RAISE'
  EXPORTING
    I_EVENTID                    = EVENTID
    I_EVENTPARM                  = EVENTPARM
* 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.
Thanks
Reddy

Similar Messages

  • Process  Chain  schedule time difference

    Hi Gurus,
    I schedule an process chain, Timing which I set is 23:55:00, But it is start running daily at 23:00:48.
    Before 1 hour, Why it is happening, could someone suggest.
    Thanks in advance
    Regards
    Devesh

    Dear Devesh,
    Sorry for the delay .... I want to know that have u checked all the scheduled jobs with "Start Process --> Right click ---->Display " .
    U can do one more thing ... delete the all scheduled job related to that particulate PC & ensure that no next job is available with click on the next start button (tcode -rspc) & then again reschedule it as immediate if it starts immediately then I believe there is no DST problem ...do it for all the 3 process chains & see the results.
    Also please tell me there is any others jobs which are starting on the right time.
    Regards,
    Pooja

  • Triggering of Process Chain in BW from R/3 system

    Hi,
    We have a special requirement where in the R/3 system (Project systems), the business user creates and saves a project.
    Currently we have a process chain for this master data which loads every 10 min on a daily basis, but many times it happens that the new chain starts before the first one gets finished, thereby creating a lock with the loads.
    To counter this we are trying to use a functional module at R/3 which gets triggered whenever the business user creates and saves the project in R/3. Though this program worked for us, but a new issue came. If the user creates 2 projects and saves it two times in a span of just 2 or 3 min, then once again the collision of chain occurs.
    Our purpose is that, once the old chain finishes, then only the new chain should get triggered. To achieve that we tried to find some options and found a table called RSPCPROCESSLOG which is present both in BW system and R/3 system. This table consists of the start and end time of a chain. So based on these fields of the table we can achieve the above. But this table is not configured to capture the logs in R/3 system.
    Please do let me know how to configure the RSPCPROCESSLOG table in R/3 system to capture the chains timing of BW. Otherwise suggest a way to achieve this task.
    Regards
    Vishwanath

    in rough :
    create table in r/3 (eg z_chain_status) : via se11. insert two fields : - Process_chain char 60
                                                                        - Active : char 1
    R/3 create FM : via se37 (eg Z_update_chain_status)
    import parameter = status
    process chain can be hardcoded or also defined as varaible, as you wish...
    select status from z_chain_status.
    status = import parameter
    modify z_chain status
    BW : create program : via se38 z_update_status_in_r3
    parameter = status
    call function z_update_chain_status destination R/3 system status
    create two variants of program :
    varaint z_active : with parameter status = 'X'
    varaint z_inactive : with parameter status = ' '
    process chain
    step 1 = start
    step 2 = abap process type
             progam : z_update_status_in_r3
             variant z_active
    step 3 - n : your loads
    step n + 1 : abap process type
             progam : z_update_status_in_r3
             variant z_inactive
    R/3 user-exit  or business addin : slect from table z_chain_status;
    if active = 'X'. exit. else trigger BW pc (I suppose as it works do today)
    M.

  • How do you run a Process Chain using parrallel processing group

    Does anyone know the answer to the above question please?
    The problem i am getting is that currently the Process chain is running on the client server and is timing out!
    is there a config setting or some other setting that is needed to stop it from timing out?

    Hi Jas Matharu,
    Hope the following links will give u a clear idea about process chains and clear ur doubts.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/sap-teched-03/using%20process%20chains%20in%20sap%20business%20information%20warehouse
    Business Intelligence Old Forum (Read Only Archive)
    http://help.sap.com/saphelp_nw2004s/helpdata/en/8f/c08b3baaa59649e10000000a11402f/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/8da0cd90-0201-0010-2d9a-abab69f10045
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/19683495-0501-0010-4381-b31db6ece1e9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/36693695-0501-0010-698a-a015c6aac9e1
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9936e790-0201-0010-f185-89d0377639db
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/263de690-0201-0010-bc9f-b65b3e7ba11c
    /people/siegfried.szameitat/blog/2006/02/26/restarting-processchains
    Siggi's weblogs for data load error and how to restart process chain
    /people/siegfried.szameitat/blog/2005/07/28/data-load-errors--basic-checks
    /people/siegfried.szameitat/blog/2006/02/26/restarting-processchains
    ****Assign Points If Helpful****
    Regards,
    Ravikanth.

  • Infopackage red in process chain but green in monitor

    With our system (BW30B, patch14, W2K, Oracle 9.2.0.5) we are having some issues with some infopackages which are included in a process chain.
    In the process chain, the status is red with the following error messages: "Processing in Warehouse timed out; processing steps mising", "<DS:DE.RSCALLER>Caller  is still missing." but the data was loaded properly --> if I open the monitor status for that infopackage, the status is green (and I confirm that data was properly loaded).
    But, this is a problem as it screws up the process chain. I did not find a fix after seaching OSS notes, but the note #766712 seems close to our issue - I tried to apply it but it did not work. In the note, it's recommended to turn on a higher enqueue time --> could you please help me on how to do it? I checked everywhere and did not find the menu option to do it.
    Any help appreciated
    Thanks
    Ioan

    Thanks Roberto
    I do not think it is related to this setting (it's now set to 30000, which is 3H) - the data properly ended loading before.
    When I change the status manually in the monitor, it is reflected in the process chain - but this happens every night, so I have to turn them green manualy every morning ...
    The note is 766721 (and not 766712)
    Thanks in advance for any help
    Ioan

  • Messages to my mail in process chains

    Hi -
    Can you help me in this reagard.
    I would like to create messages in my process chain.
    Saying that if the infopackage Load in PC fails ..
    A message with "Load failed" has to come to my mail box...
    This i tried on my PC -> select load infopack right click select messages...went to a screen with document and receipiants
    created some document and saved created some receipiants and saved...
    but when the load fails the message is not coming to my mail box.
    So wat i have to do futhur...
    Can any could suggest me...
    This is Urgent..
    Plz .
    Thanks and regards,
    Vishwa.

    Actually I would say the approach you have chosen is wrong. What I mean is that it is better to have successfully completed chains message you for successfull completion, than waiting message for a failed one.
    The reason is simple: If your process chain did not start or if a process has "stuck" and has not timed out then you will not get a failed message back. On the other hand if you use the approach im suggesting, you will note that a successfull completion message is missing and that something went wrong.
    Apart from that in the "send message" properties have you selected in the "recipient type" the sap logon name option? How do you check your inbox after that? Via the SO01 transaction?
    Assign points if usefull
    Regards
    Giorgos

  • How to identify what are all the errors appears in process chain,

    Hi all,
    i have a process chain running, but i want to find out what are all the errors that the process chain has thrown
    thanks
    pooja

    Hi Pooja,
    Errors in monitoring:
    SID error
    Reason: If the corresponding master data is missing for the particular transaction data.
             1. Check for the load timing for the respective master data, if it less than an hour  then make the request red and repeat the ip.
             2. If the data is loaded to PSA then you have to delete the request from target and manually push the data to from PSA.
             3. If we are required for selective update then note down the info source from header and find it in RSA1,select the one with ‘Single as postfix’.
             4. Goto ‘data selection’ tab and change the range.
    Tip: change the last 4 digits for from to ‘0000’and the last 4 digit for to     ‘9999’.
            5. Repeat the ip.
             6. In case only of failure in one target goto RSA1 find the PSA, put he request no. and reschedule it.
    Note: IF PSA is present never make the request red rather delete it.
    Replication error
    Reason: Data source replication Failed.
             1. In order to handle this error you should be known to IP, info source and source system.
             2. Goto RSA1, find the data source in the source sys tab.
             3. Right click on the data source and replicate it.
             4. Since all the transformation rules pertaining to this data source need to be reactivated so go to SE38 and execute rs_transtru_activat_all, data source and sys name.
             5. Delete the ‘red’ request from the target.
    Update R not supported
    Reason: The corresponding initialization flag for the ip is lost.
             1. Goto header click on the ip and goto schedule tab and click initialize in the source system, whatever screen appears delete the only request present(the initialization flag).
             2. Goto RSA1, find the ip in the info source (one with the Adhoc initialize flag).
             3. Goto update tab and select ‘Initialize delta process’ try going for ‘with data transfer’.
             4. Reschedule the IP.
    Duplicate Record Error
    Reason: Duplicate error records for the loaded master data.
             1. Goto info package via header or via RSA1.
             2. Goto ‘processing tab’ and change the ip setting, selecting only PSA and ignore duplicate records and re run the ip.
             3. Do remember to change the ip settings back to the original once after the second step.
    ODS activation failure
    Reason: Prerequisites for ODs activation not satisfied i.e. unique key.
             1. Goto ‘maintain variant’.
             2. Check for the ‘QM’ status of the requests in the target they should be green.
             3. Then click the ODS activation tab.
             4. In the screen which appears put the requests for which ODS activation failed.
             5. Activate these and keep on refreshing them until status reverts from green,
    Remember to refresh these requests one at a time.
             6. If requests are red then delete them from target.
             7. Reschedule the IP.
    Note: Never Try activating ODS manually if it is Y1.
    Aggregate Rollup error
    Reason: No aggregate found for the respective rollup.
             1. Click on the variant in which the error occurred.
             2. Goto chain tab and copy the variant and instance.
             3. Run the nestle provided program YBW05.
             4. Put in info in there and put the status as g – ‘green’.
             5. Execute and refresh the status.
    Lock issue
    Reason: The same ip is been locked by other user or may be used by other process chain.
             1. We can see the locked entries and in the transaction SM12.
             2. Wait for the other process to get complete once the ip loads to target in that process then there is no need for running it for the process.
             3. In other case make the request red, when PSA is present then goto environment tab ->schedule->initiate update.
             4. In the box appears select update in the background.
             5. And the manually update the failed IP’s by selecting manual update in the context menu.
    Alfa confirming value error, Time conversion error, Chain didn’t start, Delay due to long running job, Poor system performance,Heirarchy node exist in duplicate.
    Reasons:
      Alfa confirming error: Data format mismatch.
      Time conversion error: Date, time format mismatch.
      Chain didn’t start: A scheduled chain didn’t triggered at the prescribed timing.
    -For all the above error we have to raise a ticket.
    Idoc or TRFC error
    Reason: An Idoc is been stuck somewhere.
             1. Reload the Master Data manually again from Info-package at RSA1.
             2. Release the Idoc.
             3. In the source system level got environment->transaction->Transaction RFC or Data ware housing level.
             4. In the Screen if the status is ‘Transaction Recorded’ it means its stuck goto edit and click Execute LUW or press F6.
             5. If status is ‘Transaction executing’ then it means its fine wait.
             6. Or raise ticket.
    Error Due to short Dump
    Reason: Error due to Short dump could be due to many reasons i.e. memory, table space, lock, error record, page allocation, failed change run.
    Process terminated in the Source system.
               Reason: Sometimes we face that a load has failed due to job Termination at Source System.             
          This happens due to unavailability of the source system or some connectivity problem between source and target systems.
    1.      Make the request red.
    2.      Delete the request from the data target.
    3.      Reschedule the ip.
    4.      If still the job fails raise the ticket.
    And also check in following links:
    Process Chain Errors
    /people/mona.kapur/blog/2008/01/14/process-chain-errors
    Common Process chain errors
    For Data Load Errors check this blog:
    /people/siegfried.szameitat/blog/2005/07/28/data-load-errors--basic-checks
    Pls assign points if it helps u,
    Thanks & Regards,
    Madhu

  • Best Practice Process Chains

    Hi All,
          What is the Best Practice Process chains recommended from SAP mainly for FICO related stuff.
           Do anyone have the structure of FI staging ,reporting layer Process chains step by step.
    Thanks in Advance
    Regards
    con
    Edited by: con on May 21, 2009 10:01 PM

    Hello con ,
    two thing to follow..
    1)have a Change run Step Once master data load completes for all the infoobjects which you have loaded.
    The Change Run activates the master data and adapts all aggregates for newly loaded master data and hierarchies.
    2)If you want to replace existing data in the DataTarget completely, first delete the data in DataTarget(also in PSA if present )and load afterwards. This will help to improve on timing parameters.
    Hope this helps you!!!
    - Nandita

  • ABAP Runtime error MESSAGE_TYPE_X in process chain

    in our daily load process chain  we have a level where datas are getting loaded in to a cube from 4 dso thru dtp. in this level the DTP fails approximately twice in a week. the DTP is shown in red in the log view. when  we check the message its showin MESSAGE_TYPE_X ABAP runtime error.
    if we give repeat it runs sucessfully and the following process are going well.
    do u ppl have any ideas abt this.

    Hi,
    This failure would happen for many reasons, like,
    Source system connection failure
    Short dump.
    System overload
    Non availability od work processes as a reasonthe load would have been timed out.
    Locked due to another load.
    That is the reason as to which the load when repeated is successful, as by then,
    The source connection would have been restored
    there would be free processes available
    The other load would have completed.
    Regards,
    Savitha

  • Problem in Process Chain Scheduling

    Hi BW Experts,
    We are running daily Process Chains in the Night Time.
    Due to Memory Problem in BW Production Server we stopped all Process Chains on 20/09/2007.
    Yesterday our memory problem solved. So I scheduled Process Chains Yesterday.
    We have Timings like:
    22:30 PM
    23:00 PM
    23:30 PM
    23:50 PM
    01:30 AM
    06:00 AM
    Yesterday we scheduled all Process Chains as per above timings.
    But when iam going to schedule the 01:30 AM Timing Process Chain on 11-10-2007 , but it is taking 12-10-2007.
    It is taking one extra day.
    Generally it has to run today 11-10-2007. But why it is happening.
    For 06:30 AM timing Process Chains also same problem.
    So we noticed that after 12:00AM, it is taking one extra day.
    Please give me the reply.
    Thanks & Regards,
    Anjali

    Hi Venkat,
    I scheduled it tomorrow at 01:30 AM , it is taking 13-10-2007.
    If I schedule any process chian after 12:00 AM, it is taking one day extra.
    This is happening since 5 months.
    ECC 6 has been upgraded successfully in May month.
    After ECC 6 Upgradation we are facing time delay problem.
    Before ECC 6 Upgradation we never faced this problem.
    Regards,
    Anjali

  • PROCESS CHAIN ENDED RED

    process chain Ending with error showing
    Lock NOT set for: Deleting Data Completely from an InfoProvider
    please help how to correct and what it means
    regards

    Hi,
    In your process chain, you must be having a process for dropping cube contents. What happens is that, before you go to carry out any kind of updates(here updates means, adding records, changing records, deleting records) on a table, a lock would be set on the table so that no other user/ program can carry out any changes on this table.
    This lock is set by using function module starting with ENQUEUE. Till this lock is active, no other program can carry out changes on this table. Then to release the lock on this table another function module DEQUEUE is used. Only after this function is finished, the table is released for changes by any other user/ program.
    As you have got this error, it means that some other program was performing some tasks on this DSO/ infocube (loading data to/ from this DSO/ infocube) when your process chain reached the step to drop cube contents. Check if any other activity was being carried out for this cube/ DSO at that time. In order to avoid this from happening in future, change the timing of one of these processes.

  • Process Chain Log Maintenance

    Hi All,
    In my project we maintain an load status excel sheet to document all the timings of process chain running in our window.
    We were maintaining only the start time of process chain (we get from RSPCM), now the requirement has changed and customer wants us to mention the end time of each process chain.
    Since we have good amount of process chain running it is becoming really hectic to take timings for each PC.
    Procedure we are following to take the end time is that through RSPCM we go to every PC and take the timing of last process in the PC.This takes lot of time.
    Please suggest from where we can exact log of start and end time of every PC.Are there any table from where we can see the start and end time???
    I am waiting for the valuable inputs......
    Regards,
    Kshitij

    try following ABAP...
    *& Report  ZBI_PROCESS_CHAIN_STATUS_EMAIL                              *
      Program uses parameters and selection options to analyze and/or    *
      email the status  of the BI process chains.                        *
    Selection-screen help:                                               *
    1) Process Chain (ID)                                                *
           Enter the name of process chain to analyze.                   *
           If you leave this field blank, all the process chains will    *
           be picked up.                                                 *
    2) Process Chain Date Selection                                      *
           Enter the Process Chain Date.                                 *
    3) Status of Process Chain                                           *
           Enter the Status of Process Chain to analyze.                 *
           If you leave this field blank, all the status will            *
           be picked up.                                                 *
    4) Send email?                                                       *
           Mark this checkbox, if you want to send email notification    *
    5) Email recipients                                                  *
           The list of people to be notified is entered here. At least   *
           one email address is required.                                *
    *Modification Information:                                             *
    Date      Mod User ID      CTS Number    Description                 *
    *05/01/08   Shalin Shah                    Original Coding Date        *
    REPORT   ZBI_PROCESS_CHAIN_STATUS_EMAIL
             NO STANDARD PAGE HEADING MESSAGE-ID 00
             LINE-SIZE 255
             LINE-COUNT 55.
    Variable Declaration for selection screen                            *
    DATA:
      gs_RSPCLOGCHAIN   TYPE rspclogchain,             "PC ID
      gs_RECEIVER       TYPE SOMLRECI1-RECEIVER,       "Email ID
      gs_BATCHDATE      TYPE RSPCPROCESSLOG-BATCHDATE, "Date
      gs_RSPC_STATE     TYPE RSPC_STATE.               "PC state
    Selection-Screen                                                     *
    SELECTION-SCREEN BEGIN OF BLOCK om1 WITH FRAME.
    SELECT-OPTIONS p_CHAIN  for gs_RSPCLOGCHAIN-CHAIN_ID default 'ZBWC_MAIN' NO INTERVALS. "Process chind ID
    SELECT-OPTIONS p_datum  for gs_BATCHDATE default  sy-datum. "Process chain date
    SELECT-OPTIONS p_Status for gs_RSPC_STATE NO INTERVALS. "Process Chain status
    SELECTION-SCREEN END OF BLOCK om1.
    SELECTION-SCREEN BEGIN OF BLOCK om2 WITH FRAME.
    PARAMETERS: p_Email AS CHECKBOX.       "Send email?
    SELECT-OPTIONS: s_mail FOR gs_RECEIVER lower case NO INTERVALS. "Email address
    SELECTION-SCREEN END OF BLOCK om2.
    AT SELECTION-SCREEN.
      If Send email is checked, makes sure at least one email address is entered.
      if p_Email = 'X'.
        READ TABLE s_mail INDEX 1.
        if sy-subrc <> 0.
          MESSAGE e001 WITH 'Please enter at least one email address'.
        ENDIF.
      ENDIF.
      loop at s_mail.
        if not s_mail-high is initial.
          MESSAGE e001 WITH s_mail-high 'is not valid. Please enter with no intervals'.
        endif.
      endloop.
    START-OF-SELECTION.
    END-OF-SELECTION.
    Variable Declaration                                                 *
    for composing email object
      DATA: OBJCONT LIKE SOLI OCCURS 10 WITH HEADER LINE. "Email object
      DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE. "Email address
      DATA: DOC_CHNG LIKE SODOCCHGI1.   "Data of an object which can be changed for email
      DATA: ENTRIES LIKE SY-TABIX.      "Count
      DATA: NAME(15).                   "Sapce for email name
      DATA: temp_message(120) type c.   "temp message space
      DATA: psubject(72) type c.        "Email subject
      DATA: temp_time(27) type c.       "temp space to PC start and end time
      DATA: pc_end_time(8) type c.      "PC end time
      DATA: pc_start_time(8) type c.    "PC start time
      DATA: pc_run_date(10) type c.     "PC run date
      DATA: pc_duration(8) type c.      "PC duration time
      DATA: pc_temp_end_time type TIMS. "temp space for pc end time
      DATA: pc_temp_end_date type DATS. "temp space for pc end date
      DATA: pc_temp_duration type TIMS. "temp space for pc duration
      DATA: pc_status(72) type c.       "PC status
    for report format
      DATA: iColor TYPE i VALUE 0,
            iCount TYPE i VALUE 1.
    for saving log of the process chain.
      DATA: I_RSPCLOGCHAIN LIKE RSPCLOGCHAIN OCCURS 0,
            WA_RSPCLOGCHAIN LIKE LINE OF I_RSPCLOGCHAIN,
            I_RSPCPROCESSLOG LIKE RSPCPROCESSLOG OCCURS 0,
            WA_RSPCPROCESSLOG LIKE LINE OF I_RSPCPROCESSLOG.
    Report Logic                                                         *
    Create email subject for report header
      CONCATENATE SY-SYSID ' - BI load status ->' SY-DATUM4(2) '/' SY-DATUM6(2) '/' SY-DATUM0(4)    ' @ ' SY-UZEIT0(2) ':' SY-UZEIT2(2) ':' SY-UZEIT4(2) INTO psubject.
    report header
    FORMAT INTENSIFIED COLOR = 1.
      write / .
      write / '*****************************************************************************************************************************************'.
      Write: / '*                                                 ', psubject, '            *' .
      write / '*****************************************************************************************************************************************'.
      write / .
    *Fill the header
      OBJCONT-LINE = '****************************************************************************************************************'.
      APPEND OBJCONT.
      OBJCONT-LINE =  psubject.
      APPEND OBJCONT.
      OBJCONT-LINE = '****************************************************************************************************************'.
      APPEND OBJCONT.
    Get the log id of the process chain.
      SELECT *
        FROM RSPCLOGCHAIN
        INTO TABLE I_RSPCLOGCHAIN
        WHERE DATUM in p_datum
        AND CHAIN_ID in p_CHAIN
        AND ANALYZED_STATUS in p_Status.
    Loop at all the selected process chains
      LOOP AT I_RSPCLOGCHAIN into WA_RSPCLOGCHAIN.                  "Loop at all the process chaing log
        CLEAR: temp_time, pc_start_time, pc_end_time.
      Get the run date, start time and end time of process chain form RSPCPROCESSLOG table.
        SELECT *
          FROM RSPCPROCESSLOG
          INTO TABLE I_RSPCPROCESSLOG
          WHERE LOG_ID = WA_RSPCLOGCHAIN-LOG_ID.
      Converts PC time to a given local timezone
        CALL FUNCTION 'STU3_ALERTS_CONV_UTC_2_LOCAL'
          CHANGING
            TIME_T = WA_RSPCLOGCHAIN-ZEIT
            DATE_D = WA_RSPCLOGCHAIN-DATUM.
      Convart date and time to MM:DD:YYYY HH:MM:SS
        CONCATENATE WA_RSPCLOGCHAIN-DATUM4(2) '/' WA_RSPCLOGCHAIN-DATUM6(2) '/' WA_RSPCLOGCHAIN-DATUM+0(4) INTO pc_run_date.
        CONCATENATE WA_RSPCLOGCHAIN-ZEIT0(2) ':'  WA_RSPCLOGCHAIN-ZEIT2(2) ':' WA_RSPCLOGCHAIN-ZEIT+4(2) INTO pc_start_time.
      sort all the process chaing log. Because we just want to get the end time of the last log.
        sort I_RSPCPROCESSLOG by ENDTIMESTAMP descending.
      loop to get the end date and end time for the process chain
        LOOP AT I_RSPCPROCESSLOG into WA_RSPCPROCESSLOG.    "Loop 1 for pc_end_time
          CLEAR temp_time.
          temp_time = WA_RSPCPROCESSLOG-ENDTIMESTAMP.
          pc_temp_end_date =  temp_time+4(8).
          pc_temp_end_time =  temp_time+12(6).
        Converts PC time to a given local timezone
          CALL FUNCTION 'STU3_ALERTS_CONV_UTC_2_LOCAL'
            CHANGING
              TIME_T = pc_temp_end_time
              DATE_D = pc_temp_end_date.
        Convart date and time to MM:DD:YYYY HH:MM:SS
          CONCATENATE pc_temp_end_time0(2) ':'  pc_temp_end_time2(2) ':' pc_temp_end_time+4(2) INTO pc_end_time.
        Get PC end-time and duration
          IF pc_temp_end_time = 000000.
            pc_end_time = '??:??:??'.
            pc_duration = '??:??:??'.
          ELSE.
            pc_temp_duration = pc_temp_end_time - WA_RSPCLOGCHAIN-ZEIT.
            CONCATENATE pc_temp_duration0(2) ':'  pc_temp_duration2(2) ':' pc_temp_duration+4(2) INTO pc_duration.
          ENDIF.
        Exit form the loop once we get end-time and duration
          EXIT.
        endloop.                                        "Loop 1 for pc_end_time
      Based on process chain status assign color and create message
        CASE WA_RSPCLOGCHAIN-ANALYZED_STATUS.           "Case pc status
          WHEN 'R'.
            CONCATENATE WA_RSPCLOGCHAIN-CHAIN_ID ' : Ended with errors on -' pc_run_date ' (Start->' pc_start_time '  End->' pc_end_time ' Duration->' pc_duration ') **Error**' INTO temp_message.
            CONCATENATE   ' Ended with errors - ' pc_duration INTO pc_status.
            iColor = 6.
          WHEN 'G'.
          Check if duration = '00:00:00' mark as **Error**
            IF pc_duration = '00:00:00'.
              CONCATENATE WA_RSPCLOGCHAIN-CHAIN_ID ' : Successfully completed on -' pc_run_date ' (Start->' pc_start_time '  End->' pc_end_time ' Duration->' pc_duration ') **Error**' INTO temp_message.
              CONCATENATE   ' Successfully completed - ' pc_duration INTO pc_status.
              iColor = 3.
            ELSE.
              CONCATENATE WA_RSPCLOGCHAIN-CHAIN_ID ' : Successfully completed on -' pc_run_date ' (Start->' pc_start_time '  End->' pc_end_time ' Duration->' pc_duration ')' INTO temp_message.
              CONCATENATE   ' Successfully completed - ' pc_duration INTO pc_status.
              iColor = 5.
            ENDIF.
          WHEN 'F'.
          Check if duration = '00:00:00' mark as **Error**
            IF pc_duration = '00:00:00'.
              CONCATENATE WA_RSPCLOGCHAIN-CHAIN_ID ' : Completed on -' pc_run_date ' (Start->' pc_start_time '  End->' pc_end_time ' Duration->' pc_duration ') **Error**' INTO temp_message.
              CONCATENATE   ' Completed - ' pc_duration INTO pc_status.
              iColor = 3.
            ELSE.
              CONCATENATE WA_RSPCLOGCHAIN-CHAIN_ID ' : Completed on -' pc_run_date ' (Start->' pc_start_time '  End->' pc_end_time ' Duration->' pc_duration ')' INTO temp_message.
              CONCATENATE   ' Completed - ' pc_duration INTO pc_status.
              iColor = 5.
            ENDIF.
          WHEN 'A'.
            CONCATENATE WA_RSPCLOGCHAIN-CHAIN_ID ' : Active on -' pc_run_date ' (Start->' pc_start_time '  End->' pc_end_time ' Duration->' pc_duration ')' INTO temp_message.
            CONCATENATE   ' Active - ' pc_duration INTO pc_status.
            iColor = 3.
          WHEN 'X'.
            CONCATENATE WA_RSPCLOGCHAIN-CHAIN_ID ' : Canceled on -' pc_run_date ' (Start->' pc_start_time '  End->' pc_end_time ' Duration->' pc_duration ') **Error**' INTO temp_message.
            CONCATENATE   ' Canceled - ' pc_duration INTO pc_status.
            iColor = 6.
          WHEN 'P'.
            CONCATENATE WA_RSPCLOGCHAIN-CHAIN_ID ' : Planned on -' pc_run_date ' (Start->' pc_start_time '  End->' pc_end_time ' Duration->' pc_duration ')' INTO temp_message.
            CONCATENATE   ' Planned - ' pc_duration INTO pc_status.
            iColor = 3.
          WHEN 'S'.
            CONCATENATE WA_RSPCLOGCHAIN-CHAIN_ID ' : Skipped at restart on -' pc_run_date ' (Start->' pc_start_time '  End->' pc_end_time ' Duration->' pc_duration ')' INTO temp_message.
            CONCATENATE   ' Skipped at restart - ' pc_duration INTO pc_status.
            iColor = 3.
          WHEN 'Q'.
            CONCATENATE WA_RSPCLOGCHAIN-CHAIN_ID ' : Released on -' pc_run_date ' @ ' pc_end_time INTO temp_message.
            CONCATENATE   ' Released' ' ' INTO pc_status.
            iColor = 3.
          WHEN 'Y'.
            CONCATENATE WA_RSPCLOGCHAIN-CHAIN_ID ' : Ready on -' pc_run_date ' @ ' pc_end_time INTO temp_message.
            CONCATENATE   ' Ready' ' ' INTO pc_status.
            iColor = 3.
          WHEN 'J'.
            CONCATENATE WA_RSPCLOGCHAIN-CHAIN_ID ' : Framework Error Upon Completion on -' pc_run_date ' @ ' pc_end_time ' **Error**' INTO temp_message.
            CONCATENATE   ' Framework Error' ' ' INTO pc_status.
            iColor = 3.
          WHEN OTHERS.
            CONCATENATE WA_RSPCLOGCHAIN-CHAIN_ID ' : Undefined on -' pc_run_date ' @ ' pc_end_time INTO temp_message.
            CONCATENATE   ' Undefined' ' ' INTO pc_status.
            iColor = 6.
        ENDCASE.            "Case pc status
      Append pc log to email object
        OBJCONT-LINE = temp_message.
        APPEND OBJCONT.
      change color and write log
        FORMAT INTENSIFIED COLOR = iColor.
        Write: / iCount, '   ', temp_message .
        iCount = iCount + 1.
        CLEAR temp_message.
      ENDLOOP.                               "Loop at all the process chaing log
    Create email subject
      clear psubject.
      CONCATENATE SY-SYSID ' load - ' pc_status INTO psubject.
    Fill the subject
      DOC_CHNG-OBJ_NAME = 'URGENT'.
      DOC_CHNG-OBJ_DESCR = psubject.
      DOC_CHNG-SENSITIVTY = 'P'.
    Cheeck send email checkbox.
      IF p_Email = 'X'.                      "Check if send email is checked
        DESCRIBE TABLE OBJCONT LINES ENTRIES.
        READ TABLE OBJCONT INDEX ENTRIES.
        DOC_CHNG-DOC_SIZE = ( ENTRIES - 1 ) * 255 + STRLEN( OBJCONT ).
      Get recipients
        loop at s_mail.
          RECLIST-RECEIVER = s_mail-low.                    "recipient
          RECLIST-EXPRESS = 'X'.
          RECLIST-REC_TYPE = 'U'.                           "internet email
          append RECLIST.
        endloop.
      Send email
        CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
          EXPORTING
            DOCUMENT_TYPE              = 'RAW'
            DOCUMENT_DATA              = DOC_CHNG
            PUT_IN_OUTBOX              = 'X'
            COMMIT_WORK                = 'X'
          TABLES
            OBJECT_CONTENT             = OBJCONT
            RECEIVERS                  = RECLIST
          EXCEPTIONS
            TOO_MANY_RECEIVERS         = 1
            DOCUMENT_NOT_SENT          = 2
            OPERATION_NO_AUTHORIZATION = 4
            OTHERS                     = 99.
      Write email status.
        WRITE: /.
        CASE SY-SUBRC.
          WHEN 0.
            WRITE: / '*** Email sent to following recipient(s) ***'.
          Loot to get email id's.
            LOOP AT s_mail.         "Loop s_mail to get email address
              NAME = s_mail-low.
              IF RECLIST-RETRN_CODE = 0.
                WRITE: / NAME, ': succesfully sent'.
              ELSE.
                WRITE: / NAME, ': error occured'.
              ENDIF.
            ENDLOOP.               "Loop s_mail to get email address
          WHEN 1.
            WRITE: / 'Too many receivers specified !'.
          WHEN 2.
            WRITE: / 'No receiver got the document !'.
          WHEN 4.
            WRITE: / 'Missing send authority !'.
          WHEN OTHERS.
            WRITE: / 'Unexpected error occurred !'.
        ENDCASE.
      ENDIF.                        "Check if send email is checked
    Shalin Shah

  • Process chains status

    Hi All,
    Most of our Process chains trigger at midnight and all are meta chains,and these all are European loads and 24 hours clock and 2 hours late than Indian timings, my question is
    for example, there is a process chain A, it should trigger at midnight say 22 that is in our timing at 12,It has been triggerd and next day morning i checked in log view selecting the option ,yesterday and today, and one of its local chain showing red status.Then i went to that particular local chain and checked in logview  by selecting the option yesterday and today,then it is showing yesterday's status ,and on the left side today's date also displayed but while clicked on the todays date, some screen is coming and not showing process chains status today. and when i check the option Today in the logview it is giving the message,no logs were found.what does that mean.is it triggered in correct time .or do we need to trigger it.if it is triggered ,then why it is showing red status.please clarify my doubt.
    Thankyou.

    Hi,
    Your meta chain failed yesterday, for this reason today it haven't triggered..
    If you want to execute todays load check the reason for failure and rectify it first than start the chain with immediate option for todays load...
    Regards
    Prasad Nannuri

  • Process chain Schedule change

    Hi,
    I have process chains in which there is one info packages.  I have changed the Schedule from once in a day to twice in a Day.  But after that Process chain is not executing the infopackage.  then I have changed the schedule in the infopackage and clicked start. After that I have changed the Infopackage to Start immediate and save the infopackage and came to process chain and again activated and scheduled but when I go to the info package it is still in the schedule mode.  Previously this process chain is working fine but now it is not executing.   This contains two programs also.  Please suggest me in this.
    Thanks
    naveen

    Hi Naveen,
       Goto process chain and double click on start routine and specify the start timing make it periodic for evry 12 hours.
       Execute process chain, you can see as scheduled only. According to specified schedule times chain will be triggered.
    Hope it Helps
    Srini

  • Activation of DSO failing frequently in process chain..

    Hello Friends..
    I need your ppl experience and help, in investigating an issue, we have a process chain, in which the activation of DSO is failing frequently, i have checked the log messages..but it gives no clue, it just displays the message that  " Activation of M records from DataStore object ZCS_O01 terminated " and even when i try to check process monitor, it displays message " No log entry available for Datastore Object", i have even checked the st22 for short dumps,there also i could find no log entries..
    This chain runs for every four hours...but it works fine some times automatically, but fails at least two-three times every day.
    So could you ppl please help me...in further investigation..that where should i check...and try to trace the prob..
    Thanks
    Raghu

    Hi Raghuram,
    It can be due to lack of process or the activation process is timing out. Look for available background process in SM50 while activation is going on.
    Also Check the ODS Object Customising settings
    ODS-Manage->Goto(menu)-->Customising Datastore-DataStore Specific->  (YOur DSO Name)
    and try to increase the timeout time for activation ,,,,,Just optimise these settings according to your system.
    Thanks!

Maybe you are looking for