DYNAMIC CHANGE OF TABLE CONTENTS IN WEBDYNPRO VIEW

Hi,
  I have a requirement to display a table contents, and there are two buttons, When i select some records and clk on a button i need to delete these records in the database table as well as in webdynpro view.
I am able to delete the records in database but the contents of table in view of webdynpro remains unchanged. Can anyone tell me how to delete the contents in the view also??
Regards
Naveen

Hi Naveen,
You need to Refresh the data you are binding to the table to make the latest data
visible on the screen.
On action of the button you are deleting entries from the database. After this
Fetch data again from the database and bind to the node of the table.
Hope this solves your problem..
Regards,
Ismail.

Similar Messages

  • How to dynamically change the table name inside a view

    Hi All,
    create table t_auto_feeds
    id number,
    table_name vachar2(100));
    insert into t_auto_feeds values(1,'T_FEED_POSITIONS');
    insert into t_auto_feeds values(2,'T_KAP_MTM');
    assume there are 100 records on id=1 in T_FEED_POSITIONS and 100 records of id=2 in T_KAP_MTM (id 1 is present only in t_feed_positions & id 2 is present only in t_kap_mtm)
    i need to create a view such that it needs to give the count of records based on the id
    create or replace view aa_view as
    select count(*), id from t_feed_position group by id
    union
    select count(*), id from t_kap_mtm group by id;
    I am getting a proper result when i query the view like select * from aa_view where id=1 but will the other union query seems to be a overhead?. I am having 10 such tables configured for different id in t_auto_feeds.so do i need to put 10 unions or is there a better way to handle this stuff.
    I know i can use a PLSQL block and dynamically build view structure, the problem is the view itself is configured in a table , so i cant write a proc for this.. can this aa_view be modified such that it queries only the table(using the t_auto_feeds ) which matches the id rather than the entire list.
    Kindly help me in this regard and let me know in case u need any further information from my side.

    >
    so do i need to put 10 unions or is there a better way to handle this stuff.
    >
    Yes - you need 10 unions
    Yes - there is a better way so that only one of the 10 queries does anything.
    You can use SYS_CONTEXT to control the query selection.
    Here is an example of using SYS_CONTEXT. Try this code in the SCOTT schema.
    create or replace context VIEW_CTX using SET_VIEW_FLAG;
    create or replace procedure SET_VIEW_FLAG ( p_table_name in varchar2 default 'EMP')
      as
      begin
          dbms_session.set_context( 'VIEW_CTX', 'TABLE_NAME', upper(p_table_name));
      end;
    select * from emp where 'EMP' = sys_context( 'VIEW_CTX', 'TABLE_NAME' );
    select * from emp1 where 'EMP1' = sys_context( 'VIEW_CTX', 'TABLE_NAME' );
    select * from emp2 where 'EMP2' =  sys_context( 'VIEW_CTX', 'TABLE_NAME' )
    exec set_view_flag( p_table_name => 'EMP' );
    exec set_view_flag( p_table_name => 'EMP1' );
    exec set_view_flag( p_table_name => 'EMP2');
    SELECT sys_context( 'VIEW_CTX', 'TABLE_NAME' ) FROM DUAL
    CREATE VIEW THREE_TABLE_EMP_VIEW AS
    select * from emp where 'EMP' = sys_context( 'VIEW_CTX', 'TABLE_NAME' )
    union all
    select * from emp1 where 'EMP1' = sys_context( 'VIEW_CTX', 'TABLE_NAME' )
    union all
    select * from emp2 where 'EMP2' =  sys_context( 'VIEW_CTX', 'TABLE_NAME' )
    SELECT * FROM THREE_TABLE_EMP_VIEWNote that you set the context for the table you want. This doesn't have to be a table name it could just be flag value
    -- use the emp table
    exec set_view_flag( p_table_name => 'EMP' );
    -- ue the emp1 table
    exec set_view_flag( p_table_name => 'EMP1' );
    -- use the emp2 table
    exec set_view_flag( p_table_name => 'EMP2');

  • Dynamically changing internal table in 'gui_download'

    Hi Experts,
                     i have to download 4 internal tables, each with different structures, to the presentation server using 'gui_download', based on which radio-button is selected in the selection screen. I am hoping to use a single 'form' and 4 'perform' calls. how can I dynamically change the tables in the 'gui_download' function modules.
    plz help.....................

    Hi ,
    Build the field catalog dynamically based on the internal table structure based on the radio button selected.Use the dynamic internal table generated from the filedcatalog and use in GUI_DOWNLOAD.
    See the below code:
    *& Report  ZRAJESH02
    REPORT  zrajesh02.
    Dynamic internal table
    TYPE-POOLS: slis.
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                  <dyn_wa>.
    DATA: alv_fldcat TYPE slis_t_fieldcat_alv,
          it_fldcat TYPE lvc_t_fcat.
    DATA: lv_monate TYPE f,
          lv_months TYPE i,
          lv_date TYPE sy-datum,
          p_check1 type n value '1'.
    lv_date = sy-datum + 360.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_check TYPE c.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      CALL FUNCTION 'MONTHS_BETWEEN_TWO_DATES'
        EXPORTING
          i_datum_bis   = lv_date
          i_datum_von   = sy-datum
          i_kz_incl_bis = ' '
        IMPORTING
          e_monate      = lv_monate.
      lv_months = lv_monate.
      PERFORM f_fcat USING 'AUFNR' 'CHAR' '12'.
      PERFORM f_fcat USING 'POSNR' 'CHAR' '06'.
      while p_check1 LE p_check.
      PERFORM f_fcat USING p_check1 'CHAR' '1'.
      p_check1 = p_check1 + 1.
      endwhile.
      PERFORM build_dyn_itab.
      LOOP AT <dyn_table> INTO <dyn_wa>.
        WRITE:/ <dyn_wa>.
      ENDLOOP.
    FORM f_fcat USING fieldname dattyp length.
      DATA:wa_it_fldcat TYPE lvc_s_fcat.
      CLEAR wa_it_fldcat.
      wa_it_fldcat-fieldname = fieldname.
      wa_it_fldcat-datatype = dattyp.
      wa_it_fldcat-intlen = length.
      APPEND wa_it_fldcat TO it_fldcat .
    ENDFORM.                    "f_fcat
    *&      Form  build_dyn_itab
          text
    FORM build_dyn_itab.
      DATA: new_table TYPE REF TO data,
      new_line TYPE REF TO data.
    wa_it_fldcat TYPE lvc_s_fcat.
    CLEAR wa_it_fldcat.
    wa_it_fldcat-fieldname = 'AUFNR'.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 12.
    APPEND wa_it_fldcat TO it_fldcat .
    CLEAR wa_it_fldcat.
    wa_it_fldcat-fieldname = 'POSNR'.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 6.
    APPEND wa_it_fldcat TO it_fldcat .
    Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fldcat
        IMPORTING
          ep_table        = new_table.
      ASSIGN new_table->* TO <dyn_table>.
    Create dynamic work area and assign to FS
      CREATE DATA new_line LIKE LINE OF <dyn_table>.
      ASSIGN new_line->* TO <dyn_wa>.
    ENDFORM.                    "build_dyn_itab
    Thanks,
    Rajesh.

  • Dynamic Changes in Table control

    Hi
    is that possible to change the table control dynamically

    Hi Rob
    my requirement is data upload from Excel to table control is over now
    some of my TL said that if i add more fields and records in that Excel than uplod the data to table control

  • Dynamically change the table fields in smart form

    hi all,
    can any one suggest me the way to change the height and the width of a table dynamically in smart form.
    thanx
    Manish

    Hello,
    That is not possible. You cannot alter the height and width of the smartform. Mainwindows height adjust automatically according to the data.
    Thanks,
    Jayant

  • Dynamic change of table

    Hi all
    i am wrking on standard script.....in ecc6.0
    i have to print th invoice no. ,date, etc....in table format....
    the driver program is RFFOUS_C....
    Now the requrement is lil complicated.....
    if the no. of invoice line items is < 40 then one table has to print....with font size 10
    if it is > 40 then tables should split into two tables in the same page and size of table also reduce ....font of line items also reduce to 5....
    i have changed F110_chck_print script........
    need ur help.....
    thnx
    Rohit

    thnx
    we have convinced the client that it is very trublesome to create & maintance tht table..
    so client has changed their mind..
    thnx for not answering..

  • Dynamically changing af:table range navigation

    Hi Steve,
    I have a requirement of changing range navigation on another variable "items per page" on the table.
    1. User can select any number of items to be displayed at a time on page from a drop down with values 10,20,30 etc.
    2. I have a valueChangeEvent Bound to this drop down to set the table rows.
    public void itemsPerPageValueChange(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    if (valueChangeEvent.getNewValue() != null) {
    Integer items = (Integer)valueChangeEvent.getNewValue();
    getTable1().setRows(items);
    This happens fine on the first page i.e. On page display. But say if there are more records then the selected value
    in the dropdown, a table range navigation is displayed as expected. Now if i go to next set of records by "pressing next",
    and select a larger value from "items per page", the list is not displayed as per the selected value. i.e. if there are 16 records
    and i select 20, the display is still displaying the last six records. Only if i click "previous 10" on the table, do i get
    20 records and the range navigation for the table disappears.
    How can i control this?
    1.I mean to always display number of records as selected by the user irrespective of which range of
    records he is seeing.
    2.To display correct value in "previous" and "next" navigation controls depending on value selected by user from dropdown
    Thanks
    sameer

    Hi Steve,
    I have a requirement of changing range navigation on another variable "items per page" on the table.
    1. User can select any number of items to be displayed at a time on page from a drop down with values 10,20,30 etc.
    2. I have a valueChangeEvent Bound to this drop down to set the table rows.
    public void itemsPerPageValueChange(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    if (valueChangeEvent.getNewValue() != null) {
    Integer items = (Integer)valueChangeEvent.getNewValue();
    getTable1().setRows(items);
    This happens fine on the first page i.e. On page display. But say if there are more records then the selected value
    in the dropdown, a table range navigation is displayed as expected. Now if i go to next set of records by "pressing next",
    and select a larger value from "items per page", the list is not displayed as per the selected value. i.e. if there are 16 records
    and i select 20, the display is still displaying the last six records. Only if i click "previous 10" on the table, do i get
    20 records and the range navigation for the table disappears.
    How can i control this?
    1.I mean to always display number of records as selected by the user irrespective of which range of
    records he is seeing.
    2.To display correct value in "previous" and "next" navigation controls depending on value selected by user from dropdown
    Thanks
    sameer

  • Get informations whether changes in Table content before store

    Hallo,
    in my Web Dynpro Application I have a table. If the User changes something in this table I must get the Information in what row the changes are before I store.
    Than I have to set a attribute in this row back.
    Is there any possibility to do that. I have try to get the Information with the method "isChangedByClient()".
    But I need the information at what row is the change.
    Is there any Event?
    Kind regards
    Gunter

    Hi Erik,
    you are missing the data in the shift register!
    You should initialize shift registers when you don't need data from previous runs of the VI…
    Or get rid of the shift register when you don't need it:
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to dynamically change the table name for a update statement

    Hi All,
    I need to update a coulumn xyz in either of tables abc and efg based on some condition.
    I wrote a cursor which has union of two queries(one querying abc and other efg)
    Now based on some inparameter only one will be executed at a time.
    And based on some condition a coulumn xyz needs to be updated which is in either of the table.
    As the update condition is same
    Update abc/efg set xyz=data where condition
    I am looking to initialize a variable like v_tname based on some condition and update like
    update v_tname .........
    (Exactly that may not be like so, But looking a technique like this)
    Please help

    If there is only two tables you'll need to update then you are better off using static SQL and implementing something like this instead:
    DECLARE
            update_condition        BOOLEAN;
    BEGIN
            -- initialize update_condition
            update_condition := <some_boolean_check>;
            IF update_condition
            THEN
                    UPDATE abc
                    SET    xyz = some_val
                    WHERE  some_col = some_other_val;
            ELSE
                    UPDATE fgh
                    SET    xyz = some_val
                    WHERE  some_col = some_other_val;   
            END IF;
    END;
    /Hope this helps!

  • Dynamically changing attributes of a field in view container UI element

    In the layout of the web dynpro component I have added a view container UI element. I am populating the fields in the view container UI element in methods in component controller using the following code
    *--Adding a Checkbox
      lv_str = wd_assist->if_wd_component_assistance~get_text( '009' ).
      CALL METHOD wd_this->att_wd_handler->add_parameter_field
        EXPORTING
          i_id          = 'CHB_DOWNLOAD_CHECKBOX'
          i_description = lv_str
          i_value       = lv_chb_download_checkbox
          i_as_checkbox = abap_true.
    *--Adding a Parameter
        lv_str = wd_assist->if_wd_component_assistance~get_text( '010' ).
        CALL METHOD wd_this->att_wd_handler->add_parameter_field
          EXPORTING
            i_id          = 'CHB_DOWNLOAD_PATH'
            i_description = lv_str
            i_value       = lv_chb_download_path
            i_as_checkbox = abap_false.
    Now based on the checkbox selection I want to make the field CHB_DOWNLOAD_PATH mandatory and also on F4 for CHB_DOWNLOAD_PATH  I want a method to be called. Where must i write the coding for the above conditions and how? Please help.

    hi
    In your method there would be a parameter ie ON_TOGGLE where you can write the name of your event .
    Whenever your checkbox will be clicked that event wil be called.
    You can write your code in that event itself.
    Regards
    Kuldeep

  • Dynamically change table selecting from

    in 3.2 on 11g database is there a way to dynamically change the table used in a select statement for an interactive report? I have a series of similar tables, one for each month of the year. I want to click a month on one page and bring up a report from the table for that month. I want to use one page for this report and have all links from previous page link to the same page, just different result based on what month was clicked.
    I know I could just setup 12 different reports and conditionally display each region based on a value passed to the that page, but I'd prefer to only create one page & one report on that page.
    Thanks for any ideas or solutions.

    Your function will have the code dynamically built.. What you do is you build your sql and pass in the table name and any other items that will change based upon your requirements..
    here is an example...
    function inventory_report (p_State IN VARCHAR2) RETURN VARCHAR2 IS
    declare
      q varchar2(4000);
    begin
      q:='   select p.category, ';
      q:=q||'       p.product_name, ';
      q:=q||'       p.quantity, ';
      q:=q||'       p.unit_price '; 
    -- Here is where we substitute the passed in state name for the data table we extract data from
      q:=q||'  from ' || V('p_State') || ' p, ';
      q:=q||' where p.product_quantity > 0 ';
      return q;
    end;Thank you,
    Tony Miller
    Webster, TX

  • How to transport contents of maintenace  view to one system to another?

    Hi Gurus,
    I have a  urgent need of transporting table contents(through maintenance  view )
    from DEV to QA and  then to PRD. How we can do it using  the transport button in SM30?
    Your appropriate help will be reqarded with points
    -B S B

    Hi,
    Look at the below link
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci1240876,00.html
    Regards
    Sudheer

  • How to change the images dynamically in a table.

    Hai,
                     How to change the images dynamically in a table based on the condition in webdynpro abap.
    Edited by: Ravi.Seela on Oct 13, 2011 2:17 PM

    This has been much discussed earlier. Do search posts.
    For your scenario i would do the following.
    inside your node which is binded to the table, i create a new node image with cardinality 1 ..1 and a attribute called path of type string.
    create a  supply function for the node image .
    Supply method now has a Element (Parent element ) and node.
    Based on your record in element, set the right image source to path attribute and bind the node.
    This will make sure that the framework calls the image supply function for every row in a table.

  • Fill data in table( on view ) dynamically from internal table

    Hi,
    How can I populate a table on view with data from an internal table?
    Thanks,
    Ronita

    Hi,
    if you have an internal table named xyz.
    Then create a structure in se11 for this internal table.
    Then create a node with this structure with cardinality 0:n
    Navigate into method WDDOMODIFYVIEW of view MAIN_VIEW. Insert coding for:
    -     Create a new context node for the table
    Hint: Use method Create_nodeinfo_from_struct of class Cl_wd_dynamic_tool.
    -     Remove “old” dynamic table IE element from view , if one exists. If it exists, it is a child of group GROUP_1 and has the name TESTTAB.
    -     Create a new UI element for a table named TESTTAB
    -     Create an internal table, fill it with the data from the database table and bind it to the newly created dynamic context node.
    METHOD wddomodifyview .
      DATA:
      UI Elements
        group_1       TYPE REF TO cl_wd_uielement_container,
        new_tab       TYPE REF TO cl_wd_table,
      Context Nodes
        dyn_node      TYPE REF TO if_wd_context_node,
        tabname_node  TYPE REF TO if_wd_context_node,
      Node Info
        rootnode_info TYPE REF TO if_wd_context_node_info,
      Data Reference (for internal table)
        stru_tab      TYPE REF TO data,
      String (for table name)
        tablename     TYPE string.
      FIELD-SYMBOLS:
        <tab> TYPE table.
    create context node ***************************************************************
    get node info of context root node
      rootnode_info = wd_context->get_node_info( ).
    Get the name of the table to be created
      tabname_node = wd_context->get_child_node( name = 'TABLE_DATA' ).
      tabname_node->get_attribute( EXPORTING name = 'NAME' IMPORTING value = tablename ).
      translate tablename to upper case.
    create sub node named TEST1 of structure (tablename)
      cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
        parent_info = rootnode_info
        node_name = tablename
        structure_name = tablename
        is_multiple = abap_true ).
    get instance of new node
      dyn_node = wd_context->get_child_node( name = tablename ).
    remove "old" table UI element from view , if necessary ****************************
      group_1 ?= view->get_element( 'GROUP_1' ).
      group_1->remove_child( id = 'TESTTAB' ).
    create new UI element table *******************************************************
      new_tab = cl_wd_dynamic_tool=>create_table_from_node(
    ui_parent = group_1
    table_id  = 'TESTTAB'
    node      = dyn_node ).
    fill context node with data *******************************************************
    create internal table of (tabletype)
      CREATE DATA stru_tab TYPE TABLE OF (tablename).
      ASSIGN stru_tab->* TO <tab>.
    Get table content
      SELECT * FROM (tablename) INTO CORRESPONDING FIELDS OF TABLE <tab>.
    Bind internal table to context node.
      dyn_node->bind_table( <tab> ).
    ENDMETHOD.
    Edited by: Sridevi D on Apr 19, 2008 10:30 AM

  • Dynamically change the Binding of a view object

    I want to reuse a panel several times in my application. The VO has one bind parameter (:1). The same panel should be reused several times with different bind variables.
    I found a technical note concerning this issue called: How to Dynamically Change the binding of a View Object to a JClient Panel. This works for JDeveloper 9i but not for JDeveloper 19g. Does anybody know how to dynamically change the binding in JDeveloper 10g

    You may use bindRowSetIterator() and pass in a custom fetched ViewObject or a RowSetIterator to the iterator binding that is displayed in your panel.

Maybe you are looking for

  • X1 Carbon 2014 Function keys not working in windows7

    Hello. I have a brand new X1 carbon(model: 20A7-005KMD) that was installed with our company image, running windows 7. Alle drivers in device manager has been installed, and system update is updated. The carbon has the "touch" function keys and they o

  • Navigation between Web Dynpro Windows

    Hi experts My requirement is to create two windows in the same Web DynPro component, then call up one of the Windows in an external page, so that the users can see both at the same time. I have looked at LinkToURL, but it does not appear to support t

  • Hlevel filter

    Hi gurus, I have a dimension with three hierarchies, the parenth1 has 6 level of hierarchy, if i select in the member lookup a member of the bottom and i show his properties i can see his HLEVEL=6, but when i go to build an EVDRE if i build a filter

  • 16:9 content squished in 4:3 area on widescreen TV

    When I burn a DVD that's made in Encore using the 16:9 mode it plays in 16:9 mode on my computer so I know it is burned properly. I go to place it in my Xbox360 and 2 other DVD players it does no auto expand to fill my 16:9 TV. (it is squished in a 4

  • Frozen ipad unable to shut down

    TRIED TO SEND PHOTOS VIA MY IPAD , AND SUDDENLY ALL THE CONTROLS STOPPED WORKING ,SO I  TRIED TO SWITH IT OFF , ITS STILL IN THE PROCESS OF SWITCHING OFF , IT IS ALMOST  4HRS NOW