More than one Detail table in the Master Detail forms!

Hi,
I need to have more than one Detail table in Master Detail Forms.
I want to see the details of the rows of the first Detail table in the Second Detail table. Please guide me to do this.
Sincerely yours,
Mozhdeh

You can do one of two things
1) Depends on the nature of your data model. I was able to manage many to many
relationships using views and instead of triggers. This solution is somewhat complex but can work in certain situations.
2)Works for situations where master record exists. create a page with mulitple portlets syncronized on some related key.
create the following package to use on the md forms to place on the one page to be rendered.
-- this package will facilitate the storage and retrieval of keys used by the related forms.
create or replace package session_var
IS
session_parms portal30.wwsto_api_session;
g_domain varchar2(2000) := portal30.wwctx_api.get_user;
function get_id (id in varchar2) return number;
PROCEDURE SET_ID
(ID in VARCHAR2
,p_val in VARCHAR2
,P_URL in VARCHAR2
END SESSION_VAR;
create or replace package body session_var
IS
--pkg body
function get_id(id in varchar2) return number is
l_store_session portal30.wwsto_api_session;
l_id number;
begin
l_store_session := portal30.wwsto_api_session.load_session(
p_domain => session_var.g_domain,
p_sub_domain => 'your domain');
l_id := l_store_session.get_attribute_as_varchar2( p_name => id);
return l_id;
end get_id;
PROCEDURE SET_ID
(ID in VARCHAR2
,p_val in VARCHAR2
,P_URL in VARCHAR2
IS
l_store_session portal30.wwsto_api_session;
begin
l_store_session := portal30.wwsto_api_session.load_session(
p_domain => session_var.g_domain,
p_sub_domain => 'your domain');
l_store_session.set_attribute(
p_name => id,
p_value => p_val );
l_store_session.save_session;
* Redirect to the page using p_url;
portal30.wwv_redirect.url(P_URL);
end set_id;
END SESSION_VAR;
--the form master detail form, section  before display page enter the following code and publish as portlet.
declare
l_fs varchar2(4000);
l_s varchar2(4000);
v_con_id number;
begin
v_con_id :=rfq.session_var.get_id('CON_ID'); -- primary key and key used to relate details
p_session.set_shadow_value( p_block_name => 'MASTER_BLOCK',
p_attribute_name => 'A_CON_ID', -- attribute on form related to primary key
p_value => '= '|| v_con_id,
p_language => portal30.wwctx_api.get_nls_language ,
               p_index => 1
l_fs := p_session.get_value_as_varchar2(p_block_name => 'MASTER_BLOCK', p_attribute_name => '_FORM_STATE');
l_s := p_session.get_value_as_varchar2(p_block_name => 'MASTER_BLOCK', p_attribute_name => '_STATUS');
if l_fs = 'SAVE' and l_s is null then
WWV_MASTER_GENSYS_1(p_block_name => p_block_name,
p_object_name => p_object_name,
p_instance => p_instance,
p_event_type => p_event_type,
p_user_args => p_user_args,
p_session => p_session);
p_session.save_session;
end if;
if l_fs = 'QUERY_AND_SAVE' and l_s is null then
WWV_MASTER_GENSYS_1(p_block_name => p_block_name,
p_object_name => p_object_name,
p_instance => p_instance,
p_event_type => p_event_type,
p_user_args => p_user_args,
p_session => p_session);
p_session.save_session;
end if;
exception
when others then
PORTAL30.wwerr_api_error.add(PORTAL30.wwerr_api_error.DOMAIN_WWV,'app','generic','onLink', p1 => sqlerrm);
raise;
end;
--then create other md forms and publish as portlets in a similar manner.
-- create a form (form_session_vars) to call procedure session_vars and place the following code in the
addiontional pl/sql tab
WWV_GENSYS_1(
p_block_name => p_block_name ,
p_object_name => p_object_name,
p_instance => p_instance ,
p_event_type => p_event_type ,
p_user_args => p_user_args ,
p_session => p_session);
--then create a page and place the md forms created above as portlets on the page.
--create a link and target the form_session_vars and in the link target inputs
enter the values for your user parameters
id= CON_ID --"your primary key name"
p_url= url/page/"your_page"
--finally create a report (QBE or standard).
in the column formation section use the link created earlier to direct the user to the target page.
How it works.
When the link is selected the form_session_Var is called and automatically runs setting the primary key values
in the user session store. The step is required or the resulting page will not render properly. Then the user is redirected to the page where the portlets are rendered. The portlets start rendering, the before display page calls the session vars package to retrieve the key and put the form into query_update mode returning the data.
The portlets finish in query_and_save mode with details in update mode, the allowable insert, delete and none actions will be available for the details.
benefits: The session_Var package code is resuable as well as the form form_session_Var and the link. passing the key name and values are done at the report level and detailed in the report links. the md forms will need to reference their related keys.

Similar Messages

  • UDO WITH MORE THAN ONE CHILD TABLE

    Hello There.
    Can I handle more than one child table for a master table by code?
    if I can, how do I create this udo, I have tryed the following code, but it takes the last child table ("jobs7")
    If oUserObjectMD.GetByKey("Jbs_UO") = 0 Then
                oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
                oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
                oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tNO
                'oUserObjectMD.FormColumns   
                oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
                oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
                oUserObjectMD.FindColumns.ColumnAlias = "Code"
                oUserObjectMD.FindColumns.Add()
                oUserObjectMD.FindColumns.SetCurrentLine(1)
                oUserObjectMD.FindColumns.ColumnAlias = "Name"
                oUserObjectMD.CanLog = SAPbobsCOM.BoYesNoEnum.tNO
                oUserObjectMD.LogTableName = ""
                oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tNO
                oUserObjectMD.ChildTables.TableName = "JOBS1"
                oUserObjectMD.ChildTables.TableName = "JOBS2"
                oUserObjectMD.ChildTables.TableName = "JOBS3"
                oUserObjectMD.ChildTables.TableName = "JOBS4"
                oUserObjectMD.ChildTables.TableName = "JOBS5"
                oUserObjectMD.ChildTables.TableName = "JOBS6"
                oUserObjectMD.ChildTables.TableName = "JOBS7"
                oUserObjectMD.ExtensionName = ""
                oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO
                oUserObjectMD.Code = "Jbs_UO"
                oUserObjectMD.Name = "Jobs UDO"
                oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_MasterData
                oUserObjectMD.TableName = "JOBS"
                If oUserObjectMD.Add() <> 0 Then
                    Dim ErrMsg As String
                    Dim ErrCode As Long
                    oCompany.GetLastError(ErrCode, ErrMsg)
                    MsgBox("Errorf adding UDO master Data" & vbCrLf & ErrMsg)
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
                    oUserObjectMD = Nothing
                    Return False
                End If
            End If

    Hi Hagai
    after oUserObjectMD.ChildTables.TableName = "JOBS1"
    just write
    oUserObjectMD.ChildTables.Add
    that would be
    oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tNO
    oUserObjectMD.ChildTables.TableName = "JOBS1"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS2"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS3"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS4"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS5"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS6"
    oUserObjectMD.ChildTables.Add
    oUserObjectMD.ChildTables.TableName = "JOBS7"

  • Can i Bind more than one Model object to the Custom controller or not

    Hi All, I trying to bind more than one model object to the custom controller, Both the model objects contains same attribute name called ( output). Both model objects created on to top of the BAPI. So when i bind first model object to the custom controller will work fine. When i am trying to bind the second model object to the same controller. This second model object also having the same attribute name called "output" . So it is giving an error of "Duplicate context element "Detail". Rename or uncheck duplicate elements.
    can i assign more than one model object to the single controller or not?
    But in the reference document, it has given that , we can create model object with more than one bapi.So in this case if both the bapis contains any element with the same name will also be problem. Any body give me the solution.
    Initially we have created one custom controller for each model object. But later i realized that, why con't we use same controller for all the model object. Because, the custom controller context is the public context. this context shared across all the view controllers.
    The concept which I am trying to do is right or wrong?

    Hi Vishal,
    of course, you can bind one controler to many models. When the same name occours you can simply RENAME binded node in controler.
    Regards
    Bogdan

  • Cannot modify more than one base table through a join view

    hi guys, my current problem is that i have a datablock based on a view, now all the fields bar 1 are updateable, but this one field that is obtained through a join is displayed, the user can enter data in this field which then pupulates other fields which are required, but this specific field should not be updated. Is there an option to state this as i keep getting the error:
    cannot modify more than one base table through a join view
    Any help would be greatly appreciated, thanks.

    the user can enter data in this field which then pupulates other fields So, using the value of "this field" you then query the rest of the fields? Can you show us the code you use to populate the rest of the fields?
    but this specific field should not be updatedHave you tried setting the "Query Only" property of the field to "Yes" and the other DML properties (Ins, Upd, Del) to No?
    Also, what is your Forms version?
    Thanks,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Logical table having more than one Logical table sources

    Hi ,
    Is it possible a logical table has 2 logical table sources and there is no join between the underlying table of logical table sources?
    What will happen if we create the request which contains one attribute from each source?
    Will BI server return records with Cartesian join?
    Is it mandatory if logical table is having more than one logical table sources(exp. Logical table sources are X,Y and underlying table is A,B respectively),
    The underlying tables (A&B) must be joined ?
    Can someone explain the logic behind the logical table sources? How does it work?
    Any reference of document will be appreciable.
    Thanks,Ashish

    Hi Stijn,
    Thanks for response.
    You are saying that Oracle BI server will run a query against both tables and combine the results. But if there is no possibilty of any type of join, how BI server will combine the results from both tables.
    I have a scenario like below -
    Suppose i have 2 tables A and B at physical layer. Both table contains the information of any common subject area.
    But there is no attribute is common between A and B so not any kind of join possible between two.
    Now if i create a logical table with 2 logical table source A and B and create any request having one column from A and one from B ,
    What will happen? How BI server will combine the result? Will BI server not result records after Cartesian join.
    How can i model this scenario?

  • How to Create Field Catalogs (More than one Source Table)

    Hi Data Archiving Experts,
    Could you please help me how to create the Field Catalogs (More than one Source Table). If any one is having example that will help.
    My scenario:
    Currently we are archiving on CRM Data archiving project. We are facing one issue on creating field catalog with more than one source table.
    Ex: ST -- BP1
                  BP2
                  BP3
    ST info store in one table and BP1 -- BP 3 info sotre in another table. with current field catalog we are getting ST -- BP1. Our requirment is we need to show the ST  -- BP3 How we can achive this.
    Regards,
    Srini

    Hi,
    I don't think its possible to create fieldcatalog for different tables,
    but if you want to do so create a dummy table which has all the fields which you want in fieldcatalog.
    populate the data from different table to that dummy table
    then create fieldcatalog for that table and pass it in the function module...
    Regards,
    Siddarth

  • More than one fact tables...

    Hi.
    I have tried OLAP until now with only one fact table.
    But now I have more than one. To start i added one more.
    I am always using SOLVED LEVEL...LOWEST LEVEL.
    I am always receiving the following error when creating the cube with this measures:
    "exact fetch returns more than requested number of rows"
    What shall I look for when dealing with more than one fact table?
    Thanks.
    ODDS
    :: ... and still have a very poor performance ...

    1.
    Well ... I saw the global star schema and we have two fact tables there!!!
    Do I have to build different cubes for each fact table always?
    2.
    I have built cubes, created a java client and a jsp client.
    Performance is much better in JSP using the AppServer(sure!).
    The power of the JSP client is more limited i presume.
    I wonder if I can do things such setCellEditing for a crosstab in both.
    3.
    Some aggregation questions:
    Everytime I create a cube using CWM2 and also a AW using AWM wizards with that cube I have one aggregation plan by default that processes everything online.
    After that I create and deploy my own aggregation plan.
    My question is: If I don't want to aggregate anything!??! I want to see, for instance, in BiBeans the lowest level values only. And everything at the top levels empty.
    I am missing something 'cause I still have everything aggregated !!!
    Thanks.
    ODDS

  • More than one item table in HIERSEQ_LIST_DISPLAY

    Hi ,
    Is it possible to have moe than one item table in HIERSEQ_LIST_DISPLAY.
    if we have more than one item table with different structures then what is the best way to disply them.
    Thanks and Regards,

    thank you

  • Material has more than one plant, only show the price for the first on

    Hi:
    I am having the standard price for the material with the different plants ,I am seeing only one Material and Standard price(if a material has more than one plant, only show the price for the first one In the report ):
    plant :de87 Material: 60020601 Standard price: 1237.00
    plant:PT01 Material :60020601 Standard price: 634.00
    In the report I am seeing DE87 with the standard price :1237.00 .
    I am extracting from the 0MATERIAL_ATTR
    Please help me how can I display all plants with the material and std price. In my data source there is no PLANT
    rgrds
    Kumar

    Hi:
    Report is running on 0MATERIAL(Transactional master data),Data sourc: 0MATERIAL_ATTR,
    We are having the standard price in the 0MATERIAL ,(Standard price is combination of plant and Material) .Plant is not available in the material,so in the report its displaying only first result
    plant :de87 Material: 60020601 Standard price: 1237.00 --->Displaying this
    plant:PT01 Material :60020601 Standard price: 634.00
    In the above we are having the same material but different plant and different standard price. so I need to display the both in the report.
    Rgrds
    kumar

  • Reg: how to join more than one cluster table into one

    Hi gurus
    How to join more than one cluster table into one
    amk

    Hi,
    You cannot join cluster tables
    Best way is to select from the header table and then select from the item table table using for all entries of header table.
    regards,
    Advait

  • How to add more than one input arguments to the tpcall

    Hi
    Can any one know how to add more than one input arguments in the tpcall using WTC (Jatmi)?
    Par example, I have un service Tuxedo getConsoClient(char* cli_id, char* type)
    To call this service, I'm using tpcall("getConsoClient", dataIn, 0);
    here, I did't know how to add two parameters in the TypedBuffer object. I'm new to WTC.
    Any hints will be greatly appreaciated.
    Advanced thanks

    Thanks for you help. But in java Jatmi, I have lot of problem to convert array into TypedBuffer or TypedString. See below code, I'm tried using vector or tableau etc..
    But I have always same erreur. :(
    public void getClientInfo() {
         Context ctx;
         TuxedoConnection myTux;
         TypedString numinst = new TypedString("1");
         TypedString idClient = new TypedString("1003");
         TypedString[] dataIn = {numinst,idClient};
         //TypedString dataIn = new TypedString(numinst+"\0"+idClient+"\0");
         Vector input = new Vector();
         input.add(0,numinst);
         input.add(1,idClient);
         Reply rpy = null;
         try{          
              System.out.println("getClientInfo called : " + dataIn);
              TuxedoConnectionFactory tcf;               
              ctx = new InitialContext();
              tcf = (TuxedoConnectionFactory) ctx.lookup("tuxedo.services.TuxedoConnection");
              myTux = tcf.getTuxedoConnection();          
              System.out.println("About to call tpcall cnx = "+myTux);
              rpy = myTux.tpcall("LireInfoCli_SE",(TypedBuffer)dataIn, 0);          
              System.out.println("tpcall successfull!");
              TypedFML32 typ = (TypedFML32) rpy.getReplyBuffer();
              System.out.println("Reply Type = "+rpy.getReplyBuffer().getType());
              System.out.println("Reply toString = "+typ.toString());
              while(typ.Fiterator().hasNext()){
                   System.out.println("Reply toString = "+typ.Fiterator().next().toString());               
              myTux.tpterm(); // Closing the association with Tuxedo
         }catch (TPReplyException tpx) {
              // Could not get the tuxedo object, throw TPENOENT
              System.out.println("TPReplyException perrno = " + tpx.gettperrno()+" DETAILS "+tpx.gettperrordetail()+" getLocalizedMessage "+tpx.getLocalizedMessage()+" "+tpx.getCause());
              tpx.printStackTrace();
         }catch (TPException tpx1) {
              // Could not get the tuxedo object, throw TPENOENT
              System.out.println("TPReplyException perrno = " + tpx1.gettperrno()+" DETAILS "+tpx1.gettperrordetail()+" getLocalizedMessage "+tpx1.getLocalizedMessage()+" "+tpx1.getCause());
              tpx1.printStackTrace();
         }catch (NamingException ne) {
                   // Could not get the tuxedo object, throw TPENOENT
                   System.out.println("Could not get TuxedoConnectionFactory : " + ne.getMessage());
                   ne.printStackTrace();
         }catch(Exception e){
                   System.out.println("Exception in getClientInfo ->"+e.getMessage());
                   e.printStackTrace();
         return;
    }

  • Can I assign more than one Pricing procedures to the one vendor.

    Hi Gurus,
    Can I assign more than one Pricing procedures to the one vendor.
    If possible, where it can assign &give the procedure.
    My client requirement is :
    Vendor supply the goods from two different countries. So, pricing procedure is different because taxes are differ in two countries and currency also differs.
    If goods are supplying from country u2018Au2019 ,automatically pricing procedure for that country  was trigger. How the system know , which pricing schema is required.
    Give me solution

    Hi,
    Extend your vendor to new purchase organisation.  Assaign new pricing procedure to this Purchase organisation.
    Use different Purchase organisation while creating POs for the same vendor  procuring from different countries.
    Regards,
    Satya
    Edited by: Penjarla Venkata Satyanarayana on Aug 28, 2008 4:21 PM
    Edited by: Penjarla Venkata Satyanarayana on Aug 28, 2008 4:23 PM

  • My sister has a mac and i want to update my phone onto the computer but i dont want her to see all my stuff can you somehow have more than one itunes account on the same computer so my stuff with save?

    my sister has a mac and i want to update my phone onto the computer but i dont want her to see all my stuff can you somehow have more than one itunes account on the same macbook so my stuff with save?

    How to use multiple iPhone, iPad, or iPod devices with one computer. The only way is for you to have a separate user account to log into on that computer.

  • Can i have more than one ipod touch on the same account, or must they both be set up with different id's.

      Can I have more than one ipod touch on the same account, or must they each have their own ID.

    If you use the same account see the following to separate Messages and FaceTime between the two iPod see:
    MacMost Now 653: Setting Up Multiple iOS Devices For Messages and FaceTime

  • Can there be more than one JVM Running on the same machine

    Can there be more than one JVM Running on the same machine.

    Even JVM's of different versions (or vendors) can run on the same box at the same time.

Maybe you are looking for

  • Moving iTunes library using Home Sharing

    I am attempting to transfer my iTunes library from my desktop PC to a new laptop using Home Sharing.  Do the iTunes folder locations have to match in each computer for Home Sharing?  My old PC has C:\ and D:\ partitions whereas my new laptop has only

  • Urgent!! downloading file in jsp

    hi all can anyone plz help me in downloading file from my disk actual scenario is like this i have uploaded file path in database, and whole file in to my disk.... i have given links to file name and when one clicks the link the file of that link sho

  • Locating and Editing Theme Files in iPhoto '08

    I'm a professional photographer working on a signature guest album for a couple. I was looking for inspiration so, I turned to iPhoto '08. I found a template or theme that I like. However, I don't like the layouts, etc. I started on a quest to find t

  • Part II of question posted right before this one

    The movie I'm making is of still photos that I've scanned in. I'm not importing anything from my camcorder.

  • Keywords conflict between Lightroom & Bridge

    I am new to Lightroom but have used Bridge for a long time. My Bridge keywords have evolved over time and various hierarchies and parent keywords have been changed many times to reflect my needs. I find that when I import older images into Lightroom,