Cancel job based on variable value

We currently have a number of jobs that are dependent on one another (i.e. Job1 runs, sets a variable to D if the action was successful and then Job2 will run if both Job1 was successful and the variable is equal to D). We are forced to handle it this way as the script executed by Job1 will always return as ran successful. The situation we're running into is that Job1 will run successfully, but if the action inside it ends up not returning D to the variable the job will just remain in waiting on dependencies. Is there any way to cancel Job2 immediately if the variable doesn't contain that specific value?
Any help or suggestion would be appreciated.

Hi auerbecktj,
How about using a variable event that monitors for that specific variable? If variable is not equal to D, then launch a Tidal job which runs a sacmd command to abort Job2 and then another sacmd command to set it to an externally status or similar.
Cheers,
Derrick Au

Similar Messages

  • How to select different Querys based on Variable Value

    Hi guys i need to know how to select different Querys, based on variable values selected by the user, i try to do it using a Web Template but i don´t know how to program a Dynamic Query.....
    I hope sombody could help me with this
    Message was edited by: Oscar Diaz

    Hi Diaz,
    Can you explain the exact scenario which you are looking for!!!
    regards
    Happy Tony

  • Limit columns based on variable value

    Gurus,
       My requirement;
       User will enter a value "A" in the variable and based on the value i need to limit
       the columns in the output. for example in the query designer i have 6 fields in
       Rows, in Free Chars i have the field with variable which user will enter. if the value
       entered is "A" only 4 fields should appear on the report else if value is "B" only
       the other 2 fields should appear.
       Is there a way accomplish this...please suggest
    Thanks with points in advance...

    Geni,
    Are u using the Excel based Analyzer as your Front End?
    If so you can run a small VBA (on event SAPBEXonrefresh) that will hide columns based on the value of the cell that displays the value of the variable that the user is setting.
    See code i posted in Re: How do I make cells "0" and not blank for an example.
    Is this what you are after?
    Hope it helps,
    Gili

  • Bex query that returns variable number of columns based upon variable value

    I have a request to create a query that, at excution time, has a variable for 'nbr of months', and based on the value entered by the user, returns data for only the specified number of months. Value that can be entered can vary from 1 to 12. A simple example is, if the user enters 1, then they would only want to see one column, and if they entered 6, then they'd like to see 6 columns in the workbook.  All suggestions on how to implement this dynamic columns on a workbook will be appreciated.
    Thanks.
    BN

    Hi,
    Do this->
    1) first create a New Structure in Rows-> Place your New Selection and drag your KF.
    2) Nw Create a New Formual under this structure. Now Create a Formula variable ( "ZFVXXX")with user-entry and ready for input and dimension as NUmber. and place in formula area. And hide this formula.
    3)Now Create a New Customer-Exit variable on 0CALMONTH name as "ZCECMON" with following atrribute->Mandatory, Range(Interval) and remove check for Ready for entry.
    4)Drag your 0CALMONTH in Rows above That Structure and restrict it to "ZCECMON".
    5) Now go to CMOD and write this code.
    INCLUDE ZXRSRU01 *
    DATA: L_S_RANGE TYPE RSR_S_RANGESID. 'In global area
    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT. 'In global area
    DATA: zmonth like /bi0/0calmonth.
    CASE I_VNAM.
    WHEN 'ZCECMON'.
    IF i_step = 2.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZFVXXX'.
    zyear = sy-datum(4).
    zmonth = sy-datum+4(2).
    l_s_range-low = zmonth.
    zmonth = zmonth + loc_var_range-low.
    l_s_range-HIgh = zmonth.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    ENDCASE.
    6) activate the porject and go to rsrt and run there first.
    Regards,
    San!
    Message was edited by: San!

  • How do I access a value of a variable in SSIS and control the flow accordingly based on its value?

    So I have a Foreach Loop Container that Enumerates a read Excel spreadsheet and this Foreach Loop get its User::SheetName. Can I change my flow accordingly based on the value of the User Variable User:SheetName that is dynamically valued by the Foreach Loop
    Container? So if the User::SheetName is "Enrolled", I want to load that worksheet to a certain SQL Server Table using an Excel Source and OLE DB Destination and if the User::SheetName is "Engaged", I want to load its worksheet contents
    to a different SQL Server Staging Table. What Task can I use to determine the value of User::SheetName or am I going to have to write a C# script to do this?
    Any help and/or suggestions are GREATLY appreciated.
    Thanks!

    Hi ITBobbyP,
    According to your description, you want to read data from excel by using the Foreach Loop container with the appropriate enumerator. If that is the case, please refer to the following steps:
    Inside the ADO NET enumerator, add a data flow task.
    Inside the data flow task, add an Excel source.
    Open the Excel source, and point to the Excel data source set up in the file enumerator.
    Select one of the sheets that shows in the drop down.
    Close the Excel source.
    Select the Excel source.
    In the properties window, copy the name of the sheet you selected. It's in the 'OpenRowset' property.
    Set this as the initial string in your sheet name variable created to gather the sheet name from the ADO NET enumerator.
    Select the Excel source.
    In the properties window, change the 'AccessMode' to OpenRowset from Variable. This will change the property 'OpenRowset' to 'OpenRowsetVariable'.
    Change the 'OpenRowsetVariable' to the variable created to hold the sheet name via the dropdown.
    Open the Excel source. You should see your variable as the sheet name.
    Click the 'Columns' tab to verify you can connect and mess with columns.
    For detail information, please refer to the following document:
    https://technet.microsoft.com/en-us/library/ms345182.aspx
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • SSIS - Loop through files from a file path based on the value in the variable

    Experts,
    I have a requirement where I'll be loading multiple files in to a SQL server table and archive the files when loaded. However, the challenge is , the file path should be dynamic based on the value of a variable (say, @ProductName).
    For example: If I am running the package for variable @ProductName="Product", the file path would be "\\....\Src\Product", in that case the ForEachLoop will loop through all the files in that folder, load them to the table and Archive
    the files to the "\\....\Src\Product\Archive" folder.
    Similarly, if the @ProductName="Product_NCP", the foreachloop container should loop through files in the "\\....\Src\Product_NCP" folder, load them to the table and archive them to the ""\\....\Src\Product_NCP\Archive"
    folder.
    Any suggestions? I should be able to run the package manually just by passing the "@Product" value, create Archive folder if it doesn't exist, load the data and archive the files.

    Yes
    1. Have a variable inside SSIS to get folder path. Set path based on your rule using an expression
    like
    (@[User::ProductName] == "Product" ? "\\....\Src\Product" : (@[User::ProductName] == "Product_NCP" ? \\....\Src\Product_NCP:..))
    similary archive
    (@[User::ProductName] == "Product" ? "\\....\Src\Product\Archive" : (@[User::ProductName] == "Product_NCP" ? "\\....\Src\Product_NCP\Archive" :..))
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Dynamic variable value based on a value from xml

    I have a invoice template and it is for 4 different companies in my organization. Based on the organization I need to have a different value for a variable that adds blank lines to the end of the invoice. Is there anyway to assign a value to variable based on the value of a xml tag.
    Thanks

    I should have explained better before. I have one invoice template and we want to keep it one template for all companies. Each invoice is run individually, each companies footer is different, I am calling multiple headers and footers based on each company. Since the headers and footers are different I need to be able to add different amounts of lines and the end of each invoice depending on that company. I have accounted for the page break in my logic based on the amount lines the page is long. I just need a dynamic variable that I can assign different values on the fly.
    Thanks

  • Selectively executing a mapping rule based on a variable value

    Hi,
    I have written a mapping rule in the following format.
    case #time_unit when 'quarter' then
    logic1
    when 'month' then
    logic2
    end
    In logic1, logic2 i again have nested case statements. Variable time_unit will have a static value hard-coded given (quarter/month) by user before execution.
    So Variable time_unit need not be checked for each row that gets transformed. It hits the performance.
    I want either logic1 or logic2 to be substituted dynamically in the mapping rule window based on the variable value.
    I cannot go for 2 seperate interfaces. How can I achieve this in ODI.
    Please help me.
    Thanks!!

    Sarah,
      I'm not aware of doing other than BPM. If you want the BPM Steps, Please refer below
      Step 1 : Receive
      Step 2 : Transformation
      Step 3 : Send (Syncronous call to the target system)
      Step 4 : Switch(Check the Payload value as per your reqmt)
      Step 5 : Transformation(Switch : False ,If the payload value is not ERROR)
      Step 6 : What you wanna do ( Switch :True)
    If you want more technically, then let me know the source and target systems, I will help you to design
    the complete flow.
    Best Regards,
    raj.

  • Looping thru column names based on a variable value

    I have an ArrayCollection with a series of columns named
    price1, price2... thru to price10
    I'm trying to loop thru these columns based on a variable
    value, but can't figure the syntax:
    for (var column:int = 1; column < 11; column++){
    testPrice = myGrid.selectedItem.price(column); <-- this
    doesn't work
    }

    Try testPrice = myGrid.selectedItem["price" + column];
    Remember to test that selectedItem isn't null before you try
    to assign the values.
    TS

  • Show or Hide fields based upon a variable value

    Hi,
    I am a rookie in the field of Acrobat. And my only question is :
    How to Circle a Form Field based upon a variable value .
    For example, If x=1, I want to circle Japan and if x=0, I want to leave it without any change.
    Please help me out. Thanks for your time and help.
    Thanks,
    Vijayvijay77.

    Hi George,
    I am pre-populating a Pdf file based upon the data submitted by the user. And I have to circle options selected in the form.
    I am writing coldfusion code to flatten, populate the form into a PDF form. The end result is the PDF generation with all the data in it.
    The data comes from the database, where I set variable values if any is selected or not.
    Thanks for your reply, I really appreciate your help.
    Vijayvijay77.

  • Restrict variable values based on another variable in the bex query...

    I am struggling to restrict the variable values from other varaible in the selection criteria. I have a variable which restricts he organisation(0ORGUNIT) and another to restrict employees.
    When the user selects any organisation unit form the hierarchy, I want only those employees related to that organsation in the varaible selection options.
    Is there any way I can make a variable values dependant on the another variable value in variable selection screen?
    Thanks,
    Your help in this matter will be much appreciated.
    Edited by: Kthapa on Nov 25, 2010 11:08 PM

    Hi Kthapa,
    Did u try using cmod?
    i_step = 1? Used to provide default values for the selection screen variables and
    i_step = 2 for filling up the variables after selection screen.
    Try using based on ur requirement.
    Hope this helps. Revert back for any queries.

  • How to Fetch Cancelled Jobs info along with the Short Dump Text

    Hi Gurus,
    I need to develop a report to fetch the cancelled jobs information for the given period. I also need to display the "Error Analysis" part of the Short Dump if it exists.
    I am able to fetch the Failed Jobs information and the Job log details using the FM "BP_JOBLOG_READ". But I need to show the "Error Analysis Text" on the report , if there is any Short Dump Exists for the Dump.
    Please give me your ideas to fetch the Error Analysis part of the short dump for a given Batch Job Name.
    Thanks in Advance.
    Best Regards,
    Sumalatha

    The dump information is in table SNAP. You could identify which dump you want by the date & time of the failed job - let's hope you don't have more than one dump with the same time. If it is ambiguous you could also compare the program name of the failed step with the program name in the SNAP data.
    The error analysis texts are in table SNAPT keyed according to which error occurred (which is data element code FC right at the start of the first record in the SNAP data). You will have to expand out the includes, and substitute the variable codes using values from the SNAP data. There is standard code to do this that you could copy - see program SAPMS380.
    To find out the details of the SAP process you could run transaction ST22 via the debugger and use the same mechanism.
    best wishes
    Ed
    PS Note these details apply to recent systems I think there may be differences if you go back to before ?2004, but I don't have such a system so can't check. You didn't say what release you have.

  • How to remove Variable-Values prior to transporting to prod-system?

    Hi specialists,
    I've got the following problem:
    We've got a mixed BEx-client-environment with user using BEx 3.5 as well as BEx 7.x.
    So I create workbooks with BEx-Analyzer 3.5 and transport them from the developement-system to the production-system.
    The problem: Obviously the variable-selection that I used at last in the developement-system is saved in the workbook. So let's say I tested the query in the dev-system with "DE01" as value for the company_code on the variable screen, then this value is saved in the workbook and transported to the prod-system.
    In the production-system the value is not replaced anymore by the users permitted company-code values (the variable is based on the users permissions), but the user has to remove this "DE01" manually and has to enter all his personal company-codes manually - which makes the permission-bases-variable senseless.
    Even if I clear all variable-values in the developement system (which is not possible for mandatory variables) prior to saving the workbook, the issue is the same: This time empty fields are presented in the prod-system, but the permission-based-variable isn't set correctly - the field stays empty (=exactly as it was when I saved the workbook in the dev-system).
    So, how can I clear the variable-screen-values before I save and transport the workbook to the prod-system? The only way (and it is certainly not the recommended one) i found: If I cancel the query at once after having confirmed the variable-screen and save/transport that query, then the variables seem to be really empty and the permission-based variables in the prod-system work.

    So, when user run the report in production, they will have to remove # for mandatory variables and put thier value.
    Mh - most of our reports have variables for "company_code","sales_org" (for example).
    Normaly this fields are not mandatory but optional.
    But: Normaly if the user opens such a variable-screen (for the first time) the company_code and sales_org are preset according to the users permissions for this chars.
    If I follow your description, then the variable-screen would open with "#" or "" - but wouldn't be replaced by the user's permitted values anymore :/ - hence the phone rings because the users didn't manage to restrict the variables to their permitted values.
    Maybe this is a case for an oss-message for the area BW-BEX-ET-USAB Userability Frontend....

  • Report for cancelled jobs

    Hi ,
    I have a requirement in which I have to create a report that should pickup all the cancelled CRM marketing jobs (due to whatever reason) based on on job name, copy them and restart them.
    In your selection screen, you will give the cancelled job name (wildcard acceptable..like ZE00*) and a radio button to show the cancelled job list and copy the jobs.
    Could anyone guide me on how to go ahead with this report?
    Regards,
    Mohit

    Hi,
    in table TBTCO and TBTCP you have all jobs with current status. You can search them by name.
    Selected jobs you can "popup_with_table" FM. Then you need to use fm to submit job in ackground;
    'JOB_OPEN', 'JOB_SUBMIT' and 'JOB_CLOSE'.
    Good luck !

  • Cancelled jobs

    Hi All
         I have to create a program which gets the background jobs cancelled for a particular period.If we have any cancelled jobs then send a SMS.I have the funtionality to send an SMS will you please tell me how to get the background jobs cancelled for a particular period.
    Thank You.
    Regards
    Giri

    SELECT jobname
             reluname
             strtdate
             strttime
             FROM tbtco
             INTO TABLE t_jobs
             WHERE status EQ 'A'  and
            strtdate GT <value> and
            strttime GT <value.
    reward if answered

Maybe you are looking for

  • Trouble with itunes and time machine

    i am having trouble with my iphone and thought it may have been itunes, so i went into time machine and tried to replace my current version of itunes with the last one. Everything went fine until i got right to the end of replacing it. it said i didn

  • No video play back.  Works in ALL other browsers...  Help

    Example: I can not get a video to play in FoxNews (stop with the "I hate Fox stuff"). The video will play in all other browsers. However, YouTube videos play fine in Safari 5.0.4. I have reset Safari, I have used Snow Leopard Cash Cleaner to reset EV

  • I purchased the design suite for PC but would like to install my second licensed download on a mac.  Can I do this?

    I purchased the design suite for PC but would like to install my second licensed download on a mac.  Can I do this?

  • Help: Group By condition

    Hello folks am actually trying to figure whether we can use the following condition i.e "to_char(sysdate, 'FMMon YYYY')," in the group by clause, Or can we use the alias "Period" instead,Can anyone please throw some light on this. SELECT Client. Clie

  • Root access question

    I have seen from some other postings that there is supposed to be a root password that is common to the N900. However when I try to use it, it doesn't seem to work. I see a lot of people suggesting the use of rootsh, but surely the same functionality