Problem with apply changes on master-detail with respect to date handling

dear sir,
i have one tabler where in i have created from_Date and to_date as varchar2(30) each. I stored the from date as 'dd-mon-yyyy hh24:mi' I had written before header process for calculating no of days between from_Date and to_Date using the said format. If to_Date is null then first i store the value as
to_char(sysdate,'dd-mon-yyyy hh24:mi') and then convert it as to_Date(substr(to_Date,1,17),'dd-mon-yyyy hh24:mi'). this calculation of days procedures works fine in sql command mode.
when i am handling through master-detail page i works fine when there is null value inf to_Date vc2 column. if i store using date picker dd-mon-yyyy hh24:mi, the data is getting stored but subsequent edit through master detail give error as ora-01722 unable to fetch row. Manually if i set the to_Date as null pages works fine. I spent lots of time and unable to understand the mistake i do.
if anybody could help me, i will be much obliged.
thanking you,
yours
dr.s.raghunatha

I think the best would be if you create an example on apex.oracle.com and I will debug it.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------------------

Similar Messages

  • Problem with crude operations in master detail tables

    Hi,
    I have Master-Detail tables in my page and crud operations are there for both the tables. Create/delete/edit are working fine on the master table but i am facing the following problems for the detail table
    1.delete operation is alway referring to the 1st record.
    2.Edit operation is working fine for the 1st time but when i amt trying to edit any other record it's refer to the previous record, if i did the same again then it's pointing to current record.
    Selected row keys and selectionListner and row selection is defined on my detail table as shown below.
    selectedRowKeys="#{bindings.CmSubscriberTerritoryXrefView1.collectionModel.selectedRow}"
    selectionListener="#{bindings.CmSubscriberTerritoryXrefView1.collectionModel.makeCurrent}"
    rowSelection="single"
    Please do need full.

    Hi,
    Thanks for your quick reply.
    I am using JDeveloper 11g. Yes i select the record, i am using a popup for delete operation so i write a button which invoke popup in that popup i am asking confirmation like do you wanted to delete for not. in the OK button i have return logic like
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("Delete2");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    operationBinding = bindings.getOperationBinding("Commit");
    result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    FacesContext fc = FacesContext.getCurrentInstance();

  • Master Details with ADFBC Listbox

    Hi Everyone,
    I'm trying to setup master - detail page with ADF BC, using Dept / Emp.
    I want to use a listbox for the master object, rather than the form + navigation commands as shown in the classic demos, so I've setup a listbox as following:
    <af:selectOneListbox value="#{bindings.DepartmentsView1.inputValue}"
    label="Available Flows:"
    id="listbox_depts">
    <f:selectItems value="#{bindings.DepartmentsView1.items}"
    id="id_Selcet_Items"/>
    The details element is the classic read-only table created by dragging the Employees view (under the departments) into the page.
    The problem arises when I run the page - the list box shows all the departments, but when I click on different departments the table data does NOT change (as it would when navigating between rows with the classical form navigation buttons).
    I've set up the Table's partial triggers to both of the listbox ids: id_Selcet_Items and listbox_depts but this doesn't help.
    Is this a bug, or am I doing something totally wrong?
    Tal.

    This looks like a good question for the JDev 11g TP3 forum.
    -h.

  • Master/details with render false on details when no rows doesn't work fine

    I created a standard master/details (form/form) based on Dept and Emp tables.
    This work as expected.
    Then i changed the rendered property of the details table by setting the following EL #{bindings.DeptView1EmpView2.estimatedRowCount>0}
    because i do not want details table to appear when there are no rows
    Here is how things go
    1) navigate to deptno 10, you see the employees of dept 10 correctly, the same applies to 20, and 30, but when you select dept 40, things start acting kind of wierd
    the details table does not disappear as expected
    returning back to dept 10, or 20 etc does not also render the details it freezes, keep navigating between 10,20,30 and randomly, the screen refershes correctly, until you again hit an master with empty details.
    If you select a master with empty details and use the submit buttom, the details table disappears as it should, if you try other master rows, the details remain hidden until you submit the page manually
    any ideas
    regards
    Ammar Sajdi

    hello again
    i removed PPT and the autosubmit that are created by default, and replaced them with JavaScript Submit() operation linked to the master table row selector. Now it works, but really i still do not know the negative implications of this work around. I feel it is not a good idea, since ADF designer favoured using the PPR method
    Ammar

  • Master-detail with auto-generated primary key(master)

    Hello,
    I have the following master-detail setup:
    Master - block A primary key is: codeA
    Detail - block B
    codeA is genrated only at commit time and is obtained from a sequence.
    User needs to add detail records. This is easy to do since he has to click on the insert icon on the toolbar. At commit time, use commit_form.
    Prob: the requirements as asked by the client is to add a button (which we will label INSERT DETAIL). When the user click on the button, it opens a window where he can enter the detail info then click on save. This should bring him back to the master-detail form and the record in the detail block is inserted.
    What is the problem here ? since the detail block has the foreign key tied to the master primary key, the window-form (with the call_form) that we opened for the detail entry won't be able to save since at this point we still have not assigned a value for the primary key (and hence a value for the foreign key).
    Possible Suggestions:
    -Use a temp database table to hold the detail record from the second form and use it to transfer values to the detail record in the master-detail
    -Use a global record group
    -We can't use parameter list to pass back these values.
    So my question is:
    What would be the most efficient way to have an insert button on the detail block that would allow the user to have a pop up where he can insert his values and then be brought back to the master-detail.
    Thanks.

    Hello again,
    May be I was not clear enough.
    Scenario 1: We use the master-detail form as is with the default oolbar. In this case, the user can insert the detail records one by one without needing the primary-foreign key value since this is handled by default.
    Once we save the form (commit_form), I use the pre-insert trigger to get the master block primary key generated from the sequence and since the detail block key is copied from this value, both are saved correctly and it is the end of the story.
    Scenario 2: As explained in the initial post, the user will populate the detail records one by one by clicking on the -INSERT DETAIL- button and hence has a window where he can insert the detail info and then be brought back to the master-detail form every time he enters a new detail record.
    The problem here is that I can't generate the primary key for the master block since the client has the following requirement:
    The user can always change his mind and not complete, meaning save the form, his process
    As such, the key should be generated in the last step before Commit.

  • Master-detail with dynamic view object

    How can you create a view link with a view object that is dynamic? I have created a master-detail relationship on a UIX page. I change the master view object at runtime using a view definition and SQL and then I bind the view object to an iterator on a UIX page. I need the new dynamic view object to maintain the link between the detail view object. Is this possible?
    The reason why I have to change the view object at runtime is because I am implementing a search module and the tables in the from clause can be modified at runtime so I need to have a dynamic view object.
    Thanks,
    Sanjay

    After playing around with ViewObjectImpl's setQuery() method some more I found out that this solution might not work for me due to the following reason: when the user tries to sort a column in the result table, the original contents of the view object get executed instead of the run time query.
    <p>
    I would like to go back to my original solution that included creating a view definition based on the runtime query and then creating a view object from that which I bind to the RowSetIterator. The missing piece to the master-detail functionality is with the detail Iterator being in sync with the master. I have tried the following but I get a ClassCastException <p>
    DCIteratorBinding detailBinding = ctx.getBindingContainer().findIteratorBinding("DetailIterator");
    detailBinding.getViewObject().<b>setMasterRowSetIterator</b>(masterBinding.getRowSetIterator());
    <p>
    here is the relevant stack trace:
    java.lang.ClassCastException
    at oracle.jbo.client.remote.ViewUsageImpl.getImplObject(ViewUsageImpl.java:1829)
    at oracle.jbo.client.remote.RowSetImpl.setMasterRowSetIterator(RowSetImpl.java:512)
    at oracle.jbo.client.remote.ViewUsageImpl.setMasterRowSetIterator(ViewUsageImpl.java:1147)
    at oracle.jbo.common.ws.WSViewObjectImpl.setMasterRowSetIterator(WSViewObjectImpl.java:1005)

  • Master Detail with programmatic ViewObjects and writeXML

    Hi,
    Using jdev 11.1.1.3.
    I created two programmatic ViewObjects related by a ViewLink (1to*).
    From an application module method, I create a row in the master ViewObject. Then using the accessor obtain the RowIterator for the detail, and create a row on that detail.
    If then I use the writeXML method on the master ViewObject, the output is only representing the master, not the detail.
    Here is the code:
            VO_MasterImpl voMaster = getVO_Master2();
            //create the master row
            VO_MasterRowImpl rowMaster = (VO_MasterRowImpl)voMaster.createRow();
            String id = "unique";
            rowMaster.setAtt1(id);
            rowMaster.setAtt2("something");
            //obtain the rowIterator for the detail
            RowIterator detail = rowMaster.getVO_Detail();
            //create the detail row
            VO_DetailRowImpl rowDetail = (VO_DetailRowImpl)detail.createRow();
            rowDetail.setAtt1(id);
            rowDetail.setAtt2("sth2");
            //insert the detail row
            detail.insertRow(rowDetail);
            //insert the master row
            voMaster.insertRow(rowMaster);
            //obtain the xml
            Node node = voMaster.writeXML(-1,XMLInterface.XML_OPT_ALL_ROWS);master.att1 is key for Master.
    detail.att1 is foreign key to Master.
    This is the contents of node:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <VO_Master><VO_MasterRow><Att1>unique</Att1><Att2>something</Att2></VO_MasterRow></VO_Master>What I would expect is that the detail row (<VO_DetailRow>) appears within the <VO_MasterRow>.
    Anyone knows what I'm missing here?
    Thanks
    Roger B
    Edited by: RogerB on 30-Dec-2010 02:16

    Hi,
    After some more tests...
    As said before, I tried with SQL VOs (Dept and Employees). No differences between the VL Dept and Emp, and the VL VO_Master and VO_Detail. They have same relationship (1 to *) and also same (changing names) SQL where (source and destination).
    I debuged the code, using ADF source code, and noticed the following:
    When iterating the rows to write the XML, at ViewRowImpl, it takes the AttributeDef and perform different actions depending on mKind (ATTR_ASSOCIATED_ROW or ATTR_ASSOCIATED_ROWITERATOR). Second one is for ViewLink.
    Once inside ATTR_ASSOCIATED_ROWITERATOR, I can see that the default RowSetIterator, has no rows (getRowCount = 0). So no child rows (for the VO_Detail), are added to the XML Node.
    On the other hand, the Dept and Employees, I can see that the default RowSetIterator has rows.
    Could this be related to the fact that Programatic ViewObjects are not persisted anywhere?
    any other clues appreciated? Does anyone tried this before (programatic master detail relationship writing to XML) ?
    Regards,
    Roger

  • Facing Problem in creation on Customer Master Record with reference

    Dear SAP Experts,
    I am making a New Customer master record with referenec to existing one. Account  Group """ Stock Transfer - Depot""" do not use internal no assignment, we put external no to customer code. but when we enter the customer master with reference to existing one, system shows the error.....enter a no between A001 and Z999.
    Customer Record Details-
    Account Group - Stock Transfer Depot
    Customer - 1101
    Compnay Code- 1000
    Sales Organisation - 1000
    Distribution Channel -20
    Division - 01
    Reference:
    Customer - 2001
    Comapny Code - 2000
    Sales Organisation - 2000
    Distribution Channel - 20
    Division - 01
    Error: ENTER A NO BETWEEN  A001 AND Z999
    I m not getting why system showing this type of error, should i need to configure new customer code sumwhere in IMG if yes please let me know.
    Lokking forward for your quick response on the same.
    Regards
    Parul Deshwal

    Hi Parul Deshwal,
    - The number range is created in XDN1.
    - The number range is assigned to the account group "Stock Transfer - Depot" in SAP Customizing Implementation Guide>Financial Accounting>Accounts Receivable and Accounts Payable>Customer Accounts>Master Data>Preparations for Creating Customer Master Data>Assign Number Ranges to Customer Account Groups
    Remember - If you are entering an external number it generally means the number is created in an external system and replicated to your system.
    Help - Check what external number was used last by doing SE16 on table KNA1 and use the account group "Stock Transfer - Depot" as a selection parameter.
    Best regards,
    Glynn

  • Master Detail with Search

    Hi All,
    I have created a Master (Form with Navigation buttons) - Detail (table) with search region.
    Intially both regions show no data as expected.
    When I search for an entry in Master region - It shows the data in Master but not in Details region.
    When I click Next in the Master then I can see details in the Table.
    Now if I click Prev in the Master I can see the details in the Table.
    If I tried to search for new data , Master form gets refreshed but details table will not get refreshed till I click on navigation buttons.
    (I think details is getting refreshed on Navigation button Events)
    If I don't have any search region.. Both Master and Details get initial load works fine.
    I tried creating Master(table)/ Detail(table) with search region on top of them.
    No data resulted.. :( after querying the data. (As there are no navigation none of the tables get refreshed).
    Pl. let me how to get the details get data based on Master.
    Thanks,
    Satya

    Shay,
    I did set the page Refresh between two areas.
    It works fine if I click on Navigation button Next, Prev.
    This happens only if I have Search bean on top to search master.
    Thanks,
    Satya

  • PRISM Master-Details with navigation between the Master and details view

    Hi, I have a Master list with accounts and a Details list containing transactions.
    The Master list : has a UserControl (AccountListView) and Viewmodel(AccountListViewModel)
    The list is bound to an observable collection of type AccountViewModel and has a SelectedAccount property to get the current selected account. Each AccountViewModel has a collection of type TransactionViewModel.
     public AccountListView(IAccountListViewModel viewModel)
                //this.DataContext = vm;
                InitializeComponent();
                ViewModel = viewModel;
            public Infrastructure.IViewModel ViewModel
                get
                    return (IAccountListViewModel)DataContext;
                set
                    DataContext = value;
    //the viewmodel
            public AccountListViewModel(IRegionManager regionManager)
                this.regionManager = regionManager;
                this.AccountList = GetAccounts(); // gets the list of accounts from another layer
            public AccountViewModel SelectedAccount
                get { return selectedAccount; }
                set
                    selectedAccount = value;
                    OnPropertyChanged("SelectedAccount");
    And the Details view has a user control(TransactionListView) and a viewmodel(AccountView);
    public TransactionListView(IAccountViewModel viewModel)
                InitializeComponent();
                ViewModel = viewModel;
                //this.DataContext = vm.SelectedAccount;
            public Infrastructure.IViewModel ViewModel
                get
                   return (IAccountViewModel)DataContext;
                set
                    DataContext = value;
    //the viewmodel 
    public AccountViewModel(Business.Account a)
                    AccountId = a.AccountId;
                    accountName = a.AccountName;
    I created a hyperlink command so that whenever I click on the name of an account from the master list it will navigate to the detail list and set the as the DataContext the account I clicked on. Before I had both Master and Detail lists displayed at the
    same time and set the DataContext of the Detail List as the SelectedAccount property(which is bound to the SelectedItem of the Master List) of the Master List. I am not sure how to pass the SelectedAccount when I navigate to the Detail List and set it as the
    DataContext of the Detail List.
           

    >>I'm using the reguestnavigate method, but from what I read you can't pass objects as parameters ?
    As I mentioned there is a NavigationParameters class that you can create an instance of and pass as a parameter to the RequestNavigate method in Prism 5:
    private void NavigateTransaction(AccountViewModel obj)
    var parameters = new NavigationParameters();
    parameters.Add("accountViewModel", obj);
    regionManager.RequestNavigate(RegionNames.ContentRegion, new Uri(transactionview, UriKind.Relative), parameters);
    The TransactionView should then implement the Microsoft.Practices.Prism.Regions.INavigationAware interface and retrieve the parameter in the OnNavigatedTo method:
    public partial class TransactionView : UserControl, INavigationAware
    public TransactionView()
    InitializeComponent();
    void INavigationAware.OnNavigatedTo(NavigationContext navigationContext)
    AccountViewModel myParameter = navigationContext.Parameters["accountViewModel"] as AccountViewModel;
    this.DataContext = myParameter;
    public bool IsNavigationTarget(NavigationContext navigationContext)
    return true;
    public void OnNavigatedFrom(NavigationContext navigationContext)
    In Prism 4 there is no NavigationParameters class so you either need to upgrade to Prism 5 if you haven't already done so or you could store the parameters to be passed yourself somewhere else. Please refer to the following links for more information and
    examples of how you could do this:
    http://stackoverflow.com/questions/9320638/how-to-pass-an-object-when-navigating-to-a-new-view-in-prism
    http://visualstudiomagazine.com/articles/2012/08/20/view-communication-in-wpf-and-prism.aspx
    Please also remember to mark helpful posts as answer to close the thread and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

  • Please Help, Data Set Master/Detail with mySQL DB

    Hi...
    I installed the Data Set Master/Detail Sample (states and
    citys autopopulate) getting values from a XML file...
    when a user adds a listing in my site, it works great.. i use
    the XML file values for the states/citys and then everything is
    stored in a DB... BUT i need to do this..
    when he comes back to edit his listing, i want the Data Set
    Master/Detail to show hes values (from de DB) with the option to
    edit them, not the first XML file values.
    Thanks

    Thank you kinblas!!!!!
    I saw another post with the solution!!!
    Here it is
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=602&threadid =1308016&highlight_key=y&keyword1=SetDefaultState
    Thanks again!

  • Master detail with from clause query

    Hi!
    I have 2 blocks: master and detail. The master block is based on a from clause query. Since I have to insert, update and delete on this block I have created the on-insert, on-update, on-delete and on-lock triggers (and the respective procedures).
    In this block I have on-populate-details and pre-delete triggers created by the master-detail relation.
    Now I have a problem!
    Since I only want to commit to db when I click the "ok" button and I want to insert and delete records from these 2 blocks, when I insert records into the detail block (and master too), it forces me to save changes if I change the focus of the current record of de master block to another record within the same block.
    How can I do this in order to insert records saving changes only when I click the button?
    Thanks!
    Ana

    I think that it is intended behaviour: when detail records are populated and there are uncommited changes so Forms asks if user wants to save changes.

  • MQC changes in master Receipe with ECM

    Hi
      I'm trying to change MQC formulas in master recipe with ECM, but i don't see the changes being releavent to ECM, my question is, are MQC changes releavent to ECM.
    Regards

    Dear
    Please Find the link as they have provided useful information
    [http://help.sap.com/saphelp_46c/helpdata/en/89/a42514461e11d182b50000e829fbfe/content.htm]
    [http://help.sap.com/saphelp_46c/helpdata/en/89/a4252e461e11d182b50000e829fbfe/frameset.htm]
    With Regards
    Pushpalas

  • Multiple level of Master Detail with ShowOneTab

    I am developing an ADF application using JDeveloper.
    Let us assume that we have three entities A,B and C. I have created three view objects and two View Link objects to implement three level Master-Detail relationship.
    I have created master table - detail table on a jspx page where master is entity A and detail is entity B. Detail table is in a showDetailItem component in showOneTab which works fine.
    Now I have the requirement to create another level of master detail hierarchy between entity B and C. The master of this relationship is B, which is displayed on one showDetailItem tab as stated above. While the detail for entity C must display on second tab (showDetailItem).
    I have set the partial trigger id of third table to masterDetail2 (id of the entity B table now serving as master). I have also set the AutoSubmit property of this table to true. But the data is not refreshed, it always displays the first set of records.
    Please suggest what I can do or if I am missing something to implement the solution?
    Regards,
    Amir

    Hi,
    I think this is because PPR doesn't work on hidden components (that are components that are not rendered). Try and add a listener to the tab canvas that then on changing the tabs, re-executes the iterator for this table
    Frank

  • Config reqd to track the changes to Bak details with report  S_AHR_61015505

    Hi All
    I have a need to tack the changes to 'Bank Details'. I have tried using the report 'S_AHR_61015505' , it works fine for the 'Addresses' info type but not for Bank details. I presume I need to do some config to activate the change log to track the changes to Bank info using this report.
    Can any body please tell me what I exactly I need to do  for this .
    Thanks
    Srinivas

    as suresh said follow the steps in img  then click on Field group definition. There in infotype 9(Bank Details ) check for Field group is 01 and maintain Fields
    Field Group   Field Name
    01                 BANKL
    01                 BANKN
    01                 BANKS
    01                 BKONT
    01                 EMFSL
    01                 ZLSCH.
    I hope this answers your question
    if so close the thread
    ---Bob Radi

Maybe you are looking for

  • Firefox crashes as soon as I open it in Windows 7

    I am running a 32 bit computer & I use Windows 7. I have not had any problems with Firefox until the past week or so. My system will crash no matter what site I am on & now I am unable to even open Firefox. My shortcut icons do not work either. I rei

  • This is a workaround for the MBP wireless issue

    There have been many topics on the MBP wireless issues already, but I thought some people might find this workaround helpful. Firstly, my system is a 2.2Ghz MBP, running 10.4.10, and also airport extreme update 2007-04. I am using an airport express

  • No Service after unlock?

    Hi, I asked my current provider Vodafone to unlock my iPhone 4, which they did. Recently I tried putting a T-Mobile sim card in it, to test it, but it just came up with No Service instead of finding a signal. The iphone is fully up to date etc, so wh

  • HT1311 How to change my payment information

    How do I change my payment I don't have creditcard

  • Button with label Unicode

    Hi everybody! I want to creat an applet, and there's one button in it. I want to set its label with some Unicode chars. For example, I want to use Chinese chars as the label for this button. Does anybody can explain me how I can do it? Thanks in adva