Create a node with the newest date only

Hi, I want to create a node in the target, only by the newest date from the source. The source is an Idoc with, say, 3 segments of the same kind, with different dates. Only the segment with the newest date, should be created in the target.
Any Ideas?

Hi,
it's easy but with user defined functions:
- put all segments into the UDF
- then inside this UDF choose the one with the
latest date and put it into the array (global variable)
- then take the values from the global variable
to fill the sements (from new UDFs)
you could also try with
DateBefore and DateAfter functions
and try to do it without UDFs
with logic like
if date1 DateBefore date2 then ....
Regards,
michal

Similar Messages

  • New entries created for RPTQTA00 with the same data

    Hi,
    Whenever I run RPTQTA00, it creates a new record in IT2006. If i run the report again, another record is created with the same data. How can i prevent this? It should only update the existing record.
    thanks,
    Steph

    Hi
    Can you please paste the piece of code written for the same to get the idea.
    Thanks
    LG

  • How to create a folder with the name = date (e.g. "20030512") with LV6.0

    hi,
    i want to create folders with the name = date automaticly.
    i found several solutions here, but all in LV6.1. could somebody give me an example in LV6.0 ?
    I tried it with "get date-string" but that date-string has "." in it :-(
    6.1-example :
    here

    Hope this will help!
    ian.f
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com
    Attachments:
    folder_create_2003.vi ‏66 KB

  • Can I create a cert with the Java API only?

    I'm building a client/server app that will use SSL and client certs for authenticating the client to the server. I'd like for each user to be able to create a keypair and an associated self-signed cert that they can provide to the server through some other means, to be included in the server's trust store.
    I know how to generate a key pair with an associated self-signed cert via keytool, but I'd prefer to do it directly with the Java APIs. From looking at the Javadocs, I can see how to generate a keypair and how to generate a cert object using an encoded representation of the cert ( e.g. java.security.cert.CertificateFactory.generateCertififcate() ).
    But how can I create this encoded representation of the certificate that I need to provide to generateCertificate()? I could do it with keytool and export the cert to a file, but is there no Java API that can accomplish the same thing?
    I want to avoid having the user use keytool. Perhaps I can execute the appropriate keytool command from the java code, using Runtime.exec(), but again a pure java API approach would be better. Is there a way to do this all with Java? If not, is executing keytool via Runtime.exec() the best approach?

    There is no solution available with the JDK. It's rather deficient wrt certificate management, as java.security.cert.CertificateFactory is a factory that only deals in re-treads. That is, it doesn't really create certs. Rather it converts a DER encoded byte stream into a Java Certificate object.
    I found two ways to create a certificate from scratch. The first one is an all Java implementation of what keytool does. The second is to use Runtime.exec(), which you don't want to do.
    1. Use BouncyCastle, a free open source cryptography library that you can find here: http://www.bouncycastle.org/ There are examples in the documentation that show you how to do just about anything you want to do. I chose not to use it, because my need was satisfied with a lighter approach, and I didn't want to add a dependency unnecessarily. Also Bouncy Castle requires you to use a distinct version with each version of the JDK. So if I wanted my app to work with JDK 1.4 or later, I would have to actually create three different versions, each bundled with the version of BouncyCastle that matches the version of the target JDK.
    2. I created my cert by using Runtime.exec() to invoke the keytool program, which you say you don't want to do. This seemed like a hack to me, so I tried to avoid it; but actually I think it was the better choice for me, and I've been happy with how it works. It may have some backward compatibility issues. I tested it on Windows XP and Mac 10.4.9 with JDK 1.6. Some keytool arguments changed with JDK versions, but I think they maintained backward compatibility. I haven't checked it, and I don't know if I'm using the later or earlier version of the keytool arguments.
    Here's my code.
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.security.KeyStore;
    import java.security.KeyStoreException;
    import java.security.NoSuchAlgorithmException;
    import java.security.cert.CertificateException;
    import javax.security.auth.x500.X500Principal;
    import javax.swing.JOptionPane;
    public class CreateCertDemo {
         private static void createKey() throws IOException,
          KeyStoreException, NoSuchAlgorithmException, CertificateException{
         X500Principal principal;
         String storeName = ".keystore";
         String alias = "keyAlias";
         principal = PrincipalInfo.getInstance().getPrincipal();
         String validity = "10000";
         String[] cmd = new String[]{ "keytool", "-genKey", "-alias", alias, "-keyalg", "RSA",
            "-sigalg", "SHA256WithRSA", "-dname", principal.getName(), "-validity",
            validity, "-keypass", "keyPassword", "-keystore",
            storeName, "-storepass", "storePassword"};
         int result = doExecCommand(cmd);
         if (result != 0){
              String msg = "An error occured while trying to generate\n" +
                                  "the private key. The error code returned by\n" +
                                  "the keytool command was " + result + ".";
              JOptionPane.showMessageDialog(null, msg, "Key Generation Error", JOptionPane.WARNING_MESSAGE);
         KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
         ks.load(new FileInputStream(storeName), "storePassword".toCharArray());
            //return ks from the method if needed
    public static int doExecCommand(String[] cmd) throws IOException{
              Runtime r = Runtime.getRuntime();
              Process p = null;
              p = r.exec(cmd);
              FileOutputStream outFos = null;
              FileOutputStream errFos = null;
              File out = new File("keytool_exe.out");
              out.createNewFile();
              File err = new File("keytool_exe.err");
              err.createNewFile();
              outFos = new FileOutputStream(out);
              errFos = new FileOutputStream(err);
              StreamSink outSink = new StreamSink(p.getInputStream(),"Output", outFos );
              StreamSink errSink = new StreamSink(p.getErrorStream(),"Error", errFos );
              outSink.start();
              errSink.start();
              int exitVal = 0;;
              try {
                   exitVal = p.waitFor();
              } catch (InterruptedException e) {
                   return -100;
              System.out.println (exitVal==0 ?  "certificate created" :
                   "A problem occured during certificate creation");
              outFos.flush();
              outFos.close();
              errFos.flush();
              errFos.close();
              out.delete();
              err.delete();
              return exitVal;
         public static void main (String[] args) throws
              KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException{
              createKey();
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.io.PrintWriter;
    //Adapted from Mike Daconta's StreamGobbler at
    //http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=4
    public class StreamSink extends Thread
        InputStream is;
        String type;
        OutputStream os;
        public StreamSink(InputStream is, String type)
            this(is, type, null);
        public StreamSink(InputStream is, String type, OutputStream redirect)
            this.is = is;
            this.type = type;
            this.os = redirect;
        public void run()
            try
                PrintWriter pw = null;
                if (os != null)
                    pw = new PrintWriter(os);
                InputStreamReader isr = new InputStreamReader(is);
                BufferedReader br = new BufferedReader(isr);
                String line=null;
                while ( (line = br.readLine()) != null)
                    if (pw != null)
                        pw.println(line);
                    System.out.println(type + ">" + line);   
                if (pw != null)
                    pw.flush();
            } catch (IOException ioe)
                ioe.printStackTrace(); 
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.security.auth.x500.X500Principal;
    public class PrincipalInfo {
         private static String defInfoString = "CN=Name, O=Organization";
         //make it a singleton.
         private static class PrincipalInfoHolder{
              private static PrincipalInfo instance = new PrincipalInfo();
         public static PrincipalInfo getInstance(){
              return PrincipalInfoHolder.instance;
         private PrincipalInfo(){
         public X500Principal getPrincipal(){
              String fileName = "principal.der";
              File file = new File(fileName);
              if (file.exists()){
                   try {
                        return new X500Principal(new FileInputStream(file));
                   } catch (FileNotFoundException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                        return null;
              }else{
                   return new X500Principal(defInfoString);
         public void savePrincipal(X500Principal p) throws IOException{
              FileOutputStream fos = new FileOutputStream("principal.der");
              fos.write(p.getEncoded());
              fos.close();
    }Message was edited by:
    MidnightJava
    Message was edited by:
    MidnightJava

  • Consolidation multiple STO PO to Create one Delivery with the same date

    Hi:
    Want to create one delivery notes from mutiple STO PO using VL10B.
    with the same delivery date.
    How to do it

    Basically the criteria to combine more than one STO into one single delivery
    is STO delivery date and receiving plant. If they are the same then one delivery
    is created and different delivery items are summed.
    Good reference available in SAP notes:
       386340 - Grouping purchase orders into one delivery using Vl10*
    There is more information in another existent thread:
      Combine STO into same DN

  • How can I create a sample with the Flex data?

    Hi mates, I'm thinking about doing some stutter vocals with the ultrabeat so I've got a vocal and I have flexed it in time so it fits well on the song's tempo, the problem is that when I create an audio file of the part of the vocal I want to use on my ultrabeat, it creates an audio file that's not fitted in time.
    How can I create the audio file fitted in time?with the flex info?
    Thanks so much!

    psikonetik wrote:
    How can I create the audio file fitted in time?with the flex info?
    You need to create Apple Loop, REX etc.
    For example select the region that you have already flexed, right click ->Bounce Merge->Bounce Inplace. I will create a new audio track with the bounced Flex work.
    Select the new region and go to Audio menu ->Open in Apple Loop Utility and check "Loop" and other attributes to create an Apple Loop. Save the Apple Loop and close the utility. It's expected that the Apple Loop aif must be created in your Project path folder or have a look at the Audio Bin in Logic where is the aif path.
    Drug the Apple Loop in the Arrange audio track ( or it will create one ) and operate with any tempos.
    !http://img59.imageshack.us/img59/4967/aglogo45.gif!

  • Return a record with the newest date.

    I have a table called credit, and the following columns:
    Rep_Date
    Rep_Name
    Rep_Code
    Rep_Plan
    I am looking for a query that will return only the record based on the most recent Rep_date, this record will then be joined to another table based on the Rep_Code and Rep_Plan, so really this will be a subquery to a larger query.
    Sample Data
    Rep_Date Rep_Name Rep_Code Rep_Plan
    01/01/2010 Jeff 1 B
    09/09/2009 Jeff 1 B
    05/05/2009 Jeff 1 B
    The result should only return the following
    01/01/2010 , Jeff , 1 ,B
    Thanks

    Welcome to the forum.
    The MAX aggregate function should do it as well:
    select max(rep_date) rep_date
    ,      rep_name
    ,      rep_code
    ,      rep_plan
    from   credit
    group by rep_name
    ,        rep_code
    ,        rep_plan;Since you're new to SQL, it is always helpful to do some searches and read (and learn) a bit on these sites as well:
    http://asktom.oracle.com
    http://tahiti.oracle.com/pls/db112/homepage
    http://tahiti.oracle.com/pls/db112/to_toc?pathname=server.112/e10713/toc.htm

  • How can i create a slideshow with the newest version of dreamweaver?

    I am trying to figure out how to create a slideshow but i cannot find any explanations for the new version of Dreamweaver. Can anyone help?

    DW doesn't make slideshows.  You'll need to use a jQuery plugin or a 3rd party commercial Extension.
    Do a web search for:
    jQuery Cycle2
    jQuery WOW Slider
    jQuery Fancybox2
    Primer for using jQuery Plugins
    Alt-Web Design & Publishing: Primer for Using jQuery Plug-Ins
    Nancy O.

  • Pl/sql Procedure is Not Creating With the CLOB data Type

    Hi,
    I am Using Oracle 10g Express Edition Release2.... My Doubt is While creating a table With CLOB Data Type the table is created successfully,but while Creating a Procedure With the CLOB Data type i am getting an Error Message
    2667/5 PL/SQL: Statement ignored
    2667/24 PLS-00382: expression is of wrong type
    then i tried With the Varchar2(30000) the Procedure is Created Successfully note i have not changed any thing in my code except the data type.
    I am Just Confused ......Why the Procedure is not Created with CLOB Data type?
    Please advice ...
    Thank U
    SHAN

    hi,
    Thanks for reply....Another Example
    CREATE TABLE USER_MAS (USER_ID     VARCHAR2 (20 Byte),MAIL_ID     VARCHAR2 (255 Byte));
    set serveroutput on
    declare
    atable varchar2(64) := 'USER_MAS';
    acolumn varchar2(64) := 'MAIL_ID';
    avalue varchar2(64) := 'NEWYORK' ;
    dyn_sql clob;
    begin
    dyn_sql := 'update '||atable||' set '||acolumn||' = '''||avalue|| '''' ;
    dbms_output.put_line(dyn_sql);
    execute immediate dyn_sql;
    end;
    commit ;
    Error at line 2
    ORA-06550: line 9, column 23:
    PLS-00382: expression is of wrong type
    ORA-06550: line 9, column 5:
    PL/SQL: Statement ignored
    When i Changed the Data type to varchar2(64)
    update USER_MAS set MAIL_ID = 'NEWYORK'
    PL/SQL procedure successfully completed.
    Commit complete.
    I like to Know the Reason Why the Procedure is Not Created in Oracle 10g XE DB
    Note :the Same Script i used in 11g DB the Procedure is Created Successfully....
    Why you need use CLOB or VARCHAR2 in your temp_num variable as you sending parameters as number?
    In the Procedure we are create some run time queries while executing the procedure. There are around 10 run time queries created.
    The size of each query is more than 4000 characters . We then add all the queries using union all after each query  to the clob variable as the normal varchar will not support.
    Please Advice
    Thank U
    SHAN

  • Creating context node with dynamic type

    When we are creating context node thru wizard,  Dictionary type must be filled. I'm trying to create Context node manually.Did any one tried created Context node class with Dynamic type.

    Hi Prasad,
    I have a similar requirement.
    Can you please share with me how did you create context node with dynamic table data?
    Thanks
    Vicky

  • I still have no way how to deal with the LabView Data folder automatically created in the My Documents folder whenever I run the application

    I tried numerous ways that some people suggested in this forum but did not succeed in having the LabView Data folder created somewhere else than in My Documents when running a built LabView application. Changing the target destination folder did not help at all. A member suggested to put some line like " defaultdestination = ..." or so into the build file, but I did not know where exactly to put such a line. That folder created is particularly anoying for people who don't normally use LabView but are only using the application. Please let me know when you LabView Experts out there have found a way to eliminate or relocate the creation of that folder at application startup.
    Thanks a lot.
    Tim, Van

    Tim,
    use the path constant located in the Functions pallette under 'File I/O->File Constants->Default Data Directory'. It refers either to the default directory (which is (osdatadir)\Labview Data on my WinXP system) OR TO A NON DEFAULT PATH if you have defined one. To define a non-default path, got to the menu 'Tools->Options...' and change the entry under 'Paths->Default Data Directory'. This change will create an entry in the labview.ini file (located where the labview.exe is), e.g. the entry 'DefaultDataFileLocation=d:\temp' is created when I change the default data dir to 'D:\temp'.
    Now for a compiled .exe with the name (say) myapp.exe you will find a file myapp.ini in the same location where myapp.exe is. It is usually an emtpy file directly after the application build process. Put the line 'DefaultDataFileLocation=(your path)' in this file.
    Users of your compiled app can either
    - edit this .ini file to change the default,
    - or you can make the menu entry 'Tools->Options...' accessible in the built VI
    - or you can provide a self written dialog in your app and modify the myapp.ini programmatically
    (This last way is probably not a good one since the user might have to relaunch myapp.exe in order to affect a change of the 'Default Data Directory' path constant)
    -Franz
    Tc@labView wrote:
    I tried numerous ways that some people suggested in this forum but did not succeed in having the LabView Data folder created somewhere else than in My Documents when running a built LabView application. Changing the target destination folder did not help at all. A member suggested to put some line like " defaultdestination = ..." or so into the build file, but I did not know where exactly to put such a line. That folder created is particularly anoying for people who don't normally use LabView but are only using the application. Please let me know when you LabView Experts out there have found a way to eliminate or relocate the creation of that folder at application startup.
    Thanks a lot.
    Tim, Van

  • [svn] 1267: fixed . patch creation to create patch with the selected files only, remove, fix newlines in the patch file.

    Revision: 1267
    Author: [email protected]
    Date: 2008-04-16 17:02:53 -0700 (Wed, 16 Apr 2008)
    Log Message:
    fixed .patch creation to create patch with the selected files only, remove, fix newlines in the patch file.
    Modified Paths:
    flex/sdk/trunk/tools/diffpack/diffpack
    flex/sdk/trunk/tools/diffpack/readme.txt

    All,
    I thought it may be related to spaces in the path in which the script was called from. I tried having the ODBC command script in another directory but the same thing happens. It will give me the "CONFIGSYSDSN: Unable to create a data source for the 'Oracle in OraClient10g_home1' driver: Could not load the setup or translator library with error code -2147467259". As soon as the script is done running I can manually double click the script and it adds the DSN fine.
    Thanks,
    Clif Bridegum

  • I have recently migrated data from Windows PC to Macbook Pro 13in. On booting the macbook now the account with the migrated data an only be accessed via the Apple menu. Is this normal ?

    I have recently migrated data from Windows PC to Macbook Pro 13in.running Yosemite. On booting the macbook now the account with the migrated data can only be accessed via the Apple menu. Is this normal ?

    Open the Users folder on the internal drive, drag all of the other home folders to the desktop, and then move the files inside to the desired locations.
    (91949)

  • How to reset the wiki server (MAC OS X 10.9 with OS X Server App Version 3) with all wiki datas only

    Hi,
    I need to reset my Wiki on MAC OS X 10.9 with OS X Server App Version 3, but without reinstalling the whole server app to configure all services.
    Does anybody knows how to reset the wiki server (MAC OS X 10.9 with OS X Server App Version 3) with all wiki datas only.
    Thanks a lot for your hints

    Hi Linc,
    sorry, I haven't saved the System-Logfile before restoring my parallels VM.
    But it looks like issues of linking data.
    For testing the Server services I have done a reset for a user password and I have deleted the profiles and configuration from Client-Side. One with Mac OS X 10.9.1, one iPad with iOS 6.1.3. But it was not possible to reconfigure/reinstall the Server Profile. Also a manually configuration was odd, because for some services the new password was necessary and for other services the old password. Very strange.
    To bring back the services I have rolled back the last snapshot of my parallels VM. Afterwards there was no probleme to reconfigure/reinstall the Profile on Client-Side (OS X 10.9.1 and iOS 6.1.3). Also the manually configuration shows the password for all services are matching with the current configuration.
    I'm going to install a further parallels VM with Mac OS X 10.9.1 and Server App 3 from scratch to move the services.
    Greetings

  • Registering with the WebEx Data Center and the Cisco WebEx Node Management System

    Dear guys, ...
    Please help,
    i want to implement to webex node ASR1000, i have read in "Configuring the Cisco Webex Node for ASR 100.pdf", there is prerequisites to implement it, that is "Registering with the WebEx Data Center and the Cisco WebEx Node Management System"
    Can someone tell how to "Registering with the WebEx Data Center and the Cisco WebEx Node Management System"
    Are there any step by step documentation to "Registering with the WebEx Data Center and the Cisco WebEx Node Management System"?
    Thank you
    BR

    You should have received a PAK Key with your order.  Go to Cisco licensing and enter the PAK Key as this will start the process.  Once the PAK Key is validated a screen will be displayed to enter your request for ASR 100 integration.  It normally takes a few days to a couple of weeks to get the information back from WebEx needed to configure your ASR.
    If you did not get a PAK Key contact your WebEx rep to get the process started to integrate your ASR to your WebEx site.
    Hope this helps
    John

Maybe you are looking for

  • Page numbers not showing up in PDF export

    I have an InDesign document with page numbers placed on all master pages. The page numbers show up just fine in InDesign, but when I export the document as a PDF the page numbers don't show up at all in the PDF. Any idea why this is happening?

  • Auto-update of date and time on Lumia 800

    I've recently had my Lumia 800 in for "repair" as the auto-update switch did not appear on the menu.  The phone has come back (from carphone warehouse) with OS version 7.10.8858.136 and Firmware 1750.0823.8858.12460, both of which seem more up-to-dat

  • Is there any other way to find and iPhone besides using the find my iPhone app?

    Been trying to find my iPhone using the find my iPhone app and have had no luck. Also added the  AT&T Family Map and have had no luck. It just makes me so mad that somebody you thought was your friend would do something like this. Can anybody HELP!!

  • Replicate Tables as Staging Tables in a DWH

    Hi We are in process of building a Data Mart, for the staging area we are considering to use GG as the Change Data Capture tool. The idea is in the source (OLTP Database) we have a table called T1, this table has no PK and it's partitioned by day, ge

  • Transaction Launcher in ICWC with Handler Class

    Hi All, I am in the process of creating new Transaction through Transaction Launcher (Wizard) in IC WebClient. I wish to know more about the creation of Transaction Launcher Handler class (With super class) and SICF - Services. Please help me to crea