About selecting record from a list

hai sir ,
           i have displayed on list using alv function module . but ,i want to select one or more record from the list.
and press any function key it shoud display the records which i was selected.how its possible give some idea.

hi,
u can easily do ot using a alv grid control as follows
1.create a class with handle toolbar method by which u can create customized button .Here i have given the function code as DISPLAY.In the handle user commad u have to write the command for displaying the selected row.Using the get selected row methos ,u will get the selected row index so that u can read the internal table with that index to get the record.After getting the selected row u can display it as pop up by calling the function module POPUP_WITH_TABLE_DISPLAY
For enabling the selection in grid ,set the layout like this ls_layout-sel_mode = 'A'.
for pasiing it to set_table_for_first_display
*--->class defenition and implementation
*class defenition
CLASS cl_eventhandler DEFINITION.
  PUBLIC SECTION.
    METHODS:
      handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
            IMPORTING e_object e_interactive,
      handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
            IMPORTING e_ucomm,
      handle_hotspot_click  FOR EVENT hotspot_click OF cl_gui_alv_grid
            IMPORTING e_row_id e_column_id es_row_no.
ENDCLASS.                    "cl_eventhandler DEFINITION
*class implementation
CLASS cl_eventhandler IMPLEMENTATION.
  METHOD handle_toolbar.
    DATA: ls_toolbar  TYPE stb_button.
    CLEAR ls_toolbar.
    MOVE 'DISPLAY' TO ls_toolbar-function.
    MOVE icon_print TO ls_toolbar-icon.
    MOVE 'Print warranty sheet' TO ls_toolbar-quickinfo.
    MOVE 'Print warranty sheet' TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled.
    APPEND ls_toolbar TO e_object->mt_toolbar.
    CLEAR ls_toolbar.
  ENDMETHOD.                    "handle_toolbar
  METHOD handle_user_command.
    CASE e_ucomm.
      WHEN 'DISPLAY'.
CALL METHOD gr1->get_selected_rows
          IMPORTING
            et_index_rows = lt_rows.
    ENDCASE.
  ENDMETHOD.                    "handle_user_command
  METHOD handle_hotspot_click .
    READ TABLE it_alv INTO wa_alv INDEX e_row_id-index.
    IF sy-subrc EQ 0.
      CHECK NOT wa_alv-vbeln IS INITIAL.
      SET PARAMETER ID '/DBM/ORDER_NUMBER' FIELD wa_alv-vbeln.
      CALL TRANSACTION '/DBM/ORDER03' AND SKIP FIRST SCREEN.
    ENDIF.
  ENDMETHOD.                    "handle_HOTSPOT_CLICK

Similar Messages

  • How to write jsp select record from Oracle  divide per page , about 50 reco

    Dear Expert,
    How to write jsp select record from Oracle divide per page , about 50 record per page.
    Thank you very much.

    I wish I could, but there is no single sign on module available for Fusion, also, so called Fusion is yet another Word With Big Letters, behind it there is yet another OC4J ( now Oracle switched to Weblogic though) container with bunsh of Oracle apps residing in it.
    Generally speaking, neither Fusion nor Oracle Apps user database does not have any single authentication module available out of the box to integrate user database.
    It's a long sad story running straight from Oracle Apps 11.0.5.
    That's why I've created JAAS single sign on login module and used it ever since at OC4J 10.2 and onwards at OC4J 10.3
    Back to the topic: to develop Apps and test them externally using the session bean I've isted above, one need to copy certain libraries from Oracle Apps server, then add them as libraries for JDeveloper project.
    Here is the complete list:
    oracle.apps.fnd.cache
    oracle.apps.fnd.cache
    oracle.apps.fnd.common
    oracle.apps.fnd.functionSecurity
    oracle.apps.fnd.metadata
    oracle.apps.fnd.security
    oracle.apps.fnd.util
    oracle.apps.jtf.cache
    oracle.apps.jtf.security
    Edited by: Faceless on Nov 26, 2009 3:04 AM

  • Select records from one database and insert it into another database

    Hi
    I need to write a statement to select records from one database which is on machine 1 and insert these records on a table in another database which is on machine 2. Following is what I did:
    1. I created the following script on machine 2
    sqlplus remedy_intf/test@sptd @load_hrdata.sql
    2. I created the following sql statements in file called load_hrdata.sql:
    rem This script will perform the following steps
    rem 1. Delete previous HR data/table to start w/ clean import tables
    rem 2. Create database link to HR database, and
    rem 3. Create User Data import table taking info from HR
    rem 4. Drop HRP link before exiting
    SET COPYCOMMIT 100
    delete from remedy.remedy_feed;
    commit;
    COPY FROM nav/donnelley@hrp -
    INSERT INTO remedy.remedy_feed -
    (EMPLID, FIRST_NAME, MI, LAST_NAME, BUSINESS_TITLE, WORK_PHONE, -
    RRD_INTRNT_EMAIL, LOCATION, RRD_OFFICE_MAIL, RRD_BUS_UNIT_DESCR) -
    USING SELECT EMPLID, FIRST_NAME, MI, LAST_NAME, BUSINESS_TITLE, WORK_PHONE, -
    RRD_INTRNT_EMAIL, LOCATION, RRD_OFFICE_MAIL, RRD_BUS_UNIT_DESCR -
    FROM ps_rrd_intf_medium -
    where empl_status IN ('A', 'L', 'P', 'S', 'X')
    COMMIT;
    EXIT;
    However, whenever I run the statement I keep getting the following error:
    SP2-0498: missing parenthetical column list or USING keyword
    Do you have any suggestions on how I can fix this or what am I doing wrong?
    Thanks
    Ali

    This doesn't seem to relate to Adobe Reader. Please let us know the product you are using so we may redirect you or refer to the list of forums at http://forums.adobe.com/

  • Selecting Records from 125 million record table to insert into smaller table

    Oracle 11g
    I have a large table of 125 million records - t3_universe.  This table never gets updated or altered once loaded,  but holds data that we receive from a lead company.
    I need to select records from this large table that fit certain demographic criteria and insert those into a smaller table - T3_Leads -  that will be updated with regard to when the lead is mailed and for other relevant information.
    My question is what is the best (fastest) approach to select records from this 125 million record table to insert into the smaller table.  I have tried a variety of things - views, materialized views, direct insert into smaller table...I think I am probably missing other approaches.
    My current attempt has been to create a View using the query that selects the records as shown below.  Then use a second query that inserts into T3_Leads from this View V_Market.  This is very slow. Can I just use an Insert Into T3_Leads with this query - it did not seem to work with the WITH clause?    My Index on the large table is t3_universe_composite and includes zip_code, address_key, household_key. 
    CREATE VIEW V_Market  as
    WITH got_pairs    AS  
         SELECT /*+ INDEX_FFS(t3_universe t3_universe_composite) */  l.zip_code, l.zip_plus_4, l.p1_givenname, l.surname, l.address, l.city, l.state, l.household_key, l.hh_type as l_hh_type, l.address_key, l.narrowband_income, l.p1_ms, l.p1_gender, l.p1_exact_age, l.p1_personkey, e.hh_type as filler_data, 1.p1_seq_no, l.p2_seq_no 
         ,      ROW_NUMBER () OVER ( PARTITION BY  l.address_key 
                                      ORDER BY      l.hh_verification_date  DESC 
                      ) AS r_num   
         FROM   t3_universe  e   
         JOIN   t3_universe  l  ON   
                l.address_key  = e.address_key
                AND l.zip_code = e.zip_code
              AND   l.p1_gender != e.p1_gender
                 AND   l.household_key != e.household_key         
                 AND  l.hh_verification_date  >= e.hh_verification_date 
      SELECT  * 
      FROM  got_pairs
      where l_hh_type !=1 and l_hh_type !=2 and filler_data != 1 and filler_data != 2 and zip_code in (select * from M_mansfield_02048) and p1_exact_age BETWEEN 25 and 70 and narrowband_income >= '8' and r_num = 1
    Then
    INSERT INTO T3_leads(zip, zip4, firstname, lastname, address, city, state, household_key, hh_type, address_key, income, relationship_status, gender, age, person_key, filler_data, p1_seq_no, p2_seq_no)
    select zip_code, zip_plus_4, p1_givenname, surname, address, city, state, household_key, l_hh_type, address_key, narrowband_income, p1_ms, p1_gender, p1_exact_age, p1_personkey, filler_data, p1_seq_no, p2_seq_no
    from V_Market;

    I had no trouble creating the view exactly as you posted it.  However, be careful here:
    and zip_code in (select * from M_mansfield_02048)
    You should name the column explicitly rather than select *.  (do you really have separate tables for different zip codes?)
    About the performance, it's hard to tell because you haven't posted anything we can use, like explain plans or traces but simply encapsulating your query into a view is not likely to make it any faster.
    Depending on the size of the subset of rows you're selecting, the /*+ INDEX hint may be doing your more harm than good.

  • Performance problem with selecting records from BSEG and KONV

    Hi,
    I am having performance problem while  selecting records from BSEG and KONV table. As these two tables have large amount of data , they are taking lot of time . Can anyone help me in improving the performance . Thanks in advance .
    Regards,
    Prashant

    Hi,
    Some steps to improve performance
    SOME STEPS USED TO IMPROVE UR PERFORMANCE:
    1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
    2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
    3. Design your Query to Use as much index fields as possible from left to right in your WHERE statement
    4. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
    5. Avoid using nested SELECT statement SELECT within LOOPs.
    6. Avoid using INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE.
    7. Avoid using SELECT * and Select only the required fields from the table.
    8. Avoid nested loops when working with large internal tables.
    9. Use assign instead of into in LOOPs for table types with large work areas
    10. When in doubt call transaction SE30 and use the examples and check your code
    11. Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. This is a general thumb rule but typically if you are sure that the data in internal table is less than 200 entries you need not do SORT and use BINARY SEARCH since this is an overhead in performance.
    12. Use "CHECK" instead of IF/ENDIF whenever possible.
    13. Use "CASE" instead of IF/ENDIF whenever possible.
    14. Use "MOVE" with individual variable/field moves instead of "MOVE-
    CORRESPONDING" creates more coding but is more effcient.

  • JSF - Problem in Retrieving selected record from datatable

    I am new to JSF and in the process of developing a new web application using JSF.
    I have problem in retrieving the selected record from a datatable. I am using h:datatable tag and h:commandlink in a column for selecting a particular row on the datatable.
    I have populated the data to the datatable by binding a bean and its property.
    When I retrieve also I am binding to a bean in the action attribute of the h:commandlink tag in h:column of that datatable.But when I try to bind the bindign attribute of the h:datatable tag to the datatable instance in my Bean , my JSF File gets corrupted..
    How to implement this without any issue??plz help me regarding this.

    HI
    Try the below code
    DATA lo_nd_del TYPE REF TO if_wd_context_node.
    DATA lo_el_del TYPE REF TO if_wd_context_element.
    DATA ls_del TYPE wd_this->Element_del.
    DATA lo_nd_et_postab_1 TYPE REF TO if_wd_context_node.
    DATA lo_el_et_postab_1 TYPE REF TO if_wd_context_element.
    DATA ls_et_postab_1 TYPE wd_this->Element_del.
    DATA lt_et_postab_1 TYPE wd_this->Elements_del.
    DATA: wa_temp TYPE REF TO if_wd_context_element,
    lt_temp TYPE wdr_context_element_set.
    * navigate from <CONTEXT> to <ET_POSTAB_1> via lead selection
    lo_nd_et_postab_1 = wd_context->path_get_node( path = `ZSHP_EXTENDED_DUE_LI.CHANGING_3.ET_POSTAB_1` ).
    CALL METHOD lo_nd_et_postab_1->get_selected_elements
    RECEIVING
    set = lt_temp.
    * navigate from <CONTEXT> to <DEL> via lead selection
    lo_nd_et_postab_1 = wd_context->get_child_node( name = wd_this->wdctx_del ).
    LOOP AT lt_temp INTO wa_temp.
    CALL METHOD wa_temp->get_static_attributes
    IMPORTING
    static_attributes = ls_et_postab_1.
    ls_et_postab_1-vbeln = del. // adding new attribute value.
    APPEND ls_et_postab_1 TO lt_et_postab_1.
    CLEAR ls_et_postab_1.
    ENDLOOP.
    lo_nd_et_postab_1->bind_table( new_items = lt_et_postab_1 ).

  • Download only selected record from ALV

    Hi
      I want to download only selected records from ALV output with button.
    i hav to fix the button on ALV screen using &ZDL whenever user presses the button record should be downloaded.
    Pl with coding
    its very very urgent.

    Hi ,
    i dont have the exact code which suits to your requirement
    but declare the internal table
    like
    data: begin of itab occurs 0,
      check type c,
    fields
    end of itab.
    while filling the field catalog
    fieldcatalog-checkbox = 'X'
    for this check field.
    and display the grid
    now write this subroutine
    *&      Form  USER_COMMAND
          Called from within the ALV processes. Currently, '&IC1' is used
          to process the hotspot and display the document 'picked' by the
          user.
          PV_UCOMM    contains the sy-ucomm from ALV
          SELFIELD is a structure that contains all the data required to
                   process a user selection. The following is an example
                   of the SELFIELD structure and sample values:
    FORM USER_COMMAND USING PV_UCOMM LIKE SY-UCOMM
                            SELFIELD TYPE SLIS_SELFIELD.
      CASE PV_UCOMM.
        WHEN '&IC1'.
          loop at itab where check = 'X'.
    append all these records to another internal table itab1
         endloop.
    call function gui_download.
    pass the internal table itab1 in the tables statement
    and also you have to give the file path that may be static or dynamic
    if dynamic you have to call the function module
    f4_filename
    and get the filename and pass the same value to gui_download
    that will be download to the above said path
    endcase.
    end form.
    reward points if helpful,
    thanks & regards,
    venkatesh

  • Selecting record from cdpos

    Hi SAP team,
    How to select record from CDPOS when value_old field is initial. For currency field .
    Thanks & Rgds,
    Santhosh Kumar.
    Moderator message: please search for information and try yourself before asking.
    Edited by: Thomas Zloch on Mar 9, 2011 3:52 PM

    Since the problem is related to a custom IDoc, it is the process code of said IDoc where you will have to look. Depending on how the condition records are updated, this will be responsible for writing correct change documents.
    If the process code uses a standard BAPI, then change documents should be written correctly. Otherwise, the code should take care of writing the correct change documents after updating the condition records.
    Often it is possible to update a business object with calling a standard function module, but change documents will not always be written since that is done separately in the usual update process. For instance, you can update a delivery by using RV_DELIVERIES_UPDATE but that won't write change documents by itself at all. So take a look at the process code and investigate how the condition records are updated. Then you'll see the way the change documents are handled.

  • How to stop Mail from selecting addresses from the list of Previous Recipients?

    How to stop Mail from selecting addresses from the list of Previous Recipients?

    This is a related question.
    I deleted ALL my previous recipients and when I create a new e-mail it STILL is getting addresses that I don't want - they pop up and I don't know how to stop this!
    I switched from one ISP to another - I deleted the old e-mail account in MAIL - I DID use the same name on the account - is that why it keeps bringing up the old address? 
    ARGH!

  • Selecting records from DEFAULT range-list subpartition

    Is it possible to select records which belong to DEFAULT subpartition of a certain partition of a RANGE-LIST partitioned table, using subpartition pruning? Our task assumes creating partitions and subpartitions in a table dynamically before running ETL. But sometimes due to complexity of the path subpartition key goes from staging data to materialized views in data warehouse, we cannot predict all subpartition key values upfront. We can create DEFAULT subpartition for every partition though, and have Oracle place records which don't match any subpartition condition into that subpartition.
    But later we need to split DEFAULT subpartition so that all records will go into their dedicated subpartitions, and DEFAULT will be left empty - other layers of our application need all records to be stored in subpartition other than DEFAULT in order to be available. For that, we need to know which keys are stored in DEFAULT subpartition. And the question is - how can we effectively achieve that?
    The obvious "brute force" approach is to issue a query like:
    select distinct subpart_key from mytable partition (myrangepartition) where not subpart_key in (list of all subpartition key values for this partition)
    but it does not use partition pruning - I have checked execution plan. While it is possible to use only DEFAULT partition, this query will iterate through all subpartitions, which is huge performance impact. How can we instruct Oracle to use only DEFAULT subpartition?

    is the solution. I have overlooked this syntax - now my life is much easier.

  • Select record from database table

    how to select a record from data-base table for current month in module-pool, i.e if current month is august then records selected should between 1/08/10 to 31/08/10.
    And, i also want to select records for last month i.e if current month is august then records selected should be between 1/07/10 to 31/07/10.
    And one thing more, it should work for every scenario. Like for months are changing then it should work according to that.
    Example: If month changes to October then current month ll be October and last month ll become September.
    Plz help me out.
    Moderator message: you chose a better forum this time, but the question is still too basic to be asked here, please (re)search yourself first, these forums are not catering to beginners.
    locked by: Thomas Zloch on Aug 8, 2010 9:41 PM

    Hi Nishant,
    You can use the option <b>ORDER BY </b> in your SELECT clause.
    This is the SAP Documentation for <b>ORDER BY </b> option.
    <i>Variant 1</i>
    <b>...ORDER BY PRIMARY KEY</b>
    <b>Effect</b>
    Sorts the selected lines in ascending order by the primary key of the database table. This variant is only permitted for SELECT * ....
    <i>Notes</i>
    Since views do not have a primary key, specifying ORDER BY PRIMARY KEY only makes sense with database tables. If, however, you do specify ORDER BY PRIMARY KEY with a view, all fields of the view are sorted in ascending order.
    <i>Variant 2</i>
    <b>ORDER BY f1 ... fn</b>
    <i>Effect</i>
    Sorts the selected records in ascending order by the specified column references f1 ... fn. If a list is also specified in the SELECT clause, the column references f1, ..., fn must appear in this list.
    By supplementing the statement with DESCENDING, you can sort in descending order using any of the fields f1, ..., fn.
    The default sort sequence is ascending order, but you can make this explicit by adding the addition ASCENDING.
    Consider this code this will select the latest 10 records form DB table(Note can use <b>Variant 2</b> for DB tables also.
    REPORT zarun_1.
    DATA : it_mara TYPE STANDARD TABLE OF mara WITH HEADER LINE.
    START-OF-SELECTION.
      SELECT * FROM mara
                INTO TABLE it_mara
                <b>UP TO 10 ROWS                "No of rows you need(give 1 here)
               ORDER BY matnr DESCENDING.    "Specify the Key Fields here.</b>
      LOOP AT it_mara.
        WRITE : / it_mara-matnr,
                  it_mara-mtart.
      ENDLOOP.
    Regards,
    Arun Sambargi.
    Message was edited by: Arun Sambargi

  • Select records from MS Access tables using multiple conditions

    Hi,
    I am trying to build s select list of team names for a
    sporting club website. The select list should include teams if the
    currently logged in user is a coach, team manager, assistant coach,
    player or a parent of a player.
    When I have only one group of conditions in the where clause
    it works fine. But that only accounts for one of the above roles.
    As soon as I ad an OR and another set of criteria my CF7 server's
    swsoc.exe goes into an permanent loop (well, at least 10 minutes, I
    reboot after that :-)
    For example, this works fine ...
    <!--- select teams I coach, assistant coach, manage, am a
    parent of a player, or am a player --->
    <cfquery name="teams"
    Datasource="#Application.Datasource#">
    SELECT distinct teams.uid_team, team_name, uid_coach,
    uid_team_manager, uid_coordinator, team_asst
    from teams, player_agegroups, players
    where
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    players.uid_invoice_to=#session.userid#)
    Order by team_name
    </cfquery>
    But as soon as I add another condition cf7 goes into a
    loop...
    <!--- select teams I coach, assistant coach, manage, am a
    parent of a player, or am a player --->
    <cfquery name="teams"
    Datasource="#Application.Datasource#">
    SELECT distinct teams.uid_team, team_name, uid_coach,
    uid_team_manager, uid_coordinator, team_asst
    from teams, player_agegroups, players
    where
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    players.uid_invoice_to=#session.userid#) or
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    players.uid_user=#session.userid#) or
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    teams_uid_coach=#session.userid#) or
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    teams.team_asst=#session.userid#) or
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    teams.uid_team_manager=#session.userid#)
    Order by team_name
    </cfquery>
    Any combination hangs CF7, whether it be two, three or all
    conditions, and any combination of conditions..
    The teams table stores team name, coach, team manager,
    assistant coach and coordinator. Players table stores the player
    records, and the parent (uid_invoice_to), is part of the player
    record. player agegroups has the teams, with a record for each
    player in a team. The whole system is based around seasons, hence
    the #session.season# variable.
    What should happen is I get a very short list of teams. When
    I select a team from the select list I then go and grab all the
    player records from the player_agegroups table joined to the users
    table to get their names, date of birth etc...
    Can anyone see what I am doing wrong?
    thanks
    Tanya

    You might try to change your query using a SQL JOIN command,
    so you can link the appropriate tables independently from the WHERE
    selection criteria. You could use Access to create the query and
    then go to the SQL command view to get the correct synyax.

  • How to get the selected values from multiselected list

    Hi,
    I have a multiselect list displaying all the years from 2003 to 2008 (used dynamic LOV). The user can choose one or more years as per his needs, and then when user clicks on the link the selected values of the list are to be captured and a pop up page of a Discoveror report needs to be opened where these years get passed as a parameter. I tried several methods to capture the value, but either one or all are getting passed but not exactly what the user has chosen.
    This is how it looks:
    P2_FISCAL_YEAR is a multiselect list containing values from 2003,2004... 2008
    If user chooses 2004 and 2007
    then I want the url to capture these values and pass as parameters for my discoveror reports. as '&qp_fiscal_year=2004,2007'
    Any help is appreciated!
    Thanks in advance,
    Sapna.

    Hi,
    I have a multiselect list displaying all the years from 2003 to 2008 (used dynamic LOV). The user can choose one or more years as per his needs, and then when user clicks on the link the selected values of the list are to be captured and a pop up page of a Discoveror report needs to be opened where these years get passed as a parameter. I tried several methods to capture the value, but either one or all are getting passed but not exactly what the user has chosen.
    This is how it looks:
    P2_FISCAL_YEAR is a multiselect list containing values from 2003,2004... 2008
    If user chooses 2004 and 2007
    then I want the url to capture these values and pass as parameters for my discoveror reports. as '&qp_fiscal_year=2004,2007'
    Any help is appreciated!
    Thanks in advance,
    Sapna.

  • Selecting Records from one table where records don't exist in a linked table

    Post Author: RMC
    CA Forum: Crystal Reports
    Tables:
    Stock (Main Table)
    Transactions (Left Outer Join)
    Criteria:
    Select all items with no transactions between a selected date range.
    The items will exist in Main table but I want to select all items that haven't been in a transaction between a date range so I can identify no movement with stock items just sitting in the database doing nothing.
    Any suggestions??

    Post Author: yangster
    CA Forum: Crystal Reports
    Sorry for the delay.  Dam meetings all day yesterday.You are essentially looking for something that doesn't exist in the db so you need to look at it from a different approach.You definitely don't want to use a full outer join.  From what i can tell from your description above you are looking for stocks that are inactive/idle.So you need not look at data that doesn't exist but the last activity date.So you'd want something along the lines ofselect s.stock_name, s.stock_blah, max(t.transaction_date) Transaction_datefrom stocks sjoin transactions t on s.itemid = t.itemidwhere whatever restrictions you need to addgroup by s.stock_name, s.stock_blahthis will produce one record for each stock you have in the stock table showing you only the last date of activityput that in a command in crystalin the selection expert in crystal reports put in a simple criteriatransaction_date <= some datethis will only pull in records based on your date selection so if you say give me all records from dec 31, 2006  you will know all the records being pulled in are stocks that have been idle since dec 31, 2006 or earlierlet me know if this doesn't work

  • Can i select Records from two tables into an itab.

    Hi,
        Suppose that i have two tables spfli and sflight.
        Now i want the records from both the tables into a single internal table.
        If so please let me know how this can be done.
        itab should consist of all the columns in sflight and spfli.
    Regards,
    Sai

    Sai,
    Yes u can do it using JOINs.
    Use this link for ref
    http://www.sap-img.com/abap/inner-joins.htm
    INNER JOIN results are an intersection of the tables being joined where in only if both the tables havethe data the result is pused onto the result set.
    WHERE as in LEFT OUTR JOIN you can push the data of the LEF T table on the resultset even when the join condition is not met.
    The use is that you wantto have all the data that is there in left table and also the right table if the join condition is a success then right table fileds will have data else they are initial.
    OUTJOIN's are used in MAINTENANNCE VIEWS, HELP VIEWS .
    INNER JOINS are used DATABSE VIEWS.
    Inner Join:-
    SELECT pcarrid pconnid ffldate bbookid
    INTO CORRESPONDING FIELDS OF TABLE itab
    FROM ( ( spfli AS p
    INNER JOIN sflight AS f ON pcarrid = fcarrid AND
    pconnid = fconnid )
    INNER JOIN sbook AS b ON bcarrid = fcarrid AND
    bconnid = fconnid AND
    bfldate = ffldate )
    WHERE p~cityfrom = 'FRANKFURT' AND
    p~cityto = 'NEW YORK' AND
    fseatsmax > fseatsocc.
    Left Outer Join
    SELECT scarrid scarrname p~connid
    INTO CORRESPONDING FIELDS OF TABLE itab
    FROM scarr AS s
    LEFT OUTER JOIN spfli AS p ON scarrid = pcarrid AND
    p~cityfrom = 'FRANKFURT'.
    Reward if helpful,
    Karthik

Maybe you are looking for

  • How much RAM & CPU should I allocate for Windows 7 Ultimate?

    I am in the process of setting up my new 27" iMac i7. I'm brand new to Apple computers so this is a learning curve for me! I have installed Parallels Desktop 5 so I can run Windows 7 side by side with Snow Leopard. Now I am trying to install Windows

  • Can I print wireless from iphone

    Can I print wirelessly from iphone 4 to my wireless home printer?  Thanks!

  • How do I open docuements as landscape within the browser?

    Is there an Open Parameter that will rotate the document, so it will be landscape, not portrait?  Or just a way to simulate right clicking + Rotate Clockwise when it loads with your plug-in on a web page? I was given over 1400 sideways documents to w

  • Compatibility Shared Services with SQL2008 SP3

    Hello: We have SharedServices 9.3.1 installed and running, using a SQL Server2008 SP1 Database. Is it also compatible with SP3? Can we upgrade with no problems? Thanks! Jorge

  • Computer won't automatically sleep

    For the past 8 years none of my computers will sleep. OSX Panther and on up through the upgrades on TiBooks MacBooks, MacBook Pro, iMacs. I can't remember what software or upgrade it started with though. And I had a heck of a time removing Norton and