Fetching last but one record from Infotype

Hello Everyone,
Can you kindly let me know how to fetch the last but one records of IT0171 and IT0000, then compare the endda of both of the records.
Thank you for your help.
Regards,
Vinod

Hi,
First sort your internal table by ENDDA descending.
Then read index 2. This will give you the last but one record.
INFOTYPES: 0171.
CALL FUNCTION 'HR_READ_INFOTYPE'
  EXPORTING
    pernr           = '506'
    infty           = '0171'
    begda           = '18000101'
    endda           = '99991231'
  TABLES
    infty_tab       = p0171
  EXCEPTIONS
    infty_not_found = 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.
ELSE.
  SORT p0171 BY ENDDA descending.
  READ TABLE p0171 INDEX 2.  ---> reads the previous record of the last entry.
  write:/ 'test'.
ENDIF.
Regards,
Soumya.

Similar Messages

  • One record from AD DNS does not transfer

    I have AD DNS to Novell DNS transfer setup (AD primary, Novell NW 6.5.8 DNS
    secondary)
    It works fine, but one record does NOT get transfered
    I deleted the .jnl file for the zone
    unloaded/reloaded named
    used -zi zonename but the record is still not there and in addition the .jnl
    did NOT get re-created
    No idea what else to do
    Oct 05 09:18:58.000 general: dns/zone: debug 1: zone brookgreen.local/IN:
    Loading from eDirectory
    Oct 05 09:18:58.000 general: dns/zone: debug 1: zone brookgreen.local/IN:
    loaded
    Oct 05 09:18:58.000 general: dns/db: debug 1: Unable to open file
    brookgreen.local.db.jnl
    Oct 05 09:18:58.000 general: dns/zone: debug 1: zone brookgreen.local/IN:
    journal rollforward completed successfully: no journal
    Oct 05 09:18:58.000 general: dns/zone: info: zone brookgreen.local/IN:
    loaded serial 266
    Seb

    I also get this daily:
    error: transfer of 'brookgreen.local/IN' from 10.0.0.14#53: failed while r
    eceiving responses: not exact
    Seb
    "Sebastian Cerazy" <sebastian.cerazy@(nospam)spgs.org> wrote in message
    news:uYUiq.6004$[email protected]..
    >I have AD DNS to Novell DNS transfer setup (AD primary, Novell NW 6.5.8 DNS
    >secondary)
    >
    > It works fine, but one record does NOT get transfered
    >
    > I deleted the .jnl file for the zone
    >
    > unloaded/reloaded named
    >
    > used -zi zonename but the record is still not there and in addition the
    > .jnl did NOT get re-created
    >
    > No idea what else to do
    >
    > Oct 05 09:18:58.000 general: dns/zone: debug 1: zone brookgreen.local/IN:
    > Loading from eDirectory
    > Oct 05 09:18:58.000 general: dns/zone: debug 1: zone brookgreen.local/IN:
    > loaded
    > Oct 05 09:18:58.000 general: dns/db: debug 1: Unable to open file
    > brookgreen.local.db.jnl
    > Oct 05 09:18:58.000 general: dns/zone: debug 1: zone brookgreen.local/IN:
    > journal rollforward completed successfully: no journal
    > Oct 05 09:18:58.000 general: dns/zone: info: zone brookgreen.local/IN:
    > loaded serial 266
    >
    >
    > Seb
    >
    >

  • Fetching more than one row from a table after selecting one value from the dropdown

    Hi Experts,
    How can we fetch more than one row from a table after selecting one value from the dropdown.
    The scenario is that I have some entries in the dropdown like below
      A               B               C        
    11256          VID          911256  
    11256          VID          811256
    11256          SONY      11256
    The 'B' values are there in the dropdown. I have removed the duplicate entries from the dropdown so now the dropdownlist has only two values.for eg- 'VID' and'SONY'. So now, after selecting 'VID' from the dropdown I should get all the 'C' values. After this the "C' values are to be passed to other methods to fetch some data from other tables.
    Request your help on this.
    Thanks,
    Preeetam Narkhede.

    Hi Preetam!
    I hope I understand your request proberly, since this is more about Java and less about WebDynpro, but if I'm wrong, just follow up on this.
    Supposed you have some collection of your original table data stored in variable "origin". Populate a Hashtable using the values from column "B" (let's assume it's Strings) as keys and an ArrayList of whatever "C" is (let's assume String instances, too) as value (there's a lot of ways to iterate over whatever your datasource is, and since we do not know what your datasource is, maybe you'll have to follow another approach to get b and c vaues,but the principle should remain the same):
    // Declare a private variable for your Data at the appropriate place in your code
    private Hashtable temp = new Hashtable<String, ArrayList<String>>();
    // Then, in the method you use to retrieve backend data and populate the dropdown,
    // populate the Hashtable, too
    Iterator<TableData> a = origin.iterator();
    while (a.hasNext()) {
         TableData current = a.next();
         String b = current.getB();
         String c = current.getC();
         ArrayList<String> values = this.temp.get(b);
         if (values == null) {
              values = new ArrayList<String>();
         values.add(c);
         this.temp.put(b, values);
    So after this, you'll have a Hashtable with the B values als keys and collections of C values of this particular B as value:
    VID --> (911256, 811256)
    SONY --> (11256)
    Use
    temp.keySet()
    to populate your dropdown.
    After the user selects an entry from the dropdown (let's say stored in variable selectedB), you will be able to retrieve the collection of c's from your Hashtable
    // In the metod you handle the selection event with, get the c value collection
    //and use it to select from your other table
    ArrayList<String> selectedCs = this.temp.get(selectedB);
    // now iterate over the selectedCs items and use each of these
    //to continue retrieving whatever data you need...
    for (String oneC : selectedCs) {
         // Select Data from backend using oneC in the where-Clause or whatever...
    Hope that helps
    Michael

  • How do you return back one record from a NamingEnumeration

    how do you return back one record from a For Loop issue
    Posted: Jan 4, 2007 9:13 AM Reply
    I have the following piece of code and i want to be able to just return one item...
    that is return e.next(); but this line doesnt work for below what is wrong
    if (attrs == null) {
    System.out.println("No attributes");
    } else {
    /* Print each attribute */
    for (NamingEnumeration ae = attrs.getAll();
    ae.hasMore();) {
    Attribute attr = (Attribute)ae.next();
    System.out.println("attribute: " + attr);
    /* print each value */
    for (NamingEnumeration e = attr.getAll();
    e.hasMore();){
    System.out.println("value:- " + e.next()));
    return e.next();
    }

    At the end of the loop, the NamingEnumeration has no more elements. You need to call getAll() again.
    By the way, please use code tags (above the posting box). You've been here long enough to know that (judging by your registration date).

  • How to print the text in only last but one page in sapscripts

    hiiiiiiiiiii,
             explian how to print the text in only last but one page in sapscripts? wher to write the code? plz if possible explain in detail with an example?

    Hello,
    The total no pages is given by &SAPSCRIPT-FORMPAGES& command.
    So u can handle the situation in ur form like this
    /: if &PAGE&  = &SAPSCRIPT-FORMPAGES&
    p1 TEXT
    /: endif
    Try in this way it may help u.
    Regards

  • Print text on last but one page of SmartForms

    Hello everyone,
       Here I have a very specific requirement in SmartForms which I am not able to do even after trying a lot of options.
       I want to print Items of PO in Main Window and I am printing total on a different window which should be printed at end of all Items.  Again this does not mean total is printed on last page, as the last page has Conditions which is default with every PO.
      So the requirement is to find out the last but one page at runtime and print the total. 
    Thanks.

    Hi Priya,
    Even I faced the same problem while creating invoice.
    Soln:
    declare a variable "g_counter" at global definition tab with data type "I'.
    In the main window just after your table and before the command line which you have used, create a program line and give input and output parameters as "g_counter"
    In the body of program line just write "g_counter = g_counter + 1".
    Make sure your total window is placed after the main window in sequence.
    Than in the total window you can put condition as "g_counter = 1".
    I am sure this issue will be reolved.
    Regards,
    Vinit

  • How to display text on last but one page in SAPSCRIPTS

    how to display text on last but one page in SAPSCRIPTS

    u have create one Foooter window , this has to be called in  only One Page.So hardcode /assign this window to only one PAGE number.
    regards
    Prabhu

  • I have no problem connecting my i-phone programs to my tv through apple tv. but one program from an application from appstore don't go through apple tv. It says an error occured while loading the content.This is just for one program. All other works good.

    My apple TV works fine with my I-Phone 4s. But one program from one of the application I downloaded from the app store dont work. When I load that a message comes "an error occured while loading this program" This is  only for one program all other most of the time works good. Any one knows why ?

    Hi there Mundaplackel!
    I have an article here for you that can help you troubleshoot the functionality of that app that you have purchased from the app store, and should be able to give you some steps that will help you resolve the issue:
    iOS: Troubleshooting applications purchased from the App Store
    http://support.apple.com/kb/TS1702
    Thanks for using the Apple Support Communities!
    Cheers,
    Braden

  • WSDL Error : Difficult in reading one record from server

    Hi,
    I have an issue with WSDL. i have imported the wsdl and getting the results in flex. Now when i am trying to import only one record from wsdl its throwing an error. Please any help is appreciable.
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at Components::References/ResultHandler()[E:\Project_Modified\05_10_2010\LawPadPDA\src\Compo nents\References.mxml:87]
        at Components::References/__lawPadServicesDAOPort_result()[E:\Project_Modified\05_10_2010\La wPadPDA\src\Components\References.mxml:19]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at com.adobe.fiber.services.wrapper::AbstractServiceWrapper/http://www.adobe.com/2008/flex/model/internal::propagateEvents()[C:\depot\DataServices\bra nches\lcds_modeler101\frameworks\projects\fiber-swc\src\com\adobe\fiber\services\wrapper\A bstractServiceWrapper.as:200]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.rpc::AbstractService/dispatchEvent()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\rpc\A bstractService.as:333]
        at mx.rpc.soap.mxml::WebService/dispatchEvent()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\ rpc\soap\mxml\WebService.as:267]
        at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\4.0.0\frameworks\pro jects\rpc\src\mx\rpc\AbstractOperation.as:254]
        at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\4.0.0\frameworks\projec ts\rpc\src\mx\rpc\AbstractInvoker.as:318]
        at mx.rpc::Responder/result()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:5 6]
        at mx.rpc::AsyncRequest/acknowledge()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\rpc\AsyncR equest.as:84]
        at DirectHTTPMessageResponder/completeHandler()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\ messaging\channels\DirectHTTPChannel.as:446]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/onComplete()
    Thanks and Regards,
    Pradeep

    The Flex forum is here:
    http://forums.adobe.com/community/flex
    This one is just for discussions on the forums themselves.

  • How to display text on last but one page

    how to display text on last but one page

    Hi Preeti,
      If u r working on a smartform then click on th window go to the condition tab there
      at the end u will find events click on the the event on which u want to trigger the 
      print.
      If u r working on a script then create a text element and call this text elemtn at
    the end of processing of the main window, this will make sure that thetext element
    is triggered only at the end.
    I hope that helps u , if not pls let me know.
    Regards,
    Vaibhav B Gawali.

  • Deleting records from infotype 0587 - PF

    Hi,
    I have a requirement to delete some records from the infotype 0587 which is having the TimeConstraint 1. For that one of my friends suggested me to use the Function module SE16N_INTERFACE to delete those records. Is this method suggestable?
    will there be any problem if i delete those records through that function module.  Can any body please suggest me.
    Thanks
    Karthik

    Hi....
    the function module which your friend suggested SE16N_INTERFACE is used to Display table as full screen..
    it cant be used to delete record for an infotype..
    And also there is no function module to do forbidden actions.
    but there are lot of indirect methods to delete the data.  But when a time constraint is set it is not advisable to delete.
    Anyways.. you only can do it with DELETE statement in report program.
    select single dbtab from t777d into gv_dbtab where infty = p_infty.
    delete from (gv_dbtab) where pernr in p_pernr.
    OR
    delete (dbname) from (work area).
    else ..you can use SE16N with editing mode set to active and then delete it .. BE CAREFUL in doing this ... Not to be used in Production.
    Hope this helps!
    Regards,
    Jhings.

  • Need to return only one record from select statement.

    Hello friends,
    I have a scenerio in which code only want to fetch one value from the SQL statement, but in some cases the statment return more then one row due to which ORA-01422 : Exact fetch return more then one row, error comes.
    Can you suggest me to write a select statement that will handel this. I am using the below mentioned select statement:
    EXECUTE IMMEDIATE
    'SELECT rsdn FROM ' || schema || '.table_name' ||
    ' WHERE a = :1 AND b = :2 AND c IN (32,33,34)'
    INTO v_rsdn USING v_a, v_b;
    One question, Can I use Rownum < 2 in Where clause to restrict the select output to only one record ? Please suggest ?
    Regards,
    Rajat

    Well, if rownum=1 could be a trash answer, it would be an issue since we don't know which record you are interested to. Is it one particular ? Is it only to workaround the issue ? Then you may want to manage some BULK COLLECT or whatever else array to receive all the rows as well.
    What are you doing with the rows returned ?
    Nicolas.

  • SQL to group the records and apply logic to pick one record from each group

    Hi Friends,
    I am looking for a query to group the records on certain columns in a table and then from each group I want to pick only one record based on certain rules.
    May be having data laid out will make my point more clear to you. Here you go :
    CREATE TABLE AD_LIST
      FILE_NAME             VARCHAR2(50 BYTE),
      ACTIVITY_START        DATE,
      ACTIVITY_END          DATE,
      DIVISION              VARCHAR2(50 BYTE),
      ITEM_CODE             VARCHAR2(50 BYTE),
      MULT                  NUMBER,
      RETAIL                NUMBER,
      AD_PAGE               VARCHAR2(1 BYTE),
      FORECAST              NUMBER,
      MEMO                  VARCHAR2(50 BYTE)
    INSERT INTO AD_LIST VALUES ('FILE_1','01-APR-2010','15-APR-2010','B',1111,5,10,'A',10,'This must be in my result');
    INSERT INTO AD_LIST VALUES ('FILE_1','01-APR-2010','15-APR-2010','B',1111,1,1,'B',15,'Must not be in my result');
    INSERT INTO AD_LIST VALUES ('FILE_1','01-APR-2010','15-APR-2010','B',1111,6,15,'C',11,'Must not be in my result');
    INSERT INTO AD_LIST VALUES ('FILE_1','16-APR-2010','30-APR-2010','N',1111,4,20,'D',40,'Must not be in my result');
    INSERT INTO AD_LIST VALUES ('FILE_1','16-APR-2010','30-APR-2010','N',1111,5,15,'E',30,'Must not be in my result');
    INSERT INTO AD_LIST VALUES ('FILE_1','16-APR-2010','30-APR-2010','N',1111,1,2,'F',20,'This must be in my result');
    CREATE TABLE PAGE_RANK
      AD_PAGE VARCHAR2(1 BYTE),
      RANK NUMBER
    INSERT INTO PAGE_RANK VALUES ('A',1);
    INSERT INTO PAGE_RANK VALUES ('B',2);
    INSERT INTO PAGE_RANK VALUES ('C',3);
    INSERT INTO PAGE_RANK VALUES ('D',4);
    INSERT INTO PAGE_RANK VALUES ('E',5);
    INSERT INTO PAGE_RANK VALUES ('F',6);
    COMMIT;
    SELECT * FROM AD_LIST
    FILE     ACTIVITY     ACTIVITY          ITEM               AD
    NAME     START          END          DIV     CODE     MULT     RETAIL     PAGE     FORECAST     MEMO
    FILE_1     4/1/2010     4/15/2010     B     1111     5     10     A     10     This must be in my result
    FILE_1     4/1/2010     4/15/2010     B     1111     1     1     B     15     Must not be in my result
    FILE_1     4/1/2010     4/15/2010     B     1111     6     15     C     11     Must not be in my result
    FILE_1     4/16/2010     4/30/2010     N     1111     4     20     D     40     Must not be in my result
    FILE_1     4/16/2010     4/30/2010     N     1111     5     15     E     30     Must not be in my result
    FILE_1     4/16/2010     4/30/2010     N     1111     1     2     F     20     This must be in my resultNow, from the table AD_LIST I want to group the records based on FILE_NAME, ACTIVITY_START, ACTIVITY_END, DIVISION, ITEM_CODE.
    So in my example here we have 2 set of records grouped based on the columns specified.
    Also we have one more table, PAGE_RANK, which has a rank corresponding to each ad_page number. Here 1 is higher rank than 2. Hence ad page 'A' takes priority over 'B'. Similarly for all other ad pages.
    Now, we need to pick one ad from each group of ads by determining the highest ranked ad page within the group and the value for mult and retail must be replaced with the value that has min(retail/mult). So, using the above data we will have the one having ad page = 'A' and ad page = 'D' as the final results since they have highest ad page rank in their group.
    The value for mult and retail values for ad_page 'A' = min (10/5 , 1/1, 15/6) = 1,1(mult,retail).
    The value for mult and retail values for ad_page 'D' = min (20/4 , 15/5, 2/1) = 1,2(mult,retail).
    Finally I have this query below
    SELECT a.file_name,
           a.activity_start,
           a.activity_end,
           a.division,
           a.item_code,
           FIRST_VALUE (a.mult) OVER (PARTITION BY a.file_name, a.activity_start, a.activity_end, a.division, a.item_code ORDER BY (a.retail /
                                                                                                                                    a.mult))
                                                                                                        mult,
           FIRST_VALUE (a.retail) OVER (PARTITION BY a.file_name, a.activity_start, a.activity_end, a.division, a.item_code ORDER BY (a.retail /
                                                                                                                                      a.mult))
                                                                                                      retail,
           FIRST_VALUE (a.ad_page) OVER (PARTITION BY a.file_name, a.activity_start, a.activity_end, a.division, a.item_code ORDER BY (b.RANK))
                                                                                                     ad_page,
           a.forecast,
           a.memo                                                                                                
      FROM ad_list a, page_rank b
    WHERE a.ad_page = b.ad_pageThis query is giving me all the records but with the values what I wanted in Ad_Page, Mult and Retail columns.
    How can I pick only one from each group.
    I am getting this FILE     ACTIVITY     ACTIVITY          ITEM               AD
    NAME     START          END          DIV     CODE     MULT     RETAIL     PAGE     FORECAST     MEMO
    FILE_1     4/1/2010     4/15/2010     B     1111     1     1     A     15     Must not be in my result
    FILE_1     4/1/2010     4/15/2010     B     1111     1     1     A     10     This must be in my result
    FILE_1     4/1/2010     4/15/2010     B     1111     1     1     A     11     Must not be in my result
    FILE_1     4/16/2010     4/30/2010     N     1111     1     2     D     20     This must be in my result
    FILE_1     4/16/2010     4/30/2010     N     1111     1     2     D     30     Must not be in my result
    FILE_1     4/16/2010     4/30/2010     N     1111     1     2     D     40     Must not be in my resultBut I want this FILE     ACTIVITY     ACTIVITY          ITEM               AD
    NAME     START          END          DIV     CODE     MULT     RETAIL     PAGE     FORECAST     MEMO
    FILE_1     4/1/2010     4/15/2010     B     1111     1     1     A     10     This must be in my result
    FILE_1     4/16/2010     4/30/2010     N     1111     1     2     D     20     This must be in my resultI have to run this query for thousands of such group combination.
    Hope some one can throw some light on this query.
    Thanks in advance,
    Raj.

    Frank,
    You are marvelous.
    That is what I was expecting, but basically I want to display the row with highest page rank which is 'A' and 'D' in this case.
    So I have changed my query as below using yours :
    WITH mainq AS
         (SELECT a.file_name,
                 a.activity_start,
                 a.activity_end,
                 a.division,
                 a.item_code,
                 FIRST_VALUE (a.mult) OVER (PARTITION BY a.file_name, a.activity_start, a.activity_end, a.division, a.item_code ORDER BY (a.retail /
                                                                                                                                          a.mult))
                                                                                                        mult,
                 FIRST_VALUE (a.retail) OVER (PARTITION BY a.file_name, a.activity_start, a.activity_end, a.division, a.item_code ORDER BY (a.retail /
                                                                                                                                            a.mult))
                                                                                                      retail,
                 --FIRST_VALUE (a.ad_page) OVER (PARTITION BY a.file_name, a.activity_start, a.activity_end, a.division, a.item_code ORDER BY (b.RANK))
                 a.ad_page,
                 a.forecast,
                 a.memo,
                 ROW_NUMBER () OVER (PARTITION BY a.file_name, a.activity_start, a.activity_end, a.division, a.item_code ORDER BY b.RANK)
                                                                                                 AS r_num
            FROM ad_list a, page_rank b
           WHERE a.ad_page = b.ad_page)
    SELECT *
      FROM mainq a
    WHERE r_num = 1
    FILE     ACTIVITY     ACTIVITY          ITEM               AD
    NAME     START          END          DIV     CODE     MULT     RETAIL     PAGE     FORECAST     MEMO
    FILE_1     4/1/2010     4/15/2010     B     1111     1     1     A     10     This must be in my result
    FILE_1     4/16/2010     4/30/2010     N     1111     1     2     D     40     Must not be in my resultMy apologies that I gave you wrong forecast and memo values in my earlier post.
    But that is what I wanted and your input greatly helped me to save lot of time by using in one single query.
    Earlier I was using cursor to do that and it was not doing any good performance wise.
    Thanks to every body for your time and your efforts.
    I appreciate it.
    Have fun.
    ~Raj

  • How to retrieve more then one record from database

    I am doing a SELECT FROM WHERE SQL statement on a database which returns more then one record. I want to retrieve certain column values from the selected records. How do I do that? If only one record is returned, I know I can do a data operation with operation set to 'Get-Retrieve Values from Record' and Record to operate on set to 'Current-Use current record'. I need to find out how to configure to data operation window in the case more then one record is returned by the preceding SQL statement. Depending on the number of records returned, I can dynamically create array variables to store the 'to be retrieved' column values, just dont know how to retrieve them.
    Any help will be greatly appreciated.
    Thanks
    Anuj

    I apologize for not being clear in explaining my problem, perhaps I should have posted an example. Anyways, I was able to figure out the solution. I was doing an 'Open SQL' statement which was selecting multiple records (rows) from a table in the dB. I was storing the number of records returned in a local variable. Then, I wanted to retrieve certain columns of all the selected rows (records). In the "Data operation", I was choosing the 'Record to operate on' as 'Current-Use Current Record'. Changing this field to 'Next-Fetch next record' fixed the problem. I then retrieved the values of those columns into a dynamically created array variable whose dimensions came from the local variable which stored the number of records returned in the SELECT SQL statement. 
    Thanks
    Anuj

  • Need help on filtering out one record from a report and open in new page

    Hi I am new and embarrassed to write in the forum asking silly questions. Thing is I am learning all from scratch without help from anyone. I have created a database (have previous knowledge only from Access) and have managed to create a beautiful report from a search filter. This report lines up several records matching what I needed. Now, I want to make the whole report with hyperlinks to a detailed page on each of the records in the report. I have tried using the feature where one can make one column hyperlinked and redirect to a new page, where I am getting all the records again - instead of only getting the record I am clicking on. I have looked and looked in the forums without finding solution and I have tested and tried various methods without luck. I am suspecting that I need some sort of knowledge on how to write a select query with where conditions that can apply to filtering out a record from one report to get another detailed on only one object (i.e. record). :/ Stupid or what?

    Hrefna.
    What you need to look into is two things:
    1) The link you defined, needs to set additional attributes for the target page. In the "Column Link" box, you have set the link to "Page in this Application" and followed by the page number (let's say, Page 10). Below that, you should set an Item to an item on you target page (let's call that P10_PRODUCT_ID). This item should be the primary key of your detail table (on the targe page). You can select this item from the popup list. The Value of the item should be picked from a popup list as well, being the value from the record you clicked on. This should then transfer your selected item to your page. The URL will then have something like P10_PRODUCT_ID:5 at the end.
    2) On the target page, 10, you must change the query slightly, so that it adds a WHERE clause:
    WHERE PRODUCT_ID = :P10_PRODUCT_ID
    Now, you should be set.
    Hope this helps.
    Borkur

Maybe you are looking for