Conditional Breakpoints in Script

It was nice to have a conditional breakpoint, so only if a variable reaches a value
the executions stops and i can continue with debugging.
Thanks a lot.

Hi Yen Li,
Applying SELECTCASE - ENDCASE combination would not produce the desired results. Instead, use Validation Business Rules - by setting up Validation Rules and Validation Rules Details and run the Stored Procedure SPRUNVALID from the Default Logic to execute these validation rules. Call the Stored Procedure by the following syntax:
RUN_STORED_PROCEDURE=SPRUNVALID(u2018applicationu2019,u2019categoryu2019,u2019currencyu2019,u2019%SCOPETABLE%u2019,u2019%LOGTABLE%u2019)
Your command: u201CIf P_ACCT.0005 is > 0, multiply P_ACCT.0004 by P_ACCT.0005 and post the product in P_ACCT.0001. Otherwise do not do anything.u201D will be shown in result!
Regards.
Chakrapani

Similar Messages

  • If condition in SAP Scripts?

    Hi,
    I have a SAP Script. In that i have one IF condition. I want to insert one more if condition in that IF condition.
    If first IF condition is true then it has to check for second IF condition.
    Can any one please help on this.syntax..
    Thanks
    Venkatesh P

    It is same way you use in your ABAP programming.
    EX:
    /: IF <CONDITION1>
    /: IF <CONDITION2>
      ***Statement***
    /: ENDIF.
    /: ENDIF
    Regards,
    SaiRam

  • How to Check files which is older than 14 days in particuler folder using IF condition in Batch script

    Hi,
    I have to check the zip files created before 14 days by using Batch script.
    Any conditional statement needed ?
    Thanks,
    Jitu

    But this script is failing if the files are not present in the same folder.
    So I am thinking to loop the statement to check if files are not there exit from the loop.
    The script does not fail - it reports that no files are found. You can detect this like so:
    if %ErrorLevel% NEQ 0 echo "There are no zip files!"
    There is no loop in your script that you can exit from.

  • If condition in SAP Script

    Hi,
    I have written a condition in the text elements like below.
    IF &EKPO-NETWR& GT '300'
    Print some text.
    ELSE
    Print other text.
    ENDIF
    But its not working.If i put EQ or NE,its working fine.But if i put GT,GE,LT,LE or >,< ,its not working.
    Suggest if there is any other symbol to be used in SAP Sccript for GT,GE.
    Thanks,
    Aparna.

    Hi all,
    Me to Facing the same problem while using IF condition in the SAP Script for the following code.
    IF &ITAB-TCS& GT 0                                        
    &SY-ULINE(65)&,,,,,,Tax Collected at Source,,&ITAB-TCS&     
    ,,,,,,&SY-ULINE(65)&                                        
    ELSEIF &ITAB-TCS& EQ &0&                                    
    &SY-ULINE(65)&                                              
    ENDIF                                                       
    i tried with all the optons mentioned,but no luck.
    try to give some resolution for this.
    Regards,
    Sathya

  • Conditional Mapping with script using BlOCKPROC to access the HFM API

    Hello,
    following problem. During the mapping/validation I need to map certain custom1 members to None if the Top Member is None and let it be if not None. This allocation depends on the account. Reading through the documentation I stumbled across conditional mapping.
    So in the Custom1 map type Like I defined following:
    Rule Name: C1_Script
    Rule Definition: CXXX*
    TargetCustom1: #Script
    In the script I try to achieve to get the Custom1 Top member for the account! The HFM API offers this function(fGetCustomTopMember) and with varValue(14) I get my TargetAccount. So everything I need seems to be there.
    Only problem is I need to use the BlOCKPROC to access the HFM API provided through the adapter, but either way won't work.
    Trying "Set API.IntBlockMgr.IntegrationMgr.PobjIntegrate = BlOCKPROC.ActConnect("LookUP")" throws an object required error.
    Trying
    Dim BLOCKPROC
    Set BLOCKPROC = CreateObject("upsWBlockProcessorDM.clsBlockProcessor")
    BLOCKPROC.Initialize API, SCRIPTENG
    throws me a type mismatch for "BLOCKPROC.Initialize".
    I am kinda at my wits end. Any help/clue is much appreciated.
    Ahh, yes the different writing BlOCKPROC and BLOCKPROC is correct!
    Thanks!

    Hello Tony,
    Many thanks for your answer. Just one last question. The event AftProcMap(strLoc, strDim) gives me the Dimension? Just how do I get the account?
    Can you point me to the right direction and I'll figure out the rest!
    Thanks a lot!

  • Conditional BreakPoint

    Is it possible to set a breakpoint based on a condition?  Precisely, my problem is that while running an extractor, I have observed in SM50 that it is hitting a Z table that it is not supposed to hit!!  Now if I run the extractor in debug (/h) mode, it is taking forever to step through it to reach any conclusion on which code is reading that Z table.  Is it possible to set a breakpoint in which I can say stop the execution if there is a read from the Z table so that I can start the debugging from there?  I am not proficient in ABAP, so any step-by-step instruction to achieve the desired result is highly appreciated. 
    One more question, is there anyway one can search the list of programs created by a particular user?  In se80, repository info system gives only the options - program name, short description, package and application component to search upon.  How do I find the list of programs/FMs created by a particular user?  Please help.  Thanks in anticipation.

    Hi Sameer,
    I dont think its possible to put dynamic break point on selection of a z table . You can put a break point on select satement but then it will stop on all selects.
    First do a where used list on the Z Table and see if you can narrow down to a few programs . Put break points in each of them . Then run your exractor . If it stops at a break point then , check call stack to find the calling sequence .
    Or else activate SQL trace before you run extractor. From trace display you have an option to branch to ABAP program.
    To get all programs created by a user . Goto SE16 , table TADIR .
    PGMID - R3TR
    OBJECT - PROG
    OBJ_NAME - Z/Y
    DEVCLass - Z/Y
    AUTHOR - <User iD >.
    Cheers

  • Race condition with Startup scripts and 2nd locally mounted hard drive?

    Hello,
    My main hard drive is a solid state drive that I have OS 10.6.6 installed on. I also have a secondary local drive that I have installed some applications to.
    When my system boots I have some scripts in /Library/StartupItems that run before any users log in. Some of the scripts attempt to launch applications that are stored on my second disk. I have discovered that when my StartupItems run, the second disk has not yet had the opportunity to mount! As a result, my scripts fail of course.
    I discovered this by adding the command "mount > /info.txt" to my startup scripts that were not working as expected.
    If I insert sleep statements in my scripts that buys them enough time to allow my second drive to mount before they actually perform their useful tasks.
    All of this being said can anyone advise what a more appropriate solution would be? Is there a way to arrange the OS mechanisms in a way that would cause all disks to mount before aany StartUp scripts are run?

    There are a couple of ways you can do this. The "right" approach is to use DiskArbitration, but that's not easy to do from a shell script. I'd suggest converting your job to launchd (StartupItems are deprecated). Check out Technical Note 2083 (http://developer.apple.com/library/mac/#technotes/tn2005/tn2083.html) for more information than you ever wanted on daemons and agents on Mac OS X.
    launchd can be a bit daunting if you've never used it before, but it offers a lot of flexibility -- in particular the StartOnMount key. Your job can be triggered whenever a new disk is mounted. From there you can check for the presence of your expected volume, and exit if it's not present. (There is a small race condition here: if the disk mounts after your check but before you exit, you could miss it and fail to run. Also, you may not be able to predict the mountpoint of your disk in certain cases. You might instead want to check that its UUID matches what you expect. You can process the output of diskutil(8) to get the volume UUID.)
    Check out the example property list at the bottom of launchd.plist(5). Give it a custom label, specify the path to your script in ProgramArguments, and replace the KeepAlive key with StartOnMount. Set permissions to something like 644 with ownership root:wheel, drop into /Library/LaunchDaemons, and you should be good to go on your next boot. (By convention, the file's name should be the same as your label followed by ".plist".)

  • Conditional Checking in Script Logic

    Could anyone please kindly enlightened me how I could code the following in the script logic?
    Scenario:
    IF A > 0, THEN B = C * D
    I have tried with SELECTCASE statement statement but all wouldn't work, I keep getting errors...
    SELECTCASE:
    *SELECTCASE [P_ACCT].[0005]
    *CASE > 0
             *REC(EXPRESSION= ([P_ACCT].[0004] * [P_ACCT].[0003]), P_ACCT=0001)
    *ENDSELECT
    Error:
    UJK_VALIDATION_EXCEPTION:Unknown or unimplemented keyword "*REC(EXPRESSION=IIF([MATERIAL].[LDG0005]=>0,([MATE"...
    Thank you very much in all advances.
    Best regards,
    Yen Li

    Hi Yen Li,
    Applying SELECTCASE - ENDCASE combination would not produce the desired results. Instead, use Validation Business Rules - by setting up Validation Rules and Validation Rules Details and run the Stored Procedure SPRUNVALID from the Default Logic to execute these validation rules. Call the Stored Procedure by the following syntax:
    RUN_STORED_PROCEDURE=SPRUNVALID(u2018applicationu2019,u2019categoryu2019,u2019currencyu2019,u2019%SCOPETABLE%u2019,u2019%LOGTABLE%u2019)
    Your command: u201CIf P_ACCT.0005 is > 0, multiply P_ACCT.0004 by P_ACCT.0005 and post the product in P_ACCT.0001. Otherwise do not do anything.u201D will be shown in result!
    Regards.
    Chakrapani

  • IF Condition in a PL/SQL Script give a report error.

    Hello, I’m German and I hope you can unterstand my Question.
    First, I work with the HTML DB Version 1.6.0.0.0.87 and the Oracle Version 9.2.0.6.
    I create a SQL Report, where a PL/SQL Script return the SQL Statement for the Report. This is my source-code, I have short it...:
    Declare
    sql_str varchar(2000);
    sql_str_select varchar(1000) :=' select dim_sparte …... ';
    sql_str_from varchar(1000) := ' from faktentabelle,dim_sparte ';
    sql_str_where varchar(1000):= ' where … and faktentabelle.zeit_id = :POPUP_ZEIT ';
    sql_str_groupby varchar(1000):= ' group by dim_sparte.name, faktentabelle.zeit_id ';
    Begin
    If ( (V('POPUP_NETZGEBIET') is not NULL) and (V('POPUP_NETZGEBIET') <>
    'Alle Netzgebiete')) THEN
    sql_str_select := sql_str_select || ' ,dim_organisationseinheit.netzgebiet_name ';
    sql_str_from := sql_str_from || ' , dim_organisationseinheit ';
    sql_str_where := sql_str_where || ' and faktentabelle ... and
    dim_organisationseinheit.netzgebiet_name = :POPUP_NETZGEBIET';
    sql_str_groupby := sql_str_groupby || ' , dim_orga .... ';
    End IF;
    sql_str:= sql_str_select || sql_str_from || sql_str_where || sql_str_groupby;
    htp.print(sql_str);
    Return sql_str;
    End;
    This Script include a IF-THEN condition. The Condition is true and the sql-String-Variables are updatet.
    I can get the string with htp.print() and the Statement is OK.
    The report get a Error “report error: ORA-1403: no data found”. If I copy the printet sql String in a new Report Region with SQL String, the Report is OK. When I write IF(true) instead of IF( Condition) the Report is OK, too.
    I try ist with Varibalen V(‘name‘) and with :name. It’s always the same problem. I can’t use IF-THEN-Else Conditions in a Script.
    Please help me and say me what is the problem???
    Thanks,
    Simona

    Hi Simona,
    In the sql region below the region source see that you have " Use Generic Column Names (parse query at runtime only)" check and not " Use Query-Specific Column Names and Validate Query".
    This error you usually get when you have a mismatch in your report heading.
    Vivek
    [email protected]

  • If condition in scripts

    Hi all
    I am using the if condition in SAP Script as shown below. Even if it is false it is printing the below lines
    /:   IF &variable& NE  '0.00'
    P1 'total'
    P1  &variable&
    /:  Endif   
    Please help
    Thanks & Regards
    vamshi

    HI,
    Try with giving a variable in the if condition.
    data: g_variable like variable value '0.00'.
    /: IF &variable& NEg_variable
    P1 'total'
    P1 &variable&
    /: Endif
    Regards,
    Venkatesh

  • IF-condition not working in sap script??????

    hi,
       i am trying to chk one condition in sap script using if statement....but it is not working at all.
      statement i am writing is :-
    /:   IF &IST_ITEM-SAD_PRINT& <>  0
    p7 ,,,,,,,,,,,,,,,,SAD,, 4.00  &IST_ITEM-SAD_PRINT&
    /:   ENDIF
    value for IST_ITEM-SAD_PRINT is coming as it is shown while debuging .
    eventhen control is going inside if statement independent from the value of IST_ITEM-SAD_PRINT
    how to use if statement properly....
    regards
    Deepak

    Hi,
    Declare a dummy variable of type IST_ITEM-SAD_PRINT and then use that variable in sapscript..
    Ex..
    <b>Print program</b>
    DATA: V_DUMMY LIKE IST_ITEM-SAD_PRINT.
    <b>Sap script</b>
    /: IF &IST_ITEM-SAD_PRINT& <> <b>&V_DUMMY&</b>
    p7 ,,,,,,,,,,,,,,,,SAD,, 4.00 &IST_ITEM-SAD_PRINT&
    /: ENDIF
    Thanks,
    Naren

  • Conditional Actions Script for PS CS2

    This script from Sivaratnam Gunaratnam will perform actions on Photoshop files and can change depending on certain definable conditions encountered in each file.
    From his Blog entry:
    "This is a tool I scripted for myself that I would like to share with all fellow Photoshopers. It allows you to execute your Actions based on Conditions. No programming needed. Just click and define your conditions.. Some examples of conditions are as follows:
    If the image height is greater than its width, do Action X, or else do else Y
    If the image format is JPG / PSD / BMP do action...
    If the image file size is bigger than 300KB, do action....
    if the image IS/IS NOT of RGB, CMYK... etc
    if image author is Siva, do action...
    if image exif contains Nikon D70s, do action ....
    if image name contains "paris", do action...
    etc
    etc
    Please note thatas of this writinghe has only tested it on Windows and PSCS2. However, someone posted a comment to his blog entry stating that it "Seems to work perfectly on a Mac too."
    caveat downloador :)
    Visit Siva's blog to read more and get the script at the following link:
    http://actionlogic.blogspot.com/2006/03/sivas-photoshop-conditional-action.html

    This script from Sivaratnam Gunaratnam will perform actions on Photoshop files and can change depending on certain definable conditions encountered in each file.
    From his Blog entry:
    "This is a tool I scripted for myself that I would like to share with all fellow Photoshopers. It allows you to execute your Actions based on Conditions. No programming needed. Just click and define your conditions.. Some examples of conditions are as follows:
    If the image height is greater than its width, do Action X, or else do else Y
    If the image format is JPG / PSD / BMP do action...
    If the image file size is bigger than 300KB, do action....
    if the image IS/IS NOT of RGB, CMYK... etc
    if image author is Siva, do action...
    if image exif contains Nikon D70s, do action ....
    if image name contains "paris", do action...
    etc
    etc
    Please note thatas of this writinghe has only tested it on Windows and PSCS2. However, someone posted a comment to his blog entry stating that it "Seems to work perfectly on a Mac too."
    caveat downloador :)
    Visit Siva's blog to read more and get the script at the following link:
    http://actionlogic.blogspot.com/2006/03/sivas-photoshop-conditional-action.html

  • Conditional Exit from the script

    Hi,
    I have to code the script like the below
    --Step 1
    begin
    If <Table1 doesnot exist> then
    Display "User Defined Error Message: Table1 doesnot exit"
    EXIT FROM THE SCRIPT(Below sql should not run)
    endif
    end
    --Step 2
    spool abc.txt;
    select "should not run" from Table1;
    spool off;Step 2 should not run if table1 doesnot exist.
    Can someone please tell how to conditionally exit the script.
    Thanks & Regards,C
    CDPrasad
    Edited by: cdprasad on Aug 12, 2010 1:35 PM
    Edited by: cdprasad on Aug 12, 2010 1:36 PM
    Edited by: cdprasad on Aug 12, 2010 1:38 PM
    Edited by: cdprasad on Aug 12, 2010 1:38 PM

    Hi,
    David is right; SQL*Plus is the wrong tool for this job.
    If you really want to to this in SQL*Plus, you can achieve a crude type of branching by using sub-sripts. Instead of an IF statement, you use START or @ to run one or another of those sub-scripts, based on a substitution variable, which in turn is set by a query.
    For example:
    --     abc.sql - Test if table1 exists, and
    --                     (1) if it exists, run abc_query.sql to do a query
    --                     (2) if it does not exist, run abc_error.sql to display an error message
    --     Preliminary query, to define next_script:
    COLUMN     next_script_col        NEW_VALUE next_script
    SELECT     CASE      COUNT (*)
             WHEN  0  THEN  'abc_error'
                       ELSE  'abc_query'
         END     AS next_script_col
    FROM     all_tables
    WHERE     table_name     = 'TABLE1'
    AND     owner          = 'SCOTT'
    --     Now that we know what to do, do it:
    @&next_scriptYou would run the above script (abc.sql) and it would decide whether to run the script containing you query, or the script that prints an error message.
    Why does table1 sometimes disappear? In a good database design, tables are permanent structures, and get dropped only when they are obsolete. Perhaps you should be TRUNCATing the table, not dropping it.

  • Conditionally build script

    Hi, I want to put some redirection code into my help stsytem, is it possable to conditionally build a <script type="text/javascript"> tag?
    Any help would be much appricieated
    oooo and meta tags as well!

    You are referring to topic titles but I think you mean topic headings, as seen by the user at the start of a topic rather than the title in topic properties.
    Enter both and use conditional build tags.
    Same for font colours although a different CSS might be easier for this one.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Test Script for HR Off Cycle Process Model

    Hi,
    Does any one have the Test Script for Off cycle Process Model?
    Regards,
    Srini.

    Do you have any conditional breakpoint between second and third step?
    The red error is coming out of conditional breakpoint and it will work if you re-run the step. Generally, we put conditional breakpoint to make sure that we will start next process only after verfiying the result of the last step and thats why if you start manually it turns green.
    You can delete conditional breakpoint if you dont want.
    Arti

Maybe you are looking for