Join relation with two sotred procedure based blocks

Hi,
I am working on a form with two DB stored procedure based blocks.
It is like:
BLOCK1: based on blk1_select(id1) (master)
BLOCK2: based on blk2_select(id1) (details)
The join condition is:
BLOCK2.id1 = BLOCK1.id1 and BLOCK2.id2 = BLOCK1.id2
here id1 is the parameter and id2 is the cursor item.
The behavior that I expect is that when I do next_record in BLOCK1, the BLOCK2 with move to next record corresponding to id2, but this time BLOCK2 records stay as the same.
The behavior is good for regular table base blocks and there must be something that I am not aware of.
This FORM does query only, no insert, update and delete.
Please help. Any suggestions are greatly appreciated.
Thank.
Jimmy
Edited by: WJH on Feb 25, 2010 3:28 PM
Edited by: WJH on Feb 25, 2010 3:44 PM
Edited by: WJH on Feb 25, 2010 4:08 PM
This FORM does query only, no insert, update and delete.

If you have access to Metalink check out Document ID: 124650.1 (Master/Detail Relationship based on Stored Procedures).
Hope this helps.
Craig...
If a response is helpful or correct, please mark it accordingly

Similar Messages

  • Procedure based blocks - error using Forms 6/8i/NT

    A simple form with a procedure-based block fails with the Lock procedure, giving an ORA-03114 error. I believe there is some known bug with procedure-based blocks using Forms 6 and Oracle 8i over NT. The Query procedure (based on a ref cursor) works fine, but the Lock, Insert and Delete triggers (and presumably the Update trigger too - without a Lock I can't get that far) return the error (these are based on a table).
    Does anyone know if this is a known bug? The same form has run successfully using Forms 6/Oracle 7.3/VMS.

    It's a known bug and the patch is available through MetaLink.

  • Release of po when two plants with two difrent procedures

    Hi,
    i am having one po with two line items .one line item with one plant and other with an other plant.two plant have difrent releasing procedure.what r the customisations required to pick the system related releasing procedure when it pick item one releasing procedure for plant1 and item 2 releasing procedure 2 automatically.
    Thanks,
    Sydanna

    If  you are talking about the PO release process, then it is not possible ..
    The PO release Strategy will be applicable to entire PO, Not for Line Item wise..
    As the Plant will be at Item Level, If you set two release strategies for two plants,
    then you will not get release strategy for PO,
    If you delete the First Line Item then the Release Strategy for Second Line Item will trigger..
    Similarly, If you delete the Second Line Item then the Release Strategy for First  Line Item will trigger..
    Try to Choose Header Level fields for PO Release process..
    If the release process is for PR, Then check this Link
    http://www.sap123.com/showthread.php?s=525f3288cbee4cb09d1d97b365f8c532&t=59

  • Create relation between two blocks which are based on different procedure

    Hiii
    How to create relation between two blocks which are based on different stored procedures in Oracle form??
    Pradhyumn Sharma

    hiii,
    I selected the common key deptno in both procedure.
    I created a relation between both procedure. but when i compile the form it give an error in ON-CHECK-DELETE-MASTER. My procedure are
    ==================================
    PACKAGE emp_pkg AS
    TYPE emprec IS RECORD(
    empno asg_emp.empno%type,
    ename asg_emp.ename%type,
    job asg_emp.job%type,
    sal asg_emp.sal%type,
    deptno asg_emp.deptno%type);
    TYPE emptab IS TABLE OF emprec INDEX BY BINARY_INTEGER;
    PROCEDURE empquery(block_data IN OUT emptab, p_deptno IN NUMBER);
    end;
    ====================================
    PACKAGE dept_rec IS
    type rec is record(dname asg_dept.dname%type,
         loc     asg_dept.loc%type,
         deptno asg_dept.deptno%type);
    type deptrec is table of rec index by binary_integer;
    PROCEDURE dept_rec1(block1 in out deptrec);
    END;
    ===================================
    In ON-CHECK-DELETE-MASTER
    CURSOR BLOCK9_cur IS
    SELECT 1 FROM dept_rec.dept_rec1 d
    WHERE d.DEPTNO = :BLOCK6.DEPTNO;
    identifier dept_rec.dept_rec1 must be declared.
    Regards
    Pradhyumn

  • Block with more than one table type agurment -  Update Procedure for Block

    Hi,
    I have one form with 3 Block. First Block is single row block, and other 2 are details block . The details balocks are based on the Procedure datasource, because of the complex query conditions. Now my requirement is When Inserting / Updating the Master Block (Single Row Block), I need to get the values in the two details block , because I need to update some other tables also based on these values. I created a procedure with two Table Type parameters (for each details block) , but when I using this procedure as the Update Procedure Name in the block, I am getting the error Only One table type arguement is allowed. Is there any other method to implement this.
    Thanks in advance.

    Rizly,
    A quick summary to make sure I understand your requirements. You have a single row base table master block with two detail blocks that are based on Procedures. When you update the single row base table master block, you need all of the data in the two procedure based detail blocks as there are updates that you have to perform to other tables that use this data. You have created a stored procedure that take two PL/SQL tables as parameters, but you are getting the error that only 1 table parameter is allowed.
    I need to ask you a few questions first. What is your Forms version? The stored procedure you created; are you using this procedure in the "On-Insert, On-Update, On-Delete" triggers or do you call the procedure in one of the Base Table block ("Key-Commit, When-Button-Pressed" or other trigger)? When you modify or add a new Master block record are you adding values to the detail blocks or using values from the previous Master block record?
    If you are using your procedure in the On-Insert, On-Update or On-Delete trigger(s), then based on your description, the error you are receiving is correct. The "On-..." triggers are constrained in that their procedures expect only a single PL/SQL table, Table of Records or Ref Cursor as a parameter. This is a Forms constraint - not a PL/SQL constraint as Forms is expecting you to only perform actions on the block where the "On-..." Trigger is located.
    Perhaps you should consider creating a database Package that has two package specification constructs (Ref Cursor, Table of Records, etc) you can populate from Forms and then simply call the package procedure that will use the Ref Cursors to perform the needed update or inserts.
    Hope this helps.
    Craig...
    If mine or someone elses response was helpful, please mark it accordingly

  • Using built-in function in the definition of relation between two blocks...

    Hi ,
    Is it possible to define a relation between two form blocks(db based) ....
    I have a master table such as:
    table : strdet (cols: ms varchar2(10) , det varchar2(10))
    materialized view : mv (cols : det varchar2(10) , sum_a number(5), sum_b number(5))
    and data:
    strdet
    ms                   det
    1                     1.1
    1                     1.2
    1.1                  1.1.1
    1.1                  1.1.2
    1.1.1               1.1.1.1
    e.t.c.
    and for the mv
    det               sum_a     sum_b
    1                   500        300
    1.1                100        200
    1.2                540        150
    e.t.c.
    I have tried some versions of relations so as to create a master-detail relation(in reality , the two blocks are connected via ms.det
    ->mv.det...  but the relation is one-to-one....) . I want a result such as:
    Master block
    1.1
    Detail Block
    1.1.1
    1.1.2
    e.t.c.Is it possible somehow...????
    Note: I use Dev6i and Dev10g ...
    Thanks ,,,
    Sim

    I think you'll have to use a from-clause-query for the detail block. If you join the master table and the mv on the DET column then you can give each row in the detail block a MS column (from the master table) which you can use in the relation.

  • How to overload two different procedure with just one name in to package

    i have created two procedure avg1 and avg2.avg1 calculate average of total salary based on e_id and avg2 calculate average based on j_id.now i want to create a package with specification and body where i want to use just one name -avg- for two different procedure.

    You can overload the same name for procedure as long as their formal parameters differ in number, order, or datatype family.
    Read more about overloading in documentation

  • How to call PL/SQL stored procedure with TWO or more arguments from URL?

    Hi all,
    does anybody know, how to call stored procedure with more than one argument?
    How to do this with one argument is known -
    <img src="#OWNER#.retreive_img_data?i_id=#IMG_ID#" width="70" height="80" alt="No Picture">
    But if I need to call procedure with two formal parameters? And need to pass through URL, for example, two page item values?

    Just separate with an "&". Using your previous example, I'll add i_name and i_type:
    <img src="#OWNER#.retreive_img_data?i_id=#IMG_ID#&i_name=somename&i_type=jpg" width="70" height="80" alt="No Picture" />
    Tyler

  • How to call a procedure with two arguments

    Hi,
    I have a procedure with two arguments, ie. myprocedure(p1 in number,p2 in number) to display a blob image.
    how can I call out this blob image in url.
    I tried http://127.0.0.1:7777/pls/apex/SCHEMA.myprocedure?p1=1&p2=2 , but it don't work..
    Thanks
    vincent

    Vincent,
    As long as you have been granted the ability to execute the procedure and there are no spaces in the url and you have not misspelled the parameter names then this looks right.
    Here is a link to a procedure to download a file which takes two parameters.
    http://mywebsite.com/pls/htmldev/schema.package.function.download_file?p_session_id=1221970786026206&p_seq_id=724
    Cheers,
    Tyson Jouglet

  • Join 2 tables which are not related with any primary-foriegn key constraint

    Hello,
    How to join 2 tables which are not related with any primary key foreign key constraint.
    Ex.Consider Table A has 5 columns->A_ID,A_Name,A_Address,A_City,A_Pin(Total 10 rows)
    Table B has 5 columns->B_ID,B_Name,B_Adress,B_City,B_City(Total 30 rows)
    From both the table i want the data,which i need to use in curosr to display finally as "Address Label".
    Both the table are entirely different,but there can be some names of Table A which may come in Table B also,if the name,address and city is also same.That means same person in both the table.
    So finally i want total number of distinct records(distinct data of Table A which is not in B+all the data of table B) to come under Address Label.
    How can i write the select query for this condition?
    Thanks
    Swapna

    Hi, Swapna,
    user11018268 wrote:
    Hello,
    How to join 2 tables which are not related with any primary key foreign key constraint.
    Ex.Consider Table A has 5 columns->A_ID,A_Name,A_Address,A_City,A_Pin(Total 10 rows)
    Table B has 5 columns->B_ID,B_Name,B_Adress,B_City,B_City(Total 30 rows)
    Both the table are entirely different,but there can be some names of Table A which may come in Table B also,if the name,address and city is also same.That means same person in both the table.I think you want a UNION, not a join.
    If you have 10 rows in table_a, and 30 rows in table_b, then
    SELECT       A_ID,          A_Name,     A_Address,     A_City,     A_Pin
    FROM      table_a
    UNION
    SELECT       B_ID,          B_Name,     B_Adress,     B_City,     B_City
    FROM      table_b
    ORDER BY            2,               4          
    ;will produce up to 40 rows; 40 if there are no duplicates. (UNION implies DISTINCT.)
    The corresponding column types should be similar, if not exactly the same.
    There's no problem if A_Name is VARCHAR2 (50) and B_Name is CHAR (30).
    However, there will be a problem if A_ID is a NUMBER and B_ID is a TIMESTAMP.
    You must have the same number of columns in all branches of the UNION.
    If you want an ORDER BY clause, put it at the very end, after the last branch of the UNION.
    You can use positional notation (where 2 means the 2nd column) like I did, or you can use names from the first prong of the UNION (such as A_Name).
    From both the table i want the data,which i need to use in curosr to display finally as "Address Label".
    So finally i want total number of distinct records(distinct data of Table A which is not in B+all the data of table B) to come under Address Label.I'm not sure what your mean about "Address Label".
    Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables, and the exact results (formatted) that you want from that data.
    You can concatenate all 5 columns into one VARCHAR2 column, if you want to.
    You'll probably want to use RPAD (or simillar functions) to make the output line up nicely.
    If any of the columns are not strings, use TO_CHAR to make string versions of them.
    For example:
    SELECT  TO_CHAR (A_ID, '9999999')
         || '   '          -- leave a little space between the left-justified a_id and the right-justified a_name
         || RPAD (A_Name, 25)
         || RPAD (A_Address, 50)
         ...Edited by: Frank Kulash on Nov 14, 2009 10:11 AM

  • Inspection type for STO with delivery and billing , two step procedure

    Dear All,
    We've  STO scenario between two company codes, plant '1000' of company code '1000' supplies goods to plant '2000' of company code '2000' using STO. We'd like to evaluate the supplying plant for vendor evalution with respect to receiving plant,
    Please suggest , which inspection type '01' or '08'  needs to  be activated in the material master in receiving plant '2000' in order to consider the supplying plant ' 1000' for vendor evalution. and kindly let know me that whether the functionalities of QM procurement (Checking receipt of certificate while posting MIGO) can be used in STO scenario similar to normal procurement scenarios,
    Here, we are going for STO scenario of two step procedure with outbound delivery & billing.
    Thanks & regards,
    rajesh

    The inspection type '08' is used for stock transfer order process.
    In SAP standard you can't evaluate the supplying plant but external vendor only.
    Also the functionalities of QM procurement can influece or control it when materials are procured from external suppliers.
    If you want to use the functionalities of vendor evaluation and QM procurement, I would suggest you implement normal procurement process, not stock transfer process.
    Regards
    Luke

  • Outer join two tables with two keys

    Hi,
    I have a question regard outer join,
    I have table A (Aid, ADesc), Table B(Bid, Bdesc), and Table C (Aid, Bid, Cdesc)
    There is data in Table A and B, but Table C is empty
    I want to outer join C with A and B with below query
    select ADesc,Bdesc, Cdest
    from A, B, C
    where A.Aid=C.Aid(+) and B.Bid(+)=C.Bid
    and A.Aid='XXX' and B.Bid(+)='ZZZ'
    The query result show only data in column Adesc , but column BDesc is empty even though there are some data in table B.
    How should the query been modified to correctly show ADESC and Bdesc.
    Thanks
    Vincent

    Guess the below should work:
    Case when records are available in Table C:
    with a as
    (select 'XXX' aid, 'adesc' adesc from dual),
    b as
    (select 'ZZZ' bid, 'bdesc' bdesc from dual),
    c as
    (select 'XXX' aid, 'ZZZ' bid, 'cdest' cdest from dual where 1 = 1)
    select ADesc,Bdesc, C1.Cdest
    from
    A LEFT OUTER JOIN C c1 ON (A.AID = C1.AID AND A.AID = 'XXX'),
    B LEFT OUTER JOIN C C2 ON (B.BID = C2.BID AND B.BID = 'ZZZ');
    Output:
    "ADESC"     "BDESC"     "CDEST"
    "adesc"     "bdesc"     "cdest"Case when table C is empty:
    with a as
    (select 'XXX' aid, 'adesc' adesc from dual),
    b as
    (select 'ZZZ' bid, 'bdesc' bdesc from dual),
    c as
    (select 'XXX' aid, 'ZZZ' bid, 'cdest' cdest from dual where 1 = 2)
    select ADesc,Bdesc, C1.Cdest
    from
    A LEFT OUTER JOIN C c1 ON (A.AID = C1.AID AND A.AID = 'XXX'),
    B LEFT OUTER JOIN C C2 ON (B.BID = C2.BID AND B.BID = 'ZZZ');
    "ADESC"     "BDESC"     "CDEST"
    "adesc"     "bdesc"     ""

  • Master table with two child tables in ADF Framework

    Hi,
    I'm trying to implement single master with two detail tables using oracle adf framework of Jdev 11.1.1.4.0. I'm able to do single master-detail by using view link but unable to achieve nested details block i.e., master with nested child blocks.
    I created Query based view object of Master and two query based view objects as details. Then I created two view link for master with first child and another view link for master with second child. Even then in my data controls I see as two different components which is incorrect.
    Please let me know how to create a data control for an example shown below:
    Fruits [MASTER]
    --- Details of Fruits as adf table
    -- Apples [FIRST CHILD]
    ---- Details of Apples as adf table
    -- Oranges [SECOND CHILD]
    ---- Details of Oranges as adf table
    Regards,
    Amar.

    You need two viewLinks
    Fruits->Apples
    Fruits->Oranges
    Then in the data model you pick the Fruits entry that has:
    Fruits
    |--->Apples
    You stand on Fruits and you shuttle the Oranges to be under it from the left.
    If you'll use the default HR schema you'll see this type of relation for Employees:
    https://blogs.oracle.com/shay/entry/master_with_two_details_on_the

  • Multi-tables based blocks

    Hello,
    Since "FROM clause" based blocks are not well handled by Forms 6i (not editable, master-details relations restrictions), is there another way to base a block on several tables without using a "FROM clause" ?
    Actually, blocks are based on one table (for editing), but along with information from another one. And these "foreign items" have to be in the same block !
    Thanks for your help.

    Yes you can base a block on a Join directly, e.g. the Query Datasource name property in the block has both tables named: emp,dept and the where clause defines the join
    You have to decide which table will be the "master" and will receive the updates etc. You define this by setting the DML Data Target Name property to that table.
    Set the Primary key property on the block to non-updatable and define which item is the actual key using the appropriate item property.
    Finally for each field in the block set the appropriate source (prefixed with the table name e.g. emp.deptno) for each Item in the Column Name property and set the items that do no come from the master table as query only.
    There is a detailed write up on how to do this in the June 2002 edition of the ODTUG Technical Journal. This available online to ODTUG members at:
    http://www.odtug.com/members/briefcase/0602/mills.pdf

  • Detail-with-two-masters : Is there a demo ?

    Hi all,
    I found in the manual following description and I think
    this could be a solution for many-to-many related Forms blocks (intersection table=detail) :
    A detail-with-two-masters relation involves a single detail block that has two master blocks.
    Form Builder displays the appropriate detail records for whichever master block is the current block in the form.
    For example, in the sample application referred to earlier, the ord block could be a detail block having two master blocks, CUSTOMER and EMP.
    End users could then see all of the orders for a particular customer, or for a particular sales representative (employee).
    Usually, when you create a detail-with-two-masters relation, you will be joining on different foreign-key items in the detail block.
    In such cases, the Copy Value from Item property is set for each foreign-key item in the detail block to point
    to the primary-key item in the appropriate master block.
    To create this type of relation, you need only define the two relations; Form Builder will automatically support coordination.
    In other cases, however, you might want to create a master-with-two-details with each relation joining
    on the same foreign-key item in the detail block.
    However, because the Copy Value from Item property can only point to one master block item,
    you will need to write additional code to coordinate querying and
    updating for the second relation if you are joining on the same item in the detail block.
    Depending on the desired functionality, this might include writing a Pre-Query trigger
    for the detail block to ensure that the correct primary-key item value
    is copied to the foreign-key item in the detail block. For example,
    COPY(NAME_IN(:system.master_block||'.primary_key_item'), 'detail_block.item');
    You might also want to create a When-New-Block-Instance trigger that checks
    the coordination status of the detail block whenever
    the end user navigates to a different master block, and,
    if necessary, populates the detail block.
    OK. But sorry, I can not realize it.
    Has anyone a FMB-demo or a to-do list to declare this manual description (many-to-many problem) ???
    Many Thanks in advance
    Friedhold
    [email protected]

    N\'bi wrote:
    Thank you for quick response, even if it is a disappointing answer.  Would a USB headset work?
    Yes.

Maybe you are looking for

  • Unable to run BDC due to start-of-selection

    Hi Experts, I am running BDC for ROH type. The data is in the excel file so I am performing the below operation. In the BDC recording before perform open group there is "START-OF-SELECTION" and I also have a START-OF-SELECTION for excel uploading now

  • How to watch Mp4 Movies With same clarity (HD,1080p,720p) in Ipad3

    Hi I am changing my 1080p and 720P videos into MP4 to upload in IPAD 3 , but they are loosing their quality on IPAD....How to fix it..How can i watch them with same clarity on IPAD3.. Thanks In advance

  • ScrollPane vertical scroll bar positioning

    I have a ScrollPane that holds a number of number of sprites. The sprites are like rows and I would like them to fill the width of the ScrollPane. My problem is that if there are not enough sprites to fill the vertical space of the ScrollPane, then n

  • Smtp authentication 10.8

    Hi, In 10.7 we could lock the SMTP service down to requiring a username and password. In 10.8 it appears that anyone can send via the server, as long as they have the address. No very secure!!! We did a simple upgrade from 10.7-10.8. Obviously Server

  • Burning an iphoto slideshow to a DVD question???

    I have created a 30 minute slideshow in iphoto with Ken Burns (550 pics), transitions, and music. What is the best way to burn this to a DVD? I like creating it in iphoto because it places random KB effects on each photo. Will it stay intact if I jus