Master-detail insert records form?

Hi,
I want to be able to build a master-detail insert form based on a BC4J, any ideas on the easiest way of doing this?
I tried using the Data Web Beans from the JSP Element wizards, and found it possible to build a master-detail form for viewing data based on a BC4J application, but not inserting.
I know it is probably possible to do this by coding your own Data Web Beans but is
there any way of doing it with the Web Beans available?
Thanks in advance.

If you have a ViewLink in your AppModule for the master/detail tables, then the JSP application wizard automatically creates a master/detail page for this view link. You may want to use the generated page and modify it.

Similar Messages

  • Problem in Master-Details  - Inserting Records to same Table

    I have 3 column of one table in master as primary key and 3 column of same table in detail as primay key. These 6 column collection as the composite primary key. when i try to insert the records in detail table it showing me Too many objects match the primary key oracle.jbo.Key Error.
    I have done the Following things:
    In HR Schema, I have created one Transient View Object for Master and Employee View Object for Details.
    I have taken EmployeeId, FirstName and LastName columns in the Master i.e., From Transient View Object and droped it as the Form.
    And I have taken E-mail, JobId, ManagerId columns in Details i.e From and droped it as the Table.
    When I entered values in master and click CreateInsert in the details record. It showing me Too many objects match the primary key errors.
    Help me out!!! for this problem.

    Hi Kumar,
    I was not in office for couple of days. Thats you couldnt reply for your earlier post. You had mentioned how can we set the value of the import parameter.
    What i wanted to tell you is not to set the value for that Binary_flag, but that flag influences the data download in ASCII FORMAT.
    You just try this: Try attaching a file through CL_CRM_DOCUMENTS~CREATE_WITH_TABLE. Before read the contents of a file into SAP using GUI_DOWNLOAD and read it in ASCII mode. Now when you try to pass this to Ascii internal table of the method specifing the MIME type, it will attach the document to the opportunity, but the document content will be still in ASCII.
    If you try to download this file using GET_WITH_TABLE, then you can see BINARY_FILE is not set to 'X' and the content gets downloaded to Ascii internal table.
    This is my observation.
    I think when attaching documents in Opportunities by default, it reads the file in Binary mode. Because when i tried to attach a file directly in Opportunity transaction, and tried the method GET_WITH_TABLE, the BINARY_FLAG was set.
    Hope now you understood, why i was mentioning that BINARY_FLAG influences the download of content in binary and Ascii format.
    Regards,
    karthik.

  • Implement Master Detail type of form

    Does anybody have tutorial or sample code to implement a master-detail kind of form?
    I am really stuck here.
    Could anyone please help?

    I have looked into that topic, but still i could not figure out.
    When we query display the form in Update mode, by just querying the Master record, the Detail records don't show up.
    I have used a Simple table for my detail records, but the master record is just some text field.
    The rows dont appear in the Simple Table.
    This is the problem that i am getting.

  • Exist RFC Function or Bapi for insert Records form a external program?

    i create a Ztable same as tell me here:
    http://abaplovers.blogspot.com/2008/02/creating-table-in-sap.html
    5 String Fileds 2 Date Fields 2 Numeric Fields
    my question is exist a RFC Function or Bapi for insert Records form a external program (Delphi/Visual Basic)?
    Any advices?
    Thanks.

    hi madhurao123 thanks for answer.
    But Why block the Thread?
    This question is no so basic, yet never learn, the forum must be open to these questions maybe open a forum somewhere basic but must be able to do these basic questions.
    IT Toolbox commented the same thing, but if not here or ITtoolbox or where else can ask basic questions?
    Advise me, thank you.

  • Validate 2 E-mail address fields in insert record form

    Hello,
    I have used the Insert Record Form Wizard to create a form, including using the Validate Form Server Behavior to validate many fields.
    I can't figure out how to compare & validate 2 E-mail address fields.
    After the form was created I opened the existing Validate Form Server Behavior - Advanced tab and built the condition {sub_email2} != {sub_email} but this had no affect on submitting the form.
    The other thing I tried was creating a new Compare Transaction Field behavior with the same condition {sub_email2} != {sub_email}, this also seemed to have no affect.
    I am just a beginner, so I admit to not really knowing what I'm doing, for me ADDT has been a great aid.
    The other thing I noticed, when I tried both the items above, besides not affecting being able to submit the form with different E-mail addresses. The red asterisks indicating a required field, would disappear.
    Here is the form http://www.oescahealthregistry.org/forms/pedigree_submission.php this version of the form does NOT include either of my attempts to validate the E-mail fields.
    Thanks in advance for your help.
    Dennis

    Hi,
    A compare statement should work fine. As an example I made small form that inserts name and email (2 fields) using Insert record wizard.
    Name field is required, email field is required and checks that its a valid email structure ([email protected]). I then finish the wizard.
    <input type="text" name="email" id="email" value="<?php echo KT_escapeAttribute($row_rsemail['email']); ?>" size="32" />
    <?php echo $tNGs->displayFieldHint("email");?> <?php echo $tNGs->displayFieldError("email", "email"); ?>
    I then add the extra field to the form that the 2nd email will be entered into, this one I called email2, I then copied the display hint and fielderror code from the first email and placed it behind the 2nd email box and changed the text to reflect email2. Which probably doesnt matter but I put it there anyway.
    <input name="email2" type="text" id="email2" size="32" />
    <?php echo $tNGs->displayFieldHint("email2");?> <?php echo $tNGs->displayFieldError("email2", "email2"); ?>
    Now that I have both email fields in the form, I go to the developer tools under server behavior and select compare transactions fields under form validation.
    I hit the + to add a field I then choose email for field, then == for condition, then {POST.email2} for compare to. I enter in an error message and hit ok.
    Thats it the form is ready.
    The first email field will check against email validation and the 2nd email will check against the first email.
    I hope that helps.
    Take note that the database actually only has 2 fields to enter data. Then 2nd email field is only for validation.
    Message was edited by: Albert S.

  • Master-detail page with form layout -- insert only -- not in create mode

    JDeveloper 10.1.3.1 with JHeadstart
    I have the following master-detail structure in JHeadstart:
    Group 1, Table a, Layout: table-form
    Group 2, Table b, Layout: table-form
    Group 3, Table c, Layout: form
    Group 4, Table d, Layout: form (on same page as master table c)
    Table a, b and c are updatable (insert, update and delete).
    I have problems with the last page, tables c and d, master-datail both in form layout.
    The master-table (c) is not an insert-only table, the detail table needs to be an insert-only form on the same page as the master table c.
    Settings Table d:
    Advanced search and quick search: none
    Autoquery: disabled
    Single row insert allowed (other options in Operations disabled)
    In my view object I have used the settings in the JDeveloper guide 8.1.2 ('no rows...' in tab Tuning).
    I run my application in JDeveloper (with the option run in my ViewController-project, which means that I am not running my detail page directly in JDeveloper??) and when I open this last page, the detail form is not in create mode (I see no rows found and a create rows button).
    I have read several threads in this forum, but I do not know how to solve this problem.

    This does not work.
    In my first post I made an mistake in describing my application, it is not a table-form, but a tree-form application:
    Group 1, Table a, Layout: tree-form
    Group 2, Table b, Layout: tree-form
    Group 3, Table c, Layout: tree-form
    Group 4, Table d, Layout: form (on same page as master table c)
    If I override the executeQueryForCollection method in the ViewObjectImpl of table d I get a message ('JBO-27122: SQL-fout tijdens voorbereiding van statement' and 'java.sql.SQLException: OALL8 is in an inconsistent state').
    while clicking on the tree (with table b and c). It seems that the QueryForCollection method is being executed to early.

  • Multiple Master Detail Relation In Forms 6i

    I have tables as below
    1.Bill_Head
    Bill_No
    Bill_Date
    Fin_Year_Cd
    Remarks
    2.Bill_Tail
    Bill_No
    Product_Cd
    Amount
    Ded_Amount
    Net_Amount
    3.Bill_Tail_Det
    Bill_No
    Product_Cd
    Quantity
    Rate
    Interest_Percent
    Service_Charge
    Vat_Tax_Percent
    The Relation is like
    Between BILL_HEAD and BILL_TAIL is Master Details Relation
    Between BILL_TAIL and BILL_TAIL_DET is one to one relation
    In single form i am not able to insert record.
    If i build Master details between BILL_HEAD and BILL_TAIL, BILL_TAIL and BILL_TAIL_DET, when i run the for to insert data.
    I will put the data for BILL_HEAD data
    For this parent record there will be child record in BILL_TAIL block.
    For this BILL_TAIL parent record there may be a child record in BILL_TAIL_DET or may not. Suppose i put a child in BILL_TAIL_DET.
    Then i wanted put one more child record in BILL_TAIL block, if i say next record, it is asking me to "save the record first".
    Please help me in this regards
    my mail id : [email protected]
    Regards
    Mahaveer
    Message was edited by:
    user603318

    Thanks Kris, for your reply.
    Is there any way out to enter all the data at once and then commit, b'cse for every record asking to commit is tedius.
    Regards
    Mahaveer

  • ADF Master Detail Insert Page

    Hi all,
    i must create a jsp with a master detail in insert mode. The problem is that the master and the detail must be validated in the same time because i must have a record in the master that must have NECESSARILY a record in the detail.
    All the samples that i've been found makes validate first the master and then the detail...can anyone help me?
    Thanks in advance...
    Fabio

    you make both insert, whitout any automatic validation...then, in the onCommit metod manually check your conditions, and eventually you force rollback: what about this solution?

  • ADF Master Detail Insertion and updation

    Dear All
    I am developing a web application with the ADF using ADF BC4J as a buisness service and JSP as th view.
    I am creating a Master detail page that makes the user add the ,master and the detail(s) information in the same page.
    Example:
    you may insert the department and the employess in that department in the same transaction (post) also the update

    Two questions...
    1. Will a future version of Jdeveloper support a drag and drop update-able multirow table?
    2. The existing example of doing this (Without Jheadstart) behaves different than a single row input form, as Duncan Mills points out, in that it loses the values that are input if validation errors occur. This same thing happends in the JHeadstart workspace.
    a) after running the code and just showing the bindings and form values, it appears a standard input form has the new values immediately after processUpdateModel(). Even if they are in error, and it later fails to make it through validateModelUpdates the values are retained.
    b) in the Multi-row example, you can examine the form bean values (for the multiple rows), and examine the values from the rowset obtained through the DCUtil.findSpelObject() and JUCtrlValueBindingRef calls, and the bindings don't change. The validateModelUpdates still manages to produce the error though.
    So, with a multi-row update form...
    a) How do you get the ROW specific error msg generated from a declarative or method-based validator? - that is, put a msg in for the row like: You can't put XXX into this field.
    Right now, we modified the BEAN to include an ErrMsg column and added that as a transient attribute to entity and view, and can display the messages via that by putting them in during the processUpdateModel(). Of course, most of the validation ended up in the processUpdateModel(), with none in the Entity.
    b) Where are those values going if they are placed into the bindings as they can't be examined later after processUpdateModel?
    Here's a method stub that we used to show values...
       * showFormValues retrieves the array of form beans as well as the
       * EmployeesView1.rangeSet, and displays the form values for Salary
       * and CommissionPct against the JUCtrlValueBindingRef (row-based)
       * bindings from EmployeesView1
       * @param actionContext
      private void showFormValues( DataActionContext actionContext )
          DynaActionForm  updateForm = (DynaActionForm) actionContext.getActionForm();
          UpdateRowBean[] updatedRows = (UpdateRowBean[])updateForm.get("Row");
          System.out.println("********** showFormValues **********");
          java.util.List origRows =
            (java.util.List) DCUtil.findSpelObject(actionContext.getBindingContainer()
                                                 , "EmployeesView1.rangeSet");
          // Now loop through the bean array
          for (int i = 0; i < origRows.size(); i++)
             //Get the rowKey of the submitted updated Row 
             String theRowKey = updatedRows.getRowKeyStr();
    //Get the corresponding row from the origional set
    JUCtrlValueBindingRef oldRow = (JUCtrlValueBindingRef)origRows.get(i);
    //Check the update row needs processing and matches the source row
    if (oldRow.get(JUCtrlValueBindingRef.RANGESET_ROW_KEY_STR).equals(theRowKey))
    // Form value - does not appear to change
    System.out.print( i + ": sal=" + updatedRows[i].getSalary() +
    ", comm=" + updatedRows[i].getCommissionPct() );
    System.out.println("....Salary=" + oldRow.get("Salary") +
    ", CommissionPct=" + oldRow.get("CommissionPct") );
    } // match on rowKeyStr
    } // for i
    System.out.println("************************************");
    } // showFormValues

  • Allowing a zero as the first digit in an insert record form field

    I have a form that has an insert record behavior applied to
    it. I would like to be able to put a number into one of the form
    fields that begins with the letter zero (i.e. 010507). The trouble
    is that when I insert any number beginning with a zero, the first
    zero in the number gets dropped when it is entered into the
    database. This occured even when I tried changing the field type
    from number to text in Access.

    Oh, I failed to change the field type to "text" in the insert
    record dialogue box as well.

  • Master Detail - Insert in Detail Table is not Working

    I am using Jdeveloper 11.1.2
    I have a very simple Master Detail Page with Masster Form and Detail Table. I have used Page fragments and called it from DynamicTab Shell. If I click on the button of CreateInsert Row in Detail Table, the detail Table stops rendering.
    If I use the same in a JSPX page it works fine but not in page fragments which I call in from DynamicTab Shell.
    The same forms worked well in JDeveloper 11g PS4 - 11.1.1.5.0
    Any help please ?
    Edited by: user465666 on Aug 9, 2011 6:35 PM
    Edited by: user465666 on Aug 9, 2011 6:40 PM

    Please explain clearly your problem

  • Master detail: select in form (newbie)

    I've been looking at this example:
    http://labs.adobe.com/technologies/spry/samples/data_region/DataSetMasterDetailSample.html
    The bit of code I cannot understand is this:
    onchange="document.forms[0].citySelect.disabled = true; (That's in
    the first "select" element.)
    Indeed, when I test this on a page of my own, I must remove
    this bit of code to get the second select list to work properly.
    That is, in my trials that bit of code seems to inhibit the second
    list from populating per the selection from the first data set.
    This seems logical: the element with id="citySelect" is somehow
    "disabled". But in the Adobe example it works just fine... so I
    guess I am asking under what circumstances is the "disabler"
    disabling...
    TIA,
    Greg Smith

    Hi,
    what you initially did should work. However, a master may have many children and the attribute you move into the form is the one of the first detail row. So if the master does not have details then you only see the label.  I don't know why you have to build this construct, but wouldn't it be better to add the attribute on the View Object directly (adding a second entity object rerference)?
    Frank

  • HOW TO: Create a JSP Insert Record Form Using BC4J Data Tags

    This is a JDeveloper Tech Note found on the OTN Documentation page. This note describes the use of the BC4J data tags to create insert/submit JSP pages. Here is a link:
    http://technet.oracle.com/docs/products/jdev/technotes/datatag_input/Insert_Form.html

    You can loop throgh query records whit an implicit cursor (which automatically manages the open cursor, fetch and next record):
      for rec in (select intime,outtime,barcode,attend_date from dail_att; )
      loop
           t_in :=rec.intime;
           t_out :=rec.outtime;
           t_code :=rec.barcode;
           t_date := attend_date;
             PUT YOUR CODE HERE ... (if ..then... elsif... logic)
             you can avoid setting variables 'cause you can directly use the implicit cursor variables: rec.intime etc.
      end loop;
    END;Anyway, I suggest you to check the where condition of your block ... because if not all data are retrieved there should be a problem in your query ... so even the cursor (if based on very same query) will return less data than expected.
    Luca

  • Moved site - pages with insert record forms not working

    Not sure what has happened here. I have copied a site from:
    www.goodsafariguide.com to:
    www.goodsafariguide.net
    The domains are on a shared reseller hosting account so are both pointing to the same database, but I noticed that pages with ADDT forms were not displaying at all.
    I created a new page just with a basic form, and it works on the .com domain:
    http://www.goodsafariguide.com/campkalahari/newform.php
    But not on the .net domain:
    http://www.goodsafariguide.net/campkalahari/newform.php
    The database connection looks OK - any idea what the issue here could be?
    Thanks.

    Narrowed it down to the error:
    PHP Fatal error:  Class 'tNG_dispatcher' not found in /home/gsgnet12/public_html/campkalahari/index.php on line 27
    I think I can see what all happened now. I originally got thrown because I uploaded the entire site, including a folder containing lots of hi-res photos, that were never uploaded originally. It looks as though files that weren't uploaded when the disk space ran out were still showing up in the file directory, but with a file size of 0k.
    So then when I was reuploading files, Dreamweaver wasn't actually uploading them because it seemed to think they were already uploaded, and I could see them showing up on the remote server, so it all looked OK.
    Anyway - it all looks OK now.

  • Unable to INSERT record but inserting. Forms 4.5 error through Apps 10.7

    Hi All,
    I have written the following code on save button on form 4.5 which has been used from APPS. I created the master-detail relation also.
    It suppose to insert a row into header and then into lines.
    Its inserting the row into both the tables but getting the following error in betweeen.
    ===========
    FRM-40508: ORACLE error: unable to INSERT record.
    ORA-01400: cannot insert NULL into ("VFI"."VFI_PC_DEFINITION_LINES"."LINE_ID")
    ===========
    I am thinking problem is some where in some default triigers or on insert triggers
    but unable to trace it. CAN anybody through a light on this ?
    ================================================
    PROCEDURE VFI_INVPCS IS
    i          number;
    v_item_id     number;
    v_item_id1     number;
    v_temp      varchar2;
    v_user_id NUMBER := 1111; --fnd_global.user_id;
    Lv_ChkFlag VARCHAR2(1);
    Lv_UnChkFlag VARCHAR2(1);
    ln_header_seq NUMBER;
    ln_lines_seq NUMBER;
    BEGIN
    BEGIN
    SELECT inventory_item_id
    INTO v_item_id
    FROM inv.mtl_system_items
    WHERE organization_id = 103
    and segment1 = :VFI_PC_DEFINITION_HEADER.parent_inventory_item_id;
    SELECT VFI_PC_DEFINITION_HEADER_SEQ.nextval
    INTO ln_header_seq
    FROM DUAL;
    SELECT VFI_PC_DEFINITION_LINES_SEQ.nextval
    INTO ln_lines_seq
    FROM DUAL;
    INSERT INTO VFI_PC_DEFINITION_HEADER( HEADER_ID
    ,PARENT_INVENTORY_ITEM_ID
    ,START_DATE
    ,END_DATE
    ,CREATED_BY
    ,CREATION_DATE
    ,LAST_UPDATED_BY
    ,LAST_UPDATE_DATE)
    VALUES ( ln_header_seq
         ,v_item_id
         ,:VFI_PC_DEFINITION_HEADER.start_Date
         ,:VFI_PC_DEFINITION_HEADER.end_date
    ,v_user_id
         ,sysdate
         ,v_user_id
         ,SYSDATE
    COMMIT; -- header
    GO_BLOCK('VFI_PC_DEFINITION_LINES');
    LOOP
    SELECT inventory_item_id
    INTO v_item_id1
    FROM inv.mtl_system_items
    WHERE organization_id = 103
    AND segment1 = :VFI_PC_DEFINITION_LINES.child_inventory_item_id;
    First_record;
    IF :VFI_PC_DEFINITION_LINES.child_inventory_item_id is not null then
    IF :CFY_PTID_FLAG='Y' THEN
    Lv_ChkFlag:=:CFY_PTID_FLAG;
    INSERT INTO VFI_PC_DEFINITION_LINES( LINE_ID
    ,HEADER_ID
    ,PARENT_INVENTORY_ITEM_ID
    ,CHILD_INVENTORY_ITEM_ID
    ,CREATED_BY
    ,CREATION_DATE
    ,LAST_UPDATED_BY
    ,LAST_UPDATE_DATE
    ,CFY_PTID_FLAG)
    VALUES ( ln_lines_seq
    ,ln_header_seq
    ,v_item_id
    ,v_item_id1
    ,v_user_id
    ,SYSDATE
    ,v_user_id
    ,SYSDATE
    ,Lv_ChkFlag
    END IF;
    END if;
    NEXT_RECORD;
    EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';      
    END LOOP;
    message('After Insert Child');
    message('After Insert Child');
    COMMIT;
    END;
    ================================================

    not sure on the block structure of your forms.
    one would question why you seem to be doing a lot of the default insert work on the press of a button (when-button-pressed).
    also if you have a master-detail relationship in the form - why you don't let forms handle the master-detail insert.
    seems like you have database database blocks but are almost coding as if they are non-base table blocks.

Maybe you are looking for

  • Error in loading blolb data

    hi, i have a form page where i am hard coding data into a table with the help of a process. I have a blob column in the table and i want to insert the data in to the column of blol.i am not able to do so. my table has following columns ID     NUMBER 

  • Lenovo A800 Wireless and Network Problem

    Hi, I bought Lenovo a800 few months ago, t'was working fine until 2 days ago, I can't seem to connect to Wifi and Bluetooth Every time I turn on these 2 options it will just say Turning Bluetooth on... then will be back to To see devices, turn Blueto

  • Can't reset password for my other account

    The page that comes up for resetting passwords automatically says that the new password doesn't match itself.   Can't get around this.   Trying to reset christinebrady79.   Who can help me with this?  How can I talk directly to SKYPE.    Had to creat

  • Same Contact for different customers

    I have same contacts (all details same) for different customer accounts (ex: Customer A, B, C etc). I have to duplicate contatcs in XD* or VAP* transactions. Is there a standard simple way to avaoid creating duplicate contact entries? Create contact

  • View the source code before deciding which PHP CMS to download?

    Maybe no one knows this site, for I just was recommend by a friend, if you want to install an Open Source [PHP CMS|http://www.phpkode.com/projects/category/php-cms/] but don't know which one to choose you can visit PHPKode.com and first view the sour