Forms 6i: master block

the master block and details block sharing the same canvas.
after establishing relation ship, i'am able to view item details for details blockand when i delete record in master block cascading is also working fine.
but when i try to enter data to be stored in master,its not aloowing.

pls. explain a little bit more. Which error message do you see ?
You annotation with the canvas can't be the problem. It's not important where the items are displayed.
Tell us a litte bit about the tables you show in master and detail. Do you have non-basetable-items in there ?
many questions
Gerd

Similar Messages

  • How to join three or more blocks in a form (like master/detail)

    I have four data blocks for four tables, lets call them blocks A, B, C, D
    Block A is a master block and block B is a detail block, block B holds a foreign key from block A (ofcourse)
    Now when i choose in a query data from block A it lists also data from detail block that is corresponding, but now.....
    detail block B also holds another foreign key from block C which takes his key from block D. and
    i want to make a form that will, when i query master block A, show some data from block B, C and D that is
    corresponding to block A.How do i do that?
    i'm using 10g and i am a begginer

    In each Data Block there are three nodes - triggers, items, and relations. The relations node is what you use to link the master to the detail. If you highlight the Relations node and press create a window will open to create your "New Relation". The master block is already entered because it is the block that you are currently in. You can then pick a detail block by pressing the "select..." button or just type the name of the block in. So if you did this in block A, you would enter B as your detail block. You will then need to enter a join condition. If the PK in block A is named A_DETAIL and the FK in block B is the same name, then you can just type in A_DETAIL, press OK, and the relationship will be automatically created. If the names are different then you could put in a join condition like A.A_DETAIL = B.B_A_DETAIL (whatever the names of the blocks and items are). You can then repeat this process for every parent-child relationship.

  • Set default value in master block of MD form

    I am finding it impossible to put a default value in a field in
    the master block of an MD form. It is essential to limit my
    users' queries to their own account. I get an error when I try
    to put a default value in, and I can't get it to respond to
    p_session.set_value in the query PLSQL section. The form appears
    on a subpage, so I can't call it with parameters. Anyone have
    any ideas? Has anyone else experienced this limitation with
    MDforms?
    Karli

    Mike,
    Thanks for your reply.
    First I just tried setting the default value for the field
    client_id (as a function returning a number) in the options box
    of the form builder. This works for my other forms, but here it
    gives me the following messages:
    Exception from wwv_generate_component.build_procedure (WWV-01821)
    Error creating module: ORA-06502: PL/SQL: numeric or value
    error: character string buffer too small (WWV-16042)
    Error creating module: ORA-06502: PL/SQL: numeric or value
    error: character string buffer too small (WWV-16042)
    Error adding module attributes: ORA-06502: PL/SQL: numeric or
    value error: character string buffer too small (WWV-16043)
    I tried setting the default as a number, 2, and got the same
    message. Therefore I decided to work around it, and just set the
    value before Querying, as follows:
    declare v_survey number;
    begin
    v_client := 2;
    p_session.set_value(
    p_block_name => 'MASTER_BLOCK',
    p_attribute_name => 'A_CLIENT_ID',
    p_value => v_client
    end;
    doQuery;--- This is the default handler
    (NOTE: I actually have a function that I want to call to set the
    default. I just used the number 2 to eliminate any unnecessary
    complexity while troubleshooting.)
    This code had no effect. I get no errors, but when the query is
    run, it ignores my attempt to set the value of the attribute. I
    suspected that perhaps this was because the doQuery procedure
    resets or ignores the master value appearing in an MDform, so I
    tried commenting out 'doQuery;' - It did not even put the value
    into the form. What am I missing?
    Karli

  • Can not delete record from the master block ,frm-40202 field must be entere

    hi ,
    i have built a form which contain master and details blocks
    the problem is
    when i try to delete a record from the master block it gives me new serial for the transaction and when i try to save it, it says
    >frm-40202 field must be entered
    where this field is required and i cant save it
    although in another form when i delete from the master it gives me the previous record and it works properly
    if any one has any ideas pls help me
    thank u
    ------- the master block has a trigger when-create-recoder
    Declare>v_dummy number;
    Begin
    Select nvl(max(ERNT_NO),0) + 1 >Into v_dummy
    From LM_RENT_EXPNMST >Where cmp_no = :LM_RENT_EXPNMST.cmp_no
    And brn_no = :LM_RENT_EXPNMST.brn_no>and fiscal_yr = :LM_RENT_EXPNMST.fiscal_yr;
    >:LM_RENT_EXPNMST.ERNT_NO := v_dummy;
    END;
    IF :PARAMETER.RNT_NO IS NOT NULL THEN
         :LM_RENT_EXPNMST.RNT_NO:=:PARAMETER.RNT_NO;
              :LM_RENT_EXPNMST.RNT_YR:=:PARAMETER.RNT_YR;
         :LM_RENT_EXPNMST.CUST_DESC:=:PARAMETER.RNT_ADESC;
    END IF;Edited by: ayadsufyan on May 8, 2013 2:03 PM

    If this is a FORMS question you should mark this one ANSWERED and repost your question in the FORMS forum
    Forms

  • HOWTO: Avoid go to detail block without fullfill the master block?

    Hi:
    I have a master detail form with 2 blocks. When the user open the form the focus is on the first text item (required = yes) of the master block. If the user tries to get out of that item with keyboard (tab or enter), it gets the correct message saying that the item is required and must be filled. But the problem starts when the user click with the mouse on another item of the detail block. Here, I will have 8 or 9 messages saying that is impossible to create records without a master record. This is really annoying. This message has no ID (FRM-XXXXX), and I really must get a way to forbide users to go to the detail block without filling required items in the master.
    Anyone?
    Best Regards
    Joao

    Hello,
    if there is a relation between the two blocks double click on that rel.and mark the check box property:prevent Masterless operation try this option and tell me what's ur feed back..?
    Regards,
    Abdetu..

  • Change in master block record not cascading to detail record blocks

    Using Forms [32 Bit] Version 10.1.2.2.0 (Production)
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    I am encountering the following problem in my form:
    I have a master block that has 2 associated detail blocks, one of which acts as a master block for another detail block:
    Master ---- Detail
             \__ Detail(master) ---- DetailThe first two detail blocks are joined to the master block on 3 fields, a date, a 10 digit code and a 5 digit code.
    The third detail block is joined to its master block by 4 fields, 2 dates, the 10 digit code and the 5 digit code.
    The problem I am encountering is when any of the fields that the blocks are joined on are updated in the master block (they don't show up in the form for the other blocks, it auto populates them) the detail blocks are not also updating and the records are being orphaned.
    So if my master block has the following data:
    January 1, 2009
    1234567890
    abcde
    And there are detail records matching this, but the master block changes too:
    January 1, 2009
    1234567890
    edcba
    Rather then the detail records being updated with this new 5 digit code, it shows up blank on the database as it cannot find detail records that match that new set of data. The records still exist in the table, but they are not updated when the master block is updated. Do i need to change the relation properties of the blocks?

    It is not a good practice to update the primary key values especially when those fields act as foreign keys.
    So it will be better to make those fields UPDATE_ALLOWED false.
    If that is an unavoidable condition, in the pre-update trigger of header block, write the update script to update those fields and re-query the detail
    Or
    in key-commit
    loop thru all the records in detail blk and assign values to those feilds and save it

  • Incorrect Where Clause being set in Master Block

    I got a strange error the other day. I have 2 database blocks in a form and the blocks are based on views. So, lets say Block1 is based on View1 and Block2 is based on View2. Block1 and Block2 are also in a Master Detail relationship. So, Block B1 is the Master and Block B2 is the Child.
    So, our error routine captures the last query that was run by doing a :SYSTEM.LAST_QUERY. What was interesting was that a user got Error FRM-40505 which basically means "ORACLE error: unable to perform query".
    Looking at the Last Query, it basically tried to get the WHERE Clause from the View2 instead of the View1 in which case there was a problem Querying that block and thus getting Error 40505.
    The where clause that is being created is actually coming from the where clause of View2 which has been set up in the Property Sheet value.
    Am not putting any code here for now but if that helps, I can put some code in there.
    Any help is appreciated.

    If you are executing a query from one of your own buttons or some other programmatic manner be sure focus is in the master block. Remember that if you are clicking on a button, focus is moved to the button. In this case, your first line of code in the button should be something like GO_BLOCK('MY_MASTER_BLOCK')
    If that doesn't help, I would recommend creating a new form. Use the Data-block and Layout Wizards to create the master block then the detail block. Allow the Wizard to create all the code needed for the relationship. Once this relationship has been created, manually create a new block. Be sure that the new block is positioned below your first two blocks. In other words:
    + Data Blocks
    ...+ master_block
    ...+ detail_block
    ...+ my_block
    Add one text item to this new block. Set the max number of characters to 32767 and set Multiline to YES. Now create a form level, POST-QUERY trigger doing something similar to what you mentioned already doing:
    :text_item1 := :system.last_query

  • Multiple master blocks populating the same detail blocks

    Hey guys. Im doing something a little weirder than I usually do but I can't get it to work correctly and im wondering if any of you have accomplished this before.
    I have a call center application which processes applications by either the application or by follow up. The application and follow up are each a block by themselves located on a separate pages on a tab canvas. Both these blocks are master blocks to the detail blocks which would be user_phones, user_addresses, user_bank_accounts, etc. The idea is I can use either page of the tabs and flip through either the follow up, or application master block and have it populate the user tables according to the user_id found on the master blocks. I figured I could use a when-new-block-instance trigger to switch off which block fires the on-populate-details trigger.
    The problem is.... complicated. If I go to the follow up block and execute query, it brings back the right information on the detail block. The strange thing is it seems like when I move the cursor to a different record on the same block, forms is almost setting a SET_BLOCK_PROPERTY DEFAULT_WHERE action. This is un-noticeable until i go to the other master detail block. When I start using the applications block, it seems like all the detail records actually MATCH the user_id that the cursor was on in the follow up block...
    phew! thats a lot of description for such a strange problem..
    Anyways. Anyone encountered this before? Has anyone ever built a two master block form to populate the same detail block? Is it possible? I haven't found a thread in the forum about this subject..
    Any help would be great. Thanks in advance :)

    Having one detail block for two master blocks was never a use case that we considered for Forms. It sounds like you are trying to make a many-to-many relationship work with two master blocks. I suggest you think about having an intermediate block (hidden or not) that drives the detail block and make each master block drive that intermediate block instead of driving the detail block directly.

  • Refresh master block - best way?

    hi,
    i want to refresh the master block every time a change is saved from the detail one (they have common items/fields).
    I want to do it by the fastest possible way cause it is gonna be on the web. Downloading all master rows again would not be an option for my app for example.
    I know no other way to do it than execute_query but i dont know if this is efficient enough.. any ideas?
    thanks in advance,
    teo

    francois,
    as far as the dml ret val is concerned i found this on help so no need to discuss it:
    "Forms uses the DML Returning clause only with an Oracle8 database server. This property is ignored when using a non-Oracle8 server."
    about the query all this only ensures that when the query runs all the rows will be fetched in the block at once i cant see how this will ensure optimum performance.
    im starting thinking of coding this myself the way i described before..
    teo

  • Master block content canvas and Detail Tabbed Canvas...

    Hi All,
    I am trying to create master block content canvas and then detail block on tabbed canvas.
    How i can view these two canvases together ?
    these two canvases opening in separately in layout editor...how i can show them both in one window..???
    Please some advice on this ..
    Thanks,

    Hi
    these two canvases opening in separately in layout editor...how i can show them both in one window..???it's just a matter of x & y issue ; pls increase the y position of the tab canvas to move it downward (straight lower down the content) minimize the tab w & h if necessary just for temporary adjustments form design.
    By this way u would control the design layout of the two canvases.
    Hope this helps...
    Regards,
    Amatu Allah

  • Searching master block based on value in detail block

    I have two blocks on a form. A master block for purchase orders and a detail block for the line items. I need to provide users with the ability to search the purchase orders based on the values entered into the detail block (line items), during the query entry. I am considering to check to see which block the cursor resides by using the :SYSTEM.CURSOR_BLOCK variable, then retrieving the value from the current item and running a query, using that query. The problem is that I am not very familiar with Forms and do not know how to implement my idea. Any ideas?
    null

    I copied you an example from metalink. Hope it will help.
    Doc ID:
    Note:109583.1
    Subject:
    How to query a Master record from a Detail Block
    Type:
    BULLETIN
    Status:
    REVIEWED
    Content Type:
    TEXT/PLAIN
    Creation Date:
    22-MAY-2000
    Last Revision Date:
    03-AUG-2001
    PURPOSE
    ------- To query a master record from a detail record. DESCRIPTION
    =========== The user would like to enter a query criteria in the detail block
    and then query the master record based on the above user input. SOLUTION
    ======== Create the master and detail blocks and the relationship in the usual
    manner. We will consider here the blocks DEPT and EMP based on the
    SCOTT schema. 1. Create a KEY-ENTQRY trigger at the block level of the detail block
    (EMP) and add the following code in it : GO_BLOCK('dept');
    CLEAR_BLOCK(no_commit);
    GO_BLOCK('emp');
    ENTER_QUERY; 2. Create a KEY-EXEQRY trigger for the detail block and add
    this : EXECUTE_QUERY;
    :global.deptno := :emp.deptno;
    :global.flag := 'T';
    GO_BLOCK('dept'); This will store the value of the deptno (primary key) in a global variable
    :global.deptno and set another global variable :global.flag to 'T'. This
    will be explained as we progress. 3. Create a WHEN-NEW-RECORD-INSTANCE trigger for the detail block
    and add the following : -- This is used to populate the MASTER block with the corresponding
    -- record whenever the user navigates through all the records in the
    -- DETAIL block if get_record_property(:system.cursor_record,:system.cursor_block,status) = 'QUERY' then
    SELECT rowid,deptno,dname,loc
    INTO :dept.rowid,:dept.deptno,:dept.dname,:dept.loc
    FROM dept
    WHERE deptno = :emp.deptno; -- This is to set the status of the record populated
    -- to QUERY and not to create a new record SET_RECORD_PROPERTY(1,'dept',status,QUERY_STATUS);
    end if; 4. Create a WHEN-NEW-BLOCK-INSTANCE trigger for the master block again
    and add this : if :global.flag = 'T' then -- set the variable to a different value
    :global.flag := 'F';
    :dept.deptno := :global.deptno; -- This will query the master table for the record based on the
    -- deptno of the detail table which is stored in :global.deptno -- For ex: if an employee of department 10 has been queried in
    -- the detail, then the global.deptno will have the value 10,
    -- which is used in the query below to fetch the master record. SELECT rowid,deptno,dname,loc
    INTO :dept.rowid,:dept.deptno,:dept.dname,:dept.loc
    FROM dept
    WHERE deptno = :global.deptno;
    set_record_property(:system.cursor_record,'dept',status,QUERY_STATUS);
    GO_BLOCK('emp'); end if; EXPLANATION
    =========== Actually in the above method we are using the base table blocks as a
    non-base table block when we query the master from detail. We are
    displaying the master record fetched from the table based on
    the query supplied in the detail. So after the fetch, if we clear the
    block or form then we get a "Do you want to save the changes you have made"
    alert. So in order to supress this while entering a normal master-detail
    query, we have created the global variable, :global.flag. There is a limitation though, if you query detail records and then
    navigate to the master block and then press the down arrow( i.e.,
    navigate to the next record) and then presses the up arrow to
    navigate back to the same record, then the detail records that
    were originally populated will change and a new set of records will
    get displayed. This is because the normal master-detail query is
    taking place during MASTER record navigation. This can be controlled by creating a flag (global variable) and setting
    its value and thus preventing the user from navigating to the next master
    record. Do the following : 1) In the KEY-EXEQRY trigger of the detail add the following :global.control_master := 1; 2) Create a KEY-EXEQRY for the master and add this : :global.control_master := 0;
    EXECUTE_QUERY; 3) Create a KEY-DOWN in the master with the following in it: IF :global.control_master <> 1 THEN
    down;
    END IF; Declare all the global variables before running the Form. RELATED DOCUMENTS
    Note:611.1

  • Multi page report with large master block

    I am doing a long multi page report with master - detail block.
    Master block is about 60-100 lines long in form format and detail block is 0 to 300 lines in table format.
    I would like to repeat a few columns from master block on all subsequent pages.
    The current solution I have done uses a logical page of 4x1, but in this way i can not repeat selected columns on subsequent pages.
    Is there another way to handle large master block that extends more than one page.
    PB

    You can try this. Create another frame within your master repeating frame and put items there which you want to display on next pages. And set the property of this frame as All Pages.

  • Display property of key field in master block effects detail blk refreshing

    Can anyone throw light on why a screen with the detail block in a straightforward master detail block does not refresh correctly unless one of the two key fields in the master block is displayed? The key field did (of course) exist in the master block - it just was not displaying. As soon as this key field was displayed, then when ever the problem screen was opened or the master block records were paged through, then the detail block refreshes nicely. Disable the display property again and the detail block does not refresh nicely. Found problem in forms 6i. (note, usage of the synchronize function did not change anything)
    Did I see similar problem some six or so years ago in forms 4? Ideas anyone?

    re rebuild from scratch.
    yes, we did rebuild the form from scratch. Original form was generated. Carefully made the same blocks, block relationships etc etc etc and then copied code from old forms triggers and so on carefully over.
    re being reproducable
    yep, tis so. We are both long term experienced Oracle developers - but this is a weirdy. Got any ideas? If we work anything out we shall certainly update this.

  • Strange Case..!! How 2 set an item as a master block to it's db items block

    Hello All,
    i have a question pls.
    ================
    How 2 set an item as a master block to it's related db items in the same data block; as follows:
    ============
    1-i have to enter the item's value ('LAB_TEMP' ) once then;
    2-the other related items in the same data block r changed record each time i navigate to the next record but this item is never changed in this case only if i re-entered another value as (master-detailed rel.). i tried to copy the value of this item to a display item called 'Temp' but it is changing according to the records frequency by default
    ===========================================================
    I tried the following code on when-new-record-instance & on post-changed Triggers as follows:
    ============================================================
    IF :LAB_TEMP IS NOT NULL THEN
    SET_ITEM_PROPERTY ('LAB_TEMP',ENABLED,PROPERTY_FALSE);
    SET_ITEM_PROPERTY ('LAB_TEMP',NAVIGABLE,PROPERTY_FALSE);
    SET_ITEM_PROPERTY ('TEMP',VISIBLE,PROPERTY_TRUE);
    SET_ITEM_PROPERTY ('LAB_TEMP',VISIBLE,PROPERTY_FALSE);
    :TEMP := :LAB_TEMP;
    ELSE
    SET_ITEM_PROPERTY ('LAB_TEMP',ENABLED,PROPERTY_TRUE);
    SET_ITEM_PROPERTY ('LAB_TEMP',NAVIGABLE,PROPERTY_TRUE);
    SET_ITEM_PROPERTY ('TEMP',VISIBLE,PROPERTY_FALSE);
    SET_ITEM_PROPERTY ('LAB_TEMP',VISIBLE,PROPERTY_TRUE);
    :TEMP := :LAB_TEMP;
    END IF;
    ============================================================
    even this generates unable to set enable property or visible prop. error
    ====================================================
    Someone help me with this pls.??
    ========================
    Thanks in advance,
    Regards,
    Abdetu..

    Hello everyone,
    This issue was solved as:
    ==================
    1-i created a separate db block
    2-created a text item called 'TEMP' with db=NO
    3-In the db block that i want to deal with it as:Master item to it's other related detailed items to that item which is called 'LAB_TEMP' ;
    * Copy value from property: TEMP.
    By this way i could entered a value i the ndb item called TEMP once & consequently this value is entered copyed 4 each new record i entered.
    This is an intial solution works fine at least 4 now, a Fried helped me with this i would like 2 share this info 2 others may be a new idea would help...
    Thanks always,
    Abdetu..

  • How to set custmer master block for posting & how to set the status .....

    < MODERATOR:  Message locked.  Please read the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] before posting next time. Use an appropriate subject in your message thread. >
    Hi ...
    How to set custmer master blocked for posting & how to set the status has deleted. please provide the steps for the above two actions.
    thanks

    Hi,
    U can use T-code FD05 for Blocking the customer and
    T-code FD06 in order to set for deletion,
    Assign Points if useful,
    Regards,

Maybe you are looking for

  • Pages 4.9 will open Appleworks Documents, but I Pages 5 will not.  What am I missing? or is the software just not as good as 4.9?

    Pages 4.3 will open Appleworks Power PC Documents, but I Pages 5 will not.  What am I missing? or is the software just not as good as 4.3?

  • System/webconsole:console failed fatally

    Getting a failed service every time I boot that I can't seem to fix. Here is the error message: Jun 3 12:24:14 rhea svc.startd[7]: system/webconsole:console failed fatally: transitioned to maintenance (see 'svcs -xv' for details) I've tried looking a

  • Adding a markup field to a map?

    Hello, I am looking to add an image of a map to a form, where people could put a mark where they want to. I have tried making 100's of check boxes, but that is.... cumbersome. Is there a way to have a field that will place a mark wherever they click?

  • CS4 Crashes opening 32 bit AE files

    I exported a still from AE CS4 32 bit project to work on in Photoshop but found that Photoshop crashes every time I try to open it. I can open it in Fireworks or Premier but not in Photoshop. I am using a dual dual Xeon with 12 GB RAM with a Quadro F

  • Frozen display on macbook pro

    Hi! My macbook has recently developed an intermittent problem with the display. The display becomes inaccessible as if the mouse button were being held down (there is no mouse attached, I am using the trackpad, which seems to be working fine). The di