Seperating numbers according to digits

Hello All,
I have a long report and it includes a lot of numbers.
I am asked to change number format.
In my report, i see the numbers like this :                 12345678
What i am asked is to make numbers like this :       12.345.678
I know i can do this by finding string lenght, reducing 3 and putting dots between.
But i wonder if there is a simple way or a function for this?
Thanks..

Hi,
Check the following program:
parameter:p_intval like WMTO_S-AMOUNT.   "Internal Amount
data:      gd_disval  like WMTO_S-AMOUNT. "Display Amount
data:      p_discur like TCURC-WAERS.
*Start-of-selection.
START-OF-SELECTION.
p_discur = 'INR'.
CALL FUNCTION 'CURRENCY_AMOUNT_SAP_TO_DISPLAY'
     EXPORTING
          currency        = p_discur
          amount_internal = p_intval
    IMPORTING
         AMOUNT_DISPLAY   = gd_disval
    EXCEPTIONS
         INTERNAL_ERROR   = 1
         OTHERS           = 2.
*End-of-selection.
END-OF-SELECTION.
write: 30 'number is displayed:', gd_disval decimals 0.
Regards,
Bhaskar

Similar Messages

  • TDS certificate numbers according to Business Place for one key

    Dear all,
    I am trying to generated TDS certificates through J1INCERT.  I am able to generated certificate numbers also. But I want to generate the certificate numbers according to my business place.
      EX: I assigned number range as 200001 to 299999. I have business places as ABC1 and ABC2 for each plant wise.
              If I generate first certificate for plant  ABC1 for 194C, it should generate the ceriticate with number 200001.
              If  I generate first certificate for plant ABC2 for 194C, if should generate the certificate with number 200001.
    Please tell me how to control this.
    Thanks in advance.
    Venkat

    SAP has provided to generate number ranges basd on Busines places too... However this is not available to all countries though..
    If you look at Cross application component, SAP has provied country specific options fo number ranges with reference to Business Place.  This functionality is available to some countries and you may use it for your countri too... For example, you may look at "Philiphines" country official receipt (it is a kind of tax receipt).
    Hope this will help you.
    reg
    S Habib Pasha

  • Export file numbering - need multiple digits

    So say I'm converting 141 files, like I just got done doing. Lightroom starts with single digits (1-9), the double (10-99), then triple (100-141). What's the problem, you say? Sort the files by name, as many applications do, and you will have the photos listed (and processed) out of sequence.
    Is there a way to force Lightroom to use 2 or 3 digit sequence numbers during Export? View NX had this, and I'm really missing it.
    And now back to re-numbering the files by hand. Groan.

    Click on File Name (File Renaming) drop down menu and choose Edit from list. The Filename Template panel will open and you shuld see an option mid way down for Sequence and Date, click on this option to expand the list of digit options that can be used.

  • How display possible batch numbers according material number in cv04n

    Hi All,
    cv04n -->clasifications,  there is fields availables like batch number, material number.
    initially in batch number field not available f4 help, material number f4 help is available.
    my requirement is create f4 help for display possible batch numbers, for this i create zfunction module and done f4 help for batch numbers.
    but first enter material number then display batch numbers whenever click f4  according material number.
    in my zfunction module how i know user which material number entered.
    how display, please give me solution with coding.

    Check following customizing:
    Logistics General --> Batch Management --> Specify Batch Level and Activate Status Management
    If you want to change the batch level, you have to start conversion to activate the change.
    Note that you cannot reset conversion from plant level to a higher level, read the documentation for customizing of
    "Specify Batch Level and Activate Status Management".
    If you want to work with same batches for different materials, you should use "Batch unique at material level".
    Logistics General --> Batch Management --> Batch Number Assignment
    Here you can define how the system should create batch numbers.
    Best Regards, Dirk

  • Adding numbers with a length of 50 digits.

    Hi folks,
    Could any one please tell me how to add two numbers with 50 digits each.
    What should be the datatype for each column, in a table, to hold the above said precision.
    However, I know that NUMBER couldn't hold this b'coz its precision is upto 32 digits. Am I right?
    What could be the solution?
    Your favour would, indeed, be remembered and acknowledged, as well.
    Cheers, PCZ.

    you could write your own function if you need arbitrary precision
    I tried (not very fast) :
    SCOTT@LSC01> create or replace function bigadd(n1 varchar2,n2 varchar2)
      2      return varchar2
      3  is
      4      result varchar2(4000);
      5      s number:=0;
      6      i1 number;
      7      i2 number;
      8  begin
      9      if (n1 is null or n2 is null) then
    10          return null;
    11      end if;
    12      if (translate(n1||n2,'x0123456789','x') is not null) then
    13          raise_application_error(-20001,'parameter is not an integer');
    14      end if;
    15      for i in 0..greatest(length(n1),length(n2))-1 loop
    16          if (i>=length(n1)) then
    17              i1:=0;
    18          else
    19              i1:=substr(n1,length(n1)-i,1);
    20          end if;
    21          if (i>=length(n2)) then
    22              i2:=0;
    23          else
    24              i2:=substr(n2,length(n2)-i,1);
    25          end if;
    26          s:=i1+i2+s;
    27          result:=mod(s,10)||result;
    28          s:=trunc(s/10);
    29      end loop;
    30      return nullif(s,0)||result;
    31  end;
    32  /
    Function created.
    SCOTT@LSC01> select bigadd('10000000000000000000000000000000000000000000000000','1') from dual;
    BIGADD('10000000000000000000000000000000000000000000000000','1')
    10000000000000000000000000000000000000000000000001Message was edited by:
    Laurent Schneider
    discovered one bug already... fixed
    Message was edited by:
    Laurent Schneider

  • Thumbnail Page Numbering in Acrobat 6.0

    Hi All
    I have Acrobat Professional 6.06 patched on a win XP Pro SP2, core 2duo, 3gb ram, Dell optiplex.
    When i insert extra pdf pages to a chapter of a pdf document the pages are knocked on in thumbnail view, if i delete the pages i inserted then all the chaptering is removed totally ruining the document. If the document is printed it reads okay with the numbering but in thumbnail view it is ruined and we need these thumbnail page numbering to be there for a customer.
    This is our procedure:
    Highlight all pages to be numbered
    Right click and select Number pages
    Ie. Numbering begin new section
    Prefix Chap 1 Page
    Start 1
    OK
    On the final page of the chapter repeat above but:
    Chap 1 Page 9/
    Start 10
    OK
    All subsequent chapters are numbered accordingly.
    I now want to add some pages to Chapter 1 because of an amendment. Page 9/10 will become 9 and pages 10 to 13/14 will be added.
    I insert 5 blank pages at the end of the chapter, then drop the amended pages on to the blank pages and renumber the thumbnails.
    Any subsequent chapters and their thumbnail page numbering should not be affected. -- this does not happen the pages are knocked on
    If I delete any page or extract and delete then all thumbnail page numbering disappears. --- This does not happen all chaptering dissappears and normal page numbering is in place.
    Any hekp or advice would be appreciated. Thanks

    I've never heard of the problem. But what I'd do is to figure out which of the source PDFs is causing the problem. Try recreating the combined PDF file by removing one page/section at a time to try to isolate it. It could be that that source PDF needs to be recreated.

  • StreamTokenizer NVAL bug? 16 digits not reading correctly?

    hi all!
    i do some calculations which are highly precise, and we use numbers with 16 digits after the comma. this works most of the time without problems. but for some numbers java rounds it automatically. i think the problem is within the StreamTokenizer nval method.
    but please see the code to get what i mean:
    private static void readFromFileTestNumberProblem() {
              try{               
                   FileReader reader = new FileReader(new File("test.txt"));
                   StreamTokenizer tokenStream = new StreamTokenizer(reader);
                   //recognize end of lines as separated tokens. ttype will be set to TT_EOL
                   tokenStream.eolIsSignificant(true);
                   tokenStream.nextToken(); // get the first token
                   String flag = (String) tokenStream.sval;
                   while(flag.equals("START")){
                        System.out.println("------------------------");
                        for (int i = 0; i < 5; i++) {
                             if(tokenStream.nextToken() == tokenStream.TT_NUMBER){
                                  System.out.println((Double)tokenStream.nval);
                             else throw new Exception("Check Input File - Not " + nObjectives + " Objectives in line " + tokenStream.lineno());     
                        // check for END token...
                        if(tokenStream.nextToken() == tokenStream.TT_WORD){
                             if (tokenStream.sval.equals("END")) {
                                  flag = (String)tokenStream.sval;
              catch (Exception e) {
                   e.printStackTrace();
         }and a file to test it: save it into test.txt
    START 7106199.0 5.0376 0.5068132912149117 0.8624999999999999 225450.0
    7595899.0 4.764800000000001 0.6378176973051516 0.9624999999999999 281000.0 END
    result is:
    7106199.0
    5.0376
    0.5068132912149117
    0.8624999999999999
    225450.0
    7595899.0
    4.764800000000001
    0.6378176973051516
    0.9625 --> i dont like this value :-) it should be 0.9624999999999999
    281000.0
    is this a bug in nval? or is this normal?
    if it is normal, can someone tell me how can i get around this...
    would appreachiate any help ..
    thanks
    thomas

    that does not change anything..
    private static void readFromFileTestNumberProblem() {
              try{               
                   FileReader reader = new FileReader(new File("test.txt"));
                   StreamTokenizer tokenStream = new StreamTokenizer(reader);
                   //recognize end of lines as separated tokens. ttype will be set to TT_EOL
                   tokenStream.eolIsSignificant(true);
                   tokenStream.nextToken(); // get the first token
                   String flag = (String) tokenStream.sval;
                   tokenStream.wordChars('0', '9');
                   while(flag.equals("START")){
                        System.out.println("------------------------");
                        for (int i = 0; i < 5; i++) {
                             tokenStream.nextToken();
                             System.out.println(tokenStream.toString());
                        // check for END token...
                        if(tokenStream.nextToken() == tokenStream.TT_WORD){
                             if (tokenStream.sval.equals("END")) {
                                  flag = (String)tokenStream.sval;
              catch (Exception e) {
                   e.printStackTrace();
         }same result as before..
    7106199.0
    5.0376
    0.5068132912149117
    0.8624999999999999
    225450.0
    7595899.0
    4.764800000000001
    0.6378176973051516
    0.9625
    281000.0

  • IPhone doesn't recognize numbers in 11 digit format

    There's a problem now that arised in Egypt.
    Before 2 days the numbering scheme was that mobile numbers are 10 digits:
    3 digits for network code & 7 digits for number.
    Now what happened that numbers had just exteneded to be 11 digits:
    3 digits for network code & 8 digits for number.
    in old scheme that iPhone successfuly recognized the mobile number:
    012 3456789 same as +2012 3456789.
    Now in new scheme doesn't do this. calls are sent in local format : 012 34567899 but msgs are received in international format +2012 34567899.
    so i have to save both number (without and with the international code +2) in order to recognize the phone call and the sms
    is there any solution or app to download?

    I'm facing the same problem and I can't find any solution, some friends told me about installing a package from Cydia if you have a jailbroken iphone, the package name is "CallerID-format Fix"; I didn't try it myself. My iPhone is not jailbroken so my problem is not resolved yet. Please post if you found any other way to resolve this issue. Thanks.

  • IPhone doesn't recognize numbers in international format

    There's a problem now that arised in Egypt.
    Before 2 days then numbering scheme was that mobile numbers are 10 digits:
    3 digits for network code & 7 digits for number.
    Now what happened that numbers had just exteneded to be 11 digits:
    3 digits for network code & 8 digits for number.
    in old scheme that iPhone successfuly recognized the mobile number:
    012 3456789 same as +2012 3456789.
    Now in new scheme doesn't do this. calls are sent in local format : 012 34567899 but msgs are received in international format +2012 34567899.
    We need help in solving this issue. I'm using iPhone 4 with software 4.3.3

    Dear's
    Vodafone has finally conformed the problem, and it's even writen in El masry El yoom yesterday.
    Fix will be avaliable within the comming 7 to 10 days from Apple. may be with the new IOS 5?.
    Thanks

  • Word Mail Merge does not accurately import a Text field in Excel with more than 15 numbers

    Hi, I've looked through some of the discussions regarding importing numbers from excel into word mail merge. I'm having a problem. In Excel I have a column that includes numbers with more than 15 digits. In Excel, I have made this column a text format, so
    now in Excel those long numbers show up correctly. However, when doing a mail merge in Word, again the numbers past 14 digits change to zeros. I've read many help articles about this but am still not finding a solution. I even tried going the DDE route and
    that didn't do it either. I checked out this answer: http://www.techsupportforum.com/forums/f57/mail-merge-data-corruption-429351.html which was the most helpful, but again, DDE seemed to work for this person but not for me. I hope someone can offer a solution.
    I was hoping that I could do a picture switch, but that does not seem to be an option for this particular problem. I don't know why importing it in DDE format did not solve the problem. Thanks for any help!

    Wow! After all my searching and just after posting this I figured out the solution! I originally had { MERGEFIELD Field_Name \# # } But then I just removed everything after the field name, as is normal for any other text field, so not indicating it was
    a number, and now it shows up correctly even if the number (from a Text formatted field in Excel) is longer than 15 digits. Hope this helps anyone else who has a problem. I did not use DDE to solve this problem.

  • Substr function? extracting just the records with 4 digits?

    have a column like this in a table
    SZSCAPD_SEC_SCHOOL_CEEB
    364775
    460460
    460240
    2562
    164625
    460240
    230969I need to be able to retrieve just the values with 4 digits like 2562 and add 00 at the front, so it will ended like 002562
    I am thinking in the substr function, but it won't work, because I will be extracting the first 4 digits of each number.
    How I will do this? I want to only retrieve the numbers with 4 digits Then I will concatenate the 00 in front.
    Thank you

    Hi,
    peace4all wrote:
    ... How I will do this? I want to only retrieve the numbers with 4 digits One way to do that is
    WHERE   TRANSLATE ( szscapd_sec_school_ceeb
                , '123456789'
                , '000000000'
                ) = '0000'
    Then I will concatenate the 00 in front.
    '00' || szscapd_sec_school_ceebThis assumes that szscapd_sec_school_ceeb is a string.
    If szscapd_sec_school_ceeb is a positive number, and you want to ignore any fractional part, use
    WHERE   szscapd_sec_school_ceeb     >=  1000
    AND     szscapd_sec_school_ceeb <  10000to find the numbers and
    TO_CHAR (szscapd_sec_school_ceeb, 'FM000000')to display them as 6 digits, with leading 0's.
    Edited by: Frank Kulash on Aug 20, 2010 11:01 AM
    Added NUMBER alternative.

  • Dynamic Page Numbering for DPS documents

    Since we don't have just 1 document for the entire publication; is there any way to have a footer that has the page number in any way? (without having to manually update every page?)

    Use the book feature.
    But it is difficult to number your publication if you have vertical and
    horizontal pages.
    And why do you need page numbers anyways? Digital has hyperlinks and scroll
    bars for solid navigation
    (mobil gesendet)
    Am 09.01.2012 19:03 schrieb "blasto333" <[email protected]>:
       Dynamic Page Numbering for DPS documents  created by blasto333<http://forums.adobe.com/people/blasto333>in
    Digital Publishing Suite - View the full discussion<http://forums.adobe.com/message/4126818#4126818>

  • Mexico Digital Invoice Implementation without XI.

    Hi All,
    We are in the process of generating Digital invoice for Mexico.
    Is it possible to generate the Digital invoice without the XI system? If possible then what are the hurdles and challenges in achieving this. I did go through the list of Notes mentioned by SAP to implement Digital Signatures for Mexico. But they dont seem to mention about implementing with out XI system.
    Also is there any standard process to generate the XML required for Mexico. Appreciate any clarification for the above queries..
    Thanks in advance.
    Regards,
    Navin.

    Hi Naveen,
    Is important to consider three points at the moment of implementin Digital Invoice Mexico:
    Enablement of ODN (official document numbering).
    Enable digital signature in SAP.
    Creation of XML.
    You can perform the first two options withount PI/XI but the only problem will be the generation of XML, that for fiscal purposes is the digital invoice. If you are not using PI/XI you can do that by ABAP, Webmethods or any tool that generates XML.
    If you decide to generate the XML with ABAP, you dont need to use IDOC but is still needed to create an output message that generates the XML instead a smartform or other. This can be sent automatically to customers or to any kind of repository to keep the files for fiscal term.
    The structure of the XML must follows all Mexican requirements acording to Anexo 20 that you can find only in spanish.
    I suggest you to read the attachments on the following note, where you can find the structure and requirements and order of each XML field:
    1318342 - Digital Invoice Mexico IDoc basic type INVOIC02 Extension
    Regarding the standard process to generate XML in SAP, the only information provided by SAP is for PI/XI, so your ABAP team needs to take a look for anexo 20 structure:
    ftp://ftp2.sat.gob.mx/asistencia_servicio_ftp/publicaciones/cfd/Anexo20RMF2010.pdf
    I hope this may help you.
    Regards,
    RP

  • I need your help about method for 'Seperating Keypad'

    Hi~ I'm a logic user.
    I used to be a PC version logic platinum user.
    And, I'm moving to Mac OS.
    So, I bought Logic Express.
    I just want to set up 'my style keycommand'.
    Especially, seperating numbers on keyboard and keypad.
    (For example, number 1 on keyboard to 'Screen01' and number 1 on keypad to 'Rewind'.)
    My equipments are is Macbook air and USB keyboard(A1243-109key)
    I bought this extra keyboard for more convenient use at home.
    and, have done all through the Manual.
    Preference < Keycommand < option < preset < US with numeric Keypad selecting (if only 109 key) < Learn by key position & Pressing number 1 on keypad.
    But, doesn't work.
    Only with message like 'already assigned to the Screen01, will you really change?'
    In short, keypad can't be seperated.
    Can you help me?
    1. Do I have to adjust keyboard to Mac before loading Logic?
    2. Is the seperating impossible in case of Macbook + normal Keyboard?
    3. Can you guess what is the problem?
    I need your cooperation~
    Thank you~

    Please post this in Portal forum. This is Reports forum

  • Large numbers! Need help

    I have problem. I need to do a multiplication of to large numbers(about 150 digits). But I don't know which way I could do it. Could anyone help me?
    Thanx for help.

    I can conribute a quick and dirty string multiplication function just to play with:
    - does not treat signs
    - does not treat decimals
    Just to show it can be done
    All credits to the yesterday's bad weather - made me think about "old days" (;-o)
    CREATE OR REPLACE
    function multiply_them(x in varchar2,y in varchar2) return varchar2 is
      retval varchar2(2001) := '0';
      i pls_integer;
      j pls_integer;
      half varchar2(1000);
      dble varchar2(2001);
      z varchar2(1000);
      w varchar2(1000);
    function number_is_it(x in varchar2) return boolean is
    begin
      if (x = '') or (x is null) then
        return FALSE;
      end if;
      return (replace(translate(x,'0123456789',rpad(chr(9),10,chr(9))),chr(9),'') is null);
    end;
    function odd_is_it(x in varchar2) return boolean is
    begin
      return (mod(to_number(substr(x,-1,1)),2) = 1);
    end;
    function add_them(x in varchar2,y in varchar2) return varchar2 is
      retval varchar2(1001) := '';
      z varchar2(1000);
      w varchar2(1000);
      i pls_integer;
      j pls_integer;
      carry pls_integer := 0;
    begin
      if x is null or y is null then
        return null;
      end if;
      if x = '0' then
        return y;
      end if;
      if y = '0' then
        return x;
      end if;
      i := length(x);  -- TO CALL FUNCTION ONLY ONCE
      j := length(y);
    -- FOR NOW WE JUST LEFT PAD THE SHORTER STRING WITH ZEROS TO MAKE THEIR LENGTHS EQUAL
    -- IN CASE OF BIG LENGTH DIFFERENCE TO DO:
    -- WHEN THE SHORTER STRING IS EXHAUSTED CONCATENATE THE HEAD OF THE LONGER STRING TO PARTIAL SUM OBTAINED
      if i > j then
        z := x;
        w := lpad(y,i,'0');  
      elsif i < j then
        z := lpad(x,j,'0');
        w := y;
        i := j;
      else
        z := x;
        w := y;
      end if;
      while i >= 0 loop
        if i > 0 then
          j := to_number(substr(z,i,1)) + to_number(substr(w,i,1)) + carry;
          carry := trunc(j/10,0);
          retval := to_char(j - 10 * carry) || retval;
        end if;
        i := i - 1;
      end loop;
      return to_char(carry) || retval;
    end;
    function double_it(x in varchar2) return varchar2 is
      retval varchar2(1001);
    begin
      retval := add_them(x,x);
      return ltrim(retval,'0');
    end;
    function halve_it(x in varchar2) return varchar2 is
      retval varchar2(1000) := '';
      i pls_integer := 1;
      j pls_integer := length(x);
      k number;
      carry pls_integer := 0;
    begin
      if x is null then
        return null;
      end if;
      if x = '1' then
        return '0';
      end if;
      if substr(x,1,1) = '1' then
        carry := 10;
        i := 2;
      end if;
      while j >= i loop  
        k := (to_number(substr(x,i,1)) + carry) / 2;
        if k = trunc(k,0) then
          carry := 0;
        else
          carry := 10;
        end if;
        retval := retval || to_char(trunc(k,0));
        i := i + 1;
      end loop;
      return retval;
    end;
    begin
    -- WE WILL DO "PEASANT MULTIPLICATION" (MORE EFFICIENT THAN CONVENTIONAL MULTIPLICATION):
    -- WHEN THE FACTOR TO BE HALVED IS ODD WE ADD THE CORRESPONDING DOUBLE TO THE RESULT (INITIALLY ZERO)
    -- AT EACH STEP WE HALVE ONE FACTOR AND DOUBLE THE OTHER
    -- STEPS ARE REPEATED UNTIL THE HALVED FACTOR IS GREATER THAN ZERO
      if x is null or y is null then
        return null;
      end if;
      if number_is_it(x) and number_is_it(y) then  -- THEY ARE BOTH NUMBERS
    -- CHECK FOR TRIVIAL RESULTS: MULTIPLICATION BY ZERO AND MULTIPLICATION BY ONE
        z := ltrim(x,'0');  -- TRIM LEADING ZEROS (JUST IN CASE)
        if z = '' then
          return '0';  -- SINCE ALL ZEROS WERE TRIMMED OFF X IS ZERO
        end if;
        w := ltrim(y,'0');  -- TRIM LEADING ZEROS (JUST IN CASE)
        if w = '' then
          return '0';  -- SINCE ALL ZEROS WERE TRIMMED OFF Y IS ZERO
        end if;
        if z = '1' then
          return w;
        end if;
        if w = '1' then
          return z;
        end if;
        i := length(z);  -- TO CALL FUNCTION ONLY ONCE
        j := length(w);
    -- WILL DO IT IN LESS STEPS IF THE LESSER FACTOR GETS HALVED AND THE GREATER FACTOR GETS DOUBLED
        if i > j then  -- X > Y => Y WILL BE HALVED AND X WILL BE DOUBLED
          half := w;
          dble := z; 
        elsif i < j then  -- X < Y => X WILL BE HALVED AND Y WILL BE DOUBLED
          half := z;
          dble := w;
        else  -- X AND Y ARE EQUAL LENGTH STRINGS SO WE COMPARE THE FIRST CHARACTERS
          if substr(z,1,1) <= substr(w,1,1) then  -- X < Y => X WILL BE HALVED AND Y WILL BE DOUBLED
            half := z;
            dble := w;
          else  -- X > Y => Y WILL BE HALVED AND X WILL BE DOUBLED
            half := w;
            dble := z;
          end if; 
        end if;
    -- PEASANT MULTIPLICATION
        while half > '0' loop
          if odd_is_it(half) then
            retval := add_them(retval,dble);
          end if;
          half := halve_it(half);
          dble := double_it(dble);
        end loop;
        retval := ltrim(retval,'0');
      else
        retval := 'at least one of the two operands is not a number';
      end if;
      return retval;
    end;Regards
    Etbin

Maybe you are looking for