Refresh TableView

After adding a record in the database and the application is running, how do I update the tableview and display the record that I just include?
Thanks

I know why it does not update.
The tutorial http://download.oracle.com/javafx/2.0/ui_controls/table-view.htm#CJAGAAEE does not mention that the POJO must have getters defined to return the property.
Instead of
public String getFirstName() {
  return firstName.get();
public void setFirstName(String fName) {
  firstName.set(fName);
}it should be
public String getFirstName() {
  return firstName.get();
public void setFirstName(String fName) {
  firstName.set(fName);
public SimpleStringProperty firstNameProperty() {
  return firstName;
}Edited by: TSJ on Nov 14, 2011 8:23 AM

Similar Messages

  • Refreshing TableView (or recall CellValueFactory)

    Hi,
    I have a similar use case as in my code sample:
    In my TableView I have a cell value factory which returns a value, which is dependent on some other values. When this other value changes, I want to refresh the TableView (or recall the cell vallue factory).
    If you run the code, click the "Add" button. The cell value factory for column2 should then return "true", but the view is not updated unless I sort the columns.
    I tried tableView.requestLayout(); but with no success.
    import javafx.application.Application;
    import javafx.beans.property.SimpleBooleanProperty;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.beans.value.ObservableValue;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    public class TestApp2 extends Application {
        public static void main(String[] args) {
            Application.launch(args);
        private ObservableList<String> someOtherStrings = FXCollections.observableArrayList();
        private ObservableList<String> items = FXCollections.observableArrayList("String1", "String2");
        @Override
        public void start(Stage stage) throws Exception {
            VBox root = new VBox();
            TableView<String> tableView = new TableView<String>();
            tableView.setItems(items);
            TableColumn<String, String> column1 = new TableColumn<String, String>("Value");
            column1.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<String, String>, ObservableValue<String>>() {
                @Override
                public ObservableValue<String> call(TableColumn.CellDataFeatures<String, String> stringStringCellDataFeatures) {
                    return new SimpleStringProperty(stringStringCellDataFeatures.getValue());
            TableColumn<String, Boolean> column2 = new TableColumn<String, Boolean>("Boolean");
            column2.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<String, Boolean>, ObservableValue<Boolean>>() {
                @Override
                public ObservableValue<Boolean> call(TableColumn.CellDataFeatures<String, Boolean> personStringCellDataFeatures) {
                    return new SimpleBooleanProperty(someOtherStrings.contains(personStringCellDataFeatures.getValue()));
            Button button = new Button("Add");
            button.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent actionEvent) {
                    // TableView should update after this.
                    someOtherStrings.add("String1");
            tableView.getColumns().addAll(column1, column2);
            root.getChildren().addAll(tableView, button);
            Scene scene = new Scene(root);
            stage.setScene(scene);
            stage.show();
    }

    Try
            column2.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<String, Boolean>, ObservableValue<Boolean>>() {
                @Override
                public ObservableValue<Boolean> call(final TableColumn.CellDataFeatures<String, Boolean> personStringCellDataFeatures) {
                    //return new SimpleBooleanProperty(someOtherStrings.contains(personStringCellDataFeatures.getValue()));
                  return new BooleanBinding() {
                    {super.bind(someOtherStrings);}
                    @Override
                    public boolean computeValue() {
                      return someOtherStrings.contains(personStringCellDataFeatures.getValue());
            });

  • Problem on refreshing tableview's content

    Hi everyone!
    I'm developing a program using BSP and MVC based on tutorial_4_mvc.
    The program functions is basically insert, update and delete records on a transparent table using a tableview element.
    I defined tableview using the following parameters:
    <htmlb:tableView id              = "result"
                     design          = "ALTERNATING"
                     headerText      = "Header Text"
                     footerVisible   = "TRUE"
                     onRowSelection = "onRowSelection"
                     table           = "<%= t_dados_table %>"
                     visibleRowCount = "3" >
    For tableview collums, I used the following parameters:
      <htmlb:tableViewColumns>
        <htmlb:tableViewColumn columnName          = "APROGRUP"
                               width               = "100"
                               horizontalAlignment = "left"
                               title               = "Grupo de Aprovação de Programa"
                               type                = "input" >
        </htmlb:tableViewColumn>
        <htmlb:tableViewColumn columnName          = "DSCEN"
                               width               = "100"
                               horizontalAlignment = "left"
                               title               = "Descrição"
                               type                = "input" >
        </htmlb:tableViewColumn>
        <htmlb:tableViewColumn columnName          = "delete"
                               horizontalAlignment = "center"
                               title               = "Delete Item"
                               type                = "button"
                               onCellClick         = "delete" >
        </htmlb:tableViewColumn>
      </htmlb:tableViewColumns>
    The insert and update functions works just fine. So as the first time I search for a record and fill the tableview with the results. But the real problem is:
    The first time I fill the tableview, it works just fine! But when I try to search for a second code or when I have to delete a tableview's record I can't display the correct information.
    Example:
    1     1
    2     2
    3     3
    When I delete the "1   1" record on the tableview, it returns displaying:
    1    1
    2    2
    and seems like I've deleted the wrong record, but looking at the transparent table, the result is:
    2    2
    3    3
    This means that the logic for delete is correct and it's working no problem.
    BUT the tableview is displaying the wrong data.
    Anyone has been in a similar situation?

    Hi Hoffmann,
    my server cache is already set to "0". The browser cache has the same value. I tried to overwrite de value on this two fields and activate again, but the problem remains.
    There is any chance of this problem be a simple configuration mistake?
    When I change the type from "INPUT" to "TEXT" on the tableViewColumn property all the functions works just fine!
    But when I try to use the "INPUT" statement, the fields came with the old value, and the only way to update them is reloading the tableview element using an empty internal table and then reloading again with the filled internal table.
    For now, I'm using this way, but must be another way.

  • Refresh,tableview,dropdown

    Hi Experts,
    i have small requirement with Table view ie
    i have a drop down from the selected drop down ,data is populating in the table view .
    example
    projectname dropdown ---> i have selected  one projectname
    data in the table view is populated and i hv selected some of them and click on the button called ok  and again when i select anothter projectname 2 then the table view should be refereshed, it is not happening , pls help me to slove this
    table view should get refreshed...
    Bhavana

    Hi Bhavana,
    In order to refresh your table view data, you should trigger a server side request on change event of your dropdown box.
    Are you using HTML select for drop down box? If so, are you triggering a server side event by submiting the form in your javascript function which gets binded to the onchange attribute of dropdown box?
    Are you using HTMLB dropdown box? If so, is there a onclick or onclientclick event handlers?
    If you trigger a server side event then the html page should refresh itself. Is it happening?
    If you are sending a server side, are you modifying the table view content based on the selected drop down box item.
    You could get hold of the issue if you are able to answer to the above questions.
    Hope it helps!
    Regards
    Maheswaran

  • Tableview getting refreshed when changing data in the rows

    Hi Gurus,
    Iu2019m doing a BSP with MVC. The requirement is as below.
    In the main page there is a button u2018Create Orderu2019, to create a sales order, once I click this button, another screen (pop up) comes up and within that I have a Tableview display with the below fields with the data of 20 records.
    Material no
    Quantity
    Delivery Date
    Here user is allowed to choose the quantity and delivery date by selecting each row.(with MULTISELECT option in BSP)
    The issue is after I select first row and change the quantity and date, and if I click on second row, the Tableview gets refreshed to enable the second row to be editable and the changes what I did on the first row are also refreshed.
    So i want the Tableview not to be refreshed when selecting the multiple rows. So that I can keep the changes I make to the quantity and date fields Can you please suggest any method.
    Cheers,
    Srini.

    Hi Srinivas,
    You need to capture the value entered by user in Quantity and date field and update the internal table with these values for the current selected row.
    For ex.
    The tableView code is like:
                          <htmlb:tableView id                  = "material"
                                     headerText          = "<%= otr(Z_SUS/HEADER_TEXT_MATERIALS) %>"
                                     headerVisible       = "true"
                                     design              = "alternating"
                                     onRowSelection      = "MyEventRowSelection"
                                     selectionMode       = "MULTILINEEDIT"
                                     width               = "880"
                                     filter              = "SERVER"
                                     emptyTableText      = "<%= otr(Z_SUS/EMPTYTABLE_MATERIALS) %>"
                                     iterator            = "<%= iterator %>"
                                     table               = "<%= gt_materials %>" />
    In eventhandler OnInputProcessing :
    DATA: lt_fields type tihttpnvp ,
               ls_fields like line of lt_fields.
    call method request->get_form_fields
                changing
                  fields = lt_fields
    Now the internal table lt_fields contains all the editable cell values , just update the internal table of your tableview with these values.
    You can try these threads
    [Thread-I.|Re: Retrieve changes made in tableView]
    [Thread-II|https://forums.sdn.sap.com/click.jspa?searchID=24460585&messageID=5516977]
    Search the forum for more information on this.
    Regards,
    Anubhav

  • Htmlb:tableView - automatic refresh

    <b>Hi,</b>
    I use htmlb:tableView  to display data.
    Have you any idea how to do automatic refresh to the tableView ?
    <b>Thanks, Natalia.</b>

    Here is the Sample code which reload every 2 seconds..
    Look at the ouput:
    http://grizzlyweb.com/webmaster/javascripts/examples/refresh.htm
    <html>
    <head>
    <title>Refresh JavaScript Example</title>
    <noscript>
    <meta http-equiv="refresh" content="2">
    </noscript>
    <script language="JavaScript">
    <!--
    var sURL = unescape(window.location.pathname);
    function doLoad()
        // the timeout value should be the same as in the "refresh" meta-tag
        setTimeout( "refresh()", 2*1000 );
    function refresh()
        window.location.href = sURL;
    //-->
    </script>
    <script language="JavaScript1.1">
    <!--
    function refresh()
        window.location.replace( sURL );
    //-->
    </script>
    <script language="JavaScript1.2">
    <!--
    function refresh()
        window.location.reload( false );
    //-->
    </script>
    </head>
    <!--
        Use the "onload" event to start the refresh process.
    -->
    <body onload="doLoad()">
    <script language="JavaScript">
    <!--
        document.write('<b>' + (new Date).toLocaleString() + '</b>');
    //-->
    </script>
    </body>
    </html>
    For more detail look at the below link..
    http://grizzlyweb.com/webmaster/javascripts/refresh.asp
    <i>* Reward each useful answer.</i>
    Raja T

  • NSArrayController and refreshing the associated TableView

    Hello,
    I'm a Cocoa rank newbie and I'm probably trying to do something too complicated for my current abilities but here goes. I've been using Hillegass' book and am building an App that uses the NSArrayController to manage an NSTableView. I can add and delete objects and all that stuff. My problem comes when the data in the objects that are bound to the TableView changes "behind the Controller's back". The values in the objects are clock-based and I need to cause the TableView to refresh it's view of the bound data every second. I have scoured the web for how to cause a refresh and the answer seems to be either use the KVO method (which I can't really do (I think) because I'm not changing the data) or "send a -fetch" to the ArrayController.
    Sending the fetch seems like what I want to do but I can't find any information on how to do it. In the end, I don't really understand how to get a reference to the ArrayController object sitting in the Doc window that has all the bindings. I basically don't understand any of the objects in the Doc window. I dutifully drag them in and make connections to them but I don't really understand why.
    Any help on refreshing the NSArrayController would be much appreciated.
    Tom

    OK, incase anyone else is struggling with this, I got this working. From various posting, it seemed that I needed to create an IBOutlet and connect it to my ArrayController. I was having a tough time getting my head around that since all I'd ever done till now was connect IBOutlets to visual things such as TextFields. I finally found a hint that said I needed to connect the outlet from File's Owner to the ArrayController. So, I created an IBOutlet in my myDocument file;
    @interface MyDocument : NSDocument
    NSMutableArray *myObject;
    IBOutlet NSArrayController *arController;
    Then, in IB, I right-clicked File's Owner and dragged from the arController Outlet to the ArrayController object in the Doc window.
    Then, in myDocument.m, in the place that I wanted to refresh the list, I did this;
    (bracket)arController rearrangeObjects(bracket);
    (how do you post code snippets in these forums without it being "interpreted"?)
    Simple enough now that I've done it but it took me awhile to connect the dots.
    Anyway, I hope this helps someone else in the same boat.

  • TableView refreshing problem

    Hi,
    I use Java FX 2.2 version and I have a problem with TableView refreshing. I am writing this post because I have not found any clear solution, but I know that there is a few post about this. Below is my pseudocode:
                table.getItems().clear();
                ObservableList<Entity> entities = {getting list of entities from DB}
                table.setItems(list of entitites);The code works with Java FX 2.0.2 version but after upgrade to new version it does'nt work. I am getting new portion of data from db and replace list but table rows doesnt refresh.
    I have been searching the solution for hours, but nothing works. It is a bug?
    Edited by: user12049238 on 2012-06-12 14:24

    Below is my simple test case. When you click refresh data in the table does not change, but when you make column name invisible and the next visible data will change.
    public class TestCase extends Application {
        public static void main(String[] args) {
            launch(args);
        @Override
        public void start(Stage primaryStage) {
            primaryStage.setTitle("Test case");
            primaryStage.setX(0);
            primaryStage.setY(0);
            Button refreshButton = new Button("Refresh");
            final TableView<Person> table = new TableView<>();
            table.setTableMenuButtonVisible(true);
            TableColumn c1 = new TableColumn("Id");
            TableColumn c2 = new TableColumn("Name");
            c1.setCellValueFactory(new PropertyValueFactory<Person, Long>("id"));
            c2.setCellValueFactory(new PropertyValueFactory<Person, String>("name"));
            table.getColumns().addAll(c1, c2);
            refreshButton.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent arg0) {
                    table.getItems().clear();
                    List<Person> person = getPerson2();
                    table.setItems(FXCollections.observableList(person));
            BorderPane pane = new BorderPane();
            pane.setCenter(table);
            pane.setBottom(refreshButton);
            primaryStage.setScene(new Scene(pane, 400, 400));
            primaryStage.show();
            List<Person> person = getPerson1();
            table.setItems(FXCollections.observableList(person));
        private List<Person> getPerson1() {
            List<Person> p = new ArrayList<>();
            Person p1 = new Person();
            p1.setId(1l);
            p1.setName("name1");
            Person p2 = new Person();
            p2.setId(2l);
            p2.setName("name2");
            p.add(p1);
            p.add(p2);
            return p;
        private List<Person> getPerson2() {
            List<Person> p = new ArrayList<>();
            Person p1 = new Person();
            p1.setId(1l);
            p1.setName("updated name1");
            Person p2 = new Person();
            p2.setId(2l);
            p2.setName("updated name2");
            p.add(p1);
            p.add(p2);
            return p;
    public class Person {
            private Long id;
            private String name;
            public Long getId() {
                return id;
            public void setId(Long id) {
                this.id = id;
            public String getName() {
                return name;
            public void setName(String name) {
                this.name = name;
            @Override
            public boolean equals(Object obj) {
                if (obj == null) {
                    return false;
                if (getClass() != obj.getClass()) {
                    return false;
                final Person other = (Person) obj;
                if (this.id != other.id) {
                    return false;
                return true;
            @Override
            public int hashCode() {
                int hash = 7;
                hash = 89 * hash + (int) (this.id ^ (this.id >>> 32));
                return hash;
    }What is the way to create new Jira issue? Could you help me?

  • Page content need to be refreshed. ( tableView )

    Dear Friends!
         I am selecting two fields using F4 helps in BSP.  My F4 help is dependent on each other.  like department is master help -> I select one department here and based on this I will select section for another field. problem of my application is when I select linearly department-->section, it has no issues.... but if i wish to change the department and then want to chage the section again, at that time section help shows me the previous department's section values. where as it should show me the new department's section values.  i found that the values of section help is not getting refreshed. if i clear the internal table then it doesnt show anything if i want to change the section again without selecting the department. let me give you my problamatic scenarios...
    scenarios
    1) department  -
    > Section works fine... first time.
    2) Re-selection of department --- >Section ( shows the value of previous department's sections).
    3) Re selection of section without selecting the department ( works fine if i dont clear the internal table after selectiong the record first time. ) it shows nothing second time when i clear the internal table on first time selection.
    4) department->section works fine if i clear the internal table for section once i selected the section. (but will not give me any well if i like to change the section again without selecting department.)
    Please tell me how i can make my section help persistent and consistent,
    anyhelp will be appreciated.
    Thanking you
    Regards
    Naeem
    Edited by: Naim Khan S Babi on Mar 8, 2009 8:04 PM

    Hi Naeem,
    the way I like to do this sort of stuff is to use AJAX techniques. When the first input field is changed trigger an asynchronous HTTP call to the back-end to retrieve the list of values for the second input field.
    If you are new to AJAX start [here.|http://www.w3schools.com/Ajax/Default.Asp]
    Cheers
    Graham Robbo

  • RichTable moves Selected Row to the Top of my tableview on refresh

    When I issue a partialtrigger on a table with a selected Row, the selected row is repositioned to be the first Row that is available. The actual positions of the rows in the tables dont change, the selected row is just scrolled to the top... I need to suppress this behavior. Anyone have any Ideas?

    Without an exact jdve version we can't do much.
    Check these properties of hte table
    activeRowKey, displayRowKey and displayRow. Then read the doc for the properties and set them according your use case.
    Timo

  • Refresh First page after returning from a framed pop-up window

    HI Can anyone help me on this technical problem.
    I have got one mainpage and from there i'm calling a popup with two frames (left, right). At frame right i'm populating the tableview.
    So when i submit(button) in tableview(right), the table contents has to be replicated in the first page and the popup has to be closed. So far it has be done successfully.
    The problem is when i return to the first page the page is not getting <b> refreshed automatically</b>. FYI, i'm not using mvc for performance reasons.
    So i need your help on how to refresh the first page, after control passes from popup.
    Here is the code, that calls the popup window
    winvar=window.open("organization.htm", 'main','height=450,width=650,status=yes,scrollbars=yes,toolbar=no,resizable=yes');

    Hi Craig & Raja,
    Let me tell thanks for your response. But your valuable solutions are not working for me. Please, check this code and please let me know that any thing went wrong.
    Here is the code
    My main page is progress.htm
    ============================
    <script language = "javascript">
        function openOrgTree(){      
           var winvar;
           winvar=window.open("organization.htm", '<b>Main</b>','height=450,width=650,status=yes,scrollbars=yes,toolbar=no,resizable=yes');
      </script>
    <htmlb:inputField id          = "InputOrgPlan"
                            showHelp    = "X"
                            onValueHelp = "javascript:openOrgTree()" />
          <% if application->i_desc is not initial.%>
          <htmlb:tableView id              = "tvX"
                           headerVisible   = "false"
                           design          = "alternating"
                           visibleRowCount = "3"
                           fillUpEmptyRows = "true"
                           columnWrapping  = "false"
                           onHeaderClick   = "MyEventHeaderClick"
                           onRowSelection  = "MyEventRowSelection"
                           keyColumn       = "Text"
                           table           = "<%= application->i_desc %>"
                           iterator        = "<%= iterate %>" />
          <% endif. %>
          </td></tr>
    organization.htm (is the frames container)
    =========================================
      <!-- frames -->
    <frameset  rows="110%,*">
        <frameset  cols="40%,*" >
            <frame name="left" src="tree.htm" marginwidth="0" marginheight="0" scrolling="No" frameborder="0">
            <frame name="right" src="table.htm" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0">
    table.htm (right frame)
    ==========================
       function callSubmit()
         alert(parent.window.name);  
    // displays the name as "<b>Main</b>" which i gave at the time opening oraganization.htm
    //        parent.window.opener.refresh();
    // window.opener.location.href = window.opener.location.href ;
             window.opener.refresh();
             parent.close(); // to close the popup
    // all of the above are not working
       </script>
      <htmlb:page onLoad = "callSubmit()">
    <htmlb:button id            = "submitbutton"
                        onClick       = "myButtonClick"
                        onClientClick = "callSubmit()"
                        width         = "10"
                        text          = "Submit" />
    i need onClick to populate the internal table and onClientClick to refresh the opener.
    if event->id = 'submitbutton'.
          refresh application->i_desc.
          application->i_desc = i_desc.
    Regards
    Swaroop

  • Retrieving table values from tableview multiselect

    Hi everyone,
    I have a BSP with a tableView set on multiselect. When the user clicks on a button I want to rertieve the selected rows in my ABAP code and send them to a function module (in the form of a table). But I haven't been able to find code examples on how to do this, ie how to retrieve the selected rows. Can someone provide me with an example or a link to where I can find one? I can catch the button onClick event, but after that I need to get the rows that were selected by the user.
    Thanks!
    best regards,
    Dionisios

    HI Dionisios,
    In your input processing,
    do something like
    CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.
    DATA: event TYPE REF TO CL_HTMLB_EVENT.
    event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
    if  event->id = 'but1' and event->event_type = 'click'.
      DATA: tv TYPE REF TO CL_HTMLB_TABLEVIEW.
      tv ?= CL_HTMLB_MANAGER=>GET_DATA(
                      request      = runtime->server->request
                      name         = 'tableView'
                      id           = 'tab1' ).
    IF tv IS NOT INITIAL.
    DATA: tv_data TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
      tv_data = tv->data.
    refresh itab2.
    refresh itab3.
    <b>call method tv_data->GET_ROWS_SELECTED
          receiving selected_rows = itab2.</b>
    endif.
    data : ind type SELECTEDROW,
           row_s type row.
    if itab2 is not initial.
        data :rw LIKE LINE OF itab.
        loop at itab2 into ind.
          READ TABLE itab INDEX ind-index into
          rw.
           if rw is not initial.
           row_s = rw.
          append row_s to itab3.
          clear row_s.
          endif.
        endloop.
    endif.
    Endif.
    Where
    TYPES
    types : tab type table of <table_name>.
    types : row type <table_name>.
    PAGE ATTRIBUTEs :
    Irow type row
    Itab type tab.
    Itab3 type tab.
    Itab2 type selectedrows.
    Rowselected type string.
    And in layout
    <htmlb:tableView id="tab1"
                      table="<%= itab %>"
    ="true" >
                     visibleRowCount="8"
                      design="ALTERNATING"
                      footerVisible="TRUE"
                     selectionMode="multiSelect"
                     keepSelectedRow
         </htmlb:tableView>
    <htmlb:button  id = "but1"
                   onClick="test"/>
    HOpe this helps,
    Regards,
    Siddhartha

  • Error when updating back to ODS using tableview iterator.

    I get this error when I try to execute my bsp page. The page collects a cell value that was edited on the previous page and updates it to the ods.
    The error is "Function not possible in a captured session"
    The termination type was: TH_RES_FREE
    When I debug, every thing looks fine. ITab3 returns values it's supposed to. So I am not sure what's causing it to fail. Any ideas? Thanks.
    Here is my code:
    CLASS cl_htmlb_manager DEFINITION LOAD.
    DATA: event TYPE REF TO cl_htmlb_event.
    event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
    if event->id = 'Update' and event->event_type = 'click'.
      DATA: tv TYPE REF TO cl_htmlb_tableview.
    FIELD-SYMBOLS <i> LIKE LINE OF selectedrowindextable.
    tv ?= cl_htmlb_manager=>get_data( request = runtime->server->request
                                     name = 'tableView'
                                     id = 'tv1' ).
    IF tv IS NOT INITIAL.
    DATA: tv_data TYPE REF TO cl_htmlb_event_tableview.
      tv_data = tv->data.
      refresh itab2.
      refresh itab3.
      call method tv_data->GET_ROWS_SELECTED
      receiving selected_rows = itab2.
      endif.
      data : ind type SELECTEDROW,
              row_s type row.
      if itab2 is not initial.
        data: rw LIKE LINE OF itab.
        loop at itab2 into ind.
        READ TABLE itab INDEX ind-index into
        rw.
        if rw is not initial.
        row_s = rw.
        append row_s to itab3.
        clear row_s.
        endif.
        endloop.
            MODIFY /bic/aNCN_O01300 FROM table itab3.
          ENDIF.
          endif.

    hi Uday,
    This is simple....
    Use the function module
    <b>1) For adding leading zero's or spaces...!</b>
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT   = lw_variable
    IMPORTING
       OUTPUT   = lw_variable.
    <b>2) and for removing leading zero's or spaces.....</b>
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        INPUT   = lw_variable
    IMPORTING
       OUTPUT   = lw_variable.
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • QAS Refresh from PRD

    Dear Bhudev/Guest,
    I am Planning to refresh my Quality system from Production's Offline Database Backup. I have seen you a lot posts.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Refresh from Offline backup (AQC from APC)
    Let's say AQC is quality and APC is production.
    Pre-processing Activity:
    Verifications:
    1. Verify the last offline backup in the source system /oracle//sapbackup/back.log
    2. Verify that both the source and target systems are at the same Oracle level (which is already the case between APC and AQC)
    3. It is recommended that an off-line backup be taken of the target system before starting this process, in case of fall back.
    4. Confirm there is enough space in the target (AQC) file systems to contain the data from the source system this is required as we may have to copy the files from Production to quality. /oracle/SID/sapdata* folders should be having little more space as compared to the source filesystem.
    5. Check access to SAP* for APC (000 and 400) and also for AQC (000 and 400)
    6. Check other passwords such as adm and ora
    7. Server : User : ora > sqlplus u201C/ as sysdbau201D > alter database backup controlfile to trace > exit In /oracle/SID/saptrace/usertrace, the last trace (check the time) is the script for recreating the control file. You will need to edit it. Please rename the trace file to ld.sql and send the file to the target system /oracle/SID Edit the Script: vi ld.sql Delete or comment out all lines at the beginning of the file before STARTUP NOMOUNT which is kept. Change old controlfile creation statement at the beginnig of the controlfile: Old line: create controlfile reuse database NOresetlogs archivelog; change to New line: create controlfile set database resetlogs archivelog; replace all occurences of string by in each line where appears :g / / s / / /g example: :g/P10/s/P10/T21/g Delete the following lines a the end of the script: ; RECOVER DATABASE; ALTER SYSTEM ARCHIVE LOG ALL; ALTER DATABASE OPEN;
    8. Get from the Prod system (APC) the .aff and backDPR.log and copy them on AQC. (/oracle//sapbackup) Copy the files to /instkits/SID/. And after we can go on target source server and copy them from /instkits/SID to the /oracle/SID/sapbackup/. With the good owner and permission
    9. Lock all the users in client 400 except Basis and post system message. Target system data collection (On AQC -400):
    1. SM59 Expand all the trees, print by choosing: ->System ->List ->Print i) Compare list to R/3 connections on source system. Record details for any that will need to be recreated on target system.
    2. SCC4 Record all client settings. -> Tableview ->Print ->Standard List -> List -> Print Make sure you understand the columnsu2026
    3. SE06 Record system change options
    4. RZ10 Record the instance profile settings for: rdisp/wp-no-btc and rdisp/max_wprun_time
    5. STMS Record current transport routes. ->Overview -> Transport Routes -> manually expand all trees -> system ->list ->print
    6. Request customer to provide u201Ccatch-upu201D list of transports to be applied to system after refresh (QA and Sandbox systems).
    7. RZ04 Record current work process set-up. Highlight each operation mode and click instances/op modes button. i) Print with ->System ->List ->Print
    8. SAP License Ensure the SAP license information is available. If not on-hand, logon target system as adm and enter command: saplicense u2013show. This information is also available on OSS.
    9. TSM Nodename View /usr/tivoli/tsm/client/api/bin64/dsm.sys on source and target system. Record the nodename entries. These will be SAP or server names.
    11. Take printer Export through SPAD and save it locally to desktop->SPAD
    12. Take Export of User Master from the client 400 through SCC8 target system is AQC , so that it may be re-imported through STMS. Note the Transport number here also verify the transport exist in the queue. DB Restore from offline backup from APC:
    1. Stop SAP on AQC -> Login as aqcadm -> stopsap
    2. Change the TSM node on AQC-> cd /usr/tivoli/tsm/client/api/bin64 ls -lrt vi /usr/tivoli/tsm/client/api/bin64/dsm.sys Change it to point to APC, comment the AQC Node. Post Restore Acitivity:
    1. Stop Database Delete Old controlfile rm /oracle/AQC/sapdata1/system_1/cntrl/* rm /oracle/AQC/saparch/cntrl/* rm /oracle/AQC/origlogA/cntrl/*
    2. Re-create the controlfile and then after that start the database User : ora > cd > sqlplus u201C/ as sysdbau201D > @ld.sql > alter database open resetlogs;
    3. Change the sapr3 password Server : User : ora Temporarily, we have to change the sapr3 password to the default password. With SAPBA, change this user password to pass.
    4. Test the connection: Server : User : adm > R3trans u2013d It should have a return code of 0000
    5. Reasign tempfile alter tablespace psaptemp add tempfile '/oracle/AQC/sapdata1/temp_1/temp.data1' size 6020M reuse autoextend on next 20971520 maxsize 10000M; alter database rename global_name to AQC.WORLD; drop user OPS$APCADM cascade; drop user OPS$ORAAPC; create user OPS$ORAAQC identified externally default tablespace psapdnausr temporary tablespace psaptemp; grant connect, unlimited tablespace, SAPDBA to OPS$ORAAQC; grant connect, unlimited tablespace, SAPDBA to OPS$AQCADM;
    7. Change the instance profile to stop all the background processing To be sure that no production batch are executing, set rdisp/wp_no_btc to 0 posprocessing:
    8. Startsap
    9. Run Transaction SICK (as sap*)
    10. Installing license through the tcode: slicense While logged in as 000/sap/using password of APC system Get the License from service.sap.com and download it to local machine Log in 000 client using SAP and run the Tcode slicense import printers, run BDLS for logical system name conversions se06 posprocessing stms usermaster import import profiles for QAS
    thanks
    Bhudev
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Hi Pranav
    why the SIDs of production and QAS are same, did you do refresh of QAS from PRD ?
    If yes, then you should have done control file creation and change of SIDs, after the datbase restore...
    however, if you want to create the new control file and change the SID then try to consider the following steps:
    1. Login as orasid
    2. connect to sqlplus
    3. run query: alter database PRD backup controlfile to trace;
    4. It will create a control file as a latest trace file (.trc) in the directory /oracle/PRD/saptrace/usertrace
    note: logout of sqlplus
    5. Rename that .trc file into ldQAS.sql
    6. copy this file into /oracle/SID ie. /oracle/QAS directory
    7. edit the .sql file as below
    8. CREATE CONTROLFILE SET DATABASE u201CQASu201D RESETLOGS ARCHIVELOGS;
    add above statement replacing the below:
    CREATE CONTROLFILE REUSE DATABASE u201CQASu201D NORESETLOGS ARCHIVELOGS;
    9. Replace all occurences of string <PRD_SAPsid> by <QAS_SAPsid> in each line where <source_SAPsid> appears
    :g/PRD/s/PRD/QAS/g
    10. login in sqlplus, stop database
    11. as oraqas, delete old control files:
    rm /oracle/SID/sapdata1/system_1/cntrl/*
    rm /oracle/sid/saparch/cntrl/*
    rm /oracle/SID/origlogA/cntrl/*
    12. again login into sqlplus (as sysdba always)
    13. run this .sql : @ldQAS.sql
    note: it should give a message that control file creaated.
    14. Open the database using: alter database open resetlogs;
    15. alter database rename global_name to QAS.WORLD;
    16. drop user OPS$PRDADM cascade;
    17. drop user OPS$ORAPRD;
    18. create user OPS$ORAQAS identified externally default tablespace <tablespacename>
    temporary tablespace psaptemp;
    19. grant connect, unlimited tablespace, SAPDBA to OPS$ORAQAS;
    grant connect, unlimited tablespace, SAPDBA to OPS$QASADM;
    at SAP level:
    1. you can run BDLS to convert logicalsystems from PRD to QAS SID
    Bhudev
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    In both post, There is some difference specially like User droping.
    Whether I have to run BDLS or Drop usr and create or both activity have to be done?????
    Regards
    Dharmendra

    Please explain step by step:-
    7. Server : User : ora > sqlplus u201C/ as sysdbau201D > alter database backup controlfile to trace > exit
    In /oracle/SID/saptrace/usertrace, the last trace (check the time) is the script for recreating the control file.
    You will need to edit it. Please rename the trace file to ld.sql and send the file to the target system /oracle/SID
    Edit the Script: vi ld.sql Delete or comment out all lines at the beginning of the file before STARTUP NOMOUNT which is kept.
    Change old controlfile creation statement at the beginnig of the controlfile: Old line: create controlfile reuse database NOresetlogs archivelog; change to New line: create controlfile set database resetlogs archivelog; replace all occurences of string by in each line where appears :g / / s / / /g example: :g/P10/s/P10/T21/g Delete the following lines a the end of the script: ; RECOVER DATABASE; ALTER SYSTEM ARCHIVE LOG ALL; ALTER DATABASE OPEN;
    8. Get from the Prod system (APC) the .aff and backDPR.log and copy them on AQC. (/oracle//sapbackup) Copy the files to /instkits/SID/. And after we can go on target source server and copy them from /instkits/SID to the /oracle/SID/sapbackup/. With the good owner and permission
    Break into steps and explain. It looks confusing to me because I am new to ECC with Oracle.
    Regards
    Dharmendra

  • Issue with editable cell of a tableVIew...

    Hi All,
    I have a tableView with 4 fields, one of the fields QUANTITY is editable .
    Now for ex. if there are 5 rows in the TV , if the user selects all 5 and then enters value for QUANTITY field and clicks on the SUBMIT button , the user is navigated to the next page and i can capture these values in my itab,
    but if the user selects one row and enters value for QUANTITY field  and then selects the second row , ROWSELECTION event is triggered and the page is refreshed ,
    so when the page is displayed agan the value enterd in the QUANTITY field for previous row  is gone and the fiels becomes blank.
    how to show the value for this field , after the page is displayed again after refreshing????
    Thanks,
    Anubhav.

    Hi Raja,
    I really cantfigure out how to solve my isuue using your code.
    The code for my TV is:
    <htmlb:tableView             id              = "material"
                                               headerText      = "Materials"
                                               headerVisible   = "true"
                                               design          = "alternating"
                                               visibleRowCount = "10"
                                               fillUpEmptyRows = "true"
                                               onRowSelection  = "MyEventRowSelection"
                                               selectionMode   = "MULTILINEEDIT"
                                               table           = "<%= itab_materials %>" >
                              <htmlb:tableViewColumns>
                                  <htmlb:tableViewColumn columnName="MATNR" title="Material Number" width="150">
                                  </htmlb:tableViewColumn>
                                  <htmlb:tableViewColumn columnName="MAKTG" title="DESCRIPTION" width="200">
                                  </htmlb:tableViewColumn>
                                  <htmlb:tableViewColumn columnName="VERPR" title="PRICE" width="150">
                                  </htmlb:tableViewColumn>
                                  <htmlb:tableViewColumn columnName="QUNTY" title="QUANTITY" edit="TRUE" width="200">
                                  </htmlb:tableViewColumn>
                                  <htmlb:tableViewColumn columnName="MEINS" title="UNIT" width="150">
                                  </htmlb:tableViewColumn>
                              </htmlb:tableViewColumns>
                           </htmlb:tableView>
    ITAB_MATERIALS has folowing fields:
    MATNR
    MEINS
    MAKTG
    VERPR
    How to capture the value of FIFTH field QUANTITY and display it when the next row is selected and the page is refrehsed?
    Thanks,
    ANubhav.

Maybe you are looking for

  • How to take a picture with the iPad

    how do I take a photo with the iPad?

  • Adobe AIR Application Installer.exe

    On my win xp pro sp3 machine from all the Adobe stuff following software installed only: - acrobat reader - flash player - shockwave player The Secunia scan tool noticed me recently I had old version of flash player. It is not right, some days ago ju

  • Safari 3.1 crash using ISA proxy

    As usual since "security patch" broke it, Safari crash again with ISA proxy. At least, other applications don't seem affected this time. Process: Safari [353] Path: /Applications/Safari.app/Contents/MacOS/Safari Identifier: com.apple.Safari Version:

  • Pages tear when scrolling

    I have been having odd things happen when scolling, only starting in the last week or so. When I scroll down the page, I get partway down and then the upper part stops scrolling and the lower part scrolls under it. The opposite thing happens if I scr

  • Need to exclude certain risks in Risk Analysis and Remediation (5.2)

    Hello Experts, My requirement is I need to exclude certain unwanted risks whenever I execute the simulation for a user or an SAP role. We had this provision in the ABAP version of compliance calibrator 4.0. But we are not able to do the same in the u