MessageFormat with NumberFormat parts

Hi,
I try to get a MessageFormat which would behave like a mixture of lets say DecimalFormat and MessageFormat -
The first part would be like MessageFormat with any characters in it, e.g
new MessageFormat("XYZ-1230-{0}")where the part which is replaced (i only have one argument, which is in Integer value, like 1000) - {0} - has a minimum of 6 digits.
So the formatted String at the end shall be like XYZ-1230-001000
I hope this was understandable :-)
The usage of DecimalFormat alone is not going to work as e.g. the dashs will break it, even if i mask them with a single quote.
Does anyone have an idea how to extend MessageFormat to behave like DecimalFormat only for the replaced part?
Regards,
Andreas

import java.util.Formatter;
public class Example {
    public static void main(String[] args) {
        int number = 1000;
        String result = String.format("XYZ-1230-%06d",number);
        System.out.println(result);
        //or
        Formatter fmt = new Formatter();
        fmt.format("XYZ-1230-%06d",number);
        System.out.println(fmt);
}

Similar Messages

  • Delete data from DSO only with a part of the key

    Hi experts,
    I have a DSO with 9 key fields and i want to delete some entrys. Our source system only provides 2 fields of the key. My problem is, that the BI is not able to delete from DSO unless I have the full key.
    Now I want to get the rest of the key fields from the active table of the DSO. Can sombody help me please with the ABAP Code? Or is there another possibility?
    I already found this thred in SDN but this is for BW 3.5:
    Delete data from ODS with only part of the key
    Thanks
    Ralf

    Ralf,
    the thread pointed out by you is for passing deletion entries to the DSO / target using the deletion entries .. namely recordmode = D.
    Are you looking at deleting data from the DSO as a one time activity or you want to handle the same using a start / end routine ...? and pass deletion entries to other data targets which get the data from this DSO ?
    Arun

  • OSSNOTES for releasing process orders with missing parts in background

    Hi All,
    The bapi 'BAPI_PROCORD_RELEASE' is not releasing the process orders
    with missing parts in background.
    Is there any OSSNotes for releasing these process orders in backgound through this bapi.
    Pls help.
    Thanks .

    Hi Suri - Thanks for your response. I tried both with blank(individual and collective) and 2 (collective req. only) but I still get the same result. I found one other setting that can solve this issue and that is checking the activate full confirmation logic at the the MRP group level in OPPR. I will test more and let you know if that works but we dont use MRP groups here at our client and that is why I was little hesistant to set up collective availability check parameters at the MRP group level. But looks like this is the only option that we can use to get this resolved.
    Thanks,
    Bharath

  • I have Iphone 5 and have an issue with deleting part of the messages in Imessage conversation. The trash button is not displayed to delete part of the imessage. I see only delete all option. Is it a bug?

    I have Iphone 5 and have an issue with deleting part of the messages in Imessage conversation. The trash button is not displayed to delete part of the imessage. I see only delete all option. Is it a bug?

    Hi An Iphone user,
    If you are having issues deleting a specific message from an iMessage conversation (not seeing the Trash icon), you may want to double-check that you are following the steps outlined in the following article:
    How do I delete a message?
    To delete a message, tap and hold the message bubble, then tap More.
    Tap Delete All to delete all the messages. Or tap to select the messages you want to delete, then tap .
    After you delete a message, you can recover it only by restoring from a backup.
    Send messages with your iPhone, iPad, or iPod touch - Apple Support
    Regards,
    - Brenden

  • BPEL Compilation Error: Load of wsdl "with Message part element undefined..

    Hi Friends,
    I am getting following error while compiling my BPEL process:
    Error: Load of wsdl "FTPWrite.wsdl with Message part element undefined in wsdl [file:/D:/MyData/_MyProjects/052_Amazon_MetadataInterface/001_SVN/002_Intl/trunc/MetadataInterfaceIntl_2013Apr15_WorkingCode/MetadataInterface_Intl/MetadataInterface_Intl.wsdl] part name = reply     type = {http://com.fox.metadata/MetadataInterfaceIntl/MetadataInterface_Intl/types}processResponse" failed
    However the reply message is already defined in the MetadataInterface_Intl.wsdlas shown below:
    Code for MetadataInterface_Intl.wsdl::::
    "<?xml version= '1.0' encoding= 'UTF-8' ?>
    <wsdl:definitions
    name="MetadataInterface_Intl"
    targetNamespace="http://xmlns.oracle.com/MetadataInterfaceIntl/MetadataInterface_Intl/MetadataInterface_Intl"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:inp1="http://com.fox.metadata/MetadataInterfaceIntl/MetadataInterface_Intl/types"
    xmlns:tns="http://xmlns.oracle.com/MetadataInterfaceIntl/MetadataInterface_Intl/MetadataInterface_Intl"
    >
    <wsdl:types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:import namespace="http://com.fox.metadata/MetadataInterfaceIntl/MetadataInterface_Intl/types" schemaLocation="xsd/Metadata_Interface.xsd"/>
    </xsd:schema>
    </wsdl:types>
    <wsdl:message name="requestMessage">
    <wsdl:part name="request" element="inp1:process"/>
    </wsdl:message>
    *<wsdl:message name="replyMessage">*
    *<wsdl:part name="reply" element="inp1:processResponse"/>*
    *</wsdl:message>*
    <wsdl:portType name="execute_ptt">
    <wsdl:operation name="execute">
    <wsdl:input message="tns:requestMessage"/>
    <wsdl:output message="tns:replyMessage"/>
    </wsdl:operation>
    </wsdl:portType>
    </wsdl:definitions>"
    Surprisingly, this same code was compiling file last week and now I have no clue why I am getting this error. Can someone please shade some light on this issue?
    Thanks,
    Sachin.

    Hello
    I have had the same problem in Oracle BPM and solved it using the following steps:
    1- In your application navigator window, expand the project that contains the business rule.
    2- In the SOA Content, double click on your wsdl file.
    3- When the file opens, select the schema view from the bottom of the page.
    4- In the schema view, expand all the schema nodes and check if you see any values in red. If you see one, that value has probably caused the error and you should correct it using the property inspector window.
    In my case, the schema location value was set to a wrong path, so I changed it and the error resolved.
    Also, some error that appear as warning in the rule editor will show as compile error later, such as input types not being used and such, so those must be resolved before compiling.
    Hope that was helpful
    good luck

  • Replacing Macbook Pro parts with Macbook parts...........???

    I have a MacBook pro that has recently bit the dust and is out of warranty. I'm 99% positive it is a combination of the hard drive and the logic board failing. I have a new MacBook that I hardly ever use and I am wondering if I can replace the faulty parts in my MacBook pro with the parts from my working MacBook.
    I know replacing the hard drive on my mbp with the hard drive
    from my mb will work just fine... But here's my longshot question.. Can I replace the logic board in my mbp with the logic board from my mb? Are they interchangable?
    If not, will my mb accept the ram from my mbp? I may just throw my 2 GB RAM from my mbp into my mb to tide me over until the new mbp comes out/I can afford it.
    Thanks.

    Well i'm not too sure about the logic board, but i do know that the ram in your macbook pro will work in your macbook.

  • Subcontracting with discontinued parts

    We use discontinuations all the time but now we are fully subcontracting some products and the discontinuation is not being planned for either the old part or the new part. SAP help clearly says that subreq discontinuation is not planned but with several parts at any one time on boms of over 200 parts, we just can't manually manage this.
    I don't believe we are the only one with this problem but I am unable to find any solution - please help!
    Thanks

    Hi Krishna,
    Thanks for your reply but I don't understand how safety stock would work. Are you suggesting loading safety stock against the new part?
    We have 12+ weeks lead times and constantly changing forecasts. The discontinuation worked very well in managing the old part down to zero stock with all the variables involved but safety stock is a fixed figure?
    Please advise.
    Donna

  • PDF with movable parts.

    I'm trying to create a PDF file with movable parts.  I'm doing a research project where participants will try to match wallpaper to a specific room.  I would like to have a PDF file that has wallpaper squares that can move around a hallway in another layer.  Is it possible to do?
    Thanks.

    Possibly with either OCG (Optional Content Groups) or via a 3D PDF file.  Depends on what you mean by the term "movable parts".  Do you mean make them invisible?  Do you mean actually make them move via JavaScript animation?  If it is the former then that is OCG.  If it is the later then that is 3D PDF.  OCG is not a simple thing to do even with Acrobat.  3D PDF is also in the same realm of difficulty and perhaps more difficult because it means you need to have other software that can create specific 3D files that then can be imported into Acrobat or a third party software company's software called tetra4D ( http://www.tetra4d.com/ )

  • Can i order a Mac with custom parts.

    Hello guys, i am so new to Mac, so, here is my question.
    If i would like to buy a Mac with custom parts like...
    i want an iMac 27" with 5k display and my custom parts will be:
         CPU: 3.5GHz Quad-core Intel Core i7
         Graphic: NVIDIA GeForce GTX 775M 2GB GDDR5
    the rest will be still the same.
    PS: Coz i really like the i7 CPU but can't effort for 4GHz and i am a nVidia fan.

    The only available options are those stated on the Apple Store web pages.

  • PO with  Mfr part Number ..?

    Hi experts,
    when i enter the  Material code in the Purchase order  it should be ask for Mfr part Number automaticalley.
    without selection of  materials with Mfr part number .
    I have materials with 3 Mfr part Numbers. normalley we select through search material through manualley  .
    but ht e problem is my client wants it should be display when he enter Material stock code.
    is it possible ?
    Thanksin advance,
    Anthyodaya.

    Hi,
    Once you create the HALB for the mfr part number and then make the association to your client's stock material number, the mfr part number will automatically appear. This will happen only if there is only one to one relationship between Mfr part number for a vendor and stock material number of your client. If I had understood correctly your scenrio, you have 3 mfr part numbers for the same stock material number but for the same vendor which is rather strange. Why is this? can you explain
    In case this is for a real  business reason, then there is no automatic solution, the system will force the end-user to pick one. As suggested an user-exit solution can be thought using some unique identifier to pick the correct mfr part number like based on material group or something else.

  • PO output with Manufacturer Part number

    Hi,
    We created PO with Mfr Part number and Manufacturer. But in the PO output (print) we are not able to see this information.
    Why we are not able to see this? Can somebody help on this.
    Thanks,
    Venkat

    do you use the SAP IDES form or a customized form specific to your company?
    If it is a customized form, then ask your form developer, this requirement did probably not exist as the form got designed.

  • Best Practices for VidConf with external parties

    We currently use Sony Video conference units for our end units. On the backend, we use a Cisco 3515 for multipoint conferences.
    We now need to be able to do video conferences with external parties using our MCU.
    Since there are many ways of doing this, are there solutions that work better than others? Basically I need to publish a doc that says 'here is what you will need. This port open on your firewall, a public IP address that is not NATd....'
    Any help would be appreciated.

    David,
    Unfortunately, Cisco has not (currently) chosen to implement H.460.x in their H.323 infrastructure solutions, so a Cisco GK could not be used in combination with a Tandberg SBC (session border controller). However, we currently use Cisco gatekeepers for everything but firewall traversal. For traversal, the Tandberg GK functions as the inside portion of the traversal solution and proxies for all my codecs (a mix of six different Tandberg and Polycom product lines)--even those that are H.460-capable. Combined with the SBC (session border controller is a Cisco MCM (25xx router) setting on the public side of the firewall and neighbored to the session border controller.
    The "public" GK is for the entities who write custom policies in their firewalls or set their codecs on the public side of their security. If not H.460 compliant, they have to register with a GK, they can't register directly with the SBC, hence, the public GK which is simply neighbored to the SBC.
    I would encourage you to closely look at the Polycom V2IU as well. It has come a LONG way since it was introduced a couple of years ago.
    Personally, I still don't feel like the V2IU has as much flexibility nor does it implement a dialing methodology best suited for converging networks. It is an ALG (App Layer GW) that has been tweaked to support H.323 traversal, so I don't think it will ever truly match the Tandberg Expressway solution apples-apples, but it is dramatically less expensive and thus worth considering.
    We tested both the Tandberg and Polycom traversal solutions with our internal CAC (call admission and control infrastructure), which is made up of multiple Cisco GK products in a fully meshed neighboring scenario prior to purchase of a traversal solution, and the Cisco products interoperated with both traversal solutions.
    Cisco did present a solution that proposed a Layer 3 solution, but we felt it best to pursue something based within the H.323 umbrella standard.
    If you want to talk more, please email me at [email protected] w/ direct contact info and I'll be happy to assist you in any way I can.
    Greg

  • How to handle same product with different part numbers and pricing in SAP.

    I am a new user and want to learn if the following scenario can be handled by SAP.
    Our business buys a product from a supplier which has 2 different part numbers and prices. It is the same product. One is the primary product whilst the other is available only as an upgrade option with a different part number to a mainline product at a cheaper price .
    Our issue is that we sometimes buy the upgrade option with a mainline product to get the better price even though these go into stock. Basically we need to have the items linked with both part numbers in SAP at different prices but inventory both in and out only going against the primary part number. Any ideas?

    Thanks Jitin
    I did give them different part numbers and then attached a Bom containing the primary part number against the upgrade option however I really need to have the secondary item as a sales and purchase item but non inventory so the stock comes from the primary part. Ideally  if we receipt the goods in as the secondary number the inventory goes to the primary part. If the second number is an inventory item then I have the issue of the same part with different part numbers sitting in stock at different prices and having to rely on employees understanding the difference.
    Sorry to be so confusing. I will do some more testing over the weekend and see if I can find a suitable solution.
    Thanks
    Martin

  • Apps Secretly Sharing Personal Data With Third Parties--

    just read this article on the huffingtonpost.com
    how can i tell who is obtaining persoanl data without telling me ?
    are there supposed to be safeguards against this ?
    *what can i do to prevent this ?*
    *Apps Secretly Sharing Personal Data With Third Parties--Without Telling You*
    JORDAN ROBERTSON | 07/28/10 10:40 PM | AP
    LAS VEGAS — Your smart phone applications are watching you – much more closely than you might like.
    Lookout Inc., a mobile-phone security firm, scanned nearly 300,000 free applications for Apple Inc.'s iPhone and phones built around Google Inc.'s Android software. It found that many of them secretly pull sensitive data off users' phones and ship them off to third parties without notification.
    That's a major concern that has been bubbling up in privacy and security circles.
    The data can include full details about users' contacts, their pictures, text messages and Internet and search histories. The third parties can include advertisers and companies that analyze data on users.
    The information is used by companies to target ads and learn more about their users. The danger, though, is that the data become vulnerable to hacking and use in identity theft if the third party isn't careful about securing the information.
    Lookout reported its findings this week in conjunction with the Black Hat computer security conference in Las Vegas.
    Lookout found that nearly a quarter of the iPhone apps and almost half the Android apps contained software code that contained those capabilities.
    The code had been written by the third parties and inserted into the applications by the developers, usually for a specific purpose, such as allowing the applications to run ads. But the code winds up forcing the application to collect more data on users than even the developers may realize, Lookout executives said.
    "We found that not only users, but developers as well, don't know what's happening in their apps, even in their own apps, which is fascinating," said John Hering, CEO of the San Francisco-based Lookout.
    Part of the problem is smart phones don't alert users to all the different types of data the applications running on them are collecting. IPhones only alert users when applications want to use their locations.
    And while Android phones offer robust warnings when applications are first installed, many people breeze through them for the gratification of using the apps quickly. Google said it tries to limit users' risk with the warnings but consistently advises users to only install apps they trust.
    Apple didn't respond to a request for comment on Lookout's research.

    The best way to handle this, depending on the app, is to turn off things like sharing on the world wide boards. (This can often be done in settings, although you may have to do so in app.)
    Also--and this may sound a bit lame--choose your apps (especially free ones) carefully. There are a whole range of games that all track certain info bits. I have a few of those, but have have turned off that part of it.
    Finally...the same things go for apps as with any program for your computer: use common sense.
    Doc

  • As soon as I open a photo with Preview part of the photo turns black

    As soon as I open a photo with Preview, part of the photo turns black.  Just started doing this.

    Complain to the Attorney General about what? There is nothing in your story worth any such complaint. They will tell you the same.
    First you have payment difficulty so credit and the Edge program are not available to you. You have to be credit worthy to get any upgrade, unless you can pay full price for all those new devices.
    Can you?
    You are trying to get new contract plans, but since you are having paying on time and in full issues you will not get extended credit from any carrier.
    What I would do is go and port out to Boost or Virgin Mobile where you pay a reduced cost for each device and get unlimited everything for $40 to $50 a month, it is pre pay so if you don't pay you get cut off.
    Verizon although with the best coverage is also the highest priced.
    Good Luck

Maybe you are looking for

  • Sequence Crashing in 10.0.3

    I've been working in FCPX on a 30min show & now all of a sudden the sequence is crashing. other sequence's are working fine. but when I try to open the one im working on right now it keeps crashing. I've uninstalled & reinstalled FCPX same issue. it

  • How to set SQL Server Login MUST_CHANGE, CHECK_POLICY, CHECK_EXPIRATION all to OFF with T-SQL

    How to set SQL Server Login MUST_CHANGE, CHECK_POLICY, CHECK_EXPIRATION all to OFF with T-SQL.  SSMS will not allow me to change policies to OFF. Error: 15128 - The CHECK_POLICY and CHECK_EXPIRATION options cannot be turned OFF when MUST_CHANGE is on

  • Not able to print more than 6 images in Preview?

    So having installed a new printer on my MacBook, I am trying to print a folder full of images in one hit... They are mixed file types, web docs, jpgs etc. However, when I go select "Open With" it comes up with Safari, so I go through and open with Pr

  • Font substitution for Times New Roman? Why is Adobe doing this?

    I'm using Adobe Acrobat Pro version 9.2 to read pdfs created by a number of different authors. I'm running Windows 7 64 bit OS. These are NOT pdfs I have created. Some of these pdfs display an incorrect font substitution for Times New Roman and I can

  • EXPDP error for 11gR2

    Hi, All of the sudden today I have been getting expdp errors only just one schema that I try to export, whereas all my other run perfectly fine.      Oracle Datapump export for ODC on 120228 at 1203      Building parameter files for ODC      EXPORT P