GetSelectedFields()  for time stamp and user stamp using java api

using Java API's
getSelectedFields() returns NULL  value if values presented also, for Time stamp and User stamp
properties in Flat tables , is there any other alternative way to get the SelectedFields values ?
Edited by: Vijaya Sekhar Reddy Alla on Mar 19, 2008 3:16 PM

Well, I can't say I solved the problem, because I got another one afterwards.
As usually I created a GetFieldListCommand, set its needed attributes and executed it. Then I read all the field properties out:
FieldProperties[] fieldProp = getFieldListCommand.getFields();
Afterwards it is possible to do what you want. Using a for-loop.
for (FieldProperties fp : fieldProperties) {
    UserStampFieldProperties usfp = (UserStampFieldProperties) fp; // <= Cast error
    FieldId[] fieldIDs = usfp.getSelectedFields();
And this is what I get now:
Exception in thread "main" java.lang.ClassCastException: com.sap.mdm.schema.fields.FixedWidthTextFieldProperties cannot be cast to com.sap.mdm.schema.fields.UserStampFieldProperties
Why this happens, I don't know. But it should somehow be solveable.

Similar Messages

  • Search for a Multilingual value in MDM using JAVA API

    Good day,
    Could you kindly assist.
    I am trying to search for a field in MDM, from Portal using JAVA API. I do retrieve the value in English, but the problem is when I am trying to retrieve it in other languages. Please see sample code:
         private Search getSearch(MDMConnection mdmconnection,String value, TableId tableid){
              Search search =null;
              FieldSearchDimension fielddimension=null;
              TextSearchConstraint textcontrain=null;
              RepositorySchema reposchema =mdmconnection.reposchema;          
                                               if(value!=null)
                   search= new Search(tableid);
                   fielddimension=new FieldSearchDimension(reposchema.getFieldId("ATTR_VAL_ABBR","TEXT_VALUE"));
                   textcontrain=new TextSearchConstraint(value,TextSearchConstraint.EQUALS);
                   search.addSearchItem(fielddimension,textcontrain);
                   search.setComparisonOperator(Search.AND_OPERATOR);
              return search;
    Thank you in advance.
    Regards,
    Simni

    Hi ,
    Mdm- Multilingual value in MDM using JAVA API:
    you can check the first point as its reagrdign youisue related pdf and soloutions for your question.
    1.  http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0e8aedc-cdfe-2c10-6d90-bea2994455c5?QuickLink=index&overridelayout=true
    2.  http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0e8aedc-cdfe-2c10-6d90-bea2994455c5?QuickLink=index&overridelayout=true
    Hope this information helps you in solving the  issue!!
    Thanks&Regards
    AswinChandraGirmaji

  • Update file date/time stamp using java

    Let me explain you what I am going through:-
    I have created a java based installer using Jexpress tool and after I do the installation of my files, the files takes the current date rather then taking the date when it was created or modified.
    Everything goes into JAR and I heard that Jar file do not retain the date/time stamp of the file.
    I would like to know if we can change the date and time stamp of the files using Java.
    Is there any method to do that or can we do this by writing the java class?
    Thank You
    Mehul

    Did you check it?
    I did.
    $ jar cvf ~/ui *.m3u
    added manifest
    adding: Amollhgv.m3u(in = 42) (out= 24)(deflated 42%)
    adding: Brand1.m3u(in = 56) (out= 27)(deflated 51%)
    adding: Brand2.m3u(in = 42) (out= 24)(deflated 42%)
    adding: Brand3.m3u(in = 42) (out= 24)(deflated 42%)
    adding: Brand4.m3u(in = 42) (out= 24)(deflated 42%)
    adding: Brand5.m3u(in = 42) (out= 24)(deflated 42%)
    adding: Brand6.m3u(in = 42) (out= 24)(deflated 42%)
    adding: Edurhgv.m3u(in = 42) (out= 24)(deflated 42%)
    $ unzip -l ~/ui
    Archive:  /home/ijbalazs/ui
      Length     Date   Time    Name
            0  12-04-03 17:53   META-INF/
           71  12-04-03 17:53   META-INF/MANIFEST.MF
           42  08-26-02 01:03   Amollhgv.m3u
           56  11-22-98 01:15   Brand1.m3u
           42  08-26-02 01:04   Brand2.m3u
           42  08-26-02 01:04   Brand3.m3u
           42  08-26-02 01:04   Brand4.m3u
           42  08-26-02 01:04   Brand5.m3u
           42  08-26-02 01:04   Brand6.m3u
           42  08-26-02 01:04   Edurhgv.m3u
          421                   10 files

  • Code to Create and Populate Lookup using Java API

    Hi All,
    I wish to write a java code to first create a lookup in OIM and then populate with some custom values.
    For creating Lookup, I used the following function and it worked:
    tcLookupOperationsIntf useLookup=(tcLookupOperationsIntf)factory.getUtility
    ("Thor.API.Operations.tcLookupOperationsIntf");
    useLookup.addLookupCode("Lookup.Custom");
    However, If I try using the following function to populate this lookup:
    useLookup.addLookupValue("value1","value2",value3",value4");
    I got this error:
    Thor.API.Exception.tcInvalidLookupException
    Please help.
    Cheers,
    Sunny

    You are using the correct API
    ("value1","value2",value3",value4");
    The values which you are providing are wrong.
    TRY THIS
    addLookupValue("Lokkup.Test", codeValue,decodevalues, "en", "US")
    Lookup.Test should be there.

  • How to get the most current file based on date and time stamp using SSIS?

    Hello,
    Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
    Thanks
    thx regards dinesh vv

    hi simon
    i excuted this script it is giving error..
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            The execution engine calls this method when the task executes.
            To access the object model, use the Dts property. Connections, variables, events,
            and logging features are available as members of the Dts property as shown in the following examples.
            To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
            To post a log entry, call Dts.Log("This is my log text", 999, null);
            To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
            To use the connections collection use something like the following:
            ConnectionManager cm = Dts.Connections.Add("OLEDB");
            cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
            Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
            To open Help, press F1.
            public void Main()
                string file = Dts.Variables["User::FolderName"].Value.ToString();
                string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
                System.IO.FileInfo finf;
                DateTime currentDate = new DateTime();
                string lastFile = string.Empty;
                foreach (string f in files)
                    finf = new System.IO.FileInfo(f);
                    if (finf.CreationTime >= currentDate)
                        currentDate = finf.CreationTime;
                        lastFile = f;
                Dts.Variables["User::LastFile"].Value = lastFile;
                Dts.TaskResult = (int)ScriptResults.Success;
    thx regards dinesh vv

  • HT201250 Can I partition my external hard drive and use one partion for time machine and the other one for data that i may want to use in different computers?

    I have this doubt. I've just bought an external drive, especifically a Seagate GoFlex Desk 3 tb.
    I want to know if it is recomendable to make a partion exclusively for time machine and let another one so I can put there music, photos, videos, etc that I should need to use or copy to another computer.
    May half and half, 1.5 tb for time machine and 1.5 tb for data.
    I have an internal hard drive of 500 GB (499.25 GB) in my macbook pro.
    Any recommendation?

    As I said, yes. Be sure your Time Machine partition has at least 1 TB for backups.
    1. Open Disk Utility in your Utilities folder.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to two (2). Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed.

  • I want to use my 1TB Seagate Hard drive for time machine and transferring files from Mac to PC.

    For about a year I've been using my 1TB external hard drive for only time machine. To be honest, it wasn't until today that I tried to connect my hard drive to a PC and realize it isn't compatible. I read about partitioning the hard drive so that it can work both for time machine and transferring files between pc and mac. I'm not what you would call tech savvy, so I was wondering if I can get some advice on how to do this.
    Thanks in advance.

    To do it, you have to partition the hard disk, so you will have one partition for Time Machine and another one to store files and use them in a PC and Mac. To create the partition, follow these steps > http://pondini.org/OSX/DU3.html
    In order to read and write in the external disk on the PC, you have to select "MS-DOS (FAT)" as "Format". If you choose any other option, the PC won't be able to read your external disk. Apart from that, note that you can't use files bigger than 4 GB with FAT. If you want to use the external disk with files bigger than 4 GB, you have to format your new partition in exFAT, and you have to do it on a PC

  • Can I use Time Capsule for Time Machine and a place to put my iPhoto Library

    Can I use Time Capsule for Time Machine and a place to put my iPhoto Library?

    Only if you partition the Time Capsure into two partitions, one for TM and one for the iPhoto LIbrary.  But you won't be able to backup that library as it will be on the same drive as the TM backups.
    It's not recommended.  An alternative solution is to get another EHD, move the library to it and run it from there. Then TM can backup both your boot drive and the working EHD drive.
    OT

  • I have a 1TB external hard drive (NTFS) that has all my files from my old PC, how do I create a partition on it for HFS  without formatting it so that I can use it for Time Machine and the like?

    I have a 1TB external hard drive (NTFS) that has all my files from my old PC, how do I create a partition on it for HFS  without formatting it so that I can use it for Time Machine and the like?

    There aren't any 3rd party apps or anything. I use PC's and Mac's at school and the only computer connected to a printer at my house is a PC so i need access to both

  • I have Photoshop Elements 12 for both PC and Mac (I use both). I have a new camera, Nikon D810. I downloaded the latest version of Camera Raw, 8.8. My D810 is listed as a supported camera model. However, when I try to open a raw photo in Photoshop Element

    I have Photoshop Elements 12 for both PC and Mac (I use both). I have a new camera, Nikon D810. I downloaded the latest version of Camera Raw, 8.8. My D810 is listed as a supported camera model. However, when I try to open a raw photo in Photoshop Elements, I keep getting the message "Could not complete your request because the file appears to be from a camera model which is not supported by the installed version of Camera Raw. I have tried reinstalling Camera Raw many times, and have tried to open many different raw files in Elements, and still get the same error message. Please help.

    How did you try to install ACR 8.8.  The only way I know of that works with Elements is to use the Updates Choice on the Help menu.
    There are two charts supplied by Adobe that explain your RAW dilemma.  This one tells you what your camera needs:  http://helpx.adobe.com/creative-suite/kb/camera-raw-plug-supported-cameras.html   This one tells you what version of software you need:  http://helpx.adobe.com/x-productkb/global/camera-raw-compatible-applications.html
    In your case, the Nikon D810 needs Adobe Camera Raw (ACR) 8.6 or Lightroom 5.6.  (Congratulations on buying a new camera!)
    To get to that level with Photoshop Elements, you will need to replace your Photoshop Elements 12 with version 13.   Adobe caps ACR updates on version 12 at 8.5.
    The most convenient way to get around it without spending any money is to use the FREE from Adobe DNG Converter.  Download and install it from here for FREE:  http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=5855&fileID=5890  Once it is installed you can convert your D810 raw files to an Adobe RAW version with the .DNG file extension that most, if not all, versions of the various Adobe software programs can use.  That includes old versions of Photoshop, Elements and Lightroom.  DNG converter can be used as the tool to move your files from your memory card to your computer, is efficient, will convert in batches and is completely lossless.  There is no risk of any image quality degradation or RAW functionality.

  • Can I set up multiple usb hard drives- one for time machine and a second for media? Can one also print wirelessly with an old HP C6280 printer?

    Can I set up multiple usb hard drives- one for time machine and a second for media?
    Can one also print wirelessly with an old HP C6280 printer?

    Can I set up multiple usb hard drives- one for time machine and a second for media?
    Yes.
    Can one also print wirelessly with an old HP C6280 printer?
    Possibly by using an Airport Express, but depends on what type of port connection the printer requires.

  • HDD for Time Machine and other stuff

    Just a very short question.. Can I use my external harddrive for Time Machine and for example putting files on it to take it to my friend, or the otherway around, put files on it and take it back home?
    The reason I ask this is that I hooked up a USB HDD and it said I needed to clear all the data on the disk first before using Time Machine.

    As you probably already figured out.. I don't know anything about External HDDs. That's why I want you to ask which of those LaCies you would suggest for TM with 40GB of used data and it needs to be fast:
    1: http://www.lacie.com/products/product.htm?pid=11022 (320GB)
    2: http://www.lacie.com/products/product.htm?pid=11013 (320GB)
    3: http://www.lacie.com/products/product.htm?pid=10695
    4: http://www.lacie.com/nl/products/product.htm?pid=10811 (only a Dutch link, I'm sorry)
    Hope you're able to help because your help is fabulous so far!
    Message was edited by: FiveMenM

  • I've bought headphones for iphone 4g and want to use them in my ipod 4g. When i want to use pilot it don"t work. What should i do ?

    I've bought headphones for iphone 4g and want to use them in my ipod 4g. When i want to use pilot it don"t work. What should i do ?

    If you have an Apple store nearby you can make an appointment at their Genius Bar.
    Apple Retail Store - Genius Bar
    You can also try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:
    iOS: How to back up
    - Restore to factory settings/new iOS device.
    iOS: How to back up your data and set up as a new device

  • Partitioned  external drive for Time Machine and Daily storage

    Now that I've partitioned my I Terabyte external drive to two partitions using the disk utility with one partition for Time Machine and one partition as my new "hard drive"...my internal drive on the MacBook almost filled....I wanted to move...pix, movies, music..etc to the new drive and have all future storage pointed to that drive not the internal drive....need to have space available on the original drive on the MacBook....How do I move existing stored data and point ongoining saved music..files...etc to the new drive...???
    Thank you...Bob

    Yogabob wrote:
    Now that I've partitioned my I Terabyte external drive to two partitions using the disk utility with one partition for Time Machine and one partition as my new "hard drive"...my internal drive on the MacBook almost filled....I wanted to move...pix, movies, music..etc to the new drive
    You could use an application like CarbonCopyCloner or SuperDuper to copy them to the new partition, but it's probably just as easy to drag the files/folders to the new partition, then delete the originals.
    and have all future storage pointed to that drive not the internal drive
    You probably don't really want to do that. Files you're using will be accessed much faster if they're on your internal HD.
    Another consideration is, you really should have backups of the moved files somewhere, in case you have a problem with the new drive. Although TM will back them up unless you exclude that partition, if the drive fails, you'll lose both copies.

  • TS4036 I purchased an iphone for my daughter and we are using the same account and she deleted some contacts from her phone and they were deleted off of my contacts as well. Is there a way to use icloud backup to reinstall the contacts to my phone?

    I purchased an iphone for my daughter and we are using the same account and she deleted some contacts from her phone and they were deleted off of my contacts as well. Is there a way to use icloud backup to reinstall the contacts to my phone?

    Welcome to the Apple community.
    You can only restore them from a Computer backup. This has occurred because you are sharing an iCloud account. ideally you should each have your own iCloud account, that way you can each manage your own mail, contacts, calendars, documents etc and avoid unintentional deletions and unwanted editing. If there is information you wish to share between you, this can be done with a secondary account.
    Having separate iCloud accounts, doesn't mean you have to have separate iTunes accounts, so whilst you keep your personal data separate, you can continue to share music, apps, books, TV shows, movies etc.

Maybe you are looking for