DAL- countrec() with a special case

Consider this...
<root>
     <bb>abcd</bb>
     <bb>xyza</bb>
     <bb>xyza</bb>
     <bb>abcd</bb>
     <bb>rwaa</bb>
     <bb>abcd</bb>
     <bb>abcd</bb>
</root>
i want to find the number of <bb> tags... whose value is not the same as previous one...
here it should be 5 (as "xyza" and "abcd" appears consecutively)
But...countrec("!/root/bb") fetches 7
Thanks in advance !!!
Navin.

Hi Navin,
I haven't seen any available rule or function to do what you are looking at. I am also not sure if you are looking at a one line simple method. But this is what I was able to find for you. A simple DAL function named "CUSCOUNTREC" given below:
#srchmask = CountRec("!/Form/bb");
#index = 2;
#cuscountrec = 0;
prvvalue = "";
curvalue = "";
While( #index <= #srchmask )
     prvvalue = Trim( GetData("!/Form/bb["&(#index-1)&"] 1,20") )
     curvalue = Trim( GetData("!/Form/bb["&(#index)&"] 1,20") )
     #strcomp = STRCompare(prvvalue,curvalue)
     If(#strcomp!=0)
          #cuscountrec+=1          
     End
     #index+=1
Wend
IF(#srchmask>0)
          #cuscountrec+=1          
END
RETURN (#cuscountrec);
Two important things to note here are:
1. I have hard-coded the Search mask as "!/Form/bb"
2. I have assumed that the field "bb" will be maximum 20 bytes in length.
However you can have these two things controlled using the GVM (by making use of SetGVM, HaveGVM functions from wherever you would want to call).
Thank you.

Similar Messages

  • Disabling default Sync iTunes with iPod (special case)

    I would sincerely appreciate it if someone could answer my question:
    I want to know if I can disable the iTunes default were it "automatically copies the songs and playlists in your iTunes library to your iPod, and deletes songs from your iPod that aren't in your library" when you connect your iPod to your computer. I know that you can do this from the iTunes preferences, but this requires you to connect your iPod and therefore lose all the songs on the iPod that aren't in the library before you would be able to change the setting. (my library has changed a lot and I don't want to lose all the songs that are only on my iPod).
    Is there some kind of keystroke that you can use to prevent this default script from running so that I can change the setting without losing all the songs unique to my iPod? Thank you.
    +Possibly helpful info:+
    I have iTunes 6.0.4 and an iPod Photo. I set up all of my music on my iPod using an earlier version of iTunes (likely version 5). In that earlier version, I changed the preference to disable auto-syncing, but I have since installed iTunes 6.0.4 and (can't tell)/(change the setting) unless I plug in my iPod

    You can use a keyboard command to prevent your iPod auto-syncing with iTunes. While connecting the iPod to the computer on a Mac hold down the Option and Command (⌥ and ⌘ Apple) keys together. I believe this command has been the same from earlier versions of iTunes until now. This will stop the iPod from auto-syncing with iTunes and it will appear in the source list. Wait until you are sure the iPod has mounted, and that it will not auto sync and then you can let the keys go. This may take between 20 to 30 seconds depending on your computer. You should then be able to change your settings: iTunes for Mac - Keyboard Shortcuts

  • Special case with dataguard

    Greetings!
    I would like to configure a dataguard standby database with a special primary. I have two servers, both access the same SAN storage and having the spfile (linked from $OH/dbs), redologs, controlfile, datafiles on this SAN. Because of that in the same time only one of the servers is able to mount and run the database. (This is NOT a RAC) And because of this situation it is not a matter which server maintains the instance because it is always the same one.
    My Q:
    Am I able to configure the DataGuard to try to dynamically connect to both servers and use that one which maintaints the instance?
    Thank you in advance.
    Best regards,
    Miklos

    Miklos
    First of all this is not a Dataguard configuration, this is just an Active/passive configuration working with the same data. In case of a failure event at the datafiles, this topology won't protect you.
    Dataguard is a stand by database at a 'remote' site which maintains its own set of datafiles, controlfiles and redologfiles, which is transactionally updated by means of an archivelog stream coming from the primary database, either physically or logically updated. In case of failure of the primary database or host or storage, you can switch to the stand by so the operation continues with minimum down time.
    In the topology you are planning, in the event of failure from the database at the datafile level there will be no way to recover but by means of a restore/recover operation. If dataguard is a mean to maintain a continuous business operation, this approach won't provide but redundancy at the node level, and it is rather a Cold Failover Cluster.
    ~ Madrid
    http://hrivera99.blogspot.com

  • Problem with Icelandic special characters on Mac

    Hello
    I am working on a Flash publication for students, and I want it to run on Mac as well as PC. Everything goes fine, except a problem with three special characters in my language, Icelandic. I am working on a registration and login page where I am using text boxes and text input boxes. Everything looks correct on PC, but on Mac the characters Þ Ð Ý are lost.
    I have tried different fonts etc.
    Any idea what is wrong?
    Jónas Helgason

    Hello Jónas,
    Did you ever figure this out ?
    I have a similar problem except only with two letters (both upper and lower case).  These two Icelandic letters can't be entered into a Flex TextInput box in the Flex apps I am creating when they are loaded on a Mac.  The letters are known as &Eth, &eth, &Thorn and &thorn in HTML terminology.  Typing these characters on the keyboard results in the following:  { [ ? /
    However I can copy the characters in question from some other app like TextEdit and paste them into a TextInput box in my Flex app and all is well, they show up correctly.
    This happens regardless of the Mac browser used and the Flash plugin version used (have tried both 9 and 10) and also happens in the standalone Flash Player application.
    Does anyone have any idea how to fix this or is this a bug in Flash Player ?  This is really annoying as it makes text input into Flex apps on Icelandic Macs very difficult.
    There must be something wrong with the mapping of keyboard key codes into character codes on the Mac that is causing this.
    Btw, I just heard from a friend that this problem does not exist in MacOS 10.6.  I am running 10.4 and have tested this on 10.5 and it exists on both of those OS versions.
    Rgds,
    Hordur Thordarson
    Lausn hugbunadur
    http://lausn.is

  • Selecting with a special character

    Hi,
    I have a table in which an user can query via a sql prompt (accept) for a text he wants to search for. This search string can contain special characters like @,$,& etc but nog on a specific position. Sometimes they search for bbbb.hhhh_23, the next time the search for pppp & xxxx. I already thought that (double) quoting would help, tried escaping (\) also but still got errors with my procedure. So, how can I search those tables with the special chars and display the text the user is searching for?
    Thanks!
    Paul

    Hi,
    Please see the forum FAQ {message:id=9360002}
    What exactly is the problem you're having?
    What input are you giving, and what output are you expecting? Remember, you need to post something that the poeple who want to help you can run to re-create the problem and test their ideas. In this case, you need to post something like this:
    "I'm running this in schema ATL5_TEST, which includes this table: CREATE TABLE TABLE_X ... with these rows: INSERT INTO table_x ....
    When I run the script and set &search to 'A_B', I'm expecting these results ... because ... but instead, I'm getting these results ... As you can see, the results are missing ....
    When I run the script and set &search to 'C%D', I'm expecting ... because ... but instead, I get this error message: ..."
    Simplify the script as much as possible. For example, if the problem involves how to accept a certain character into a substitution variable, then you don't need to post 60 lines of PL/SQL code, even if your goal is to use that substitution vaiable in that PL/SQL code. Just post the ACCEPT statement, maybe a very simple "SELECT ... FROM dual;" query to get some results, a couple of inputs, and the expected outputs/
    Never write, let alone post, unformatted code. Indent the code to show the scope of BEGIN, IF, LOOP, and so on.
    When posting any formatted text (including, but not limited to, code) on this site, type these 6 characters:
    \(all small letters, inside curly brackets) before and after each section of formatted text, to preserve spacing.
    The EXCEPTION section you're using is only hiding details about the error.  Get rid of it.
    Whenever you write dynamic SQL, start by displaying the SQL string *instead of* executing it.  for exampledbms_output.put_line (v_sql || ' = v_sql before EXECUTE IMMEDIATE');
    -- execute immediate v_sql
    -- into v_match_count;
    When you get this much running, and the output is what you expect, then you can uncomment the EXECUTE IMMEDIATE statement.  Later, you'll want to comment out the call to put_line.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • What does the trim() method of the String class do in special cases?

    Looking here ( String (Java Platform SE 7 ) ), I understand that the trim() method of the String class "returns a copy of the string, with leading and trailing whitespace omitted", but I don't understand what the last special case involving Unicode characters is exactly.
    Looking here ( List of Unicode characters - Wikipedia, the free encyclopedia ), I see that U+0020 is a space character, and I also see the characters that follow the space character (such as the exclamation mark character).
    So, I decided to write a small code sample to try and replicate the behaviour that I quoted (from the API documentation of the trim method) in the multi-line comment of this same code sample. Here is the code sample.:
    public class TrimTester {
        public static void main(String[] args) {
             * "Otherwise, let k be the index of the first character in the string whose code
             * is greater than '\u0020', and let m be the index of the last character in the
             * string whose code is greater than '\u0020'. A new String object is created,
             * representing the substring of this string that begins with the character at
             * index k and ends with the character at index m-that is, the result of
             * this.substring(k, m+1)."
            String str = "aa!Hello$bb";
            System.out.println(str.trim());
    However, what is printed is "aa!Hello$bb" (without the quotes) instead of "!Hello$" (without the quotes).
    Any input to help me better understand what is going on would be greatly appreciated!

    That's not what I was thinking; I was thinking about the special case where the are characters in the String whose Unicode codes are greater than \u0020.
    In other words, I was trying to trigger what the following quote talks about.:
    Otherwise, let k be the index of the first character in the string whose code is greater than '\u0020', and let m be the index of the last character in the string whose code is greater than '\u0020'. A new String object is created, representing the substring of this string that begins with the character at index k and ends with the character at index m-that is, the result of this.substring(k, m+1).
    Basically, shouldn't the String returned be the String that is returned by the String class' substring(3,9+1) method (because the '!' and '$' characters have a Unicode code greater than \u0020)?
    It seems to not be the case, but why?

  • Sql Loader record delimiter (SPECIAL CASE)

    I have a special case where I want to use <EOR>\n as record delimiter, but OWB won't load any data with that. If I only use <EOR> it does load data but throws warning (1 Row not loaded because all fields were null), TRAILING NULLCOLS option is enabled. I appreciate the help.

    Hi David,
    First of all, I appreciate your reply. I did do what you recommended (OMBALTER FLAT_FILE 'ABCD' SET PROPERTIES (RECORD_DELIMITER) VALUES ('<EOR>\n'). I didn't open the FF, but I did sync the FF and deployed the mapping unfortunately it didn't work "File processing option string: "STR X'3C454F523E5C6E'" (basically HEX values)
    Any more suggestions?
    The reason I want to use this record delimiter is:
    LINE1 = AB|CD|EF|GH|IJKL<EOR>$ note:($ is \n)(set list)
    LINE2 = AB|CD|EF|GH|IJKL$
    MNOPQRSTUVWX$
    YZ<EOR>$
    For the time being I fixed the problem by putting all columns(ROW EACH) in a single row and just use '\n' as RD, but I would like to do it by using ('<EOR>\n') as RD as well.
    I appreciate the help.

  • Special case of pricing and GL

    Dear all,
    We have a special case from our user. We are selling our product to an outlet with an invoice of Rs 73 per liter of milk. If I want that Rs 72 should hit one GL and Rs 1 goes into a new special GL , what procedure is required? Need to know the changes in SPRO

    Initially you told 1rs now asking as 6Rs---seek the clarity from client.
    why you made this thread as answered???????????
    Apart from maintaining separate customer pricing---
    1.Make ZCPP as 78Rs by condition records--sub total as XWORKD
    2.ask your client how they are retrieving 6 Rs as distributor margin(accordingly maintain the percentage as condition records for ZTMV and give step number of ZCPP in from column)(you also try as statistical)(sub total as XWORKE)
    3.now maintain ZLOC with calculation formulae as 12.
    4.maintain ZKSU surcharge as suggested by your client.
    Note: we cannot give you step wise completely--rather you need to try on your end--any problems let us know.
    Phanikumar

  • Sir, We have around 500 items as Insurance Spares in the stores. These spares are checked once in 6 months for their healthiness, storage, etc with a special checklist. We want this checklist an schedule in SAP ( MM). How to do it? Please help.

    Sir, We have around 500 items as Insurance Spares in the stores. These spares are checked once in 6 months for their healthiness, storage, etc with a special checklist. We want this checklist an schedule in SAP ( MM). How to do it? Please help.We are presently doing it as similar to PM schedule ( PM module) but want it in MM module.

    Hi Prerna
    Please refer the this doc ...it might help you
    http://www.erptips.com/Samples/ERPtips-SAP-Training-Manual-SAMPLE-CHAPTER-from-Basic-Quality-Management.pdf
    and kindly update the status if it works or not
    Regards
    Partha

  • RFC destination with CIF application case !

    Hi,
    Can someone explain the difference between
    Assigning a logical system to a RFC destination  and
    u201CAssigning a logical system to a RFC destination with CIF Application case" (there are 4 of them in all as i see - AC, RL, RQ, DG, AC- refers to availability check)
    e.g I have 2 entries in the system landscape settings.
    1)     Logical system u2013 RFC destination
    2)     Logical system- application case AC u2013 RFC destination.
    Even if I remove the 2nd entry, the relevant APO ATP FMu2019s are called  (just a negative testing to see what goes wrong without application case) but am clueless about this concept of CIF application case. Why such a provision to begin with. The context help says. some transaction need to have synchrious RFC and hence the need but i see the same even without his entry.
    Regards,
    Loknath

    Hello Loknath,
    If I understand your query correctly,
    1.Assign logical system to RFC destination is OK for you.
    2.Assigning the RFC destination to a specific CIF application is used in the following case,
    You have a system/service user set up for communicating with the R/3 system thru CIF & this is assigned to the RFC destination assigned to the point no:1
    & for debugging purposed you need a dialogue user, so you may assign this dialogue user to a different RFC destination & assign it here in the customizing (Assign RFC to application cases) to the application Debugging..so that while the particulat application is called (Debugging...CIF cockpit...etc)the corresponding settings from the different RFC destinations will be used.
    I could not understand your query, where u relate some ATP stuffs with this CIF topic...
    Thanks,
    Mahesh

  • Firefox doesn't reconvert special characters in the file names when download a file with any special characters in the file name

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [/questions/815207]</blockquote><br>
    if i try to download a file with any special characters in file name (e.g. File_Name.pdf), it doesn't reconvert them from the "sanitize url" process and download the file an incorrect name (e.g. File%5FName.pdf).
    This is really annoying.
    Thank you for your patient

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * [[Troubleshooting extensions and themes]]

  • FLEX debugger not hitting breakpoints, because Flash sometimes embeds source file paths with wrong letter case?

    I was trying to figure out why breakpoints were working fine for source files in some locations but not others.  FlashDevelop's debugger (which I believe is actually the FLEXSDK debugger) was successfully connecting, tracing output, and hitting breakpoints in SOME files, but not others.
    I downloaded SWFInvestigator from Adobe Labs and checked the embedded debug paths for various source files to see what was going on.
    I discovered that files in which no breakpoints could be hit had their paths embedded in all lowercase (e.g. "c:\users\username\desktop\source\myproject" instead of "C:\Users\username\Desktop\source\MyProject").
    So I have two questions:
    First, is this a Flex debugger issue, or a FlashDevelop plugin issue? Letter case shouldn't matter or interfere with matching file paths in Windows.
    Second, what could possibly influence the letter case of embedded paths in a SWF output by Flash Professional (CS6), such that they are sometimes all lowercase and other times maintain the same case from the file system?  And why would that affect a debuggers ability to hit breakpoints in Windows 7?  I am compiling in multiple ways. Sometimes clicking Publish within Flash. Sometimes the file being published is not even open in Flash, and my JSFL script file is passed to Flash.exe containing embedded file paths to open the document. Usually, everything seems to work fine, no matter where I publish from, regardless of whether the FLA file is open or not. I'm honestly starting to believe that it depends on how the FLA was last opened in Flash Professional, as though it saves some sort of last access path internally and uses that to embed debug information.

    I don't think it's the source path in my case, because it's simply the dot ".", although I did check that because it would most likely influence the embedded paths.
    In the library path, I use relative paths exclusively, since all my individual project folders exist in the same "source" folder.
    Here's how I arrived at the conclusion that something more complex or "stateful" must be occuring:
    I publish my files with a one-click application, which does the following
    updates version timestamps (static constants) in specific files via regex match
    fills in a JSFL template with the FLA filename and writes the JSFL file to disk, then passes the JSFL file path to flash.exe for publication
    the JSFL then runs a command, which signals the main application via cross-process communication that the script has finished publishing
    That all makes it easy for me to update and publish multiple projects and deploy them, with a single click.  Here is the JSFL template I created, which has been drastically simplified since the days where it used to search to see if the file was open in Flash, select the document, and call publish.  Now it just uses the publishDocument method to silently publish files without opening them.
    var filepath = "FLAFILEPATH"; //template parameter: the URI (beginning with "file:///") of the FLA file to publish
    fl.publishDocument( filepath, "PUBLISHPROFILENAME" );
    FLfile.runCommandLine("COMPLETECOMMAND");
    The C# app replaces the strings in all caps with the actual values.  The COMPLETECOMMAND is actually populated with the application's own executable path, along with a "complete" switch, which lauches a 2nd instance, which handles the complete switch by broadcasting a signal over an interprocess channel and then terminates.  The main instance captures the signal, triggers a wait handle, and continues with publishing the next file.  Here is the core code for it:
    private string fillTemplate( string fla_directory, string fla_filename, string publish_profile_name )
        string fileuri = "file:///" + Path.Combine( fla_directory, fla_filename ).Replace( '\\','/' );
        return EmbeddedResources.OpenAndPublish //JSFL template file embedded as string resource
            .Replace( "FLAFILEPATH", HttpUtility.JavaScriptStringEncode( fileuri ) )
            .Replace("COMPLETECOMMAND", HttpUtility.JavaScriptStringEncode( "\"" + Application.ExecutablePath + "\"" + " -publishcomplete" )) //call self with -publishcomplete switch to signal main instance's publishCompleteSignal
            .Replace("PUBLISHPROFILENAME", HttpUtility.JavaScriptStringEncode( publish_profile_name ) );
    private static readonly string FLASH_PATH = @"C:\Program Files (x86)\Adobe\Adobe Flash CS6\Flash.exe";
    public void publish( string fla_directory, string fla_filename, string publish_profile_name )
        Program.publishCompleteSignal.Reset();
        string template = fillTemplate( fla_directory, fla_filename, publish_profile_name );
        string curdir = Environment.CurrentDirectory;
        string tempJSFLfilepath = Path.Combine( curdir, "temp_script.jsfl" );
        File.WriteAllText( tempJSFLfilepath, template );
        Process p = Process.Start( FLASH_PATH, tempJSFLfilepath );
        Program.publishCompleteSignal.WaitOne( 30000 ); //timeout after 30 seconds
    Here's where it gets interesting.  The FLAFILEPATH has ALWAYS been passed in as all lower case, yet this publication method has worked 99% of the time for hundreds of publish operations every day.  This applies to both the publication of the first SWC, which is referenced by the second published SWF (both were being published with lowercase paths), yet the paths for the main SWF were remaining in lowercase, while those in the referenced SWC were maintaining the correct case from the file system.
    So there may be any number of things going on here.  SWCs may be published differently than SWFs, such that SWCs always have the correct letter case for debug source files, regardless of how the source FLA project was opened.  Ensuring the path passed to publishDocument uses the right case definitely fixes the problem, but it doesn't explain why it usually worked, despite having always been passing a lowercase string.  The only variable I can think of in all of this is Windows itself or Flash, such as whether the document was open in Flash at the time the silent JSLF publishDocument command ran, and how that FLA was last opened (via shortcut, via "recent documents" in Flash, via recent documents in Windows.  It has to be something, even if it's something as obscure as how the folder path was last accessed in windows, although I strongly suspect it's just how (in terms of path case) the FLA was last opened in Flash.
    In any case, I'm happy that passing the right case to JSLF's publishDocument command fixes the problem, so I'm not going to spend any more time trying to figure out how opening the FLA in various ways could affect the embedded debug paths.  The only thing that should be done is to address how paths with the wrong case are handled when they do get embedded that way for whatever reason.  Perhaps the flex debugger should be updated to use case-insensitive matches in case-insensitive file systems, unless, perhaps, this is a FlashDevelop debugger issue after all.

  • Spanish Dictionary and problems with spanish special characters

    I need a spanish dictionary, with all spanish words. I know that your priority are france, spanish, germany and Italy. So, the component has problems with spanish special words, this problem was notified before.
    Have you ready something? A new version?
    Thank you for your time.

    For the special character issue, you can check the reference:
    http://forums.adobe.com/message/2430501

  • Unity Connection 8.6 LDAP or CUCM Import with german special characters called "Umlaut": ä, ö, ü

    Hi,
    for  jabber 9.1 integration i sync'ed all users at Callmanager, Presence and  Unity to our LDAP (MS AD). with CUCM and Presence (both 8.6.x), it  works fine, just Unity Connection sync the Users from AD, but i cannot import Users  with german special characters ä, ö, ü  (i.E. German Name in LDAP-su: Müller).
    Jabber  9.1 need for Voicemail Integration the AD Authentication. Know  somebody, if there is an Workaraound or Fix ?
    This is a general issue, with or without Jabber, with sync directly from AD, or indirectly through CUCM (sync'ed with AD)
    thx and regards
    Jacky

    I located an identical defect (CSCts28455) that was closed as unreproducible. The defect references CSCtj73444 "Add support for UTF-8 password to LDAP and RADIUS/MSCHAP" which is added to 8.4.2 with the recommendation of RADIUS/MSCHAP or LDAP only for international character support. It would make sense to go to the latest in your current train (ie: 8.4.4.1.ED) and see if the issue remains. What you want to do appears to be supported.
    Matthew

  • A name should not start with any special characters

    I need to put a condition in iF statement such that a name that is given by the user should not start with any special charecters.A dialog box should display indicating this conditon.Can u plz give sample code for this.My code is as below.
    //text box for giving the name
    JTextFeild ReportNameText;
    //the name is stored in String
    String name=ReportNameText.getText();
    //Here tell me how the if condition should be written
    //condition to be mentioned

    Already asked, and answered, here: http://forum.java.sun.com/thread.jspa?threadID=727919
    See reply 4 in that thread, and scsi-boy's suggestion of writing another
    method to check for "special" characters. And the links to the String
    and Character API documentation given.

Maybe you are looking for

  • Smart Group not working when assigning Card "is not member of"

    I'm trying to create a smart group in Address Book, that seems to be failing. What I'd like is a Smart Group where Cards NOT assigned to a certain other group are included in the Smart Group. However, the Smart Group isn't so smart ... in fact, it's

  • Error message after deploying Web Dynpro App.

    Hi everyone, I am having the following problem when trying to run my WD app after deploying it. The funny thing about this issue is I deployed this application earlier and it was working fine. But about an hour later I tried to access it again and go

  • Howto get componet thats under cursor...

    How can i get ahold of the component under my cursor? It could be any type of component. Lets say for this example, I would like to focus the component under my cursor if is a JText field...without clicking on it obviously... ideas? pointers?

  • Archive log in WAS J2EE

    Hello, I install a WAS J2EE 6.40 SP13 for EP6.0 and I want to know how can I delete log file after archiving them with the Visual Administrator -> Cluster -> <SAPSID> -> Server -> Services -> Log Configurator -> Archive ? Thanks, Regards, Chris

  • In table TCURC set the primary flag

    Hello, I am trying to do a RSCRM_BAPI download and am getting an error in the job log "For the ISO code there is no unique SAP currency code for ALE".  The procedure says to set the primary flag for ISO codes used multiple times in the TCURC table.