How to read number of digits in a given decimal number by using abap

Hi ,
How can we read the number of digits present in a decimal number , just before decimal.
For example: I have this number - 200.00
Now I want to read how many digits are present in this number before decimal ( . ) point. so in this case the number of digits are 3( 200). Similarly if we have a number 15.00, in this case number of digits is 2 ( 15 ) before decimal point.
How can i acheive this by using abap.
Regards
PG

Hi
There are differenent logics available.The previous reply was really good. get another way also.
Data: v_dec type p decimals 3,
         v_temp   type char20,
          v1 type char10,
          v2  type  char10,
           v_len type i.
v_temp   = v_dec.
split  v_dec at  '.'  into v1 v2 .
condense v1  no-gaps.
len = strlen( v1 ).
Regards,
Chellamma Chandrasekar.

Similar Messages

  • I would like to read a text file in which the decimal numbers are using dots instead of commas. Is there a way of converting this in labVIEW, or how can I get the program to enterpret the figures in the correct way?

    The program doest enterpret my figures from the text file in the correct way since the numbers contain dots instead of commas. Is there a way to fix this in labVIEW, or do I have to change the files before reading them in the program? Thanks beforehend!

    You must go in the labview option menu, you can select 'use the local
    separator' in the front side submenu (LV6i).
    If you use the "From Exponential/Fract/Eng" vi, you are able to select this
    opton (with a boolean) without changing the labview parameters.
    (sorry for my english)
    Lange Jerome
    FRANCE
    "Nina" a ecrit dans le message news:
    [email protected]..
    > I would like to read a text file in which the decimal numbers are
    > using dots instead of commas. Is there a way of converting this in
    > labVIEW, or how can I get the program to enterpret the figures in the
    > correct way?
    >
    > The program doest enterpret my figures from the text file in the
    > correct way since the numbers contain dots instea
    d of commas. Is there
    > a way to fix this in labVIEW, or do I have to change the files before
    > reading them in the program? Thanks beforehend!

  • How to read a variable within a VC code.  I am using BADI based VC code.

    How to read a variable within a VC code.  I am using BADI based VC code.
    Lets say I have a variable for a fiscal period that holds cumulative month.
    If user enters 03/2014 in that variable, it will have month starting from Jan till March.
    Within VC code I would like to read the last month which is
    03/2014 and based on this month I would like to do some calculation on all the records using the last month.
    Since VC code runs for one record at a time and there is no way I can store this value.
    Is there a way to go about it....any suggestions would be of great help.
    Thanks.

    Any suggestions would be highly appreciated.
    Thanks!

  • How can the number of used computers used for itunes be updated? I had to reinstall itunes on a new hard drive

    How can the number of computers used for an iTunes account be updated? I had to reinstall itunes on a new hard  drive it and counted as an additional computer, against my 5 total computers.

    wait until you reach the limit of five authorized machines. then, once a year, you will be able to deauthorize all machines, following which you can reauthorize those computers you currently use/have access to.
    click here for more information.

  • How to get Cost centers a below a cost center from hierarchy using ABAP

    Hi !!
             I am currently developing a user application wherin i need to give a dropdown help to the users for cost center field.
    How ever I need to give him those cost centers in the help which are lower to the cost center to which he is assigned  .
    For example he is at department level which has cost center '90000' he should get the cost centers of the offices assigned to that department in the hierarchy .Also cost centers of various lower nodes which might have been assigned to these offices and so on so forth .
    How can I get those cost centers which lie lower to a particular cost center in the hierarrchy using ABAP ..as I am in to BSP application and have access using ABAP.
    thanks in advance

    BSPIAN,
    usually there will be a hierarchy table where the cost center hierarchy is stored. see if you can find that table.
    To go about the same , activate the datasource for cost center hierarchy from business content
    Execute the datasource in RSA3
    do a background SQL trace and you will find the necessary table for the same.
    Hope it helps..
    Arun
    Assign points if helpful

  • How to read number of ';' in a text file

    I have a text file with size 2kb. The file has names seperated by ';' . For example John, Smith; David, Putnam; etc ..
    Now I have to read the file and find out how many ';' are there.
    I tried GUI_upload to read the text file and I think I did not get whole data.
    and
    loop at itab.
    if itab-names cs ';' .
    find ALL OCCURRENCES OF REGEX ';' IN itab-names MATCH COUNT  mcnt.
    l_mstring = itab-names .
    endif.
    endloop.
    I'm just getting count as 3
    Edited by: P V on Feb 21, 2008 9:57 PM

    DATA : tot_count TYPE i,
               mcnt TYPE i.
    loop at itab.
    if itab-names cs ';' .
    find ALL OCCURRENCES OF REGEX ';' IN itab-names MATCH COUNT mcnt.
    tot_count = tot_count + mcnt.
    endif.
    endloop.
    You will get total number of ; available in file in the field tot_count.
    Regards
    Sudhir Atluru

  • How to read text and it's font details (Family and size) using Acrobat plugin?

    Hello,
           I have query about reading PDF, I wanted to extract text and it's font details (Family and size) using Acrobat plugin. How can I achieve that?
    Any suggestions are welcome.
    Thanks
    Rohit Shinde

    Look at the samples in the SDK around PDFEdit and the PDEdit APIs.

  • HOW TO READ DATA FROM A FILE AND INSERT INTO A TABLE USING UTL_FILE

    Hi..
    I have a file.I want to read the data from file and load it into a table using utl_file.
    how can I do it?
    Any reply apreciated...

    Hi,
    This is not your requirment but u can try this :
    CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
    GRANT READ ON DIRECTORY text_file TO fah;
    GRANT WRITE ON DIRECTORY text_file TO fah;
    DROP TABLE load_a;
    CREATE TABLE load_a
    (a1 varchar2(20),
    a2 varchar2(200))
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY text_file
    ACCESS PARAMETERS
    (FIELDS TERMINATED BY ','
    LOCATION ('data.txt')
    select * from load_a;
    CREATE TABLE A AS select * from load_a;
    SELECT * FROM A
    Regards
    Faheem Latif

  • How to read the response from the request made from teh client using java

    Hi All,
    I am using the following code to connect to the sever .
    HttpRequest httpRequest     = new HttpRequest();
    httpRequest.setMethod(method);
    if( null == uri )
    uri = "";
    httpRequest.setURI(myReplaceAll(uri, ' ',"%20"));
    httpRequest.setHeader(CONTENTTYPE, CONTENTTYPE_XML);
    httpRequest.setHeader(TRANSLATE, "f");
    httpRequest.setBody((String) null);
    IResponse httpResponse = null;
    try
    httpResponse = getRequester().perform(httpRequest);
    int httpStatus= response.getStatus();//get the response code
    I want to read the response stream that will be returned from this connection.
    Can you please help me in this case.
    Thanks and Regards,
    Anamika Mazumder.

    IResponse provides getDocument() (for XML) and getStream() (otherwise). Only one of them will work; I don't recall how it chooses. See http://help.sap.com/javadocs/NW04s/current/km/com/sapportals/wcm/util/http/HttpRequest.html#expectsResponseDocument(boolean).
    And, btw, do not construct URIs by text replacement; there are proper URI parsing/generator classes for this purpose in KM.

  • How to read the name of .csv file from a particular folder using Oracle.

    Gurus,
    I have a folder called 'data_dir' in Oracle Server and it contains 10 different .csv files and the name of the each file is being suffixed by date and time(24 hrs format).
    First i need to read all the file names then i have to process those files by UTL_FILE to load the data into a relational table.
    Is there any mechanism is available in Oracle to read the file names?
    (In this case all the 10 different csv file names)
    If so, then please help me accomplish this.
    Thanks in advance.
    Regards,
    Venugopal.K

    Is there any mechanism is available in Oracle to read the file names?Sounds to me like you need to use External Tables (*not* utl_file).
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/et_concepts.htm

  • How to read the column name of a table from sap system using C#?

    Hi!!
    I am using SAP .NET connector and creating a windows application.
    Now I wanna read the column name when a table name is given....
    Connection is done, but I don't know the code to read the column names alone...
    Can anyone help me with the code??

    fine!!
    So if i give the table name, which the RFC_READ_TABLE function module have, will it run properly? or i wanna change all the codes in order to support RFC_READ_TABLE function module?
    Because from the beginning I was using BAPI_CUSTOMER_GETLIST function, but my client requirement is to use ERP function module RFC_READ_TABLE, he didn't give any table name also..
    This is my code: What I have to change in this???
    ECCDestinationConfig ECCDestination = new ECCDestinationConfig();
                RfcDestinationManager.RegisterDestinationConfiguration(ECCDestination);
                RfcDestination rfcDest = null;
                rfcDest = RfcDestinationManager.GetDestination(a);
                    RfcRepository repo = rfcDest.Repository;
                    IRfcFunction customerList = repo.CreateFunction("BAPI_CUSTOMER_GETLIST");
                    IRfcTable addressData = customerList.GetTable("AddressTable"));
                    int j = addressData.Metadata.LineType.FieldCount;
                    for (int i = 0; i < j; i++)
                        RfcElementMetadata metadata = addressData.GetElementMetadata(i);
                        listallcolumn.Items.Add(metadata.Name);
    Message was edited by: Jeswin Rebil

  • How 2 read two files from 2 diff. directories, using single adapter

    How 2 read two files from 2 diff. directories in same system, using single file adapter.

    you can use advanced selection for source file
    see
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm

  • How to read DefaultTrace files, What are other useful trace files

    Hi,
    I was trying to debug some issue using Default Trace file and it is painful. Can anyone point out some tips and tricks to do debugging. And how to read Default Trace file.
    Also what are the other useful trace files available? Please point out.
    Thanks,
    Deepak

    Hello Deepak,
    Here is the link with all infos how to use Log Viewer to view logfiles:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/57/5f1140d72dc442e10000000a1550b0/frameset.htm
    As all program generated logs are written to Default Trace file, it is the only file to check for  logs.
    Greetings,
    Praveen Gudapati
    p.s. Points are always welcome for helpful answers
    Message was edited:
    You can perform the following activities using the Log Viewer UI:
    &#9679;     Connect to and view logs on multiple servers
    &#9679;     Add log files
    &#9679;     Add log files from a log directory
    &#9679;     Customize the columns for the log records that are displayed
    &#9679;     Search for log records that meet specific criteria
    &#9679;     Filter log records by specific criteria
    &#9679;     Sort log records
    &#9679;     Merge log files within and across servers
    &#9679;     Use the refresh function to display the latest logs
    &#9679;     Open archives of log files
    &#9679;     Save log files to comma separated value (CSV) files and open them using Microsoft Excel.

  • How to read PP01- Object type u0091Positionu0092- Description- Text

    Hi All,
    How to read PP01->Object type ‘Position’->Description->Text
    I tried to use READ_TEXT but i am not able to figure out what combination
    to be given in input fields  of this BAPI.
    Please Guide.
    Regards

    Hi Amit,
    Thanks for reply.
    It is coming in HRT1002 table which is linked with HRP1002 with field TABNR.
    But problem is that I have to capture this value in BADI-HRBAS00INFTY.
    Before save. Because with BADI i need to update data in it.
    any solution of it?
    Regards

  • Instapaper- can't figure out how to read page offline

    Can anyone help me with how to read a web article offline with Instapaper Free? I used the Instapaper "read later" bookmarklet, which appeared to save the story, but I can't figure out how to access the text version offline.

    Hi, thanks for taking time to reply, and I'm sorry for confusion of the two types of script. The only reason I am using shell script to test IP is I haven't figured out how to test it with Applescript. I will use only Applescript once I get it all figured out, as I undeerstand shell script even less than I understand Applescript.
    The begining script writes user name and email address to a plist from user input, then runs the above script to test and send mail. I just can't figure out how to have mail "make new message" with the "username" and "emailaddress" values already contained in the plist. I have seen that I can't use "property list file" unless it is directly under "tell application system events", but I am stuck on how to do this, and have mail use the values. Thanks again
    tell application "Mail"
    set theName to value of property list file item "username" of p_list --this is what I've been trying to figure out.
    set theAddress to value of property list item "emailAddress" of p_list --p_list path is at the begining of script.
                                 set newMessage to make new outgoing message with properties{visible:true, subject:"Your IP Address has changed",content:"Your Current IPAddress is: " & Current_ipAddress}
                              tell newMessage
      make new to recipient at end of to recipients with properties {name:theName,address:theAddress} --This is where I'm trying to use them
                              end tell

Maybe you are looking for

  • Enterprise Application and Web Portal Projects

    I know its possible to have one enterprise application that contains 2 web portal projects. The part Im unsure about is if it is possible to update one web project without having to bring down the other project. Supposedly through console you can do

  • Select Record Between Date Gap-Oracle 11g, Windows 2008 server

    hello everyone, I have a sql query where I need to select only records with an 18 month gap between max(date) and previous date( no dates between max(date) and 18 month gap date), when I run the below query it should only select supid 130, not 120 (e

  • Assets: Unable to post to the assigned Cost Center in Asset Master

    When I do the Depreciation Run, the cost center that gets hit is the Cost Center specified on the Cost Element (associated with the Depreciation Expenses account). Never does the Cost Center specified on the Asset Master gets picked. In case I do not

  • AddPrinter.app Crash

    Hello, i'm having this problem where I can't add any new printers because AddPrinter.app crashes "Exception Type: EXCBADACCESS (SIGBUS) Exception Codes: KERNPROTECTIONFAILURE etc...". I imagine there's nothing to it but to reinstall the application,

  • Mac book pro is running very slow and won't connect to the Internet

    Mac book pro is running very slow and won't connect to the Internet. Please help I'm rubbish with computers!