2 Replies Latest reply: Sep 17, 2012 5:58 AM by Kiran Shinde RSS

    Row Selection

    Kiran Shinde

      Hi Everyone,

       

      I have following Requirement,

       

      Table1:

       

      EntryNo
      ItemNoPostingDate
      E01I00105/07/2012
      E02I00106/07/2012
      E03I00208/07/2012
      E04I00301/07/2012
      E05I00130/06/2012
      E06I00225/06/2012

       

       

       

      Table2:

      BusGroupProductGroupItemNo
      FromDate
      EBPG-001RMI00102/07/2012
      EBPG-001RMI00103/07/2012
      EBPG-001RMI00205/07/2012
      EBPG-001PMI00208/07/2012
      EBPG-001PMI00306/07/2012
      EBPG-001RMI00109/07/2012

       

      EntryNo-PostingDate(one to one)

       

      When I will select BusGroup EBPG-001,ProductGroup RM & ItemNo I001, Then I will get multiple FromDate (02/07/2012,03/07/2012,9/07/2012)

      When I will select EntryNo  E02 for the same ItemNo I001 then I will get PostingDate 06/07/2012

      Now,I want to select that row from Table2 whose FromDate is Maximum Among all dates that are less than or equal to PostingDate for EBPG-001 & RM Combination

       

      So in this case,It will select FromDate 03/07/2012 which is less than 06/07/2012.

       

       

      How can I do this??

       

      Thanks.