ZEROES in Scripts

Hi all
How to eliminate ZEROES in a script from a particular field.Is it possible to do without calling a driver program in Scripts.Please help
With Regards
Vijay G

if you are working with sap  scripts you can put a condition
in the first colum put
:/   if &field& <> 0. "this will check the condition
P1 &field& "this will print it
:/  endif.
if this heklps reward points

Similar Messages

  • Supress preceding zeros in script

    Hi Friends,
         Currently i am working on quotation. My main requirement is i want to suppress preceding zeros in the output, for that i am using (z) to the variable, but also it is not
    suppressing the zeros in output .
    ie
    I am using &Zvalue(Z)&  but  i am getting out put as 00234.
    I want to get output as 234.
    kindly help me.
    regards,
    desha.

    hi desha,
    U can avoid preceding zeros by using 'no-zero' while printing.
    for example,
    data: v1(10) type c value '0002.800'.
    write: / v1 no-zero.
    i think it will useful for u.
    Rewards points if useful,
    Thanks,
    Usha

  • I want to eliminate leading zeros in a script

    Hi Friends,
    Pls guide me  iwant to eliminate the leading zeros in scipt  output pls guide me.
    Regards
    Jagadeeshwar.B
    Edited by: Alvaro Tejada Galindo on Jun 12, 2008 5:24 PM

    Hi,
    &SYMBOL(Z)&  will Suppress leading zeros in script.
    In report, In order to suppress the leading zeros of a number field the keywords used are : NO-ZERO.
    <REMOVED BY MODERATOR>
    Thanks and Rewards
    - Rishika Bawa
    Edited by: Alvaro Tejada Galindo on Jun 12, 2008 5:24 PM

  • I am not sure if scripting is what I need

    Hello everyone,
    Please forgive me for the inexperienced questions. I will try to make this as clear and concise as possible.
    We have a form at work (8pages) that I have redesigned in word and then made a fillable form in PDF. I am wanting to add some features to this to really make it an asset to the company and the customer. I have spent the majority of today's work day looking through forums and trying to find the answers. Several posts have hinted at things that I am hoping to accomplish but none of them were exact.
    At the top of the form I am wanting a Text box/ballon/etc. open up when the customer opens the PDF.
    The box will have about 8 lines of information that explains how to use the form and then I would like for it to have an "OK" button at the end that when clicked makes the box disappear. (and not print)
    I also am wanting to add in a "Help" button at the top header of every section that when clicked/moused over has a text box pop up that has some basic FAQ's for that section.
    If this is accomplished by a click of the mouse then an "OK" button to make it disappear, if this is a mouse over action then no click button needed. (I would not  want any of these help buttons to print out)
    I am unsure on how to accomplish this, I am working with Adobe Acrobat X Pro. I have tried making text boxes that are visible and then you click them to make them go away - works somewhat but when you click it to "Hide form field" the box is then no longer visible again unless you go into editing mode, making it usable on once (sure that I am missing something simple).
    In my limited experience I am unsure if I need to make all the "Help" information be located in a separate file and make the "Help" buttons link to the FAQ's that are set up for their section in that file. Or wether I can make what I would call "Pop-up" windows that would be mouse overs.
    I have zero java scripting experience but if that is the true way to make this happen in an elegant and functional way then I have the ability and most importantly the desire to take classes.
    Any and all thoughts are appreciated, I am working to learn more everyday but I can't afford to waste to much time on this as I need to have it ready within 3-4 weeks (end of November) to be sent to clients.
    I am hoping to really blow away the owner of the company with this and in turn have him invest in adobe suite for myself and to pay for me to obtain certified in adobe and take classes on the company budget.
    Thanks in advance for any and all help,thoughts, and advice

    What you describe can be set up with a non-printing button. A button can be set up to have any size and appearance you want. In the Mouse Up event of the button you can use something like the following:
    // Create the string to display
    var msg = "This is the first line of text with two carriage returns at the end.\r\r";
    // Add some more test to the string...
    msg += "This is the third line with a single carriage return at the end.\r";
    // ...and a bit more.
    msg += "This is line 4\rand this is line 5.";
    // Display the text in an alert with an OK button
    app.alert(msg, 3);
    For more information on the app.alert method, see: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.135.html
    There are a number of other ways to implement this type of thing, but see if the above approach works for you. If not, post again and we can make other suggestions.

  • Content length zero

    Hi
    In open script i am getting content length zero
    Open script made settings in the preferences>>Playback>>Error Recovery>>zero Lenght download make as ignore the script is working
    But the same script i am using in the scenario to load test it is failing
    regards

    HI Alex
    In OLT Scenario this is the configure paramter settings is this
    vu >>5
    system >>oltserver
    usermode >>javaclient
    iteration >>1
    vupacing >> recording
    browsing emulation >>IE6.0
    user ip spoofing >>ticked
    Zero downloads fatal >>ignore
    In Watch Vu Grid : Still i am getting the error
    Current Error column :ThinbrowserException occured : Content lenght is zero and it is failing
    I need some more details for this to make sure to run the scenario without errors
    Hope i can get some more help
    regards
    abdul

  • When I mark a mail in the junk folder as 'not junk', is there a way to have it automatically move to the inbox?

    Apple Mail keeps putting good messages into the Junk folder. I mark them as 'not junk', but then they just sit there. It is really tedious to have to move them back to the inbox, and change the colour back to black. Is there any way to do this automatically?
    I originally placed this question on the Snow Leopard group, but since then I have updated to Lion. I was hoping that Lion would have provided a solution, but it seems not. In the Snow Leopard group, somebody posted a script which apparently works in Snow Leopard, but I have no idea if it works in Lion, as there doesn't seem to be any way to load scripts.
    This is the script, anyway.
    It was given to me by <Bernard Hills> but I don't know who wrote it.

    OK, I've discovered how to access the library.
    It's here: http://techheavy.com/2011/07/access-the-user-library-folder-in-lion/
    But I don't really want to try that script in case it screws something up. I know zero about scripting.

  • Calling javascript function

    Hi,
    I have a javascript function which i want to call when item P6_PID is null.
    When i try calling it using the below code its not running
    I have added alert box to check the code... When P6_PID is null i'm not getting the alert box but when it is not null i'm getting the alert message..
    The below code is written in REGION FOOTER which is calling hideButton() function.
    The Function HideButton is in PAGE HEADER.
    <script>
    alert(&P6_PID.).length)
    if( (('' + &P6_PID.).length) == 0)
    hideButton('addNotes' , 'editNotes' , 'addNextStep' , 'editNextStep', 'addChallenges' , 'editChallenges' , 'addPersonalNotes' ,'editPersonalNotes') ;
    </script>
    I don't understand why the above code is not running when P6_PID is null.
    Please help...

    I have added alert box to check the code... When P6_PID is null i'm not getting the alert box but when it is not null i'm getting the alert message..
    The below code is written in REGION FOOTER which is calling hideButton() function.
    The Function HideButton is in PAGE HEADER.
    <script>
    alert(&P6_PID.).length)<b>Try this to check if length is zero: </b>
    <script language = "javascript">
    var mylength =  ($x('P6_ID').toString()).length;
    alert(mylength);
    </script>But, why do u need to check the length = 0? You can simply check if value is null by using:
    <script language = "javascript">
    if(($x('P6_ID').value=="")
    alert('Value is null');
    </script>

  • HOW TO: Make Buttons that appear to Fade up and Down

    How would you do this?
    I looking for a series of buttons appear to fade up on mouse
    over and fade back down on mouse out, on click goto to scene (got
    that working).
    How should I structure this. Tried really hard to make this
    work but getting know where.
    Should I Trigger a movie clip if so what's the code to play a
    movie that's behind the button? (I've got the button with just a
    hit state so it's transparent).
    For info I am a designer and would describe my knowledge as
    pretty good on making non interactive flash.
    But interactive, next to zero action, script next to zero. I
    can make a button goto to scene, frame, use stop but that's it!
    I'm using CS3 but with with Actionscript 1.0 2.0. as 3.0 too
    much for me right now!
    Is this easy or hard?
    I'm going nuts!!!
    Crack this and I'm off and running!

    no problem buddy, you can do this. The easiest method would
    be to use the Tween class, this makes things very simple.
    Here's an example of this type of Tweening, just using the
    alpha property:
    FILE

  • BPC5.1 - Data manager package to Stored proc with custom return codes

    Hi all,
    Does anyone have experience passing the return codes from a stored procedure back into the eData "view status" package progress or event log details?
    When my stored procedure throws errors, the offending SQL code shows up in the pacakge details, which is helpful. But what I'd really like is to structure my stored proc with return codes
    0 = everything's wonderful
    1 = invalid category / time combination
    2 = unauthorized
    3 = no data to process
    And then handle these codes as either "completed" "warning" or "error" in the package progress.
    And ideally, I'd like to put some meaningful message about the warnings & errors, directly into the log details, so the user can fix the problem themselves rather than ask the IT guy to trouble-shoot.
    Any tips? I've started playing with using the on-complete, on-success, on-failure routing of different tasks within the DTSX package (SQL 2005), but I'm just working on a trial-and-error basis right now. (With # of errors = # of trials.)
    Thanks,
    Tim

    In case anyone's interested, I've solved this by tracking my return codes as a package variable.
    Within the package, I have conditional logic moving from task to task, evaluating the return code to check for various conditions, and selecting which tasks to perform accordingly.
    In the last task, I run a final stored procedure which posts some data (completion time & status) to a custom transaction log table, and then if the return code is not zero, I script and execute some SQL which I know will throw a "fake" error. The SQL statement itself includes the key information I want the end user to see. For example
    Select InvalidEntitySelection [USEast1],TransactionID [12340]  from ThisTableDoesntExist
    Select UnauthorizedUser [Tim], TransactionID [12345] from ThisTableDoesntExist
    Select WorkStatusIsLocked [USEast1 Actual 2008], TransactionID [12345] from ThisTableDoesntExist
    It's not exactly elegant, but it gets the message across, which is all that I need. In this way, the end user sees that the package failed with an error, and when they look at the package details, they can see the problem. They can pass on the transaction ID to an administrator to look into the details, if they can't figure it out on their own.
    Sorin, I never managed to figure out how to use a VB task to send the information back to the user, plus force the package to end in an error. I'm sure there's a way to do so, but this seems to work for my requirement.
    I'm not entirely happy with the "fake error" approach, but I don't know if BPC has any support for "intentional" programming of errors in the DTS scripting toolset.
    Thanks,
    Tim

  • Changes Interactive forms after SAP_BASIS SP19, SUM in formcalc

    Hi,
    after updating to SP19 of SAP_BASIS, formcalc has changed in sum() evaluation (I know it is strange):
    Before SP19 in this expression:
    Sum($form.IK.IN.DATA[*].N_HOD), Sum returns zero value if table has zero rows (nothing to count)
    now I get error (if table have zero rows) :
    Script error:.....Error:accesor '$form.IK.IN.DATA[*].N_HOD' is unknown.
    Before SP19 behaviour was better, now I have to check all tables if have data, perform sum into variables and then sum variables...
    this means 4x longer formcalc code........
    Many thank for any explanation or workaround.

    Hi,
    It's my problem only.
    Coming to my FORMCALC/JAVASCRIPT Problem,I made some mistakes in my scripts, which lead me to this confusion.
    And coming to my BADI Method problem which I mentioned below...I didnt activate my BADI Method, but I was expecting those changes to be there in EP. I checked these methods carefully and found that my METHOD is not ACTIVE.After ACTIVATION of my method, I can see the CHANGES happening perfectly.
    So there is absolutely <b>NO BUFFER PROBLEM</b> from <i>ADOBE INTERACTIVE FORMS</i>.
    Regards,
    Raja Sekhar

  • Passing Variable via BridgeTalk

    Hello,
    I'm simply trying to send send 2 variables through BT to PS from IA to create a new document of the specified size.  Why isn't this working, please?  It works fine if I substitute numbers for the variables in the body of the script.
    #target illustrator;
    var artWidth = 100;
    var artHeight = 100;
    var bt = new BridgeTalk;
          bt.target = "photoshop";         
           var script = "app.documents.add(artWidth,artHeight);"       
           bt.body = script;
           bt.send();
    Thank you for saving my sanity, again!

    Thanks Mark,
    When I initially started on this, I knew that PS gave you the option of using the clipboard for the new document size but, I didn't see anything in the PS Ref about being able to script that option during a document creation.  That's what gave me the idea of pulling the dimensions of the art from illustrator and sending them to PS.
    I know zero about scripting PS and I guess I assumed the scripts would automatically work in pixels like AI.  Since I've only really scripted Illustrator (Applescript and now JS), I was suprised at just how much the scripting options differered.
    Luckily, I only have to take art from Illustrator into PS and save it as a TIFF (with the options that PS offers over AI).
    You mentioned something that I didn't know you could do, though.  Before getting into scripting, I used to record actions for things that they could do.  But, how do you get to the actual code they produce?  Can you use that in scripts?  If so, could you transfer that code into ScriptUI code for use in a palette?  Seems like that would open up alot of options!
    Thanks!

  • WA.R.T. - WAllpaper RoTator (another one)

    hi guys!
    well, i know there already are a bunch of these around.. but i couldn't really find what i wanted, and i have like zero experience scripting bash. actually, this is pretty much my first script. it uses fbsetbg (can be changed pretty easily, though) to change my wallpaper every X minutes, or it can put a random wall every time it is executed. tell me what you think, and PLEASE let me know how i can improve it
    #!/bin/sh
    ## Wallpaper rotator by Christian Brassat ##
    ## /\ \ /'__`\ /\ \__/\ \__ /\ \\ \ ##
    ## \ \ \/'\ /\_\L\ \\ \ ,_\ \ ,_\ ___\ \ \\ \ _ __ ##
    ## \ \ , < \/_/_\_<_\ \ \/\ \ \/ /'___\ \ \\ \_ /\`'__\ ##
    ## \ \ \\`\ /\ \L\ \\ \ \_\ \ \_/\ \__/\ \__ ,__\ \ \/ ##
    ## GNU GPLv3 2009 ##
    # Settings
    displaytime="10" # Minutes every wallpaper should be displayed
    directory="/##DIRECTORY##" # Directory containing the walls to be switched
    loop="true" # Loop or no loop - values: true or false
    # Script (do not change unless you know what you're doing)
    let "displaytime *= 60" # Converts minutes to seconds for 'sleep' function
    # Loops wallpapers when 'loop = true'
    while [ $loop = "true" ]
    do
    for i in $(ls $directory)
    do
    fbsetbg $directory/$i
    sleep $displaytime
    done
    done
    # Switches to random wallpaper when 'loop = false'
    if [ $loop = "false" ]
    then
    # Creates an array from all wallpapers
    files=($directory/*.*) # create an array of the files.
    N=${#files[@]} # Number of members in the array
    ((N=RANDOM%N))
    randomfile=${files[$N]}
    # Sets wallpaper from random file
    fbsetbg $randomfile
    fi

    Perhaps you could combine it with that one, which is made for XFCE4 and works fine:
    #!/bin/bash
    export PATH="/sbin:/bin:/usr/sbin:/usr/bin"
    ROTATEDELAY=120
    WORKDIR=/tmp/.rotate_wallpaper
    FILELIST=$WORKDIR/.imagefiles
    # Location of the directories of your image files.
    IMAGEFILES="$HOME/wallpapers"
    if [ ! -d $WORKDIR ]
    then
    mkdir $WORKDIR
    fi
    if [ -e FILELIST ]
    then
    rm -f FILELIST
    fi
    # Build file list
    for I in $IMAGEFILES
    do
    find $I -type f \( -name '*.jpg' -o -name '*.png' -o -name '*.gif' \)>> $FILELIST
    done
    # Load list of images into array and remove unneeded file.
    oIFS=$IFS IFS=$'\n' LINES=($(<"$FILELIST")) IFS=$oIFS
    rm $FILELIST
    # Pick random image, set the background, and loop forever.
    cd $WORKDIR
    while :
    do
    n=${#LINES[@]}
    r=$((RANDOM % n))
    IMAGE="`echo ${LINES[r]}`"
    xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s ""
    xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s "${IMAGE}"
    killall -USR1 xfdesktop
    sleep $ROTATEDELAY
    done
    That one is using the regular means for setting the XFCE4 background (xfdesktop and xfconf).
    KDE3/4 users do not need scripts for that, and while I'm not sure (not using Gnome) there are a couple of GNOME apps that can rotate the wallpaper.
    Last edited by scarecrow (2009-07-05 18:17:59)

  • Loading forecasts alternatives to HFM (9.3.1)

    Hi,
    I'm hoping that you could provide some recommendations as to what is the best method for us to load data into Budget/Forecast scenarios.
    As a bit of background to our HFM structure,
    I am only concerned with loading data into 1 entity, however we are using C3 to represent different business units/cost centres of the business of which there are approximately 300. Up until now, all budgeting and forecasting would be prepared by individual business units/cost centres in excel and "submitted" to central finance where we would them consolidate the forecasts together in excel before submitting via FDM as a ranged load to HFM.
    There is a deep desire to enable at least to divisional level; the ability for individual users to submit data directly to HFM so that they can control their budgeting process. It is also likely that they will want to continually re-submit revised budgets to HFM during the process.
    There are a number of solutions I can see to allow the divisions to submit.
    *1) Use data forms via excel to push the data to HFM.*
    This has the advantage that I can ensure that no zero amounts are loaded into HFM however given the number of cost centres containg data (approx 300) this would be cumbersome to say the least.
    2) Setdata in Smartview.
    As above.
    3) FDM using range load templates
    Because all of the divisions exist under the same entity but want to submit their data at different times, it is not possible for them to use the replace load method, they would have to use the "merge" load method to ensure that they do not remove other divisional data. This presents the problem that all accounts will need to be loaded against even if the value is zero to ensure that if a value of an intersection changes to a zero, the total value of the TB is correct.
    A quick calculation 300 cost centres * 200 accounts * 12 months = 720,000 data points at a minimum for P&L only. The vast majority will zero.
    How well does HFM deal with zero values? for 720k - 1m are not an issue with regard to performance etc then it may be acceptable. At a push I could always use a remove zero's script once the budget/forecast is finalised.
    If anyone has had a similar issue or can provide any other solutions or things for me to consider, then I welcome your feedback.

    Hi,
    Can you define "diffrent domains" for me? Are they diffrent phisyical machines? What type of database server are you using?
    -Tony

  • Deleting zeros in Quantity field in Sap Script

    Hi,
    I have a Quantity(FKIMG) field in Invoice (Sap Script), It is showing as 1.000 ,I want to show this as 1 ,By removing all zeros and point.
    how can i do this in Script?
    Thanks in advance,
    fractal

    Hi,
    Use <b>TRUNC</b>    "Interger part of x
    ex:
      TRUNC(FKIMG) to get integer part of the quantity.
    or
    declare an integer variable and pass quantity to this variable , use the same variable for print.
    Regards
    Appana

  • How to prevent a text in script from displaying if its value is zero

    Dear all,
    How to prevent a text in script from displaying if its value is zero
    for eg   Price  = 0.00
    if price is 0 it should'nt appear in output.
    I tried with    if price ne 0.
                       price = &price&
                        endif.
    but it's not working.
    Regards
    Raj
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Jan 20, 2009 8:59 AM

    Hello Nagaraju,
                           What you were doing is partially right.
    The correct format to write in the script is as follows :
    /:  if &PRICE& ne 0.
      &PRICE&
    /:  endif.
    This should work. Let me know how it goes.
    Nayan

Maybe you are looking for

  • How do I Change my Apple ID on my iPad with IOS7.  The area is grayed put

    How do I Change my Apple ID on my iPad using  IOS7.  The area is grayed out and won't allow it to be changed.  I changed my Apple ID when my email change but when i upgraded ti IOS7 it reverted to the old ID and now won't me change it.

  • Inline Search with Library and Link App Part

    I have created a wiki page with a Library app part on it.  The search box option is checked and it displays as expected as part of the Library app part.  At this point I can type in the search box and it filters the library as expected -everything is

  • Need help connecting guitar, a/i, speaker together.

    I'm new to this forum, and sure this has been covered, but i couldn't find what i'm trying to do. I want to connect my guitar to garageband, then output it live to either my stereo. I have an airport express connected to stereo if that helps me or no

  • Where to down load input/writ​e Chinese Simplified Pin Yin

    I bought BB Tour 9630 contract with verizon can somebody help where to find input/write chinese simplified PinYin thank you

  • About cube

    currently, i am doing a project using xmii, and i use olap query to visit data in bw, but i am a little confused about that query . so could someone tell me what is a cube ,what is the structure of a cube