Browse row of a user table

i have a question about user table. I create my user table and access with getByKey() and there is no problem.
What i have to do for list all record in table ? There is not something Browse ?
thanks in advice

Matteo,
use the recordset object to access all user tables.
SQL is "Select * from [@YourTableName]"
That will get you all records into the recordset.
HTH Lutz Morrien

Similar Messages

  • Tabular: Row filter on USERNAME() still returns all rows if current user is NOT matched in table??

    I have a table (basically the same setup in the various dynamic security in tabular blogs) where the table contains WindowsUserName stored as domain\username.
    I have a Row Filter on the table: SecurityTable has a filter of =SecurityTable[WindowsUserName]=USERNAME()
    When a user connects to the tabular model AND their name is matched in one of the rows they return JUST the rows with their match.  Which makes sense.
    However, if a user connects and their Windows user name is NOT in a row in that table....they return ALL rows???
    That makes no sense to me.
    It behaves almost as if it is doing a check and if it DOESN'T find a match it just returns all values.
    What am I missing?
    --------------EDIT-----------
    Found the issue: that use was (unknown to me) a domain admin, so... admin rights trump all :)

    Resolved:
    User had admin rights, didn't realize this at the time.

  • 'Master data type User table cannot add row'-DTW error

    Hi All,
          I am creating a template for user define Master data table from DTW, when i am trying to port data by using that template through DTW. it is giving error like--'Master data type User table cannot add row'
    So can any one have solution for this.
    Regard's
    Hari

    Hari,
    Please see SAP Note 1234690 on the SAP PartnerEdge Portal.  This seems like a similar problem although the example is using the Business One SDK which uses the DI API.  The DTW also uses the DI API ... so there may be a relation.
    You may want to check the latest patch level for SAP Business One 2007A as the note says it is a known issue.
    Eddy

  • Cannot sort child rows in multilevel tree table

    Hi,
    I originally hijacked a two-year-old forum thread that was vaguely similar to my issue, but a kind forum moderator split my post away
    (and deleted my other hijack post asking this same question)
    so that my inquiry might be viewable on its own.
    Hopefully someone can pay attention to my issue instead of getting it confused with those other old forum threads.
    So, here we go ...
    Is sorting in a treeTable at a particular level possible? Just want to let you I have tried the following approaches to do this. But it dis not work for me.
    I have tree table with 2 levels. I am trying to sort the child rows based on its column say "Display Sequence".
    User can type in number in this column which contains input text. On value change event of the this field, all the
    child rows in the level 2 need to be sorted. This needs to be done without committing the data. On commit it works,
    because it sorts based on order by clause. I want the child rows to be sorted on value change event. Following
    various approaches I tried.
    TreeModel tModel = (TreeModel)treeTable.getValue();
    SortCriterion sortCriterion = new SortCriterion("DisplaySequence",true);
    List<SortCriterion> sortCriteriaList = new ArrayList<SortCriterion>();
    sortCriteriaList.add(sortCriterion);
    tModel.setSortCriteria(sortCriteriaList);
    The above code does not work, As "DisplaySequence" is not available in the parent view object.
    Here is approach no 2
    JUCtrlHierBinding treeTableBinding = null;
    JUCtrlHierNodeBinding nodeBinding = null;
    JUCtrlHierNodeBinding parentNodeBinding = null;
    JUCtrlHierTypeBinding nodeHierTypeBinding = null;
    Key rowKey;
    Object dispSeqObj;
    Number displaySequence = null;
    Map<Key,Number> keyValueMap = null;
    Set<Key> emptyValueKeySet = null;
    Map<Key,Number> sortedKeyValueMap = null;
    DCIteratorBinding target = null;
    Iterator iter = null;
    int rowIndex = 1;
    RowSetIterator rsi = null;
    Row currentRow = null;
    Row row = null;
    RowKeySet selectedRowKey = lookupTreeTable.getSelectedRowKeys();
    Iterator rksIterator = selectedRowKey.iterator();
    if (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    System.out.println("key :"+key);
    treeTableBinding = (JUCtrlHierBinding) ((CollectionModel)lookupTreeTable.getValue()).getWrappedData();
    nodeBinding = treeTableBinding.findNodeByKeyPath(key);
    parentNodeBinding = nodeBinding.getParent();
    //rsi = nodeBinding.getParentRowSetIterator();
    rsi = parentNodeBinding.getChildIteratorBinding().getRowSetIterator();
    keyValueMap = new LinkedHashMap<Key,Number>();
    emptyValueKeySet = new LinkedHashSet<Key>();
    // Gets the DisplaySequence by iterating through the child rows
    while(rsi.hasNext()) {
    if(rowIndex==1)
    row = rsi.first();
    else
    row = rsi.next();
    rowKey = row.getKey();
    dispSeqObj = row.getAttribute("DisplaySequence");
    if(dispSeqObj!=null && dispSeqObj instanceof Number) {
    displaySequence = (Number)dispSeqObj;
    keyValueMap.put(rowKey, displaySequence);
    }else {
    emptyValueKeySet.add(rowKey);
    rowIndex++;
    rowIndex = 0;
    // Sort the numbers using comparator
    DisplaySequenceComparator dispSeqComparator = new DisplaySequenceComparator(keyValueMap);
    sortedKeyValueMap = new TreeMap<Key,Number>(dispSeqComparator);
    sortedKeyValueMap.putAll(keyValueMap);
    rsi.reset();
    nodeHierTypeBinding = nodeBinding.getHierTypeBinding();
    System.out.println("nodeHierTypeBinding :"+nodeHierTypeBinding);
    String expr = nodeHierTypeBinding.getTargetIterator();
    if (expr != null) {
    Object val = nodeBinding.getBindingContainer().evaluateParameter(expr, false);
    if (val instanceof DCIteratorBinding) {
    target = ((DCIteratorBinding)val);
    ViewObject targetVo = target.getViewObject();
    System.out.println("targetVo :"+targetVo);
    targetVo.setAssociationConsistent(true);
    //ri = target.findRowsByKeyValues(new Key[]{rowData.getRowKey()});
    rsi = parentNodeBinding.getChildIteratorBinding().getRowSetIterator();
    //rsi = nodeBinding.getParentRowSetIterator();
    // Rearrange the tree rows by inserting at respective index based on sorting.
    ViewObject vo = nodeBinding.getViewObject();
    iter = sortedKeyValueMap.keySet().iterator();
    while(iter.hasNext()) {
    currentRow = rsi.getRow((Key)iter.next());
    rsi.setCurrentRow(currentRow);
    rsi.setCurrentRowAtRangeIndex(rowIndex);
    //rsi.insertRowAtRangeIndex(rowIndex, currentRow);
    rowIndex++;
    iter = emptyValueKeySet.iterator();
    while(iter.hasNext()) {
    currentRow = rsi.getRow((Key)iter.next());
    rsi.setCurrentRow(currentRow);
    rsi.setCurrentRowAtRangeIndex(rowIndex);
    //rsi.insertRowAtRangeIndex(rowIndex, currentRow);
    rowIndex++;
    rsi.closeRowSetIterator();
    AdfFacesContext.getCurrentInstance().addPartialTarget(treeTable);
    private class DisplaySequenceComparator implements Comparator {
    Map<Key,oracle.jbo.domain.Number> dispSeqMap = null;
    public DisplaySequenceComparator(Map<Key,oracle.jbo.domain.Number> dispSeqMap) {
    this.dispSeqMap = dispSeqMap;
    public int compare(Object a, Object b) {
    Key key1 = (Key)a;
    Key key2 = (Key)b;
    oracle.jbo.domain.Number value1 = dispSeqMap.get(key1);
    oracle.jbo.domain.Number value2 = dispSeqMap.get(key2);
    if(value1.getValue() > value2.getValue()) {
    return 1;
    } else if(value1.getValue() == value2.getValue()) {
    return 0;
    } else {
    return -1;
    In the above code I tried to perform sorting of DisplaySequence values using comparator, then tried to rearrange
    nodes or rows based on sort resurts. But rsi.insertRowAtRangeIndex(rowIndex, currentRow) give
    DeadViewException...unable to find view reference. While setting current row also does not work.
    Approach 3.
    DCIteratorBinding iter1 =
    bindings.findIteratorBinding("childIterator");
    iter1.executeQuery();
    SortCriteria sc = new SortCriteriaImpl("DisplaySequence",false);
    SortCriteria [] scArray = new SortCriteria[1];
    scArray[0] = sc;
    iter1.applySortCriteria(scArray);
    Any help in Sorting Child nodes ADF treeTable is appreciated. Thanks in Advance.
    Abhishek

    Hi Frank,
    Thanks for your reply. I have tried similar approach for sorting tree table child rows based on user specified number and it works. But there is a limitation for this. This sorting works only for read only/transient view object. For updatable view object after sorting, data cannot be saved or updated, as it cannot find the rowid. Here is what I tried
    In the ParentViewImpl class,
    1. overrode the method createViewLinkAccessorRS, so that this method is forcefully executed.
    @Override
    protected ViewRowSetImpl createViewLinkAccessorRS(AssociationDefImpl associationDefImpl,
    oracle.jbo.server.ViewObjectImpl viewObjectImpl,
    Row row,
    Object[] object) {
    ViewRowSetImpl viewRowSetImpl = super.createViewLinkAccessorRS(associationDefImpl, viewObjectImpl, row, object);
    return viewRowSetImpl;
    2. Added the following method, which will be invoked on valueChange of DisplaySequence in child row. Expose this method through client interface. This method accept a parameter i.e. parent row key of the child row.
    public void sortChildRecords(Key parentKey) {
    ViewObject viewObject = null;
    String type = null;
    if(parentKey==null) {
    Row [] row = this.findByKey(parentKey, 1);
    RowSet rowSet = (RowSet)row[0].getAttribute("ChildVO");
    viewObject = rowSet.getViewObject();
    viewObject.setSortBy("DisplaySequence asc");
    }else {
    Row row = getCurrentRow();
    RowSet rowSet = (RowSet)row.getAttribute("ChildVO");
    viewObject = rowSet.getViewObject();
    viewObject.setSortBy("DisplaySequence asc");
    this.setQueryMode(ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES |
    ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
    this.executeQuery();
    For custom sort, lets say all the numbers should be display first in ascending order, and null or empty values to be display at the end need to override the getRowComparator method in the ChildViewImpl class,
    Here is the code for the same
    @Override
    public Comparator getRowComparator() {
    SortCriteria sortCriteria = new SortCriteriaImpl("DisplaySequence",false);
    SortCriteria [] sortCriterias = new SortCriteria[1];
    sortCriterias[0] = sortCriteria;
    return new DisplaySequenceComparator(sortCriterias);
    private class DisplaySequenceComparator extends RowComparator {
    public DisplaySequenceComparator(SortCriteria [] sortCriterias) {
    super(sortCriterias);
    public int compareRows(Row row1, Row row2) {
    Object dispSeqObj1;
    Object dispSeqObj2;
    Number dispSeq1 = null;
    Number dispSeq2 = null;
    boolean compareRow1 = true;
    boolean compareRow2 = true;
    if(row1!=null) {
    dispSeqObj1 = row1.getAttribute("DisplaySequence");
    if(dispSeqObj1!=null && dispSeqObj1 instanceof Number) {
    dispSeq1 = (Number)dispSeqObj1;
    }else {
    compareRow1 = false;
    if(row2!=null) {
    dispSeqObj2 = row2.getAttribute("DisplaySequence");
    if(dispSeqObj2!=null && dispSeqObj2 instanceof Number) {
    dispSeq2 = (Number)dispSeqObj2;
    }else {
    compareRow2 = false;
    if(compareRow1 && compareRow2) {
    if(dispSeq1.getValue() > dispSeq2.getValue()) {
    return 1;
    } else if(dispSeq1.getValue() == dispSeq2.getValue()) {
    return 0;
    } else {
    return -1;
    if(!compareRow1 && compareRow2)
    return 1;
    if(compareRow1 && !compareRow2)
    return -1;
    return 0;
    The above solution works properly, and sorts the child tree rows. But while saving the changes, update fails. I also came to know that in-memory sorting is applicable to read-only/transient view objects from some blogs and also mentiond in this link http://docs.oracle.com/cd/E24382_01/web.1112/e16182/bcadvvo.htm
    Is there any way that updatable view objects can be sorted and saved as well?
    Thanks,
    Abhishek
    Edited by: 930857 on May 2, 2012 7:12 AM

  • HOW CAN I ADD/UPDATE/INSERT IN A USER TABLE WITH MATRIX

    Hi All,
    I have one User table (Defined as No Object) and what i need to do is a form with a matrix to Add/Update/Delete data in my user table.
    I already create the form and the matrix that already give me the user table data. But now i have several problems to solve.
    First I try to add a new row but this new row get the data of the last row in the matrix. What i needed is a blank row to add new data in the user table.
    Second, when i change data in matrix and do update in the form, sap show me the message that the operation is successfully done but the data in the user table in not updated.
    I am trying to do one forma like whe can find in Setup-> General -> Freight.
    Can anyone help me?
    Best Regards,
    Luis Duarte

    Hi,
    If ur dealing with a simple form like that U can as well use the direct table form, and just provide a FMS to auto matically fill the code and name. U can directly use the form by.. Tools-->UserDefined Windows
    Or
    Comming to ur problem.... when ur adding a new row clear the data sources so that u'll get a blank row.
    And for update the best thing to do is delete all the records in the table and again insert all the records directly from the matrix.
    Hope it helps,
    Vasu Natari.

  • How to create an encrypted key for a user table

    I have an airshow website where volunteers and vendors can apply online (www.hollisterairshow.com) . The city attorney requires that we have a wet signature on a printed application form so the volunteer/ vendor currently has to print their application at the time they apply online, then sign it and mail it in and this works fine. Unfortunately, we have had a lot of instances where volunteers/ vendors needed to print their application again and the only way we could do this was for an administrator to print their application to a pdf file and e-mail the file to them. So, I'd like to improve this process by automatically sending an e-mail to the applicant when they apply online with a link to a printable page and containing a key pointing to their application. This way, volunteers/ vendors could print and sign their application whenever they want and as many times as they need to. Each volunteer is a single row in a volunteer table and each vendor is a single row in a vendor table.
    The key I use in the tables is a sequential key automatically incremented by MySQL so I would end up sending them a link looking something like www.hollisterairshow.com/printvolunteerapp.php?volunteernumber=27 . This would work, but it wouldn't be hard for a volunteer to change it to a different volunteernumber and so get access to someone else's personal information, which would not be acceptable. So, I'm thinking I need a secondary key that is somehow scrambled and used as an secondary index in the table so I'd be sending a link that mght look like www.hollisterairshow.com/printvolunteerapp.php?volunteerkey=sygew . So I'd really appreciate some advice on how to create a scrambled secondary index for each volunteer or vendor and plug it into the link I send them in the e-mail.
    Thanks for any advice.
    Tony

    Your question is not clear whether you want to create account or you want to create agent.
    For creating local agent you can refer
    http://bhabaniranjan.com/configure-odi-11g-local-agent/
    For creating EE Agent you can refer
    http://bhabaniranjan.com/configure-odi-java-ee-agent-on-windows-server-2008-64-bit/
    For creating account, login to supervisor and then go to security tab. There you can create different user to login to odi Studio. Let me know If i understand you correctly or not.
    Thanks.

  • Merging of multiple rows in an internal table as a single record

    Hi All,
    I have an internal table which has the following columns:
    text, date, time, user.
    it stores notes in the internal table.
    The problem is...when I save a note with multiple lines and spaces it saves each line of the note as a row in the internal table.
    Thus i get more no. of rows in the internal table compare to the no. of rows!
    I need to store each notes as single row in the internal table.
    Please advise how to approach this?
    Helpful answers will be rewarded.
    Thanks & Regards,
    Anshumita.

    You can create a deep internal table. You can declare one Column as an internal table and store the NOTES in that Internal table for each row.
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm
    you can check the example in the link
    regards,
    abhishek

  • How to save matrix do user table?

    Hi,
    I have created on system form matrix as:
                        oNewItem = oOrderForm.Items.Add("a", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
                        oNewItem.Top = 150
                        omatrix1 = oNewItem.Specific
                        oColumns = omatrix1.Columns
                        oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT)
                        oColumn.TitleObject.Caption = "#"
                        oColumn.Width = 20
                        oColumn.Editable = False
                        oColumn = oColumns.Add("code", SAPbouiCOM.BoFormItemTypes.it_EDIT)
                        oColumn = oColumns.Add("name", SAPbouiCOM.BoFormItemTypes.it_EDIT)
                        oColumn = oColumns.Add("cesta", SAPbouiCOM.BoFormItemTypes.it_EDIT)
    This matrix i have bounded to datasource as:
                oDBDataSource = oOrderForm.DataSources.DBDataSources.Add("@SKIL_ATTACH")
                oConditions = New SAPbouiCOM.Conditions
                oCondition = oConditions.Add
                oCondition.BracketOpenNum = 2
                oCondition.Alias = "U_PATH"
                oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                oCondition.CondVal = "xxx"
                oCondition.BracketCloseNum = 1
                oDBDataSource.Query(oConditions)
                oItem = oOrderForm.Items.Item("a")
                omatrix1 = oItem.Specific
                oColumns = omatrix1.Columns
                oColumn = oColumns.Item("cesta")
                oColumn.DataBind.SetBound(True, "@SKIL_ATTACH", "U_XCESTA1")
                oColumn = oColumns.Item("code")
                oColumn.DataBind.SetBound(True, "@SKIL_ATTACH", "CODE")
                oColumn = oColumns.Item("name")
                oColumn.DataBind.SetBound(True, "@SKIL_ATTACH", "NAME")
                omatrix1.LoadFromDataSource()
    The user table has 3 my fields (U_Path, U_xcesta and U_xcesta1) abd 2 fileds (code and name) - this two fields i didnt create, i think that are some system fields?
    On the system form everything seems to be ok, I can add rows, modify data, set new data, ... After changing any data in this matrix, the system button will change from OK to Update or Add and after click on this button in status bar is OK, the data was added or updated...
    The problem is, that in user table aren`t data modified and there are still old data.
    I tried to make update manually as:
                    oItem = oOrderForm.Items.Item("a")
                    omatrix1 = oItem.Specific
                    omatrix1.AddRow(1, 0)
                    Dim cell As SAPbouiCOM.Cell
                    Dim col As SAPbouiCOM.Column
                    Dim ed As SAPbouiCOM.EditText
                    col = omatrix1.Columns.Item("code")
                    cell = col.Cells.Item(1)
                    ed = cell.Specific
                    ed.String = CStr("some data")
                    omatrix1.Columns.Item("cesta").Editable = True
                    omatrix1.Columns.Item("cesta").Cells.Item(1).Click(SAPbouiCOM.BoCellClickType.ct_Double)
                    omatrix1.FlushToDataSource()
                    omatrix1.AddRow(1, 1)
    but nothing happens and data in table are still old. What I`m doing bad? Could anyone help me please?
    Please be patient, because Im working with SBO for short time. Thanks!

    I solved is through manual updating and inserting to database as"
                        oUserTable = oCompany.UserTables.Item("SKIL_ATTACH")
                        oOrderForm.DataSources.DataTables.Item(0).ExecuteQuery("SELECT coalesce(max(convert(integer, code)),0) as max from dbo.[@SKIL_ATTACH] with(nolock)")
                        oUserTable.UserFields.Fields.Item("U_Popis").Value = "xxxxx"
                        oUserTable.UserFields.Fields.Item("U_PATH").Value = "xxxxx"
                        oUserTable.UserFields.Fields.Item("U_OP").Value = "xxxxx"
                        lRetCode = oUserTable.Add
    It works, but I think that it is not the easiest way.

  • Deleting a row from the item table

    Hi All,
    I have a requirement where I need to put a button to delete the selected row from the item table and for this I have written the following code:
    DATA lo_nd_t_bseg TYPE REF TO if_wd_context_node.
        DATA lo_el_t_bseg TYPE REF TO if_wd_context_element.
        DATA ls_t_bseg TYPE wd_this->element_t_bseg.
        data: it_tab type table of wd_this->element_t_bseg.
      lo_nd_t_bseg = wd_context->path_get_node( path = `Z.T_BSEG` ).
      lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
      lo_el_t_bseg->get_static_attributes(
        IMPORTING
          static_attributes = ls_t_bseg ).
        lo_nd_t_bseg = wd_context->path_get_node( path = `Z.T_BSEG` ).
        lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
        IF lo_el_t_bseg IS not INITIAL.
          lo_nd_t_bseg->remove_element( lo_el_t_bseg ).
        ENDIF.
    Now the problem is although it's deleteing the selected line correctly but because of this I am losing one line on the screen for the user to enter... my form has a fixed number of lines and in my case it's 10... so everytime I am using deleting a line item I am losing one line to enter..... can you please tell me how can I avoid this?
    Edited by: rajatg on Aug 4, 2011 3:12 PM

    lets say...
    i have 1,2,3 documents
    i have cleared , document 2....
    1. when the user selects this record.... you can read the context_element....using the context element you can get the values and clear those values and set the blank values...
    when the user click on save ...you can have only those two records in the table.
    2. conitnue with your logic .... remove_element. once it is done ,,, create_element at the deleted index...
    3. when clicked on delete ...remove_element ( current code).... bind the table to the node... and you will have ur values

  • Trigger in mutation - Update another rows in the same table with a trigger

    Hi ,
    I try to do a before update trigger on a table , but the trigger is in mutation. I understand why it do that but my question is :
    How can I update other rows in the same table when a UPDATE is made on my table??????
    Here is my trigger :
    CREATE OR REPLACE TRIGGER GDE_COMPS_BRU_5 BEFORE
    UPDATE OF DEPARTEMENT--, DISCIPLINE, DEG_DEMANDE, CE_ETAB
    ON GDEM.COMPOSITION_SUBV
    FOR EACH ROW
    Organisme : FQRNT-FQRSC
    Date de création : 14-07-2011
    Date de modification :
    Modifié par :
    Auteur : Johanne Plamondon
    Description : Ce déclencheur s'executera lors de la modification
    du responsable dans la table COMPOSITION_SUBV
    DECLARE
    V_OSUSER V$SESSION.OSUSER%TYPE;
    V_PROGRAM V$SESSION.PROGRAM%TYPE;
    V_TERMINAL V$SESSION.TERMINAL%TYPE;
    V_MACHINE V$SESSION.MACHINE%TYPE;
    V_MODULE V$SESSION.MODULE%TYPE;
    V_LOGON_TIME V$SESSION.LOGON_TIME%TYPE;
    V_AUDIT_ID NUMBER;
    vSEQ NUMBER;
    i NUMBER;
    vID DEMANDE.ID%TYPE;
    BEGIN
    begin
    SELECT OSUSER, PROGRAM, TERMINAL,MACHINE,MODULE, LOGON_TIME
    INTO V_OSUSER,V_PROGRAM,V_TERMINAL,V_MACHINE,
    V_MODULE,V_LOGON_TIME
    FROM V$SESSION
    WHERE TYPE = 'USER'
    AND USERNAME = USER
    AND LAST_CALL_ET IN (0,1)
    AND ROWNUM < 2;
    exception when others then null; end;
    IF NVL(:NEW.SC_PART,' ') = 'CHC' THEN
    SELECT COUNT(*)
    INTO i
    FROM DEMANDE
    WHERE DEM_REF = :NEW.DEM_ID
    AND PER_NIP = :NEW.PER_NIP;
    IF i = 1 THEN
    SELECT ID
    INTO vID
    FROM DEMANDE
    WHERE DEM_REF = :NEW.DEM_ID
    AND PER_NIP = :NEW.PER_NIP;
    UPDATE COMPOSITION_SUBV
    SET --CE_ETAB     = :NEW.CE_ETAB,
    --DISCIPLINE  = :NEW.DISCIPLINE,
    DEPARTEMENT = :NEW.DEPARTEMENT,
    --DEG_DEMANDE = :NEW.DEG_DEMANDE,
    DATE_MODIF = SYSDATE,
    USER_MODIF = V_OSUSER
    WHERE DEM_ID = vID
    AND PER_NIP = :NEW.PER_NIP
    AND ANNEE = :NEW.ANNEE;
    END IF;
    END IF;
    /*EXCEPTION
    WHEN OTHERS THEN
    NULL;*/
    END;

    A standard disclaimer, the mutating trigger error is telling you that you really, really, really don't want to be doing this. It generally indicates a major data model problem when you find yourself in a situation where the data in one row of a table depends on the data in another row of that same table. In the vast majority of cases, you're far better off fixing the data model than in working around the problem.
    If you are absolutely sure that you cannot fix the data model and must work around the problem, you'll need
    - A package with a collection (or global temporary table) to store the keys that are modified
    - A before statement trigger that initializes the collection
    - A row-level trigger that adds the keys that were updated to the collection
    - An after statement trigger that iterates over the data in the collection and updates whatever rows need to be updated.
    If you're on 11g, this can be simplified somewhat by using a compound trigger with separate before statement, row-level, and after statement sections.
    Obviously, though, this is a substantial increase in complexity over the single trigger you have here. That's one of the reasons that it's generally a bad idea to work around mutating table exceptions.
    Justin

  • A Table that was created at Run time. A Row Properly Deleted from Table Is Still Present on Form with BindingNavigator

    Hello
    I have a dataset that was created at design time
    but - after I run the app, it randomly creates a table based on The Users name
    since I do not know the users name before had, the table is not part of my existing dataset
    (I actually used an insert into sql nonquery to just make this table a copy of the masterUserTable)
    Now - I have a binding navigator on my form, that is originally bound to masterUserTable, but my goal is to make it bound to the users table (let's say GabrielUserTable)
    I thought I did so with this code: 
            'TODO: This line of code loads data into the 'MyLearningDBDataSet.masterUserTable' table. You can move, or remove it, as needed.
            Me.MyMainDBTableAdapter.Fill(Me.MyLearningDBDataSet.masterUserTable)
            Dim ThisNewVariable As String = MyUserNameIs & "UserTable"
            Dim ThisNewTableName As New DataTable
            Me.MyLearningDBDataSet.masterUserTable.TableName = ThisNewVariable
            Me.MyMainDBTableAdapter.Fill(Me.MyLearningDBDataSet.masterUserTable)
    that appeared to do the trick  (but if it is incorrect please advice on the proper way to add a table made at runtime to a users existing datset)
    Else where in my code  I successfully execute the following NonQuery :
            SqlString= "DELETE FROM " & MyUserNameIs & "UserTable" & vbCrLf &
                "WHERE vState='" & txtStateInfo.Text & "';"
    I check in Visual Studio 2013 that the row was deleted from the "GabrielUserTable"  (Gabriel is the current value of MyUserNameIs) by using the Server Explorer and right clicking
    on the table and choosing show talbe data
    But the MyMainDBBindingNavigator is still showing the item I deleted.
    So after searching for answers - I created a new button for testing and added the following code to test if it would work
            Me.Validate()
            Me.MyMainDBBindingSource.EndEdit()
            Me.TableAdapterManager.UpdateAll(Me.MyLearningDBDataSet)
    but the data is still shwoing after deleting it with my NonQuery 
    Please Help!

    Hi genterprise,
    >> Now - I have a binding navigator on my form, that is originally bound to masterUserTable, but my goal is to make it bound to the users table (let's say GabrielUserTable)
    In my option, if you want to rebind the users table to the navigator, you need to set the BindingNavigator.BindingSource. Based on your description, it seems that you did not reset the datasoure of the MyMainDBBindingNavigator. It was the original datasource
    of the masterUserTable. For more details about BindingNavigator.BindingSource Property. You could refer the link below:
    # BindingNavigator.BindingSource Property
    https://msdn.microsoft.com/en-us/library/system.windows.forms.bindingnavigator.bindingsource%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • How to  load data into user tables using DIAPIs?

    Hi,
    I have created an user table using UserTablesMD object.
    But I don't have know how to load data into this user table. I guess I have to use UserTable object for that. But I still don't know how to put some data in particular column.
    Can somebody please help me with this?
    I would appreciate if somebody can share their code in this regard.
    Thank you,
    Sudha

    You can try this code:
    Dim lRetCode As Long
    Dim userTable As SAPbobsCOM.UserTable
    userTable = pCompany.UserTables.Item("My_Table")
    'First row in the @My_Table table
    userTable.Code = "A1"
    userTable.Name = "A.1"
    userTable.UserFields.Fields.Item("U_1stF").Value = "First row value"
    userTable.Add()
    'Second row in the @My_Table table
    userTable.Code = "A2"
    userTable.Name = "A.2"
    userTable.UserFields.Fields.Item("U_1stF").Value = "Second row value"
    userTable.Add()
    This way I have added 2 lines in my table.
    Hope it helps
    Trinidad.

  • I canu00B4t do a formatted search in a user table

    Hye, I'm trying to do a formatted search over a user table using and I get the error -2006, why?
    I use "report generator" and my selecc is :
    SELECT T0.U_grupo, T0.U_CODE
    FROM T0
    WHERE T0.U_grupo ='[%0]' FOR BROWSE
    If I do the same with standar table ( e.j OITM),  all is right:
    SELECT T0.ItemCode, T0.ItemName
    FROM OITM T0
    WHERE T0.PrchseItem ='[%0]' FOR BROWSE
    unless, with user tables no, whyyyy?
    thank´

    I have seen this, though I don't have an official answer, I have my own theories.  SBO matches up the variable with the previous field name and looks up the description for that field.  The description for user fields is not stored in the same place as standard fields.
    In a previous thread, named "SQL Syntax in SBO" (number 7144) another user showed a way to do dummy selects with the variables to get the names of standard fields.  Then the variables can be used for the real work.
    That is awkward, and it limits you to the descriptions of standard fields.
    Bruce

  • Duplicate Rows In Oracle Pipelined Table Functions

    Hi fellow oracle users,
    I am trying to create an Oracle piplined table function that contains duplicate records. Whenever I try to pipe the same record twice, the duplicate record does not show up in the resulting pipelined table.
    Here's a sample piece of SQL:
    /* Type declarations */
    TYPE MY_RECORD IS RECORD(
    MY_NUM INTEGER
    TYPE MY_TABLE IS TABLE OF MY_RECORD;
    /* Pipelined function declaration */
    FUNCTION MY_FUNCTION RETURN MY_TABLE PIPELINED IS
    V_RECORD MY_RECORD;
    BEGIN
    -- insert first record
    V_RECORD.MY_NUM = 1;
    PIPE ROW (V_RECORD);
    -- insert second duplicate record
    V_RECORD.MY_NUM = 1;
    PIPE ROW (V_RECORD);
    -- return piplined table
    RETURN;
    END;
    /* Statement to query pipelined function */
    SELECT * FROM TABLE( MY_FUNCTION ); -- for some reason this only returns one record instead of two
    I am trying to get the duplicate row to show up in the select statement. Any help would be greatly appreciated.

    Can you provide actual output from an SQL*Plus prompt trying this? I don't see the same behavior
    SQL> SELECT * FROM V$VERSION;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL> CREATE TYPE MY_RECORD IS OBJECT(MY_NUM INTEGER);
      2  /
    Type created.
    SQL> CREATE TYPE MY_TABLE IS TABLE OF MY_RECORD;
      2  /
    Type created.
    SQL> CREATE OR REPLACE FUNCTION MY_FUNCTION
      2  RETURN MY_TABLE
      3  PIPELINED
      4          AS
      5                  V_RECORD        MY_RECORD;
      6          BEGIN
      7                  V_RECORD.MY_NUM := 1;
      8                  PIPE ROW(V_RECORD);
      9
    10                  V_RECORD.MY_NUM := 1;
    11                  PIPE ROW(V_RECORD);
    12
    13                  RETURN;
    14          END;
    15  /
    Function created.
    SQL> SELECT * FROM TABLE(MY_FUNCTION);
                  MY_NUM
                       1
                       1

  • How to write select query for all the user tables in database

    Can any one tell me how to select the columns from all the user tables in a database
    Here I had 3columns as input...
    1.phone no
    2.memberid
    3.sub no.
    I have to select call time,record,agn from all the tables in a database...all database tables have the same column names but some may have additional columns..
    Eg: select call time, record,agn from ah_t_table where phone no= 6186759765,memberid=j34563298
    Query has to execute not only for this table but for all user tables in the database..all tables will start with ah_t
    I am trying for this query since 30days...
    Help me please....any kind of help is appreciated.....

    Hi,
    user13113704 wrote:
    ... i need to include the symbol (') for the numbers(values) to get selected..
    eg: phone no= '6284056879'To include a single-quote in a string literal, use 2 or them in a row, as shown below.
    Starting in Oracle 10, you can also use Q-notation:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements003.htm#i42617
    ...and also can you tell me how to execute the output of this script. What front end are you using? If it's SQL*Plus, then you can SPOOL the query to a file, and then execute that file, like this:
    -- Suppress SQL*Plus features that interfere with raw output
    SET     FEEDBACK     OFF
    SET     PAGESIZE     0
    -- Run preliminary query to generate main query
    SPOOL     c:\my_sql_dir\all_ah_t.sql
    SELECT       'select call time, record, agn from '
    ||       owner
    ||       '.'
    ||       table_name
    ||       ' where phone_no = ''6186759765'' and memberid = j34563298'
    ||       CASE
               WHEN ROW_NUMBER () OVER ( ORDER BY  owner          DESC
                              ,        table_name      DESC
                              ) = 1
               THEN  ';'
               ELSE  ' UNION ALL'
           END     AS txt
    FROM       all_tables
    WHERE       SUBSTR (table_name, 1, 4)     = 'AH_T'
    ORDER BY  owner
    ,       table_name
    SPOOL     OFF
    -- Restore SQL*Plus features that interfere with raw output (if desired)
    SET     FEEDBACK     ON
    SET     PAGESIZE     50
    -- Run main query:
    @c:\my_sql_dir\all_ah_t.sql
    so that i form a temporary view for this script as a table(or store the result in a temp table) and my problem will be solved..Sorry, I don't understand. What is a "temporary view"?

Maybe you are looking for

  • Google news buttons no longer working

    I'm still having some problems with Google News that I asked about in an earlier question (https://support.mozilla.org/en-US/questions/947273) In Firefox 18 and 19, the buttons to expand / contract the news items on http://news.google.com/ are no lon

  • How do I merge Aperture libraries?

    On rather poor advice, I started splitting my Aperture library by year -- I did this by setting up a smart album for each year and clicking "Export > Smart Album as New Library..." I now want to merge them back together but am not sure how. I am also

  • CMD+S registering as "CMD+C" system wide?

    Hi all, I'm looking for help in tracking down the source of an error in keyboard commands I'm having. System-wide, "CMD+S" is registering an input of "CMD+C". Pressing "s" alone, behaves as intended. Pressing "shift+s" behaves as intended. Pressing "

  • Conditional GROUP BY clause

    Hi, I have four columns in group by clause. I want to add conditional group by clause. Case 1 : If one of the  column's value is null, I don't want to include it in group by clause. Means, Now GROUP BY clause will have only 3 columns. Case 2 : If not

  • A12E1 error

    I am running windows 7 and am trying to install the cc desktop app and have tried the tips in the other forum.