Waiting time in process chain

Hello,
Could anyone tell me how to insert waiting time in a process chain?
I need 30 minutes of waiting time before the nex step..
Regards,
Fredrik

Aha! :-)..
So, is this waiting time before or after the actual step?
Regards,
Fredrik

Similar Messages

  • How to keep waiting time between processed messages !!

    Hi Folks,
    I have got one scenario required waiting time between processed messages. The problem as follows !!
    File --> Proxy scenario. I receive 15 messages from sender side (same messages structure) so working with one interfaces. File picking and transforming this message and split into 2 messages. messages are receiving to receiver. I am using BPM with 7,8 steps like receiving step, block , message transformation step , internal block 1 for sender 1, internal block 2 for sender 2.
    All things are working fine, messages are going to receiver properly. But customer requirement is , wait step required between processed messages before sender1. I have put wait step still, PI picks all messages in one shot processing and waiting for 2 minutes, after 2 minutes sending all messages at the same time, this process is not working.
    I have tried with wait step in mapping (Sarvesh) given excellent idea, still PI works the same way.
    Can someone please explain a bit why the messages or not waiting message by message. I am using EOIO with Queue name and file process mode "BY NAME" and I have tried "BY TIME" as well. I have given priority to this Queue. On BPM Queue assignment : One Queue.
    Please I am expecting positive answer !!
    Many Thanks in Advance
    San

    Hi Rudolf Yaskorski ,
    Not sure about your PI release and BPM model, do you create separate process instance for each file, or do you process files collecting them in one single instance? Are you using parallelization within your ccBPM ?
    I am using serialization, I don't think bpm can do Parallization until PI 7.0, but PI 7.11 has got has queue assignment. But I am using one queue. This must be serialization.
    To me it looks like your issue is not in ccBPM but rather more in polling files (as per your post file CC polls all 15 files in one shot). So if you wish to poll the files not at the same time some workaround is required. Possible options you could check out:
    A. Either implement "wait" in your mapping based on file name or other criteria (e.g. directory name). Check out if respective BPM instances are really created at different times.
    I have used wait step in mapping. These 15 messages has to go through one interface. So I am using one interface. But I have checked mapping process time in all messages on receiver system. Shows same timing, even though I put 40000 ms waiting time in mapping.
    B. Try polling different files (or use different directories) with different channels and coordinate starting / stopping of your channels by scheduling availability for each CC in RWB. E.g. you poll file 1 with CC 1. You start 2 minutes later CC 2 and poll file 2. And so on.
    I am not clear about this . On BPM waiting step is working and it keeps wait all messages, which are coming through one interface. Then it releases all messages at the same time.
    I don't know how to resolve this. I have tried with Transport acknowledgment, but all messages are going to reciver system waiting at receiver system in priority queue and processing in EOIO, but taking so long. Rather all messages go and sits in queue, I want to stop messages by message with 2 minutes time gap. How please?
    Kind Regards
    San

  • Can you delete ODS indexes before loading each time in Process Chain

    Can you delete ODS indexes before loading eachin time in Process Chain and rebuild them just like a cube.And do you have to delete the indexes if its a daily refresh where data is deleted and a full update is done everyday.

    Hi,
    Are you using Secondary Indices on the ODS objects. I thought the Primary Index (which is also the Key Part of the ODS) is automatically updated during the Data Activation in the ODS. I am not sure if the Secondary Indicies are also automatically updated by the system.
    Naga

  • How to delete  old schedule time of process chain after changing

    I am try to change the schedule time of process chain on production but after changed the old schedule is still working (i.e. every day on 7 am I want change it to 6 am only) ,one process scheduled two time.
    I want only last changed. How to remove the older one?
    Thanks

    hmm wierd...one more thing check if this process chain get trigger by anyother process chain by some abap program or any.
    Check the table rspcchain to know if it has any meta chain or not. IF not follow the below steps :
    make your process chain trigger based upon the event. Follow the below step.
    1.SM64 ---> Create event -
    > come to your process chain -> maintain the start variant -> event base---> give that event name here.Now we will be require to create the job which will trigger this event for  this.
    2.Let us take the below PC as example;
    ZL_TD_HCM_004 -- This PC is running after event u2018START_ZL_TD_HCM_004u2019
    3.Go to T Code: SM36 Here we define the Background job which will be available in SM37 after saving it.
    4.It will ask for ABAP Program to be entered. Give it as Z_START_BI_EVENT and Select Variant from the list. (Based on Process chain, you can select it)
    5.Then select Start Conditions and give the start time of process chain. and select periodicity.
    6.Save the newly created job in SM36.It will be now available in SM37.
    This should solve your problem now .. have  fingure crossed
    Thanks,
    Deepak
    Edited by: Deepak Machal on Dec 14, 2011 8:20 AM

  • Ger Run time of Process Chain

    Hi All,
    I have been monitoring process chains regularly in RSPCM.
    Can anyone help me with the table name or transaction code to find the total run time of individual process chain?
    Thanks in Advance,
    Shreyas Shah

    hi,
    Go to the transaction ST13....Give tool name as BW-TOOLS......then select process chain analysis radio button.... then click on process chain tab....A selection screen will appear.... give the name of the Process Chain and date and execute....you will get the run time of the Process Chain for that day.
    You can also check the table RSPCPROCESSLOG  and insert the Variant name and the date of the chain run.
    You will get details of all the runs of that particular chain.
    Timings are there in the STARTTIMESTAMP and ENDTIMESTAMP fields.
    Hope it helps.

  • Set time for process chain

    Hi,
    I have requirement to set maximum time to run the process chain.
    For example:
    Process chain is starting daily at 10 PM and taking time 1hr 30 min to complete process. Some times it is taking 2-3 hours to complete process.
    So I need to set max. time 2 hours to complete process chain. If not completed with in 2 hours (before 12PM), then the process chain should be cancelled.
    Please help me in this regard.
    Thanks,
    Hari

    Hi,
    you can set the varaiant and schedule the max time in the variant for process chain.For the scheduled jobs in SM37, pls chk this link;
    http://help.sap.com/saphelp_nw04/helpdata/en/c4/3a8009505211d189550000e829fbbd/content.htm
    Hope this helps,
    Regards
    CSM Reddy

  • Table for Start and End time of Process Chain

    greetings experts,
    Hi All,
    I Have to give an Excel Sheet to Top level manager on Start and End Time of Data Load in each InfoPackage (PSA Load) triggered by Process Chain, please let me know if there is any table who keeps these information.
    Regards
    Sulochan

    Hi,
    You can use the program /SSA/BWT to give the Timings of the process Chain runs.
    1) To access this tool Goto SE38 .Type in u201C/SSA/BWTu201D as the Program name and click on execute. The list of all the tools that this Program contents are displayed.
    2) By default the option u2018Process Chain Analysisu2019 is selected. Now click on the execute button. Then you are displayed with the options through which you can select to perform analysis at Process Chain level or Process Type level. (Along with that, the Time Zones used to display the information is also displayed)
    3)If you click on the button u2018Process Chainsu2019 a window Pops up, here you need to provide the Chain-ID and/or the Log-ID and the Start Date/Time and the End Date/Time.
    4)Decide the parameters to enter as per your requirement, suppose your requirement is to check the runtime of a particular process chain for the past one week, then provide the technical name of that chain in the field Chain-ID and the start and end dates as per last one week and click on execute.
    5)Then the logs of the Process Chain for the selected dates are displayed along with the status (Red, Green or Yellow). The logs of the local chains (if any exist in the Process Chain selected) are also displayed (Much more additional information exist which is self explanatory). Now you can have a look at the Runtimes of different logs.
    Regards,
    Suprajah.

  • Wait time for 5 min in process chain

    hi Guru,
    how to add in the process chin for wait time 5 min.
    two flat files are there, once the complete of first flat file wait for another 5 min for the second flat file load.
    my question how to add a condition for 5 min wait time , the flat file load after 5 min(means second process is trigger after 5 min).
    Thanks in advance
    Edited by: priya das on Sep 29, 2008 5:02 AM

    See if below threads are useful -
    waiting time in process chain
    Set delay for process in process chain (BI7)

  • Pointers for optimizing system performance (run time) while running DP process chain with parallel processing

    Hi Experts,
    We are running APO DP process chain with parallel processing in our company, we are experiencing some issues regarding run time of process chain, need your help on below points;
    - What are the ways we can optimize process chain run time.
    - Special points we need to take care of in case of parallel processing profiles used in process chain.
    - Any specific sequence to be followed for different processes in process chain - if there is some best practice followed.
    - Any notes suggesting ways to improve system performance for APO version 7 with different enhancement packs 1 and 2.
    Any help will be really appreciated.
    Regards

    HI Neelesh,
    There are many ways to optimize performance of the process chains (background jobs) in APO system.
    Firstly I would recommend you to identify the pain areas (steps) which are completing with more runtimes. Then each one of the step has got different approaches to decrease the runtime.
    Like you may end up with steps like infopackage executions, DTPs, DP mass processing jobs etc which might be running with more runtimes. So now target each one of them differently and find out the ways to optimize. At the same time the approach you follow should be technically possible with basis perspective (system load and utilization) as well.
    And coming to parallel processing, you can use parallel processing for different for different jobs. You can further r explore on the same using parallel processing. Like loading an infocube, mass processing, infopackage execution, DTP, TSCOPY etc.
    Check the below link for more info
    Performance problems in DP mass processing
    Let me know if you require further info.
    Regards,
    Raj

  • Process Chain Triggers Multiple times

    Hi All,
    I have Meta process chain say ZAAA  which has multiple Local Chains example ZBBB , ZCCC and ZDDD. .This Local chain ZCCC trigger multiple times of  in one day . we had a issues today  with deactivation of Transformations and DTP in different levels because of that Local Process chain ZCCC is failed along with other process chains . when I reach to ZCCC started by repeat or repair ,before Local Chain ZCCC finished whole process ,ZCCC triggers second time .
    Now first times  triggered process chain ZCCC is in  yellow , and second time triggered process chain ZCCC gone through all the way to gree ,  and Meta chain showes red.
    what I have do make Meta chain green.
    Regards
    Hari

    Hi Hari,
    I wonder what you mean by below statement:
    one of the sub pc still yellow first time trigger and went to red and second time trigger whole process is green. all Sub PC are green
    For the sub pc mentioned above, you trigger it all over again? Or you repeat/repair the step failed?
    If you trigger it the second times all over again it is a new run and the first run remain fail,ed so the meta chain will never get green, if you want to make the meta chain green, you need to repeat/repair the step failed in first run.
    Regards
    Bill

  • Process chain Has ran two times

    Hell Gurus,
    I have some problem with my process chain,It is running through Based on Event,some time that process chain running two time,I dont know why its happens,Please any one can give me solution.
    Thanks in Advance........
    Sekhar Reddy.

    Hi Sekhar......
    For the Option display schedule job option...u hav to open the chain in Planning view..........Open the chain through the tcode RSPC1.........then automatically it will open in Planning view...
    You hav said that this Process chain is event based.....from where this event comes...........is that event triggers from another process chain.......or it is time based event.........
    I think I got it...............that day u hav triggerred the event manually.........after that the chain triggerred and the event collector got reset..........then again when actually the event triggerred ........it again triggerred the chain........u hav already told that there was problem in system performance........so may be that event got trigger late...........again as usual next day also that event got trigger.......and again ur chain ran..........due to this ur chain ran twice that day................
    Just check whether the event is part of any event collector or not.........to check this copy the event..........go to SE16 >> RSEVENTHEAD..........there in the Event field give the event .........then execute............u will get the event collector name............if u r unable to find in this table..........search in the table RSEVENTCHAIN..........the copy the event collector.........then go to RSA1OLD(if u r in BI7.0.......otherwise RSA1).........click on the Tools button in the top.........check the event collector...................
    If u r unable to find in both the chains..........that means it is a single event..............then go to SM37........select the event from the or after event: field...........in the job field put BI_PROCESS_TRIGGER.......then check for this event how many times this trigger chain run on that day and the next day..........Then u wll understand.........
    Hope this helps.......
    Regards,
    Debjani.......

  • Process Chain that uses a DTP and locks up with CX_RSBK_REQUEST_LOCKED

    Hello Experts,
    I am making a program to start a PC inside a loop. This Loop has several dates and ODS ID's. The problem is that inside the loop I make a call to FM RSPC_API_CHAIN_START, after this I have a WAIT UNTIL 30 SECONDS command so that the process has enough time to finish loading data. Each time the loop starts I change the name of the .txt flat file that te PC is going to load and store it inside a Z table with a rutine inside the DTP calling it every loop cycle. And so every time the Process Chain starts it should load a different file into a specifyc ODS. The problem comes at the second loop in which through the RSA1 transaction I find out that the chain is locked with an exception CX_RSBK_REQUEST_LOCKED and the subsequent calls to the Process Chain simply don't start at all. One solution I found was to delete the last Petition Request ID in the table RSSTATMANPART.
    I use RSSM_DELETE_REQUEST to delete that request using that ID and the cube name.
    Now this doesn't work either.
    PROGRAM SUMMARY:
    LOOP WITH ODS THAT NEED LOADING INTO BW ODS
        DELETE PETITION REQUESTS FROM RSSTATMANPART WITH YELLOW OR RED STATUS.(So that PC can start)
        CHANGE FILE THAT DTP ROUTINE WILL LOAD
        START PROCESS CHAIN
        WAIT A CERTAIN AMOUNT OF TIME FOR PC TO FINISH
    ENDLOOP.
    Edited by: Antonio Alejandro Ortega Vergani on Apr 12, 2011 12:05 AM

    Hi saveen,
    I've checked the transaction sm50 to check the available processes and I have 8 BTC(batch), 5 DIA(dialog), 2 UPD(update), 1 ENQ(enqueue) and 1 SPO(spool). Are these the ones you are asking about? I assume you refer to BTC which I believe 8 is enough....correct me if Im wrong here as Im starting out with this please.
    Thing is that Im trying to automate this whole process (for loading various file types(headers.txt, details.txt, payments.txt, etc), for various centers and several months...this is why I want to automate the whole process, so I dont have to go manually through all this data loading. So what I did was try to start the chain inside a loop for every new combination of dates that DIDN'T EXIST in the ODS tables. The process chain is supposed to call a DTP that uses a routine to see which file is going to upload to BW but only does it the first time.
    The problem comes with the second cicle of the loop in which the petition request for the DTP is already green, nevertheless the next start of the chain doesn't come as there seems to be no creation of another request and the exception CX_RSBK_REQUEST_LOCKED in the transaction RSPC.
    Appart from this whenever I try to delete the last request so that this way it does create another request(rnr) in RSSTATMANPART through the use of RSPC_API_CHAIN_START the data in my ODS does not stay and is deleted.

  • 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

  • How to add Abap program in process chain to check the another process chain status and do accordingly

    Hello All,
    My requirement is related to process chain 1 . I have one process chain in that i have to  put abap program in middle of that chain . This program will check the status of one another process chain 2 status ( whether it was completed or it is going on). if it is completed then continue the Process chain 1  to further activity else wait to complete Process chain 2 .
    Here i have to use process chain 2 as a parameter.
    Kindly provide me solution .
    Regards
    Saurabh

    Hi Saurabh,
    You need to create ABAP program in which you check the values for required process chain in
    following table
    RSPCLOGCHAIN (Feilds ANALYZED_STATUS LOG_ID)
    Depend on values you can trigger next process or you can wait unitil this process chain complete.you need to check status from table using ABAP.
    If you are not aware about how to write ABAP program then take help from ABAP Team.
    Regards,
    Ganesh Bothe

  • Parallel Process in a Process chain design

    Hi
    BAsed on what factors can we make a decision on How many parallel data loads (process) we can include while designing a Process chains
    Thanks

    Hi Maxi,
    There is no hard and fast rule for that, for trial purpose you can add specific no. of parallel processes and schedule the chain, if there are not enough background processes available to fulfill your request then SAP will give you warning there you can see how many processes are available.
    But if you go for maximum parallel process then it actually depends on how many processes are available at the time of process chain scheduling. Though your server have enough process but if they are utilized by other processes then still you will get warning while executing process chain.
    So just check in your server how many background processes are there and then take some optimum decision.
    Regards,
    Durgesh.

Maybe you are looking for

  • How to Use getDBTransaction() in Controller Class

    I am using the below code.      OADBTransaction tx = (OADBTransaction)getDBTransaction();                          java.sql.Connection pConncection = tx.getJdbcConnection();                ConcurrentRequest cr = new ConcurrentRequest(pConncection); B

  • Is my DP dead?

    I bought my probook 6550b in august 2010.  it's running windows 7 prof. 64-bit.  I normally could watch the display on tv using the probook's dp hdmi cable. Last week, the tv suddenly blacked out when we were watching a video from the laptop to the t

  • Changing settings for updates

    I bought a second hand mac mini. My system says there is an update available but when i want to download it uses the apple account of the previous owner. It not possible to type another e-mauiladrees in this field. How can i change this?

  • How do you end date an objective in table per_objectives_library?

    Hi, I would like to find out how to end date an objective in table per_objectives_library. I have checked HR_OBJECTIVES_API.update_objective but there is parameters there for Valid_from and Valid_to dates. Is there any other API Package that can be u

  • Time Machine says it will take months for the first backup.

    Time Machine said it would take over a month for the first backup on my new Mac. I figured it would get its act together overnight, but when I got up this morning, it said 160 days. Here are my specs: Mac mini 2.3 GHz Intel Core i5 (Macmini5,1) 2 GB