How to get separators from a string

I need to find the thousand separator, hundred separator and decimal separator from a string. I need to check which separator is available in a string ie., thousand or hundred separator. There may be a case where there is no separators.
Please suggest me. I would be greatful if you provide me a code snippet.
Thanks in advance...

Hi Ananth,
Try following:
//For decimal fraction
if (Count(Split(StrReverse(ToText ({OINV.DocTotal})), '.') ) > 1) then "With Decimal" else "Without Decimal"
//For Units
//Convert numbers to string valule
//Reverse the string so that you cold parse them accordingly in units, hundreds, thousands etc
//and finally split and parse each comma
if
    Length
        Split
                (Split(StrReverse(ToText ({OINV.DocTotal})), '.')[2]) , ','
            )[1]
    ) <= 2
) Then "Hundreds"
Else "Thousands"
You can continue on length of each subscript in array for hundreds, thousands, millions...
Cheers,
Kashif Ali

Similar Messages

  • How to get substring from a string?

    For example, there is a string:
    C-REVF-00003 0010 Development
    how the program get the value '0010'?

    Hi,
    Use Split command.
    Syntax
    SPLIT <c> AT <del> INTO <c1>... <cn> INTO TABLE <itab>.
    Searches the field <c> for the character <del> and places the partial fields before and after <del>
    into the target fields <c1> … <cn>, or into a new line of the internal table <itab>.
    Ex.
    DATA: STRING(60),
    P1(20) VALUE '++++++++++++++++++++',
    P2(20) VALUE '++++++++++++++++++++',
    P3(20) VALUE '++++++++++++++++++++',
    P4(20) VALUE '++++++++++++++++++++',
    DEL(3) VALUE '***'.
    STRING = ' Part 1 *** Part 2 *** Part 3 *** Part 4 *** Part 5'.
    WRITE STRING.
    SPLIT STRING AT DEL INTO P1 P2 P3 P4.
    WRITE / P1.
    WRITE / P2.
    WRITE / P3.
    WRITE / P4.
    The output appears as follows:
    Part 1 *** Part 2 *** Part 3 *** Part 4 *** Part 5
    Part 1
    Part 2
    Part 3
    Part 4 *** Part 5
    Regards,
    Bhaskar

  • How to get pattern from the string?

    Friends,
    I have 3 strings variables.
    Name1,Name2 and Name 3.
    I want to search following terms in above variables.
    'T1' 'TURC1' 'TURC 1' and 'TURC 1X'  " X=any character
    'T2' 'TURC1' 'TURC 2' and 'TURC 2X'  " X=any character
    'T3' 'TURC1' 'TURC 3' and 'TURC 3X'  " X=any character
    'T4' 'TURC1' 'TURC 4' and 'TURC 4X'  " X=any character
    If T1      found, then v_res = 1.
    If TURC1   found, then v_res = 1.
    If TURC 1  found, then v_res = 1.
    If TURC1X  found, then v_res = 1X.
    Same for 2 3 and 4.
    So, How can I do this?

    Hi,
        Try below code
    Do for remaining same Strings
    DATA : name1 TYPE string,
           name11 TYPE string,
           name2 TYPE string,
           name3 TYPE string.
    DATA : v_res(2) TYPE n,
           w_fdpos TYPE sy-fdpos,
           str TYPE i,
           ch TYPE c.
    name1 = 'ABCT1XRYTURC1JJTURC 1LLTURC 1A'.
    str = STRLEN( name1 ).
    FIND 'T1' IN name1.
    IF sy-subrc = 0.
      v_res = 1.
      FIND 'TURC1' IN name1.
      IF sy-subrc = 0.
        v_res = 1.
        SEARCH name1 FOR 'TURC 1'.
        IF sy-subrc = 0.
          v_res = 1.
          w_fdpos = syst-fdpos.
          w_fdpos = w_fdpos + 6.
          str = str - w_fdpos.
          name11 = name1+w_fdpos(str).
          SEARCH name11 FOR 'TURC 1'.
          IF sy-subrc = 0.
            CLEAR w_fdpos.
            w_fdpos = sy-fdpos.
            w_fdpos = w_fdpos + 6.
            ch = name11+w_fdpos(1).
            CONCATENATE '1' ch INTO v_res.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDIF.
    FIND 'T2' IN name1.
    IF sy-subrc = 0.
      v_res = 1.
      FIND 'TURC2' IN name1.
      IF sy-subrc = 0.
        v_res = 1.
        SEARCH name1 FOR 'TURC 2'.
        IF sy-subrc = 0.
          v_res = 1.
          w_fdpos = syst-fdpos.
          w_fdpos = w_fdpos + 6.
          str = str - w_fdpos.
          name11 = name1+w_fdpos(str).
          SEARCH name11 FOR 'TURC 2'.
          IF sy-subrc = 0.
            CLEAR w_fdpos.
            w_fdpos = sy-fdpos.
            w_fdpos = w_fdpos + 6.
            ch = name11+w_fdpos(1).
            CONCATENATE '1' ch INTO v_res.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDIF.
    FIND 'T3' IN name1.
    IF sy-subrc = 0.
      v_res = 1.
      FIND 'TURC3' IN name1.
      IF sy-subrc = 0.
        v_res = 1.
        SEARCH name1 FOR 'TURC 3'.
        IF sy-subrc = 0.
          v_res = 1.
          w_fdpos = syst-fdpos.
          w_fdpos = w_fdpos + 6.
          str = str - w_fdpos.
          name11 = name1+w_fdpos(str).
          SEARCH name11 FOR 'TURC 3'.
          IF sy-subrc = 0.
            CLEAR w_fdpos.
            w_fdpos = sy-fdpos.
            w_fdpos = w_fdpos + 6.
            ch = name11+w_fdpos(1).
            CONCATENATE '1' ch INTO v_res.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDIF.
    FIND 'T4' IN name1.
    IF sy-subrc = 0.
      v_res = 1.
      FIND 'TURC4' IN name1.
      IF sy-subrc = 0.
        v_res = 1.
        SEARCH name1 FOR 'TURC 4'.
        IF sy-subrc = 0.
          v_res = 1.
          w_fdpos = syst-fdpos.
          w_fdpos = w_fdpos + 6.
          str = str - w_fdpos.
          name11 = name1+w_fdpos(str).
          SEARCH name11 FOR 'TURC 4'.
          IF sy-subrc = 0.
            CLEAR w_fdpos.
            w_fdpos = sy-fdpos.
            w_fdpos = w_fdpos + 6.
            ch = name11+w_fdpos(1).
            CONCATENATE '1' ch INTO v_res.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDIF.
    Regards
    Bala Krishna

  • How to get CLOB from stored procedure via StoredProcedureCall

    hi all
    I got "sp" on server : procedure get_text(p_in in varchar2, o_list out clob);
    in code:
    StoredProcedureCall call = new StoredProcedureCall();
    call.setProcedureName("get_text");
    call.addNamedArgumentValue("p_in", new String("MyList"));
    call.addNamedOutputArgument("o_list"); // <- out CLOB
    Vector v = (Vector)this.m_UnitOfWorkt.executeSelectingCall( call ); // <- here I got error
    but if o_list is varchar is all ok
    so how to get data from clob?
    Please help
    Regards
    Krzysztof

    Post Author: achaithanya
    CA Forum: Data Connectivity and SQL
    I'm connecting to database through stored procedure only.We have sybase installed on our local system so that we are given permissions only to access the stored procedures.When u see the fields in CR XI i.e Field explorer you are able to see only 1st result fileds.I connected to sybase and there i'm able to see the output of 1st & 2nd Result set.
    Regards,
    Chaithanya.

  • How to get coordinates from Google Map

    I wonder how to get coordinates from Google Map to JavaFX application when click has occured. Here is an example of code:
    public class JavaFXApplication extends Application {
    public void showCoordinates(String coords)
            System.out.println("Coordinates: " + coords);
        @Override public void start(Stage stage)
            final WebView webView = new WebView();
            final WebEngine webEngine = webView.getEngine();
            webEngine.load(getClass().getResource("googlemap.html").toString());
            webEngine.getLoadWorker().stateProperty().addListener(
                    new ChangeListener<State>() {
                        @Override
                        public void changed(ObservableValue<? extends State> ov, State oldState, State newState) {
                            if (newState == State.SUCCEEDED) {
                                JSObject window = (JSObject) webEngine.executeScript("window");
                                window.setMember("java", new JavaFXApplication());
            BorderPane root = new BorderPane();
            root.setCenter(webView);
            stage.setTitle("Google maps");
            Scene scene = new Scene(root,1000,700, Color.web("#666970"));
            stage.setScene(scene);
            stage.show();
       public static void main(String[] args){
            Application.launch(args);
    // googlemap.html file
    <!DOCTYPE html>
    <html>
        <head>
            <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
            <style type="text/css">
                html { height: 100% }
                body { height: 100%; margin: 0px; padding: 0px }
                #map_canvas { height: 100%; background-color: #666970; }
            </style>       
            <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">
            </script>
            <script type="text/javascript">           
                function initialize() {
                    var latlng = new google.maps.LatLng(40.75089, -73.93804);
                    var myOptions = {
                        zoom: 10,
                        center: latlng,
                        mapTypeId: google.maps.MapTypeId.ROADMAP,
                        mapTypeControl: false,
                        panControl: true,
                        navigationControl: true,
                        streetViewControl: false,
                        backgroundColor: "#666970"
                    var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);    
                    document.map = map;
            google.maps.event.addListener(map, 'click', function(event) {
                //java.showCoordinates(event.latLng); ???
            map.setCenter(location);
            </script>
        </head>
        <body onload="initialize()">
            <div id="map_canvas" style="width:100%; height:100%"></div>
        </body>
    </html>Edited by: krbltik on 03.10.2012 22:59

    Hi, welcome!
    You may also have a look at GPS Info Qt, available for free at Ovi Store: http://store.ovi.com/content/165671
    GPS Info Qt is a nice Qt app. I have it on my C6-01 and I like it.
    Regards.

  • How to get Text from (.txt) file to display in the JTextArea ?

    How to get Text from (.txt) file to display in the JTextArea ?
    is there any code please tell me i am begginer and trying to get data from a text file to display in the JTextArea /... please help...

    public static void readText() {
      try {
        File testFile = new File(WorkingDirectory + "ctrlFile.txt");
        if (testFile.exists()){
          BufferedReader br = new BufferedReader(new FileReader("ctrlFile.txt"));
          String s = br.readLine();
          while (s != null)  {
            System.out.println(s);
            s = br.readLine();
          br.close();
      catch (IOException ex){ex.printStackTrace();}
    }rykk

  • How to get photos from mac to iPhone 6? when i try it just comes up iCloud instead of my photos

    how to get photos from mac to iPhone 6? when i try it just comes up iCloud instead of my photos

    Make sure Settings > iCloud > Photos > iCloud Photo Library (Beta) = "Off"
    Then sync your iPhone using iTunes and make sure your sync settings for photos are set correctly in iTunes.

  • I got a new computer and don't know how to get music from ipod touch to itunes library

    I recently got a new computer and don't know how to get music from my ipod touch to show on my itunes library. 

    You need to transfer the iTunes folder from the old computer to the new one.
    iTunes: How to move your music to a new computer (Mac or Windows):
      http://support.apple.com/kb/HT4527

  • I have a new MacAir and don't know how to get info from my USB stick and my SD photo card.  Can anyone help me please?

    I have a new MacBook Air and don't know how to get info from my USB stick and get info from my SD card.  Can anyone help, please?

    Plug the stick and/or card into the appropriate slots on the side of your Air. Do you see icons for the devices appear on the desktop? Click into them to see what files are there.
    Matt

  • How to get data from a USB-UIRT device using Labview?

    How to get data from a USB-UIRT device using Labview?
    I'm trying to get data from a USB-UIRT device, is it posible with Labview?
    I really appreciate your help, 
    thanks

    You may want to contact the developer of the device for the API and DLL.
    http://65.36.202.170/phpBB2/viewforum.php?f=3

  • How to get file from server while click on link

    Hi,
    i created on link and i gave one server path to select file from server but while clickinng on link it no displaying any thing.
    following is the Destination url that i gave for the item.
    /u08/app/appvis/xxex/inst/xxex_apps/xxrbe/logs/appl/conc/log/
    please tell me how to get file from server while click on link.

    Ok I got your requirement now.
    If you are getting file names from view attribute then you should not be adding destination URI property for the link.
    Instead you can use OADataBoundValueViewObject API.
    Try below code in your controller processRequest method:
    I am assuming that you are using classic table.
    Also in below example it considers OAMessageStyleText and you can replace it with link item if you want.
    OATableBean tableBean =
    (OATableBean)webBean.findChildRecursive("<table item id>");
    OAMessageStyledTextBean m= (OAMessageStyledTextBean)tableBean.findChildRecursive("<message styled text in table item id>");
    OADataBoundValueViewObject tip1 = new OADataBoundValueViewObject(m, "/u08/app/appvis/xxex/inst/xxex_apps/xxrbe/logs/appl/conc/log/"+"<vo attr name which stores file name for each row>");
    m.setAttributeValue(oracle.cabo.ui.UIConstants.DESTINATION_ATTR, tip1);
    Regards,
    Sandeep M.

  • How to get value from list item

    Hi all,
    How to get value from list item?
    I have a problem with the List Item object
    in the Oracle forms.
    How can I retrieve the selected item from
    a list ?
    I didn't find any function like 'list.GET_
    SELECTED_ITEM()'...
    thanks
    Bala

    Hello,
    You get the value as for any other Forms item:
    :value := :block.list_tem ;Francois

  • How to get FILENAME from FILE PATH

    does anyone know how to get filename from a file path for example
    FILE PATH: C:\Project\uploadbean\web\uploads\Button.txt
    returns
    FILENAME: Button.txt

    @BalusC
    ust for a reference cause i'm new in JSP This has nothing to do with JSP, but with basic knowledge of an essential API. I have given you the link to the File API. Are you saying that you refused to read the API documentation, which clearly explains you how to use the File and shows which methods are all available to you undereach the straightforward getName() method, and expecting that the others may chew the answers for you? Loser.

  • How to get data from PDF form?

    PDF forms can send data in url like GET or POST method. Is it possible to get data from url, like in PHP http://sever/file.php?item1=value1&item2=value2&item3=value3
    In APEX url have specific construction and I don't know how to get value of items (1...3)
    Please let me help to find simple method of geting data from URL.
    Best Regards,
    Mark

    The APEX URL syntax is detailed here
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/concept.htm#BCEDJBEH
    How to get it from PDF is another matter...
    I'm working on an app that downloads PDFs with a Large amount of data as a blob, takes that blob and changes it to XML, then goes through the xml to validate each section of data and then add it into the schema that my apex app is referencing....
    I didn't write the original code but I do know that it isn't a quick thing to implement and includes using some uploading some java jar files to your schema and writing some custom java code.
    Someone else may be able to help with grabbing PDF data into the URL for the amounts of data you want to pass to apex.
    Gus..
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!
    Edited by: Gussay on Sep 21, 2009 5:52 PM

  • How to get the value of String in integer type

    how to get the value of String in integer

    {color:#0000ff}http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#parseInt(java.lang.String)
    http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#valueOf(java.lang.String){color}

Maybe you are looking for

  • I have iPhoto '09 v 8.1.2 and it will not install v9.2.1 that i downloaded. Keeps asking for me to have v9.0 or higher. Any ideas please?

    Hi, I have iPhoto'09 v8.1.2 (424). I have downloaded v9.2.1 update and it will not install. Keeps asking for me to have v 9.0 or later. Now i have downloaded 9.1update plus 9.1.3 and they will not install either. Do i need 9.0 and if so where do i ge

  • Creation of LDAP User for Discoverer Web Services

    Hi all, this isn't a Discoverer issue per se, but I couldn't find where to post this in other forums. After installing the web services patch for Discoverer (5648158), I need to create a bipublisher user in OIDDAS right? However our installation seem

  • Unable to play movies

    Though I am logged in via Apple TV to may account, I'm seeing that it will take 4 to 9 hours to view the movie!!! ISP connection is excellent (Latency 20 ms, upload 30MB; download 23MB). This has to be with the iTunes store. What is going on? Anybody

  • Use rptproj SSRS for SQL Server 2008R2 in VS 2010 (and/or VS 2012 better(

    In my company, I use VS 2008 and SQLServer 2008R2, and I have rptproj projects in VS 2008. The rptproj project has several rdl files. I would like use VS 2010 or VS 2012 with SSRS and SQLServer 2008R2. SSDT, which was introduced with SQL Server 2012.

  • Can't connect to Workspace

    Customer has valid connection to cube in CMC and can access cube via an OLAP Universe with WebI, but when attempting to open Voyager Workspace they receive the following message: "The requested operation was not completed successfully.  Please try ag