How to reatin record selection in a master table

Hi,
I have table A with single selection item and detail table B below, both VO based. Once single selection is clicked the detail table shows corresponding result record set. I need to retain the selection of the record in table A once query on table B. is there was to do that?
Thank you
Anatoliy

Hi,
Refer below links:
http://oracle.anilpassi.com/master-detail-screen-in-oa-framework-part-i.html
https://kr.forums.oracle.com/forums/thread.jspa?threadID=2364464
--Sushant                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to insert the select query result into table?

    How to insert the select query result into table?
    SELECT  top 20 creation_time  
            ,last_execution_time 
            ,total_physical_reads
            ,total_logical_reads  
            ,total_logical_writes
            , execution_count 
            , total_worker_time
            , total_elapsed_time 
            , total_elapsed_time / execution_count avg_elapsed_time
            ,SUBSTRING(st.text, (qs.statement_start_offset/2) + 1,
             ((CASE statement_end_offset 
              WHEN -1 THEN DATALENGTH(st.text)
              ELSE qs.statement_end_offset END 
                - qs.statement_start_offset)/2) + 1) AS statement_text
    FROM sys.dm_exec_query_stats AS qs
    CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st
    ORDER BY total_elapsed_time / execution_count DESC;
    Thanks,
    Tirumala

    1. SELECT INTO
    Below method will create table when data is inserted from one table to another table. Its useful when you need exactly same datatype as source table.
    Use AdventureWorks2008R2;
    Go
    ---Insert data using SELECT INTO
    SELECT AddressLine1, City
    INTO BothellAddresses
    FROM Person.Address
    where City = 'Bothell';
    GO
    ---VERIFY DATA
    Select AddressLine1, City
    FROM BothellAddresses
    ---DROP TABLE
    DROP TABLE BothellAddresses
    GO
    2. INSERT INTO SELECT
    Below method will need table to be created prior to inserting data. Its really useful when table is already created and you want insert data from
    another table.
    Use AdventureWorks2008R2;
    Go
    ---Create Table
    CREATE TABLE BothellAddresses (AddressLine1 NVARCHAR(60), City NVARCHAR(30))
    ---Insert into above table using SELECT
    INSERT INTO BothellAddresses(AddressLine1, City)
    SELECT AddressLine1, City
    FROM Person.Address
    where City = 'Bothell';
    ---VERIFY DATA
    Select AddressLine1, City
    FROM BothellAddresses
    ---DROP TABLE
    DROP TABLE BothellAddresses
    GO
    Regards,
    Vishal Patel
    Blog: http://vspatel.co.uk
    Site: http://lehrity.com

  • How to display record selection settings in the result

    Hi,
    CR 2008 and 2013 are being used, but this is a rather general question.
    We are generating different schedules using one source file. Depending on the filter setting on the data scope, say CURRRENTDATE or last month, daily or monthly reports are sent out.
    The problem is, when there is no data included in the report, we would like to put a message in the report saying "There is no data found in the period xyz". But so far we haven't figured out how to retrieve the different filter settings in the schedules.
    Is there a way to do this? I do hope we don't have to create different .rpt files just for different schedules.
    Any suggestions and opinions are appreciated.

    While, the reports can be run manually by the user with a prompt asking the range or scheduled on the server and sent out automatically without interaction.
    For the latter case, the prompt for date range was written as optional. And the record selection looks like this:
    IF (HASVALUE({?dFrom}) AND  HASVALUE({?dTo}))
    THEN
    {a_table.dDate}>={?dFrom}) AND {a_table.dDate}<={?dTo}
    With the user input, everything is ok. But while scheduling a report on the server, we set the prompt to EMPTY and control the range by using a filter. For a daily report, the record selection changes to
    {a_table.dDate}= CURRENTDATE-2
    Here comes the problem. Without being able to read this value into the report, we don't know how to show period xyz in an empty report, because a daily report could also query CURRENTDATE or CURRENTDATE-10, depending on the schedule. The same applies to monthly reports. People can schedule a report to run once a month, but still query just CURRENTDATE by mistake.
    So the most reliable information is to read out what is set in the filter...

  • How to insert past record after updating the master table in history table through store PROC

    Master Table
    Party Status
    A Active
    B Inactive
    C Active
    D Inactive
    Duplicate Table
    Party Status
    A Active
    B Active
    C Active
    D Inactive
    Updated Master Table
    Party Status
    A Active
    B Active
    C Active
    D Inactive
    Party History Table
    B Inactive
    I have two table one master and another duplicate I need to update master table based on duplicate table insert the record which updated into Party history table as shown above. need help to write store proc.

    Check MERGE syntax in BOL (example D). There should be a sample with output, e.g.
    insert into PartyHistory (Party, [Status])
    select Party, [Status] FROM
    (MERGE Master M using Duplicate D on M.[Party]=D.[Party]AND M.[Status]<>D.[Status]
    WHEN MATCHED THEN UPDATE
    SET [Status] = D.[Status]
    OUTPUT Deleted.[Party], Deleted.[Status], $Action) AS Changes (Party, [Status], Action) WHERE Action = 'UPDATE'
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • How to upload records  in two different interface tables through WebADI.

    We have created custom integrator with two different interfaces to insert records in AP_INVOICES_INTERFACES and AP_INVOICE_LINES_INTERFACE. Also defined the custom layout in which we mention the header and lines column info to be displayed in the spreadsheet. When I tried to create document to upload the records into the interface tables, could find two different interface for header and lines , when we select the header and upload records into the AP_INVOICES_INTERFACES table it was successfull. But couldn't upload records inserted in Lines interfaces tables. How do we upload records in both the table do we have constraint with Web ADI can insert records to only one interface tables. Any recommendation highly appreciated.

    Raghu,
    Thanks for the reply,
    I have a concern, But if you are connecting a another database you have to create one more subreport and each time am creating connections across databases we have to create subreport and go for the design to show the record. Is it any way to have a common field or union records approach in crystal report 2008.
    For Example :
    Approach 1 :
    Emp name           Emp salary      (Common Header)
    Variable Field1    Variable field2   ( Iterations to be done here for records)
    Variable field 1 contains ---> emptbl(employee name), b.emptbl(employee name) (A database, b database, c database or any .db)
    Variable field2  contains --->  emptbl (salary info between databases)
    Approach 2:
    getting all the records and union all the records 
    Thanks
    Murali Sri

  • How to get the selected rows in a table

    Hi,
    How to get the ids of all the selected rows. On Page load a query is executed that shows the data in a table with a checkbox in the first column to select the rows and delete. Now if a user select multiple rows how do I get the ids of selected rows in the backend code.
    Thanks

    Please search the forum before posting questions.
    refer following thread for table selection.
    Re: Record selection with MessageCheckBox and print the selected record.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                           

  • How to freeze the selection column in the table control of the module pool.

    hi ,
    in my module pool there is a row selection field  <b>w/selcolumn</b> of the table control called as mark.
    how to freeze the selection column where there is no record in the table control row.
    or in other words where wa is initial.
    thanks
    ekta

    Hi all,
    in the PBO of the screen the following code is written.
    say the selection column is MARK and is declared in the data as well.
    thanks
    ekta
    *************************C O D E **************************************************
    MODULE disp_tabctrl1 OUTPUT.
      IF flag_c = 1.
        READ TABLE it_create_data INTO wa_material_data
             INDEX tab_ctrl1-current_line.
      ELSE.
        READ TABLE it_material_data INTO wa_material_data
             INDEX tab_ctrl1-current_line.
        IF sy-subrc = 0.
          IF ok_code_0101 = '&SEL1'.
            mark = 'X'.
          ELSEIF ok_code_0101 = '&DSEL'.
            mark = ' '.
          ENDIF.
        ELSE.
          LOOP AT SCREEN.
            IF screen-name = 'MARK'.
              screen-input = 0.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
      index_t = tab_ctrl1-top_line.
      index_d = tab_ctrl1-top_line + n.
    ENDMODULE.                 " DISP_TABCTRL1  OUTPUT

  • Modeling: how to place Material Grp in Material Master TABLE instead of DIM

    Hi,
    I just completed a review of the "...Modeling with BI" document and I will appreciate some clarification on the following:
    Some key points leading to question:
    --"..In order to cover all requirements, master tables in a BI Data model are NOT linked directly to cube .."
    e.g. While Material Number is in the Material Dimension; Material Type and Material Group are outside the Star Schema (page 14) i.e. in the Material Master, Material Text, Material Hierarchy TABLES.
    --".. translation tables called SID tables are used in the BI data model to link the master tables of the BI data model to cubes" (page 16)
    --So, the discussion goes on to point to the different LOCATIONS that a dependent attribute (which are not in 1:N relationships) of a characteristic such as Material Group may be located:
    in the
    i) Material Dimension table or
    ii) Material Master table or
    iii) Material Hierarchy table or
    iv) combination of i/ii/iii
    My question:
    When building a cube, I know how to add Material Group to the same dimension as in case of i.
    How do I add Material Group in the cube, in such as way that it is ii?
    If I created a separated InfoObject, Material Group, it will not meet ii, since it will not be part of the Cube in question.
    Can you help me with how to make the LOCATION for Material Group as ii and iii in this example?
    i.e. to make Material Group as part of the model but not added to the Material Dimention table but to "Material Master table"
    i.e. I am trying to get this line well:
    --".. translation tables called SID tables are used in the BI data model to link the master tables of the BI data model to cubes"
    Thanks

    Hi Amanda.........
    I am not getting ur question properly...........but I will try to explain u .......
    translation tables called SID tables are used in the BI data model to link the master tables of the BI data model to cubes.......
    Do u know.........what is Extended star schema.............it is a purely that concept..........
    Look.......Infocube will never store Master data...........Master data will be stored in Infoobject...............
    Now look...........if u make a Infoobject Master data enable.........then it will be connected to  Four Master data table.......
    Attribute Table
    Text Table
    SID table
    Hierarchy table.........
    Different Master tables are........
    /BIC/M -- View of Master data Tables
    /BIC/P -- Master data Table, Time Independent attributes
    /BIC/Q -- Master data Table, Time Dependent attributes
    /BIC/X -- SID Table, Time Independent
    /BIC/Y -- SID Tabel, Time Dependent
    /BIC/T -- Text Table
    /BIC/H -- Heirarchy Table
    /BIC/K -- Heirarchy SID Table
    When u r creating the Infoobject........in the Masterdata/text tab...........if u check the box With Master data.........the characteristic may have attributes........... In this case the system generates a P table for this characteristic.............. This table contains the key of the characteristic and any attributes that might exist.........
    Again if u check the With Text...........then it will hav text table..............
    For Hierarchy in the Hierarchy tab page..u hav to select with hierarchy.................
    Now while activating the Master data SID gets generated..........this is stored in SID table.........SID table contains the Key field of the Attribute table and SID............suppose material...........then SID table will contain Material number and SID value........
    Now the DIM table of an infocube contains..........SID and DIM.............so DIM tables r connected to the Master data table with this SID.......Again in turn SID tables are conneected to the Master data table.........
    So cube will access this Master data table with the help of SID..........ie.......ID tables are used in the BI data model to link the master tables of the BI data model to cubes
    Check this.........
    http://sapbwneelam.blogspot.com/2007/10/extended-star-schema.html
    Regards,
    Debjani......

  • Selection in the master table is not getting reflected in the child table

    <p> I have a 4 level master detail relationship.I have a bounded taskflow where I have a master in the first view.The child (The other two levels as a tree) in the second view.I move to second view when i click the command link(Each row has a command link) of the master table (present in the first view).</p>
    <p>At the very first time when i try to insert a row in the child it's successful .I am able to see the same in the second view (The corresponding child of the master row which i have clicked).The 2 view is not refreshed i have panel strech layout in the 2 view which i am refreshing(PPR) on inserting the row. The master table is not refreshed as it is in the 1 view.I am not manipulating the master table but it was being set to the first row the second time .Added to that the 2 view doesn't have parent table .
    </p>
    Thanks,
    Raj.

    Hi Frank,
    I am using jdev 11.1.1.6 and integrated wls.
    I have a single taskflow.I have a 4 level master detail.The vo's are connected through a view link . I have dropped the first level as a table . On selecting a row the corresponding children are displayed.The children are displayed as a tree. I have a tree context menu where i have inserted a row using popup . When the user clicks on the ok dialog i am commiting the data and refreshing the tree.
    Now the problem is when i first create the row it's working properly . After when i try to create another row this time the currency of the first level is reset to the first row.
    As suggested by you i have tried disabling the commit opertion . But the issue still occurs.
    Thanks,
    Raj
    Edited by: RajaSekharReddy.M on Feb 26, 2013 6:03 PM

  • How to capture a selected row in a table control in screen

    Hello,
        I have a table in a screen and hv data in it also from a table.Now i want if a user selects a row n clicks a display button , i should display the same fields in empty text fields created outside the table on the same screen.
    Rite now i m lookin for single selection but any help on multiple selection is also welcomed.
    I have given a line-selection element name as 'LSELECT1'  to the table in screen painter n have declared a variable also with the same name of type C(1) in my abap prog.But dont know wat to write in PAI now to caputure the selected row.
    THANKS

    Hi,
    Use ALV to display your table records from FM 'REUSE_ALV_GRID_DISPLAY'.
    In your internal table add a field with char1. This will show you the selected records by 'X' or ' '. Use this field in your layout like g_layout-box_fieldname = 'CHK'.
    Here i used CHK TYPE CHAR1 added to internal table to display. Now ur ALV will be showing u a column to select records. U can select multiple records also. Evry selected record will reflect into internal table by modifying value of CHK as 'X'. Add button to ALV by creating PF-STATUS and  add code its behavior when executed.
    DATA: BEGIN OF ls_ekko,
          ebeln TYPE ekko-ebeln, " this is my internal table showed in alv
          bukrs TYPE ekko-bukrs,
          bstyp TYPE ekko-bstyp,
          bsart TYPE ekko-bsart,
          lifnr TYPE ekko-lifnr,
          ekorg TYPE ekko-ekorg,
          ekgrp TYPE ekko-ekgrp,
          waers TYPE ekko-waers,
          chk(1)   TYPE c, " check field
          END OF ls_ekko.
    DATA it_ekko LIKE TABLE OF ls_ekko.
    DATA : gt_fcat    TYPE slis_t_fieldcat_alv WITH HEADER LINE,
           g_layout   TYPE slis_layout_alv,
           gt_fcat1    TYPE slis_t_fieldcat_alv WITH HEADER LINE,
           g_layout1   TYPE slis_layout_alv.
      g_layout-colwidth_optimize = 'X'.
      g_layout-box_fieldname = 'CHK'. " adding check field to alv
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
       i_callback_program                = sy-repid
       i_callback_pf_status_set          = 'PF_STATUS_ALV'
       i_callback_user_command           = 'USER_COMMAND_ALV'
      IT_EXCLUDING                      =
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
          is_layout          = g_layout
          it_fieldcat        = gt_fcat[]
          i_default          = 'X'
          i_save             = 'A'
        TABLES
          t_outtab           = it_ekko
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
    *&      Form  PF_STATUS_ALV
        Subroutine for PF status
         -->RT_EXTAB   text
    FORM pf_status_alv USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'SELOBJ' EXCLUDING rt_extab.
    ENDFORM.                    "PF_STATUS_ALV
    Hope this help

  • How do I pull information from a master table to another table?

    This may be quite simple, but I'm missing something.  I want to pull information from my master table into a secondary table.  In the Master Table in Column A, I have a list of teams ("Team 1" through "Team 12"), then in Columns B through D I have information for each assignment given to each team.  I want to have a secondary table for each team that lists all of their assignments.  So, this is what I want:   if Column A says 'Team 1', then I want the secondary table to have the info from Columns B through D.
    Again, I'm sure it's simple, but I just can't figure it out.
    Thanks for any help.
    Mark

    Hi Mark,
    1)  But does this work if in the Master Table (which will be over 300 rows long) each team will show up 10-15 times over the course of the 300 rows randomly (hence the need to have sub-tables for each team...so it's easier for them to see what their tasks are).
    Your fellow Numbers enthusiasts in this forum will need more information to help you with that. You are on the right track though with the idea of many tables. Therein lies the power of Numbers.
    2)  I'm a bit confused by the formula.  With the "$A2" do I select the first column in the Master Table?  And can you break down the second part of the formula?  The "$A$2:$D$4,2,0"  Why would you have A2 and D4 in the same formula?  They are not in the same row.  And what's the 2,0 at the end?
    Breaking this question down:
    With the "$A2" do I select the first column in the Master Table? 
    No. The $ keeps the reference to Column A absolute (it won't change to B then C as you Fill Right in the Team Task Table.
    And can you break down the second part of the formula?  The "$A$2:$D$4,2,0"  Why would you have A2 and D4 in the same formula?  They are not in the same row.
    $A$2:$D$4 is the range of cells (a rectangle) where VLOOKUP will search (in my example) but not in your 300 row table!
    And what's the 2,0 at the end?
    The syntax of VLOOKUP is VLOOKUP(search-for, columns-range, return-column, close-match)
    The 2,0 at the end means "return column" is 2 (the second column of the range) and 0 means "Exact Match" - it won't find a close match. After Fill Right you will need to edit the formula in each Column to change "return column" to 3, then 4, then ...
    With a table selected, click on the Function Button in the Toolbar and choose Function Browser. I find that much more useful than the Help Menu. However (there is always a however in life) the Help Menu will show Numbers User Guide, and Formulas and Functions Help. Download them and read at your leisure. The first four chapters of the User Guide are well worth a read. Use other chapters as a reference when you need them.
    Regards,
    Ian.

  • How to get Record Count Of a Database Tables in DBCNT?

    HI ALL,
    I checked  these threads...
    Select Count
    SY-SUBRC
    my question is ..
    i uploaded data to table.. 39 records..
    but when i debug the reprot sy-dcnt value showing 100 times...?
    100 times execution going in select and endselect statement..
    can any body explain...it?

    Hi,
    see this code
    data:itab like mara occurs 0 with header line.
    select * from mara into table itab UP TO 20 rows where matnr like 'C%'.
      write:/ sy-dbcnt.
      LOOP AT itab.
      write:/ sy-tabix.
      ENDLOOP.
    rgds,
    bharat.

  • How to save the  selected rows from Advance table into database

    Hi
    I have requirement like..
    In custom page , Manager Search the Candidates and selects the candidate ROWS from advance table.
    The reqt is how to save the selected multiple rows into the database.

    hi Reetesh,
    In Custom page
    Supoose the Recruiter Search is for Position Finance Mangager , it retrieves 100 rows , out of which Recruiter select 10 rows .
    So in Such scenario how to save this 10 rows against Recruiter
    , i mean , Is i need to create custom table, to save Recruiter , these selected 10 rows.
    I hope u understand my question

  • How to Read records from structure to internal table

    HI,
    Can any body know how to read the records from structure to internal table at runtime.
    please give me sample program if possible.
    thanks in advance
    KP

    if your internal table is having the same structure as the structure you are reading the values from then you can directly assign like..
    internatable table work area or header line = structure.
    or else if they are different assign field by field like
    internal table-field1 = structure-field1.
    internal table-field2 = structure-field2.
    award points if it helps.

  • How to move the selected rows from a  table control in dialog programming

    hiiiiiiii Every1
    I have to update some fields for a slected row in table control on click of a button and save it in database.
    Regards
    Sachin Dhingra

    see below example, I have added INSERT option after DELETE option, you can use same table or you can use differnt table by populating into that table and insert into the db table. If you want to use same internal table then use below code
    LOOP AT itab INTO demo_conn WHERE mark = 'X'.
    insert into table from itab.
    ENDLOOP.
    REPORT demo_dynpro_tabcont_loop_at.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA cols LIKE LINE OF flights-cols.
    DATA: ok_code TYPE sy-ucomm,
    save_ok TYPE sy-ucomm.
    DATA: itab TYPE TABLE OF demo_conn.
    TABLES demo_conn.
    SELECT * FROM spfli INTO TABLE itab.
    LOOP AT flights-cols INTO cols WHERE index GT 2.
    cols-screen-input = '0'.
    MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE cancel INPUT.
    LEAVE PROGRAM.
    ENDMODULE.
    MODULE read_table_control INPUT.
    MODIFY itab FROM demo_conn INDEX flights-current_line.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
    save_ok = ok_code.
    CLEAR ok_code.
    CASE save_ok.
    WHEN 'TOGGLE'.
    LOOP AT flights-cols INTO cols WHERE index GT 2.
    IF cols-screen-input = '0'.
    cols-screen-input = '1'.
    ELSEIF cols-screen-input = '1'.
    cols-screen-input = '0'.
    ENDIF.
    MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
    WHEN 'SORT_UP'.
    READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
    IF sy-subrc = 0.
    SORT itab STABLE BY (cols-screen-name+10) ASCENDING.
    cols-selected = ' '.
    MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDIF.
    WHEN 'SORT_DOWN'.
    READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
    IF sy-subrc = 0.
    SORT itab STABLE BY (cols-screen-name+10) DESCENDING.
    cols-selected = ' '.
    MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDIF.
    WHEN 'DELETE'.
    READ TABLE flights-cols INTO cols WITH KEY screen-input = '1'.
    IF sy-subrc = 0.
    LOOP AT itab INTO demo_conn WHERE mark = 'X'.
    DELETE itab.
    ENDLOOP.
    ENDIF.
    WHEN 'INSERT'.
    READ TABLE flights-cols INTO cols WITH KEY screen-input = '1'.
    IF sy-subrc = 0.
    LOOP AT itab INTO demo_conn WHERE mark = 'X'.
    itab1 = itab.
    modify itab1.
    ENDLOOP.
    ENDIF.
    if not itab1 is initial.
    INSERT dbtab FROM TABLE itab1.
    endif.
    ENDCASE.
    ENDMODULE.

Maybe you are looking for

  • How to allocate external process cost on the units of Production order

    Hi Gurus, I am facing a cost allocation issue. The scenario is a make-to-stock scenario in discrete manufacturing industry. I am using production order (PP01) and confirming the material issued to production and operations manually. There is an elect

  • Design view not showing actual layout

    I have a test page where I have a navigation div element created and it floats to the left. When I preview the page in IE, this navigation div element shows up as it should on the left part of the page but in the Design view of Dreamweaver CS3, the n

  • Finding "Use previous headers and footers"

    Working in Word Processing, and I cannot find "Use previous headers and footers" (I need to uncheck it.)

  • Rebuild a Photos Library?

    Hello everyone, I'm running Photos 1.0 on OS X 10.10.3, and I'm wondering if there's a way to rebuild a Photos library? I used to be able to do this in Aperture ... Mike

  • What is the WPS button, and where do I find it??????

    A guest set up their computer and printer to mine today as a guest.   My wireless printer now will not work for me.    In trying to reinstall the printer, I came across the message,... press and hold the WPS button for 5 seconds......I cannot find th