Using Time Field in UI5

Dear All,
Greetings!
Is there a way to use time input field in ui5 like DatePicker which shows a rich calendar to pick the date. ?
I came across different threads but not able to find the exact solution.
In some thread i found by using sap.m.DateTimePicker, but this is for mobile platform if i am not wrong and i am looking solution in UI5 web apps.
Can anyone please solve how to use time as input field like DatePicker in ui5 web apps ?
Thanks in advance
Regards,
Rumeshbabu S

Hi Rumeshbabu,
well, a Time-Picker is not available in sap.ui.commons library. If you really need one, you have to write your own custom control. But fortunately, there are a lot of good jQuery-Time-Picker plugins avaiable,e.g. 10 jQuery Time Picker Plugins
You can use one of these as a base of a notepad control.
Regards Michael

Similar Messages

  • How to Sort JTable data using Multiple fields (Date, time and string)

    I have to fill the JTable data with some date, time and string values. for example my table data looks like this:
    "1998/12/14","15:14:38","Unicorn1","row1"
    "1998/12/14","15:14:39","Unicorn2","row2"
    "1998/12/14","15:14:40","Unicorn4","row3"
    "1998/12/17","12:14:12","Unicorn4","row6"
    Now the Sorted Table should be in the following way:
    "1998/12/17","12:14:12","Unicorn4","row6"
    "1998/12/14","15:14:40","Unicorn4","row3"
    "1998/12/14","15:14:39","Unicorn2","row2"
    "1998/12/14","15:14:38","Unicorn1","row1"
    ie First Date field should be sorted, if 2 date fields are same then sort based on time. if date and time fields are same then need to be sorted on String field.
    So if any one worked on this please throw some light on how to proceed. I know how to sort based on single column.
    But now i need to sort on multiple columns.So what is code change in the Comparater class.
    Thanks in advance.. This is urgent....

    I think your Schedule objects should implement Comparable. Then you can sort your linked list using the Collections.sort() method without passing in a Comparator.class Schedule(Date date, String class) implements Comparable
      public void compareTo(Object obj)
        Schedule other = (Schedule)obj;
        return date.getTime() - other.getDate().getTime();
    }

  • Insert / Update of a TIME field using Native SQL

    Hi Oracle gurus,
    We are trying to perform inserts and updates within an ORACLE table where a TIME field exists without suscess. We are trying to code it using Native SQL.
    EXEC SQL.
    INSERT INTO table (field1[name], field2[age], field3[birthday], field4[hour])
    VALUES (:name, :age, TO_DATE(:date_birth), ¿:hour?)
    ENDEXEC.
    EXEC SQL.
    UPDATE table SET field3[birthday] = TO_DATE(:date_birth), field4[hour] = ¿:hour?
    WHERE field1[name] = :name AND field2[age] = :age
    ENDEXEC.
    Which is the right coding sentence in order to achieve our goal?
    Many thanks in advance. Best regards,
       Imanol

    Hi
    There is no TIME datatype in oracle. There is only a TIMESTAMP or DATE type or the field is VARCHAR2 as most date fields in a SAP database are. To help you we would need the real field type. If possible you please do a desc <owner>.<table> in a sqlplus session and give us the field type.
    If possible also supply the error you get.
    Regards, Michael

  • Using regular expressions for validating time fields

    Similar to my problem with converting a big chunk of validation into smaller chunks of functions I am trying to use Regular Expressions to handle the validation of many, many time fields in a flexible working time sheet.
    I have a set of FormCalc scripts to calculate the various values for days, hours and the gain/loss of hours over a four week period. For these scripts to work the time format must be in HH:MM.
    Accessibility guidelines nix any use of message box pop ups so I wanted to get around this by having a hidden/visible field with warning text but can't get it to work.
    So far I have:
    var r = new RegExp(); // Create a new Regular Expression Object
    r.compile ("^[00-99]:\\] + [00-59]");
    var result = r.test(this.rawValue);
    if (result == true){
    true;
    form1.flow.page.parent.part2.part2body.errorMessage.presence = "visible";
    else (result == false){
    false;
    form1.flow.page.parent.part2.part2body.errorMessage.presence = "hidden";
    Any help would be appreciated!

    Date and time fields are tricky because you have to consider the formattedValue versus the rawValue. If I am going to use regular expressions to do validation I find it easier to make them text fields and ignore the time patterns (formattedValue). Something like this works (as far as my very brief testing goes) for 24 hour time where time format is HH:MM.
    // form1.page1.subform1.time_::exit - (JavaScript, client)
    var error = false;
    form1.page1.subform1.errorMsg.rawValue = "";
    if (!(this.isNull)) {
      var time_ = this.rawValue;
      if (time_.length != 5) {
        error = true;
      else {
        var regExp = /^([01]?[0-9]|2[0-3]):[0-5][0-9]$/;
        if (!(regExp.test(time_))) {
          error = true;
    if (error == true) {
      form1.page1.subform1.errorMsg.rawValue = "The time must be in the format HH:MM where HH is 00-23 and MM is 00-59.";
      form1.page1.subform1.errorMsg.presence = "visible";
    Steve

  • Use time part of Date/Time field info path

    I want Compare tow Time field. first field set as default value with 
    =today+”09:00 AM”
    Another field set as value with
    =now()
      if first filed less than another filed set something action , when condition is set doesnt work!!
    would you please tell me how can I do this correctly? 

    Hi Hoorie,
    As you are using formula for populating the fields’ values, then the rule needs to be executed when the form loads.
    So I recommend to set the rule when form loads in InfoPath.
    Please click Data tab in InfoPath and then click Form Load button in Rules section, then add the rule for comparing the two fields’ values and set the action.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • For custom tables should we use UTC for date/time fields

    A general question.
    Can anyone confirm that SAP does seem to be moving towards storing date/time in UTC format?
    We're building custom tables and we're making it a standard to store date/time fields in UTC format.
    Regards,
    Lavaughn

    Hello Lavaughn,
    I can not speak for SAP, but from my personal experience TimeStamps are the state of the art to store time date info in db tables. Even with date/Time fields a conversion to the local timezone is necessary. Of course you can reuse your db definition on dynpros. But since UI and business logic will be divided anyway this is also not really a valid point.
    Best Regards
    Klaus

  • Using TIME MACHINE with a TIME CAPSULE

    There's often a bit of confusion about this terminology: +*Time Machine+* vs. +*Time Capsule:+*
    _*Time Machine*_ is Apple software that performs backups, to an external HD, a Time Capsule, etc.; and also allows you to browse and restore from them. It comes with Leopard and Snow Leopard, but cannot run on any previous versions of OSX.
    A _*Time Capsule*_ is a piece of Apple hardware that combines a wireless router and hard drive, that can be used for Time Machine backups and/or other data.
    Most Time Machine questions & problems are not unique to Time Capsules. For those, or if you don't find what you need here, try one of these:
    Time Machine - Frequently Asked Questions
    Time Machine - Troubleshooting
    They can also be found in the *User Contributed Tips* section of both +Time Machine+ forums:
    Mac OS X v10.5 Leopard > Time Machine
    Mac OS X v10.6 Snow Leopard > Time Machine
    Contents
    |
    QUESTIONS
    *Q1. How do I set up Time Machine to back up to my Time Capsule?*
    *Q2. How do I set up Time Machine to back up to a USB drive connected to my Time Capsule?*
    *Q3. Can I use my Time Capsule for Time Machine backups AND other data?*
    *Q4. My Time Capsule is too small to back-up my Mac(s). Now what?*
    *Q5. Should I delete backups? If so, how?*
    *Q6. How do I back-up my Time Capsule and/or USB drive(s) connected to it?*
    If you don't see your question here, try the Frequently Asked Questions *User Tip,* also at the top of the +Time Machine+ forum.
    |
    PROBLEMS
    *P1. The Backup disk image could not be created.*
    *P2. Time Machine could not complete the backup . . sparsebundle could not be accessed. (Error 109).*
    If you don't see your problem here, try the Time Machine - Troubleshooting *User Tip,* also at the top of the +Time Machine+ forum.
    QUESTIONS
    |
    _*Q1. How do I set up Time Machine to back up to my Time Capsule?*_
    |
    First, set up your Time Capsule via +Airport Utility.+ Keep the name you assign to it, your Computer, and your network short (under 25 characters), and avoid embedded spaces, special characters, and punctuation (see item #P1 below for details). Make sure your Mac can connect via an Ethernet cable, if at all possible, as well as wirelessly.
    The setup and first backup (of your entire system) will be much faster if you connect via Ethernet.
    |
    a. If the +Time Machine+ icon isn't already in your Dock, drag it there from your Applications folder. See below for more about it's use.
    b. Right-click it and select +Open Time Machine Preferences,+ click the +Show Time Machine status in the menu bar+ box (see below), then click +Select Disk+ (on Leopard, this button will be either +Choose Backup Disk+ or +Change Disk).+
    c. A list of possible destinations will appear. It should include your Time Capsule (with the name you gave it via Airport Utility), and may show other internal or external drives as well. Select your Time Capsule and click the +Use for Backup+ button.
    d. A prompt for your name and password will appear. In some cases there won't be a Name field, but if there is, enter your short user name. Also enter the password you set up for the Time Capsule via Airport Utility, then click the Connect button.
    e. A 120-second countdown to the start of your first backup will appear in the +Next Backup+ area of the TM Preference panel.
    |
    Note that this first backup will copy the entire contents of your system, except for a few things that are skipped automatically, such as system work files, most caches, your logs, trash, etc., and anything else you may have excluded (see #10 and #11 in the Frequently Asked Questions *User Tip,* also at the top of the +Time Machine+ forum). So it will be rather lengthy, depending on how much data is on your system, whether you're connected via Ethernet or WIFI, and if WIFI, how good the signal is.
    You can continue to use your Mac while TM is backing-up, and you can even cancel a backup if necessary, but to make this first full backup as fast as possible, try not to overload your Mac or cancel the backup.
    |
    _*The Time Machine Icons in your Menubar and/or Dock*_
    |
    In the steps above, you dragged the TM Application's icon into your Dock, and clicked the +Show Time Machine status in the menu bar+ box.
    For detailed info about them, see question #24 in the Frequently Asked Questions *User Tip,* also at the top of the +Time Machine+ forum.
    +Go to Top+
    _*Q2. How do I set up Time Machine to back up to a USB drive connected to my Time Capsule?*_
    |
    Mostly the way you set it up to use the Time Capsule's internal HD.
    But first, attach the drive directly to your Mac, and erase and format it per the instructions in #5 of the Frequently Asked Questions *User Tip,* also at the top of the +Time Machine+ forum. Note, however, that it doesn't matter whether you use the +Mac OS Extended (Journaled)+ or +Mac OS Extended (Case-sensitive, journaled)+ Format, since Time Machine will put your backups in a sparse bundle that's case-sensitive. You cannot change that.
    Unlike the Time Capsule's disk, you can partition the USB drive. That's highly recommended if you're going to be putting other data there, so the backups don't completely fill the disk (but be aware that Time Machine cannot back that "other" data up. See question #Q6 below).
    If you're backing-up multiple Macs to the same drive, you can make one partition for each, but it's not as helpful on a network drive, because each Mac's backups will be in a separate sparse bundle. So you can let them share the disk or a partition.
    Also note that if you've been doing backups to an external disk connected directly to your Mac, you cannot continue the same set of backups when you connect it to your Time Capsule. They are stored differently, and Time Machine will put them in a sparse bundle, alongside but *completely separate from* the backups made locally, and the first backup will be a full backup of your entire system.
    Once the USB disk is set up the way you want it, use the setup procedure in question #Q1 above, but in step (c), select the USB drive/partition, not the Time Capsule's internal HD.
    *RAID Sets connected to a Time Capsule:*
    |
    Time Machine will back up to a +Hardware Mirrored RAID set,+ also called +RAID 1,+ (sold that way, with multiple drives in the same enclosure). However, if you partition the +Hardware Mirrored RAID set,+ once you start using it with TIme Machine, you cannot change the sizes later and continue to back up to the same set of backups.
    While you can connect multiple USB drives to a Time Capsule via a USB hub (a powered one is best), Time Machine +*will not+* back up to a +software Mirrored RAID+ set (where you combine the drives into a single volume via Disk Utility).
    +Go to Top+
    _*Q3. Can I use my Time Capsule for Time Machine backups and other data?*_
    |
    You can put other data on your Time Capsule's internal HD, but there are three major considerations:
    Especially for things like photos and videos, access may be too slow for convenient viewing, and worse for editing. So test this a bit before you decide what to put there.
    Time Machine cannot back-up that other data, so you'll need some other method. See question #Q6 below.
    Time Machine will, by design, fill up all the space available to it, so there may be a conflict between the sparse bundle it puts your backups in, and the other data. There is a workaround, to "reserve" some space there, by creating a disk image of the desired size and storing your data there, but it's a bit cumbersome, and two Macs can't share it at the same time.
    An alternative is to connect a USB drive to your Time Capsule. Then you can back up to the TC's disk and use the USB drive for other data, or vice-versa. But note that Time Machine cannot back-up the USB drive while it's connected to the TC (see question #Q6 below).
    If you want to reserve space on the TC's internal disk, here's how:
    |
    a. Start the +Disk Utility+ app (in your Applications/Utilities folder). Click the +New Image+ icon in the toolbar (or select +File > New > Blank Disk Image+ from the menubar). If the little arrow to the right of the "Save As" box points down, click it so it points up.
    b. Give it a name in the "Save as" box. This name will appear on the TC's disk, with ".dmg" appended. (Similar to the way the sparse bundle containing your Time Machine backups appears, with ".sparsebundle" appended).
    c. Click your TC in the sidebar. It may take a few moments for Disk Utility to recognize it, and show it in the center pane.
    d. In that center pane, select the blue Share folder for your +Time Capsule+ (you may need to scroll down, or enlarge the window, to see it). Once selected, you'll see any existing disk images in the right pane.
    e. Give the Image a name. This name will appear on your desktop and/or Finder sidebar when you mount the .dmg by double-clicking it, if you have the +External Disks+ box checked in +Finder > Preferences > General+ or +Finder > Preferences > Sidebar.+
    f. Select the Size for the amount of space you want to reserve, either one of the pre-sets or Custom which allows any size. Avoid taking all the remaining space for the disk image, as Time Machine needs a bit of room to operate. Also note that if very little space is left, it will begin deleting old backups very soon, to make room for new ones.
    g. Select the desired Format, probably the default of +Mac OS Extended (Journaled).+
    h. If you want it encrypted, select the desired type.
    i. Select single partition, either GUID or +Apple Partition Map.+
    j. Select +Read/Write disk image+ for Image Format.
    k. Click the Create button. The larger the image size, the longer this will take.
    |
    When complete, the new disk image will be automatically mounted on your Mac's desktop, ready to receive the files you want to move into it. (When you first open a disk image, there may not be a sidebar and/or toolbar; if so, select +View > Show Toolbar+ from the Finder menubar.)
    To access this disk image from another computer, you must first eject it from this one, since only one can mount it at a time. Otherwise, the other one will see a message that the disk image is "Temporarily unavailable."
    Note that you may be able to change the size of the disk image later, via +Images > Resize+ from the Disk Utility menubar (while the disk image is not mounted or selected in Disk Utility's sidebar).
    +Go to Top+
    _*Q4. My Time Capsule is too small to back-up my Mac(s). Now what?*_
    |
    You can attach a USB drive to your Time Capsule. Then you can back up to the USB drive instead of the Time Capsule's internal HD. If you have multiple Macs, you can back some up to the TC's internal drive, and others to the USB drive.
    If you need even more space, you can connect multiple USB drives via a hub (a powered one is usually best), and back up different Macs to each. What you cannot do, however, is have one Mac's backups continue from the Time Capsule's internal HD to a USB drive connected to it, or have the backups for any one Mac "span" two drives.
    The exception is, you can connect two (or more) drives that are in a +concatenated RAID+ set (sometimes called +RAID 0).+ In that configuration, all the drives in the set are treated as a single volume (see +Concatenated RAID+ in the Help for Disk Utility for details). This configuration may cause some other difficulties; once they're in a RAID set, you cannot connect any drive to your Mac separately -- it's all or none. And if one drive fails, you risk losing everything on all the drives in the set.
    See question #Q2 above for setup instructions for backing-up to the USB drive.
    +Go to Top+
    _*Q5. Should I delete backups? If so, how?*_
    |
    It depends on exactly what you want to do, and why.
    Under normal circumstances, you shouldn't have to delete anything. TM automatically "thins" (deletes) backups every time it does a new backup, on the following schedule:
    "Hourly" backups after 24 hours (except the first of the day, which is a "Daily" backup).
    "Daily" backups after a month (except the first of each week, which is a "Weekly" backup.)
    "Weekly" backups are kept until TM needs the space for new backups; then one or more of the oldest weeklies will be deleted.
    However, TM will never delete the backup copy of anything that was on the disk being backed-up at the time of any remaining backup. So all that's actually deleted are copies of items whose originals were changed or deleted before the next remaining backup.
    But if you do need to delete backups, here's how:
    To delete individual backups, or all backups of selected item(s), see #12 in the Frequently Asked Questions *User Tip,* also at the top of the +Time Machine+ forum.
    To delete everything on the Time Capsule's internal HD, use +*Airport Utility.+* Select +*Base Station > Manual Set-Up+* from the Menubar, then Disks in the tool Bar, then Erase.
    To delete everything on a connected USB drive/partition, you can delete via the Finder, but that may take a very long time. It may be faster to disconnect it from your Time Capsule, connect it directly to your Mac, and use Disk Utility (in your Applications/Utilities folder) to erase the disk/partition.
    To delete all the backups for one Mac, without disturbing anything else on the Time Capsule's internal disk, open the TC via the Finder and delete the sparse bundle associated with that Mac.
    To delete all the backups for one Mac, without disturbing anything else on a connected USB drive, either open the USB drive via the Finder and delete the sparse bundle associated with that Mac, or disconnect the drive from the TC, connect it directly to your Mac, and delete the sparse bundle from there.
    +Go to Top+
    _*Q6. How do I back-up my Time Capsule and/or attached USB drive(s)?*_
    |
    That depends to some extent on what you want to back up, and where it is.
    It's generally not a good idea to try to back-up your Time Machine backups. If there's a problem with them, it will be copied to (and perhaps magnified on) the copy.
    A better solution is probably to use either Time Machine or a different application to make separate, independent backups of your Mac, to a different destination. A portable external hard drive is great for this; you can periodically connect it to your Mac, make a backup, then take it to a secure off-site location, so you're protected against fire, flood, theft, direct lightning strike on your power lines, etc. If you use Time Machine for this, you'll have to use the disk selection process each time you want to switch, via +Time Machine Preferences.+
    Many folks use the CarbonCopyCloner or SuperDuper! apps to make "bootable clones" of their internal HD to an external HD. While these usually don't have "archived" copies of previous versions of things you've changed or deleted, you can boot and run your Mac from them if your internal HD fails. Your Mac may run a bit slower, but it will be usable. Both are easily found via Google.
    Since Time Machine cannot back up your Time Capsule's internal hard drive, or a USB drive connected to it, if you have other data there, you'll need a different method to back up that other data.
    In a pinch, you can disconnect a USB drive from your Time Capsule, attach it to your Mac, and copy or back it up that way.
    |
    There is a procedure that will let you "archive" the TC's internal disk to a USB drive connected to it.
    But it's not quick, since since the data must be read from the TC's internal disk to your Mac, then sent *back through the Time Capsule* to the connected USB drive. And it's "all or nothing" -- you can only use this procedure to copy the entire contents.
    All users will be disconnected from both the internal HD and the connected USB disk (but the network will remain usable).
    Attach a USB drive with at least as much free space as the total amount of data on the TC's internal HD (see #5 in the Frequently Asked Questions *User Tip,* also at the top of the +Time Machine+ forum, for formatting instructions).
    Turn Time Machine "Off" via +Time Machine Preferences.+ Stop all processes that may be accessing the Time Capsule's disk. If possible, connect your Mac to the Time Capsule with an Ethernet cable -- it will still be slow, but faster than WIFI.
    Then follow this Apple procedure: Using AirPort Utility 5.3.1 or later to make a copy of the Time Capsule disk.
    +Go to Top+
    PROBLEMS
    |
    _*P1. The Backup disk image could not be created.*_
    |
    Oddly enough, Time Machine can be rather picky about the way certain things are named.
    Check your +*Computer Name*+ at the top of the System Preferences > Sharing panel.
    It must not be blank; it should not be more than 25 characters long; and you should avoid punctuation, spaces, and special characters.
    After changing it, click the Edit button and make the corresponding change to the +*Local Hostname.+*
    If that doesn't help, apply the same rules to the name of your Time Capsule and Network, via +Airport Utility.+
    +Go to Top+
    _*P2. Time Machine could not complete the backup .. sparsebundle could not be accessed. (Error 109).*_
    |
    The sparsebundle containing your backups is corrupted.
    Try Repairing it, per #A5 in the Time Machine - Troubleshooting *User Tip,* also at the top of the +Time Machine+ forum.
    If the sparsebundle is on your Time Capsule's internal HD, and Disk Utility can't fix it, your only option is to delete it (or erase the TC's disk), and let Time Machine start over. You may be able to prevent this from happening again by changing the names per problem #P1 above.
    If the sparsebundle is on a USB drive connected to your Time Capsule, and Disk Utility can't fix it, it's possible a heavy-duty 3rd-party +Disk Repair+ application, such as +Disk Warrior+ can. (You'll have to connect the drive directly to your Mac.) These are not cheap, and there's no guarantee they can fix it. Be certain whatever you use is compatible with your OS. For Disk Warrior, you need at least version 4.1.1 for Leopard, 4.2 for Snow Leopard.
    +Go to Top+

    This tip is ready for consideration.
    It is an update to the current Tip at: http://discussions.apple.com/thread.jspa?threadID=2296894
    Changes:
    Q1: replaced info about the TM icons with a link to the TM FAQ tip.
    Q2: added info about RAID sets attached to a TC
    Q6: reworded a bit and replaced last paragraph with a link to the Apple article.

  • ALV report using the field catalog

    which is the quickest way to generate an ALV report using the field catalog merge.  without needing to build the field catalog manually .
    is it easier to create a structure and passe it in the field catalog merge .  if yes can i have an example plzzzz

    hI
    Supports the creation of the field catalog for the ALV function modules
    based either on a structure or table defined in the ABAP Data
    Dictionary, or a program-internal table.
    The program-internal table must either be in a TOP Include or its
    Include must be specified explicitly in the interface.
    The variant based on a program-internal table should only be used for
    rapid prototyping since the following restrictions apply:
    o Performance is affected since the code of the table definition must
    always be read and interpreted at runtime.
    o Dictionary references are only considered if the keywords LIKE or
    INCLUDE STRUCTURE (not TYPE) are used.
    If the field catalog contains more than 90 fields, the first 90 fields
    are output in the list by default whereas the remaining fields are only
    available in the field selection.
    If the field catalog is passed with values, they are merged with the
    'automatically' found information.
    Below is an example ABAP program which will populate a simple internal table(it_ekpo) with data and
    display it using the basic ALV grid functionality(including column total). The example details the main
    sections of coding required to implement the ALV grid functionality:
                             Data declaration
                             Data retrieval
                             Build fieldcatalog
                             Build layout setup
    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic requirement for this demo is to display a number of       *
    *& fields from the EKKO table.                                         *
    REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    * There are a number of ways to create a fieldcat.
    * For the purpose of this example i will build the fieldcatalog manualy
    * by populating the internal table fields individually and then
    * appending the rows. This method can be the most time consuming but can
    * also allow you  more control of the final product.
    * Beware though, you need to ensure that all fields required are
    * populated. When using some of functionality available via ALV, such as
    * total. You may need to provide more information than if you were
    * simply displaying the result
    *               I.e. Field type may be required in-order for
    *                    the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    *  fieldcatalog-do_sum      = 'X'.
    *  fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    *  gd_layout-totals_only        = 'X'.
    *  gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
    *                                         "click(press f2)
    *  gd_layout-zebra             = 'X'.
    *  gd_layout-group_change_edit = 'X'.
    *  gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
    *            i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
    *            i_callback_user_command = 'USER_COMMAND'
    *            i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
    *            it_special_groups       = gd_tabgroup
    *            IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
    *            is_variant              = z_template
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    endform.                    " DATA_RETRIEVAL

  • How to show a time field in a form portlet

    Hi,
    I am not familiar with PL/SQL and I was wondering how I could show a time field on a form portlet.
    I have a date column in my database that stores the time and date together, but I do not know how to separate them into date and time fields. I also do not know how to concatenate them when a user inserts a new record, or how to query on a date alone.
    At present, the user has to type the date and time following this format mask hh:mi am DD/Mon/RR
    I also have a problem with one of my hidden id fields. I have set the default to a sequence.nextval (#qtc_app.seq_visitor.nextval) and then hidden it since
    it is irrelevant to my users. However, I can no longer use the query function since the sequence is always generating a new value. How would I only generate
    a new sequence no. when a user inserts a record??
    Thank you!
    cheers, Kim

    Hi,
    Each colunm in the form has a format mask associated with it. For the date column make the format mask like this DD-MON-RR HH.MI. This will show the date along with the hours and minutes.
    Thanks,
    Sharmila

  • F4 help for Time field in Webdynpro Screen

    Hi Experts,
    I'm using TIMS data type for my Time field. In ECC we will have F4 function for the same data element, but in Webdynpro screen, am not getting the F4 help.
    I got some information from SCN that I need to go for some custom search help. But with which reference to the table, am I want to create it.
    Please let me know, is there any other possible way to create F4 for time field for webdynpro.
    Even I tried to use some standard search help, but am getting an error as 'Sending of dynpro ' ' not possible. No window system type specified'.
    Expecting valuable information from you experts.
    With Regards,
    RAM.

    Hi RAM,
    For time field, there is no SAP delivered search help in WDA , so we need to go for freely programmed search help.
    Please refer the below link, in which Mr. Thomas, has provided the links for search help document you can follow and create new search help component
    and also nugget of the component which can be imported using ZSAPLINK program.
    search help for time
    Regards,
    Rama

  • No time field in an event added by pressing down a date in the month view of the calendar!, no time field in an event added by pressing down a date in the month view of the calendar!

    I have been trying to add time to an event i already added but the time field does not exist.
    this happens only when I add the event from the month view while I press a date. in no other senario does this happens.
    may be its a bug in the calendar.
    if I press the + sign then it's normal.
    any suggestions on how to fix this?

    there is edit button; however, my problem comes after that. if the event was added using the above method then there is still no way to change the time of the event in that date. if the event was added in any other way then I can change the time.
    and I just realized my iphone3gs with ios5.0.1 has the same exact bug.

  • Using Time Machine to restore to new hard drive missing recent backups

    On Mac Book Pro 2009 with OS X 10.5.8.
    I have been backing up to Time Machine on an external drive since 2009. A few month ago I upgrade to OS X 10.9 Mavericks.
    Trying to install a new hard drive and restoring from Time Machine. Just before installing the hard drive I again backed up to Time Machine.
    Trying to restore from Time Machine.
    Note: this link shows the screen I am on. It isn't from my computer. Just showing for display purpose.
    http://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2014 /03/time_machine_select_backup.jpg?itok=G2WbV0Vu
    "Select a backup. Select the Time Machine backup you want to restore. Only complete backups of Mac OS X appear in the list"
    The problem is, the most recent "complete" restore point in the list is August 2011 (OS X 10.5.8). How can that be? Over the years I have checked Time Machine and I have back ups way past 2011.
    What should I do?
    Thanks

    Daniel Greeney wrote:
    So I just purchased an internal drive (separate from my system drive) to use as a Time Machine drive, for both of my computers (only one partition). Since they will be backing up every day, I will retain much more recent material in case of drive failure.
    Let Time Machine back up every hour, as it's designed. That will protect you best.
    My question is this - if I have a drive failure on my current internal system drive, and the internal Time Machine is intact, is it possible for me to take my external bootable backup (say 3 weeks older than Time Machine in how recently it was backed up), make a cone of that on a new internal system drive, and then use Time Machine to restore that drive to what is most current on Time Machine?
    Does this question make sense?
    The question makes sense until you realize that Time Machine backups contain everything you need (unless you do something silly, like exclude your system files).
    Once the new drive is installed and formatted, you can restore your entire system from the TM backups faster than you can copy the clone to the new internal HD. See #14 in the Frequently Asked Questions *User Tip,* also at the top of this forum. Note that you use the Snow Leopard Install disc only for the Installer on it; you don't install OSX from it.

  • Can i use time machine with a airport extreme and a external hard drive

    I have connected a hard drive to my airport extreme.
    Now i would like to use time machine to back up my computers, and would like to do this on the hard drive which is connected to my airport extreme.
    Next step is that i would like to be able to approach my external hard drive via the internet.
    Is this possible or not?

    Both are possible. However, Apple does NOT support Time Machine backups to AirPort Disks attached to the 802.11n AirPort Extreme Base Station (AEBSn). Doing so will potentially lead to data corruption and is highly not recommended. Please check out this excellent Pondini article for more details. This article also provides the Apple Support references that states Apple's position. Bottom line? If your backups are critical to you, then you may want to rethink your backup solution.
    As far as accessing the AirPort Disk from the Internet, the following is the basic steps to do so:
    Start the AirPort Utility > Select the AEBSn, and then, note the IP address shown.
    Select Manual Setup.
    Verify that Connection Sharing = Share a public IP address is selected on the Internet > Internet Connection tab.
    Select Disks, and then, select File Sharing.
    Verify that both the "Enable file sharing" and "Share disks over WAN" options are enabled.
    Verify that Secure Shared Disks = With a disk password. (Recommended)
    Verify that AirPort Disks Guest Access = Not allowed. (Recommended)
    Select Advanced, and then, select the Port Mapping tab.
    Click the plus sign to add a new port mapping.
    For Service, select the "Personal File Sharing" option. (Note: This option would only allow Mac clients to access the AirPort Disks. If you want both Macs and PCs to connect, you would need to leave this field at its default value and enter the appropriate SMB ports to the mix of ports to be opened.)
    In the Public UDP Port(s) and Public TCP Port(s) boxes, type in a 4-digit port number (e.g., 8888) that you choose. In the Private IP Address box, type the internal IP address of your AEBSn that you wrote down in step 1. In the Private UDP Port(s) and Private TCP Port(s) boxes, type 548. Click Continue.
    In the Description box, type a descriptive name like "AirPort Disk File Sharing," and then, click Done.
    Click on Update.
    To connect to the shared AirPort Disk from a remote location using a Mac:
    From the Finder > Go > Connect to Server.
    Enter the Pubic (WAN-side) IP address of the AEBSn, followed by a colon and the Public port number that you choose in step 11 of the previous procedure. For example: afp://www.mydyndnsdomain.com:8888 or afp://123.456.789.123:8888
    Click Connect.
    You should be prompted for your user name and password. The user name can be anything you like; the password should be the Disk password for the AEBSn that you created in step 6 previously.
    Click Connect.

  • How do you use time machine?

    I just got my MBA and I was checking out all the new features of it, however, I can view them all and see them work except Time Machine.
    I can turn the app on, which it to "On" but then nothing shows up in the field to choose to back up too.
    How do I use this app?
    Thanks!!

    So its recommended to use one external storage device per mac computer.
    That's not what I said. It works and is supported to use one backup device for multiple Macs as long as they're all running Leopard and so using Time Machine (and of course you have sufficient capacity on the backup device). It's a bit iffy to use a TM backup volume for purposes other than Time Machine backups, though.
    How would I format the drive for the mac? Will that happen automatically upon plugging in the external drive and firing up TM?
    No. You'll need to use Disk Utility to reformat the drive.
    Why do you recommend a HDD instead of a flash drive or other device for example?
    Flash drives are too limited in capacity to act as a backup device for an entire system unless you keep very little on your computer. It's pretty easy to exceed the capacity of most flash drives just with photos and music, and that doesn't include backing up your operating system and applications The cost per megabyte of an external hard drive is much lower than the cost per meg of a flash drive, so for all but very small backup needs, a hard drive is usually much more cost effective.
    Message was edited by: Dave Sawyer

  • How can I query on a time field??

    Hi All,
    I have a time field (base table field) in my form. I use a format mask of HH24:MI for that field.
    If i put in "%10:00" in that field and query, the query returns rows correctly. But I canot ask my user to put in a "%" each time he/she queries. I have to do it from the form.....
    How can I do this programatically..I mean how do I write it in pre-query?
    Thanks in advance...
    Sowmya.

    Hi,
    Thanks for your reply...
    Unfortunately I already tried that..
    The problem was to compare only the time portions . And as soon as the user put in say "12:00" in the time field, the system defaulted it to 01-SEP-2002 12:00:00 .And it compared this to the database value which is wrong...
    I solved the problem by creating a non-base table item and then writing code in pre-query using set_block_property etc...and it worked !!
    Thanks for you response once again..
    Sowmya.
    How about using the Set_block_property(Default_where) built in? check the online help.

Maybe you are looking for

  • JNI / Garbage Collection question

    I have a C++ library I am calling into from our application. The question I have is I want the library to return a jintarray or a jstringarray (not sure which yet). If they create that array in the function and then return it to me as the return type

  • Problem accessing VARRAY OF VARCHAR in 9i, but working in 8i

    The following code (modified sample ArrayExample.java for VARRAY OF VARCHAR) produces different results on a 8.1.7 and 9.0.1 database. The standard way of accessing the members of an array of strings in the database: ARRAY array = ((OracleResultSet)r

  • How to copy a structure from one SAP system to other SAP system in ABAP

    Hi All,   We have a requriement where need to copy an strcture of 250 feilds from on SAP system to other SAP system , do any one know how to do it . Regards Channu

  • I get an hourglass instead of a thumbnail in the catalog

    I have a laptop with Windows Vista and SP1. I was running Adobe Photoshop 6.0 and upgraded to Adobe Photoshop Elements 7.0. Now when I import new photos instead of a thumbnail view of the photo I get a thumbnail of an hourglass. If I regenerate the t

  • IllegalStateException's

    Dear all, When reviewing some trace files of some of our technicians that are using the MAM, I did notice the following error message quite often: com.sap.mbs.core.api.BOException: Failed inserting Mam010Item080: java.lang.IllegalStateException: Stat