Declaratice Custom Componente - leading zeros

Hello,
i'm currently building some custom components in JDev 11.1.2.3.0. Now sometimes it happens that some input fields are displaying 4 digits and they must display leading zeros, if those values are smaler than 4 digits.
I've tried it via the convertNumber component, it is displaying a single 0 if i give the pattern 0000 and those input fields are empty, but i could input some values with less than 4 digits and the required leading zero is gone.
So, how is the corect behaviour with always leading zeros for less than 4 digits achieved?
Thanks and best regards.
Alex

Frank Nimphius wrote:
Hi,
numbers are not showing leading numbers.Converting numbers into Strings thus is the way to go.
FrankBut where could i define the format for the string?

Similar Messages

  • Leading zeros problem with custom popup

    I've implemented a custom popup page following the How-To docs on the topic. The value I'm return to the calling page in the passback function most often will have leading zeros. So from the custom popup I do a call like this: javascript:passback(00363644). When my value arrives back on the calling page it's converted to 124836 (haven't yet figured out what kind of conversion is happening there).
    I realize this is not a javascript forum (and I've Googled for leading zeros in javascript to no avail - yet) but the HTML DB field type Popup LOV seems to accomplish this just fine so I was wondering how Oracle might be doing it. Anyone have any ideas?
    Earl

    Vikas,
    See
    http://tinypic.com/ibbfoy.jpg
    So, just use
    javascript:passback("00363644")and it should do what you want.You would think. But I've tried:
    wrapping it in single quotes:
    opener.document.getElementById('P6_CONTACT_ID').value = "'" + myVal + "'";
    wrapping it in single quotes:
    opener.document.getElementById('P6_CONTACT_ID').value = """ + myVal + """;
    and the other 'trick' that I've seen mentioned several places, concatenating an empty string to the value:
    opener.document.getElementById('P6_CONTACT_ID').value = "" + myVal;
    All to no avail! This is really frustrating. Supposedly, any string concatenation action will 'force' the value to retain it's original 'string-ness'.
    Working off this assumption and thinking that the conversion had already taken place by the time I assigned the value I backed up a step and assigned the value to a variable before trying to set the value, ala:
    var myVal = p_Value.toString();
    opener.document.getElementById('P6_CONTACT_ID').value = myVal;
    and still no joy.
    Following this logic one step further, do I need to get the value to a string in the original call. This will be a challenge because the link in the popup report is a is set to a URL with javascript call, like this: javascript:passback(#CONTACT_ID#);
    Further, when I float over the links with the mouse I can see the URL in the status bar of the browser as javascript:passback(00363644); So, how do I go about wrapping this in quotes in the link?
    Any help???
    Earl

  • Leading zero to customer invoice number

    We want to have rules that are payor specific to identify those payors that make changes to our current Invoice numbers.(many customers add leading zero)
    T
    •     Ability to have business rules to allow for consistent anomalies (i.e. payer always drops leading zero)
    How can we do this in AR
    points will be surely awarded.
    Thanks
    Nik

    When you load the files if you right justify the zeroes shouldn't matter.
    pls assign pts to say thanks.

  • Leading zeros with 24-hour clock?

    I have my system preferences set to 24-hour clock.
    How do I get the times to display with leading zeros?
    For example, 06:45 instead of 6:45?

    As I said before, you need to explore. I was able to add it in less than 30 seconds.
    Let me try to explain. It is easy to do, but more difficult to explain.
    Go to Sys Prefs/Int'l/Formats pane. Choose Custom in the Times area. Choose Medium in the Show drop down menu. (Medium seems to be the one used by OS X for the menu bar clock.) Here you can arrange the order of the different components as you like. Notice they have little arrows indicating drop down menus. Most of the optional formats offer a leading zero.
    Even though you have formatted it in the Int'l pane, you must choose for some of your formating to show in the Date & Time/Clock pane.
    Good Luck.

  • Leading zero on 24 hour clock

    Is it possible to have the 24-hour clock display a leading zero? Such as 09:00 instead of 9:00.

    As I said before, you need to explore. I was able to add it in less than 30 seconds.
    Let me try to explain. It is easy to do, but more difficult to explain.
    Go to Sys Prefs/Int'l/Formats pane. Choose Custom in the Times area. Choose Medium in the Show drop down menu. (Medium seems to be the one used by OS X for the menu bar clock.) Here you can arrange the order of the different components as you like. Notice they have little arrows indicating drop down menus. Most of the optional formats offer a leading zero.
    Even though you have formatted it in the Int'l pane, you must choose for some of your formating to show in the Date & Time/Clock pane.
    Good Luck.

  • Visual Studio Projects Not Showing FileVesion Leading Zeroes in File Properties

    I created a simple Visual Studio 2013 windows form application setting the AssemblyInfo.cs file as show below.
    // You can specify all the values or you can default the Build and Revision Numbers
    // by using the '*' as shown below:
    // [assembly: AssemblyVersion("1.0.*")]
    [assembly: AssemblyVersion("1.0.0.0227")]
    [assembly: AssemblyFileVersion("1.0.0.0227")]
    [assembly: AssemblyInformationalVersion("0.0.0.0227")]
    I built the application and went to the Windows File Explorer and brought up the file properties. What I see is that the product version showing the leading zeros, but the file version field does not show the leading zeros.
    It appears to be a bug either with Visual Studio or with Windows. Which one is it and is there a fix?

    Hi Sarah,
    We can't see the screenshot. Do you mean you use Windows Explorer to browse to the AssemblyInfo.cs file and check the property?
    If you change the product version or the file version from the AssemblyInfo.cs file, you need to firstly rebuild the assembly, then if you go to the debug/release folder, check the property of the assembly file, the Details tab will show you the corresponding
    changes of these properties. It's the assembly property but not the cs file property.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • CRM 7.0 Leading zeros on material in sales documents delta replication

    Hi
    During initial load of sales documents from ECC to CRM the item is replicated with leading zeros.
    The consequences is that CRM do not find the product and the crm order gets an error message that the product is not maintianed in product master.
    So my question is; how to replicate the order without leading zeros for items?
    BR
    Johan

    Hello Johan,
    You need to check txn:OMSL in ERP and you need to make sure that settings are in sync with CRM customizing path settings.
    SPRO>IMG>Cross-Applicaiton Component>SAP Product>Basic Settings-->Define O/P Format..
    Especially you need to check for the lexicographical flag.
    If this flag is set, then 0123 is different from 123.
    Hope this helps!
    Best Regards,
    Shanthala Kudva.

  • BAPI_PO_CHANGE document number leading zero problem

    Hi experts,
    The following code clears the "Delivery Complete" flag on a list of Purchase Orders uploaded from a CSV file.
    The PO number is 9 digits long, however, in EKPO table it is stored as 10 digits (prefixed with a zero). The BAPI does not recognise the document number unless it is prefixed with a zero in the CSV file (which adds extra work for the user to create custom format in Excel to add the leading zero).
    What code is required for the BAPI to recognise the 9 digit number without the leading zero?   Perhaps the leading zero could be hard-coded into the program?
    Any advice is much appreciated.  Thanks for your time.
    REPORT  Z_MASS_REMOVE_FDI_DCI_BAPI.
    *Check if file exists
    DATA: rc TYPE sy-ucomm.
    CALL FUNCTION 'WS_QUERY'
           EXPORTING
                query    = 'FE'  "File Exist?
                filename = 'X:\STO.TXT'
           IMPORTING
               return   = rc.
    IF rc EQ 0.
      WRITE: / 'File does not exist'.
    ENDIF.
    TYPES: BEGIN OF ty_tab,
            DOCNO(10),
            ITEM(4),
           END OF ty_tab.
    DATA : it_tab TYPE STANDARD TABLE OF ty_tab,
           wa_tab TYPE ty_tab.
    START-OF-SELECTION.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename = 'X:\STO.TXT'
    *     FILETYPE = 'ASC
          has_field_separator = 'X'
    *     HEADER_LENGTH = 0
    *     READ_BY_LINE = 'X'
    *     IMPORTING
    *     FILELENGTH =
    *     HEADER =
          TABLES
          data_tab = it_tab
          EXCEPTIONS
          file_open_error = 1
          file_read_error = 2
          no_batch = 3
          gui_refuse_filetransfer = 4
          invalid_type = 5
          no_authority = 6
          unknown_error = 7
          bad_data_format = 8
          header_not_allowed = 9
          separator_not_allowed = 10
          header_too_long = 11
          unknown_dp_error = 12
          access_denied = 13
          dp_out_of_memory = 14
          disk_full = 15
          dp_timeout = 16
          OTHERS = 17.
    END-OF-SELECTION.
    LOOP AT it_tab INTO wa_tab.
      WRITE:/ 'DOCUMENT: ',
      wa_tab-DOCNO,
      ' ITEM: ',
      wa_tab-ITEM.
      WRITE: / '-----------------------------------------------------------------------'.
      DATA: s_header TYPE bapimepoheader,
            s_headerx TYPE bapimepoheaderx,
            s_item TYPE bapimepoitem,
            s_itemx TYPE bapimepoitemx,
            i_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
            i_extension TYPE bapiparex OCCURS 0 WITH HEADER LINE,
            s_bapimepoheader TYPE bapimepoheader,
            s_bapimepoheaderx TYPE bapimepoheaderx,
            s_bapimepoitem TYPE bapimepoitem occurs 0 with header line,
            s_bapimepoitemX TYPE bapimepoitemX occurs 0 with header line,
            wa_message TYPE c LENGTH 100.
      s_bapimepoheaderx-po_number = wa_tab-DOCNO.
      s_bapimepoheader-po_number = wa_tab-DOCNO.
      s_bapimepoitemx-PO_ITEM = wa_tab-ITEM.
      s_bapimepoitem-PO_ITEM = wa_tab-ITEM.
    *Remove Delivery Complete Indicator (DCI)
      s_bapimepoitemx-NO_MORE_GR = 'X'.
      s_bapimepoitem-NO_MORE_GR = ' '.
      append s_bapimepoitem.
      clear s_bapimepoitem.
      append s_bapimepoitemx.
      clear s_bapimepoitemx.
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          purchaseorder = wa_tab-DOCNO
        TABLES
          return        = i_return
          poitem        = s_bapimepoitem
          poitemx      =  s_bapimepoitemx.
    *Message types: S Success, E Error, W Warning, I Info, A Abort
    *Supress all Warning Messages
    DELETE i_return WHERE ( TYPE EQ 'W' ).
    *Commit only if no errors have been returned
      read table i_return with key type = 'E'.
      if sy-subrc ne 0.
        COMMIT WORK AND WAIT.
      endif.
    *Display Return Messages on Screen
      LOOP AT i_return.
        WRITE: /   'RETURN MESSAGE: ',
        'ID: ',
        i_return-id,
        ' TYPE: ',
        i_return-type,
        ' NUMBER: ',
        i_return-number,
        i_return-message.
      ENDLOOP.
      WRITE: / '-----------------------------------------------------------------------'.
      refresh : s_bapimepoitem,s_bapimepoitemx.
    ENDLOOP.

    hi,
    Use the conversion exit to make it as 10 digit char CONVERSION_EXIT_ALPHA_INPUT.

  • Leading zeros-master data

    Hi All,
    We have a characteristic 'Material'(custom defined master data infoObject) of length
    10,Conversion routine:ALPHA, datatype :CHAR,& output length:10.
    Requirement is Material number should be displayed as 10 digit number(characters ) in Bex
    report.
    but for some of the materials,we  don't have 10 digits for example we have a material
    123(this 123 should be seen as 0000000123 in Query output).
    When i am displaying infocube contents or master data contents i could see 123 as
    0000000123. but with F4,it shows 123 as 123  and in Query output also as '123'
    1.actually How data will be stored in infocube and master data tables? (either 123 or
    0000000123)
    2. one soution to display matarial as 10 char in report is  with  transfer/update routine by
    adding leading zeros.
    Is there any other way to achieve this without using routine ?kendly let me know.
    correct me if my above asumption is wrong.
    thanks

    Hi Murali,
    the Alpha Conversion ist used to convert data between an internal and an external view. The internal view is how the data is physically stored in the database. The external is i.e. how the data is displayed in reports.
    At some point the Alpha Conversion (if defined for the characteristic) is automatically used - you can not change it. This means that in this cases you can only see the external format. The BEx Reporting is one place and the F4 help another.
    In some places within the BW system (no enduser view) you have the option to see the data in the internal format. One of these places ist the cube content. There you have a flag "Do not use any conversion". If this flag is activated you will see the data in the internal format. But this is NOT the format a user will see in reporting.
    In your case the internal format is the value "0000000123" and the external "123".
    Hope that helps
    Regards
    Adios

  • Need formula to take text from one cell, add that to a serial number with leading zeros

    I'm trying to create a spreasdheet cell that simplifies creating videotape Numbers from a job name in cell and appends a serial number with leading zeros, and that would survive an export to EXCEL.
    The result would look like
     A Column
    Job Name
    B ColumnTape #
    Formula needed for B
    ClientName-TapeType-
    ClientName-TapeType-001
    =
    ClientName-TapeType-
    ClientName-TapeType-002
    =
    I've tried using a custom cell format that had the text in front of the (Integer) drag and drop, with three integers and leading zeros.
    That worked, but requires recreating the custom cell format for each client and tape type.
    So, I've used the formula =A2& in order to play around with different things, but haven't hit on something that adjusts for increased numbers and retains the leading zeros.
    I don't mind doing a starter for the first row and then adding +1 in the formulas for the rows below.
    I've done that using the custom cell formats for the first B cell and then using =Bx+1 in the following cells.  It works, but I'm hoping to find something simpler or that can be copied and pasted in multiple rows on one paste.
    Thanks in advance.
    Suggestions much appreciated!
    Ted

    Ted,
    This expression in B will give you the pattern I believe you are looking for:
    =A&RIGHT("00"&ROW()-1, 3)
    Here's a screen shot...
    Jerry

  • Grep query - optional character, leading zeros & shortening words

    I have recently been taught (thanks to this forum) how to use Grep searches (wish I’d known about it years ago!). I still can’t get my head around some of the search strings - hoping someone can shed some light & explain what the components are doing so I can further utilise them?
    I have dates for a travel brochure, given to me sometimes separated by commas without the date (2, 3, 4, 5) & I need to put each date into its own cell in a table with the month next to them (with no space & going across left to right) + with a leading zero for single digits (02Jan /t 03Jan /t 04Jan /t 05Jan).
    How can I get it to add a leading zero for single digits & add the month to the last number that doesn’t have the comma (which I otherwise utilise in the search)? (The way I get it currently is  2Jan /t 3Jan /t 4Jan /t 5).
    I can’t seem to work out the optional character command.
    The other problem I have is that the months need to be shortened to just the first 3 digits & I’m not sure how to do that, either.
    Any light shed would be appreciated!
    Using current Indd on Mac.
    Message was edited by: Alleyna Lenton I have just found (through searching IndesignSecrets) how to do the optional comma: (\d+),?    ->    $1Mar\t  (although I'm not clear whether the '+' after '\d' represents more than 1 or any number of digits?) Just the other 2 probs I have - abbreviating words to first 3 characters & adding a zero to the front of single digits.

    Very good -- GREP is a useful tool to master! If you can't work out the last few things, do let us know. Make sure to list a couple of Before-After examples.
    The + after \d is indeed for "1 or more", that is, at least one and then as much as possible (I don't think there is a realistic upper limit). Contrast with * which is "zero or more" and ? for "none or exactly 1".
    Cutting off month names after the first 3 characters was asked not too long ago, but I cannot recall what the offered solution was. Try something like this:
    (?<=\bJan)uary
    (replace with nothing). The (?<=xxx) is a positive lookbehind: it will search the text "uary" and only match it if preceded by "Jan". By writing out all months in one long string, you can change all of them:
    (?<=\bJan)uary|(?<=\bFeb)ruary|(?<=\bMar)ch|(?<=\bApr)il
    ... etc., etc., where the vertical bar is an OR operator. (It's a bit long written in full, but remember you only have to write this GREP once and then you can save it.)

  • Leading zeros are not displaying in the excel

    Hi Experts,
    Leading zeros are not displaying in the excel
    Here is the situation:
    I have developed one report, which will create the file in Application server with TAB deleimeted. After that I am sending that file via email in the excel format using Email functionality FM.
    Normally our material numbers will start with zeros.
    But when I check the email excel file , leading zeros are not displaying.
    Even I checked the application server (AL11) file, zeros are there.
    I thought program FM was wrong and I tried it manually by downloading the file into excel. Eventhough it is suppressing zeros.
    Could you please advise, how to display leading zeros to the material number in excel file.
    Thanks in advance
    Raghu

    Application server file showing  zeros infront of the material number.
    1200#  0012401387# XXXXXXXX
    Once file created in app server, I am using one custom FM to send that output in excel format / txt format via email.
    when I send txt file via email, I am getting leading zeros. But when I send xls file via email, I am not getting zeros.
    I checked custom FUNCTION MODULE . No mistakes in that.
    ===
    Sudhir,
    As you said, I passed ( ' ) single quote infront of the material number. When I check the excel file, single quote also displaying like this '0000100.
    Application server file showing like below
    1200#  '0012401387# XXXXXXXX
    ===
    Could you please advise anyone how can we acheive this.
    Thanks

  • Need hel attendant console- missing leading zero

    I have a customer wher we did an upgrade from 4.1(3) to CUCM 7.1(2), we installed the AC plugin from the CUCM, and the AC is working but now the cutomer complains that they can't dial back from the AC because they are missing the leading zeros from the incomming calling numbers, on the phone the numbers are displayed with the zeros, what can be doen to have the leading zeros on the  AC
    Thanks

    Bradley,
    I cannot comment on the implementation you have gone through but I can comment on your comments about CUEAC.
    There is going to be a new release in June this year which will support directory integration directly to AD as well as the CUCM sync which is available today.
    The GUI iteself is to undergo a redesign in version 10, the date on this release is not yet known.
    Incremental search is something which is not on the roadmap but is something I will discuss with the Product Manager to see if it can be considered.

  • Char NUMC(5) - need to store value at database level without leading Zeros.

    Hi All
    We have 0Mat_Item like infoobjects in SAP BI, which have data type Char NUMC(5). Here if u load value '1', it would show us '1' at front end (BI or reporting level) but at database level stores as u201800001u2019.
    My requirement is to store this value without leading zeros at database level. I wrote code in transformation u201Cshift u2026 left deleting leading u20180u2019 u201C & could load the data into New data table and at database level as I was getting result without leading zero. But once I activate the request, it gives SID generation error u201CValue '1' of characteristic 0ME_XCHRATE is not a number with 000009 spaces.u201D
    How to solve this issue so that I could store u20181u2019 value instead of u201800001u2019 value in the database & could able to activate in DSO.
    Thanks....

    Hi.....
    System may be storing the data in that way to maintain consistency.
    Alpha conversion is used to store data consistently. It does this by storing numeric values prefixed with 0s Eg. If you have defined a material as length 6 (of type Numc) then material number 1 is stored as 000001 but displayed as 1; this removes inconsistencies between 01 vs. 001.
    U can add the conversion routine for this Infoobject in either below way...
    In the BW side...in the Datasource Level
    In the datasource >> Go to fields tab >> there search the R/3 field which is mapped to that Infoobject in the Transformation >> Then in the Conv.Routine column select the Alpha Conversion Routine and In the Format column select External....
    In the Transformation
    Write a field level routine for that particular field abd call the Alpha conversion routine there...
    In the R/3 side
    In the Customer exit ....Go to SE37 >> EXIT_SAPLRSAP_001 >> Double click on ZXRSAU01 >> search the datasource......write the code there....
    Hope below link helps you.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/7108a690-0201-0010-4cbc-9bca94f9ad9c?quicklink=index&overridelayout=true
    Regards,
    Vinay.
    Edited by: Vinay Joshi on Mar 10, 2011 4:54 AM

  • Alpha-convers. in BW but no leading zeros from source system

    Hello all,
    I want to load customer data via XML. The data are delivered via XI every night in a delta-queue in BW. From the delta-queue the data gets loaded into an ODS.
    From the source system I get the customer number with 6 characters, but in BW I have a alpha conves.Routine in the InfoObject 0SOLD_TO and 0CUSTOMER.
    How can I fill in leading zeros to the values? Do I have to do this in the InfoSource setting or in the update rule?
    Any ideas would be great.
    Thanks upfront and Best regards,
    Stefanos from Munich/Germany

    Hi,
    Try checking the option in the transfer rules. Aganist the Info Object 0Customer you'll have to scroll to right then you can see the check box called conversion . Check that & try loading the data.
    Other than this you'll have to go with the routine.
    Regards,
    SB

Maybe you are looking for

  • Can't get Macbook to turn back on after sleeping...

    I put my Macbook on sleep and now it won't turn back on. The fan's working, the white light at the bottom is on when I close the lid..but when I open it nothing, and when I hit the power button nothing. Help??

  • How do I prevent Firefox from opening all tabs in seperater windows?

    Every single time I open Firefox it not only opens all of my previous tabs in one window but it also opens each and every one of them is it's own separate window. As I normally work with over 60 tabs it takes several minutes for them to complete open

  • How to create own attributes in the graph.xml of 10g Reports

    Hi, Iam using 10g reports. Iam recreating the graphs in 10g which were created in Graphics builder earlier. While doing that I found lot of features are missing in 10g reports charts wizard. It has only limited number of Graph types when compared to

  • AIR error message while previewing

    Hi, I am using Captivate 5, running on Windows 7 (32-bit) OS, with 4 Gigs RAM. When previewing a Captivate moview, by pressing F4 key, Captivate throws an error in a pop-up window, titled "Adobe AIR". The message reads: This installation of this appl

  • I want to do upgrades but my computer reports I do not have permission, now what?

    <blockquote>Locking duplicate thread.<br> Please continue here: [[/questions/866906]]</blockquote> security and stability update, do not have system permissions to install it. I do not know what or how to correct this