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

Similar Messages

  • Terms and conditions in Script

    Hi Experts,
            My requirement is to add terms and conditions in Script.
    Terms and condition given in Pdf.I'm trying to include in SO10.
    It is possible to include the one group of text as Left align and other as right align and combine them and display.
    Points will be rewarded for Useful answers.
    Thanks in advance

    Hi.
    Create that in 2 windows in one single page...
    adjust that by left alignment with particular measure.. .
    Try it..
    Regards,
    Priya.
    Edited by: Priyadharshini Veluswamy on Mar 13, 2008 11:01 AM

  • FDM Conditional Map Script Error

    Hi all,
    we trying importing data from EBS to HFM though ERPI by using FDM.
    We used conditional based scripts to importing data from ebs to FDM.
    this scripts used in FDM for ICP dimension between conditional mapping script.script logic is some particular account are related to Intercomapny transaction accounts we have to map to ICP member
    can anyone help me on this:
    this is error :
    ** Begin FDM Runtime Error Log Entry [2011-12-12 15:10:18] **
    ERROR:
    Code............................................. 1014
    Description...................................... Conditional Map Script Error: Expected 'End' at line(2)
    Script:
    If varValues(14)="113401" Then Result="21_ADNIP"
    Else Result="[ICP NONE]"
    End if
    Rule=I1
    Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 13888
    IDENTIFICATION:
    User............................................. admin
    Computer Name.................................... ADNIPHYPUAT01
    App Name......................................... FDMHFM
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... ORAOLEDB.ORACLE
    Data Server......................................
    Database Name.................................... HYPUAT
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... HFMGLLOAD
    Location ID...................................... 750
    Location Seg..................................... 4
    Category......................................... WLCAT
    Category ID...................................... 12
    Period........................................... May - 2011
    Period ID........................................ 5/31/2011
    POV Local........................................ False
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    Thanks.
    Srini

    Hi, please try the mapping script again having the "Result=" statement on a separate line, like:
    If varValues(14)="113401" Then
    Result="21_ADNIP"
    Else
    Result="[ICP NONE]"
    End if
    Kind regards,
    Jeroen

  • For the checking the conditions in script element

    Hi,
          I have one element in medruck script like item.in that i have some conditions.how can i check that conditions in that?
    whether in script or print program?
    Rgs,
    Venkat

    Hi,
    You need to check the condition in the text element of the script.
    Regards,
    Raj.

  • Global Conditions - Powershell Script - Script is not signed (Error: 87D00327; Source: CCM)

    I failed to use any Powershell script in Global Conditions with error 87D00327. The script is signed and tested without problem. Setting execution policy doesn't change the result at all.
    Error message as below:
    In-line script returned error output: File C:\Windows\CCM\SystemTemp\e7001c04-3966-46a7-9622-26c36d9c45de.ps1 cannot
    be loaded. The file C:\Windows\CCM\SystemTemp\e7001c04-3966-46a7-9622-26c36d9c4
    5de.ps1 is not digitally signed. The script will not execute on the system. Ple
    ase see "get-help about_signing" for more details..
    At line:1 char:2
    + & <<<< 'C:\Windows\CCM\SystemTemp\e7001c04-3966-46a7-9622-26c36d9c45de.ps1'
    + CategoryInfo : NotSpecified: (:) [], PSSecurityException
    + FullyQualifiedErrorId : RuntimeException
    ScriptProvider 6/23/2014 1:45:06 PM 2516 (0x09D4)
    ScriptProvider::CreateInstanceEnumAsync - Script Execution Returned :1, Error Message:File C:\Windows\CCM\SystemTemp\e7001c04-3966-46a7-9622-26c36d9c45de.ps1 cannot
    be loaded. The file C:\Windows\CCM\SystemTemp\e7001c04-3966-46a7-9622-26c36d9c4
    5de.ps1 is not digitally signed. The script will not execute on the system. Ple
    ase see "get-help about_signing" for more details..
    At line:1 char:2
    + & <<<< 'C:\Windows\CCM\SystemTemp\e7001c04-3966-46a7-9622-26c36d9c45de.ps1'
    + CategoryInfo : NotSpecified: (:) [], PSSecurityException
    + FullyQualifiedErrorId : RuntimeException
    ScriptProvider 6/23/2014 1:45:06 PM 2516 (0x09D4)
    Failed in discovering instance.
    Script is not signed (Error: 87D00327; Source: CCM) ScriptProvider 6/23/2014 1:45:06 PM 2516 (0x09D4)
    Failed to do HandleExecQueryAsync().
    Script is not signed (Error: 87D00327; Source: CCM) ScriptProvider 6/23/2014 1:45:06 PM 2516 (0x09D4)
    Failed to process CScriptProvider::GExecQueryAsync.
    Script is not signed (Error: 87D00327; Source: CCM) ScriptProvider 6/23/2014 1:45:06 PM 2516 (0x09D4)
    I can't figure out a way to capture the temp script file mentioned in the error message so I can't verify the script locally.
    Any help will be appreciated.
    Sean
    Regards, Sean

    Hi, Sean.
    There was a product issue with signed PowerShell detection method scripts that has been fixed in R2 CU2. I just noticed it's not mentioned in the KB article for CU2. I'm not sure what happened here but I'll have somebody look into this.
    Anyway, there's a couple of caveats to consider regarding this fix in your scenario. Firstly if you're creating a PowerShell script detection method you must not copy/paste the script text -- you need to "Open" it. Secondly, if you have any previously created
    PowerShell script detection methods with signed scripts, you will need to re-add the detection script (again using "Open"). Finally, you must use an administrator console that's been updated to CU2 and a client that's been updated to CU2 for this fix to be
    effective.
    I hope this helps resolve the issue for you.
    Check out my Configuration Manager blog at http://aka.ms/ameltzer

  • Conditional action script not executing

    I have four buttons, Q1, Q2,Q3,Q4.  the script for each works fine:  the variable (ex. Q1) is set equal to 1 and the other functions perform as scripted.  When all four buttons are clicked on and equal to 1, another script (Slide_End) is supposed to work--hiding a box on the screen and showing the Next button.  This Slide_End script is not working.  I have the slide properties On Enter assigned to Advanced Actions>Slide_End.  The Slide_End script has been labelled as All Clicked within the script itself.  I just can't understand what I am missing.  I have the exact same settings on another slide and it works fine.

    Never had a formal training neither, but have been blogging about advanced actions and solving use cases for many users. And wrote some articles long time ago, here you can find the link with those:
    https://workspaces.acrobat.com/?d=tGgSjfVqRtEgI6fORG-zbw
    Normally for a standard action, you choose 'Standard action', not a 'Conditional action'. Have a look at this old presentation, maybe it will clarify something:
    http://blog.lilybiri.com/presentation-devlearn-2011
    Double click on the second 'Untitled' and you have a second possibility to check something. The first condition will always be fulfilled  (IF 1 is equal to 1) so that is really a standard action. The second Untitled will be your real condition where you check all the variables and have two different sets of statement/commands depending on the answer Yes or No for that condition.
    Lilybiri

  • 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

  • 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

  • Error on conditional mapping script after upgrading from 9.3.1 to 11.1.2.1

    We have the following error while importing the data file on one location. The script is sitting on the Account Like mapping. It was working fine on 9.3.1 but not working on 11.1.2.1.
    Even after I removed the Case statement (so just leave the Ifxxxxx,Thenxxxx,Elsexxx,End If), it still doesn't work.
    Can anyone help please? Thank you !
    Error: An error occurred running the script:
    13 - Type mismatch: 'VarValues'
    At Line: 12
    Select Case VarValues(13) ‘Special Accounts
    Case "46221000","40974000","46713300","46747000","47111900","47414010","46871200"
    If VarValues(9)>0 Then
    RESULT="12009000"
    Else
    RESULT="20023490"
    End If
    Case "41110120","40119160","47311200"
    If VarValues(9)>0 Then
    RESULT="12009000"
    Else
    RESULT="20023490"
    End If
    End Select

    Have you tried converting the value of the amount to a double? I just went up to 11.1.2.2 and had a similar problem when referencing the amount and using a number.
    Select Case VarValues(13) ‘Special Accounts
    Case "46221000","40974000","46713300","46747000","47111900","47414010","46871200"
    If CDBL(VarValues(9))>0 Then
    RESULT="12009000"
    Else
    RESULT="20023490"
    End If
    Case "41110120","40119160","47311200"
    If CDBL(VarValues(9))>0 Then
    RESULT="12009000"
    Else
    RESULT="20023490"
    End If
    End Select
    Regards
    JTF

  • Condition in script logic.

    I need to copy the 'All Account'  % value in datasource 'A' to 'All Account' , All costcenters with in same data source.
    This I need to copy only for those cost centers, for  which transaction data exist in data source 'B' for this period
    How to achieve this in script logic.
    Appreciate input
    Regards,

    In such case you need to modify that script in the following way.
    Add
    *XDIM_MEMBERSET COSTCENTER = <source cost center>
    *SELECT(%ALL_CC%, ID, COSTCENTER, "[CALC] = 'N'")
    at the beginning and put the following loop around *REC statement.
    *FOR %ONE_CC% = %ALL_CC%
    *REC(EXPRESSION = [DATASRC].[A], DATASRC = B, COSTCENTER = %ONE_CC%)
    *NEXT

  • Conditional calc script execution

    Dear all,
    I'm trying to implement a calculation that is executed only for entities that are flagged with a '1' on a technical account. The only solution that comes to my mind goes like this:
    FIX (Entity1, Entity2, Entity3)
    "TargetAccount"
    IF ("ENTITY_FLAG" == 1)
    SourceAccount;
    ENDIF
    ENDFIX
    As there are hundreds of potential lines in the original calcuation, this may become a tedious task with unreadable code. Does anybody have an idea for a shorter or global alternative (for a whole calc script)?
    Thanks in advance!
    Regards,
    Lars

    Dear GlennS,
    Thanks for your reply. TargetAccount and SourceAccount are always different. The one calculation block is the same for all entities. In simple but incorrect syntax the script would be like:
    FIX (@IDESCENDANTS ("All Entities"))
    /* Execute calc only if flag is set for respective entity */
    IF (FLAG_ACCT == 1)
    TargetAccount1 = SourceAccountA1 + SourceAccountA2
    TargetAccountn = SourceAccountAn + SourceAccountAn
    ENDIF
    ENDFIX
    As there are many TargetAccounts involved the correct IF/block syntax (as outlined in my initial post) would be pain to write and read. Any suggestions?
    Regards,
    Lars

  • Scripting for Conditional Advanced Actions disappears after saving - title remains

    Hi, for the third time in a 24 hour period, after painstakingly entering 14 lines of variables and actions, the contents of the conditional AA script that I saved disappeared.  Yes, I saved all of them!  The name I gave it remains on the list of Advanced Actions, but clicking on it yields a virginal scripting window. At this point I've wasted a couple of hours re-writing the script only to have it go blank on me again.  Any ideas?

    It's actually a lot more complex than that.
    Here is a list of words that should NOT be used when naming objects, slides, variables or actions in Captivate because they can conflict with existing code or names in the app:
    abstract
    accessibilityProperties
    alpha
    as
    blendMode
    boolean
    break
    buttonMode
    byte
    cacheAsBitmap
    case
    cast
    catch
    char
    class
    const
    constructor
    contextMenu
    continue
    currentFrame
    currentframe
    currentLabel
    currentLabels
    currentScene
    debugger
    default
    delete
    do
    double
    doubleClickEnabled
    dropTarget
    droptarget
    dynamic
    each
    else
    enabled
    enum
    export
    extends
    false
    filters
    final
    finally
    float
    focusEnabled
    focusRect
    focusrect
    for
    forceSmoothing
    framesLoaded
    framesloaded
    function
    get
    goto
    graphics
    height
    height
    highquality
    hitArea
    if
    implements
    import
    in
    include
    instanceof
    interface
    internal
    intrinsic
    is
    loaderInfo
    lockroot
    long
    mask
    menu
    mouseChildren
    mouseEnabled
    mouseX
    mouseY
    name
    name
    namespace
    native
    new
    null
    numChildren
    opaqueBackground
    override
    package
    parent
    parent
    private
    protected
    prototype
    public
    quality
    return
    root
    rotation
    rotation
    scale9Grid
    scaleX
    scaleY
    scenes
    scrollRect
    set
    short
    soundbuftime
    soundTransform
    stage
    static
    stop
    super
    switch
    synchronized
    tabChildren
    tabEnabled
    tabIndex
    target
    textSnapshot
    this
    throw
    throws
    to
    totalFrames
    totalframes
    trackAsMenu
    transform
    transient
    true
    try
    type
    typeof
    url
    use
    useHandCursor
    var
    virtual
    visible
    visible
    void
    volatile
    while
    width
    x
    xmouse
    xscale
    y
    ymouse
    yscale

  • Pricing Conditions In Order confirmation-Scripts

    Hi,
    My client has two scenarios  1. CMS-complete manufacturer & supply (i.e,with taxes)
                                               2. jobwork ( i.e., without taxes).
    I have copied standard print program and script into our zprograms.
    I have to create Sales order confirmation for CMS and JOBwork.(cms is working)
    Am getting pricing conditions for CMS process but not getting in Jobwork.
    Pricing conditions means tooling cost, packing cost etc.
    I have searched for so many conditions. but failed.
    Plz let me know the proper condition or modification to retrieve the pricing conditions.
    Thanks in Advance.
    Regards,
    Murthy.
    Edited by: kan murthy on Nov 26, 2008 4:20 PM

    Hi Prasanthi,
    Thanks for ur valuable reply.
    I came very near to solution.
    I have given query like following.
    SELECT SINGLE KBETR INTO KK3  FROM KONV WHERE KNUMV = VBDKA-KNUMV AND KPOSN = VBDPA-POSNR AND KSCHL = 'ZDEV'.
           IF SY-SUBRC = 0.
               FLG3 = 1.
           ENDIF.
    And Am checking condition in script like this
    IF &FLG3& NE 0
    DEVELOPMENT COST : &KK3&
    ENDIF
    I have nearly 10 condtion types.
    Data is coming into field properly.
    Now problem is, the fields has its value equal to 0 are also displaying(even though i gave SY-SUBRC)
    If value = 0. i dont want to be displayed those condition values in output.
    Thanks & Regards,
    Murthy
    Edited by: kan murthy on Dec 1, 2008 12:59 PM

  • Mapping script issue

    Hello experts,
    I'm quite new to FDM and Iv'e been trying to write a simple conditional mapping script with no success. for my entity dimension, in most cases, the source is ths same as the target though there are some cases where this does not apply and have to go to a NA_Entity. For example:
    SOURCE     TARGET
    PE00_0001     PE00_0001
    PE00_0002     PE00_0002
    PE00_0003     PE00_0003
    AL00_0001      NA_Entity
    PE00_0004     PE00_0004
    CO_HWE        NA_Entity
    PE00_0005     PE00_0005
    As you can see, all source entities which start with "PE" are equal to the target entity and any other entity not starting with PE should be mapped to the "NA_Entity". I believe it's pretty unefficient to maintain an explicit map so we've decided to create a conditional mapping script (not working yet) which reads as follows:
    If Left(varValues(15),2)="PE"
         Then Result = varValues(15)
    Else Result ="NA_Entity"
    Every time i try to import a file I keep on getting:
    Error: An error occurred importing the file.
    Detail: Invalid Like Clause: For Dimension Map (ENTITY) and Rule (Peps)
    ERROR:
    Code............................................. 4026
    Description...................................... Invalid Like Clause: For Dimension Map (ENTITY) and Rule (Peps)
    Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 5416
    IDENTIFICATION:
    User............................................. admin
    Computer Name.................................... CTARESULDESA2
    App Name......................................... INT_IECI
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... SQLOLEDB
    Data Server...................................... 10.228.128.168
    Database Name.................................... FDM_INTIECI
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... Argentina-EP
    Location ID...................................... 758
    Location Seg..................................... 3
    Category......................................... Reales
    Category ID...................................... 13
    Period........................................... Nov - 2013
    Period ID........................................ 2013-11-30
    POV Local........................................ False
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    I've followed the script guide and Iv'e tried several scripts, all with no success. The only workaround I've found is maintaining an explicit map where 99% percent of the elements map to themselves and the other 1% map to "NA_Entity", not very maintenance friendly.
    Thank you very much for your help
    Santiago Ruiz.

    You do not mention what release of FDM you are working with, but there should be no need for scripting .
    Explicit mappings are the most efficient from a performance point of view, but in view of what you want to achieve then all you need are two 'Like' mapping entries.
    the first will be mapping PE* to PE*  and the second entry mapping * to 'NA_Entity' to pick up all the other codes.
    Alternatively if you are processing millions of records and have a performance issue, then an alternative might be to change the non 'PE' type records with a script on the import format, but i think the two records should be the easiest.

  • Use Counter in Script Logic

    Hi guys, I have code in default logic which starts its run if one of several accounts data has been sent. However, when I send data for 2 accounts from *WHEN/IS condition, this script logic runs 2 times and result doubles, while I need it to work only once. Here is a code:
    *WHEN P_ACCT
    *IS "PAC10064", "PAC10065", "PAC10066", "PAC10067"
    *REC(EXPRESSION=[P_ACCT].[PAC10064] + [P_ACCT].[PAC10065] + [P_ACCT].[PAC10066] + [P_ACCT].[PAC10067], P_ACCT="PAC10068")
    *ENDWHEN
    *COMMIT
    Is there any option to put Counter in BPC Logic, like in VBA where I can put code like this
    Y=0
    *WHEN P_ACCT
    *IS *
    IF Y=0
    *do calculation
    Y=Y+1
    END IF
    ENDWHEN
    Looking for help. Thank You.

    Nilanjan,
    1. Is there any option to generate intersection within %VALUE% with something else but not with so many *WHEN/ENDWHEN? The reason why I'm asking is that we have 300 calculations to develop and hadle in Script Logic and this will be quite a toughcode to maintain for client afterwards
    2. And another question: with 2 *SELECT statements we get 2 pools of Accounts, which we need divide ( SUM(Pool1)/SUM(Pool2) ). What I need to write in EXPRESSION and is there any chance to avoid FOR/NEXT in this case?
    *SELECT(%ACCOUNT1%, "[ID]", P_ACCT, "[SUBFUNC_ID]='SUB09'" AND "[TYPE]='u0417u0430u0442u0440u0430u0442u044B'" AND "[CALC]='N'")
    *SELECT(%ACCOUNT2%, "[ID]", P_ACCT, "[SUBFUNC_ID]='SUB07'" AND "[TYPE]='u0417u0430u0442u0440u0430u0442u044B'" AND "[CALC]='N'")
    *SELECT(%COSTCENTER%, "[ID]", COSTCENTER, "[TYPE_ID]<>'TP11'" AND "[CALC]='N'")
    *XDIM_MEMBERSET COSTCENTER=%COSTCENTER%
    *WHEN P_ACCT
    *IS *
    *DESTINATION_APP = KPI
    *SKIP_DIM = COSTCENTER_SEND
    *ADD_DIM AGGREGAT = AGR2, WORKSHOP_LINE = WSL2, STOCK_CATEGORY = STC2, PARTNER = PRN2, RESOURCE_TYPE = RTT2, SALE_PROJECT = SLP2
    *REC(EXPRESSION=................, COSTCENTER="CCN2", P_ACCT="PAC30318")
    *ENDWHEN

Maybe you are looking for

  • Emac Fire Wire to RCA DV Converter

    Is there a Converter out there like the "Apple Mini-DVI to Video Adapter" for the Emac?

  • Loss 3D graphics and can't connect to external display with NVIDIA card

    I note this morning that the graphics in 3D mode of iWork (version 4.1 with system 10.6.8) no longer appears in all software suite. The 2D graphics are displayed perfectly. I also notice I can't connect an external display when I am on NVIDIA card bu

  • Slideshow widgets work in Safari but not in Internet Explorer.

    I have tried both the Spry Image Slideshow with Filmstrip and the Spry Image Slideshow - Basic. They work well in Safari but they skip images in Internet Explorer. I am using the default widgets in each instance. In IE only the 1st, 3rd, 5th, 7th, 9t

  • SALERT_CREATE -custom alert creation for validation

    Hi, I have done one scenario,in which i have used the custom alert creation calling the SALERT_CREATE function module from my udf.That is doing fine but now i have an understanding problem that, in the udf we need to use one RFC receiver comm channel

  • Skype is using Credit instead of my subscription

    HI, I had both Skype credit and a subscription to Paraguay, and I was able to call my daughter's cell phone. But the first subscription ran out of minutes until Jan 2nd 2012, so I bought a new one, I picked the top choice of Call World and I thought