Master Detail Help
I have a master/detail page that also has a built in
inPlaceEditor in the detail part. When the user updates the detail,
I need the master list to update with the information (this part
wasn't hard, I just did dsEmployees.loadData()). However, when I
load the data the detail aspect defaults back to the first row of
the dsEmployees. How can I get the detail page to default to the
row that was changed?
Hi,
This is really a SQL query, not much to do with Forms.
Something like this.
SELECT ....
FROM <DETAIL_TABLE>
WHERE <DETAIL_TABLE>.<DATE_COLUMN> = (SELECT MAX(<DETAIL_TABLE>.<DATE_COLUMN>) FROM <DETAIL_TABLE>
WHERE <DETAIL_TABLE>.<FK_COLUMN> = 'AA' )
.....BTW, DATE is a reserved word and cannot be a column_name.
The equivalent of the WHERE Clause above is what you need to put into the detail block.
For any better response, you should post the actual query with actual table/column names.
Regards,
Edited by: Prabodh on May 26, 2012 1:02 PM
Similar Messages
-
ORACLE FORMS MASTER DETAIL HELP
GOT 2 DATA BLOCKS. 1 REPRESENTING ALL EMPLOYEES, THE OTHER REPRESENTING ALL SALARIES. uSING A MASTER - DETAIL RELATIONSHIP WHEN TRYING TO SHOW ALL SALARIES BESIDE ALL EMPLOYEES IN A MULTI-ROW TABULAR VIEW I CAN'T SEEM TO LIST THE SALARY FOR EACH EMPLOYEE ONLY THE FIRST...EG.
EMPLOYEE SALARY
|||||||||||||||||||||||| ||||||||||||||||||||
SMITH _____10000
JONES
REGERG
SDGS
SDFGSR
HOWEVER, AS I MOVE THROUGH THE EMPLOYEES THE SALARY CHANGES BUT STAYS AS THE FIRST ENTRY.... THANKS FOR ANY HELP OFFERED
Message was edited by:
user445629
Message was edited by:
user445629
Message was edited by:
user445629You have master - detail relationship here. So unless you click on second employee it won't show you salary for second employee.
You can create a control block and capture values in this block through cursor. You can also create a view and get values from view. In both cases you need only one block not two.
Are you showing this only for display or user can also modify these values? -
Hi,
I'm trying to wrting to the nested node in the context but I can't.
I have the following context:
root
pai (1..n) singleton
filho(1..n) singleton
I'm tryng to do a master/detail application.
The node pai is bound to a table in my view, the node filho is bound to another. My objective is to show the detail (node filho) correct to each line in table master.
I can write to node pai, it works. I wrote to the node filho too, but when I debug, only one element of node child is filled.
If someone could help me, I would be thankfull.
The complete code is here, I put it into the wd_doinit of my view:
data: table_pai type wd_this->elements_pai,
table_pai_linha type wd_this->element_pai,
passo type matnr,
lo_nd_pai type ref to if_wd_context_node,
lo_nd_filho type ref to if_wd_context_node,
lo_el_filho type ref to if_wd_context_element,
table_filho_linha type wd_this->element_filho,
lo_el_pai type ref to if_wd_context_element,
cont type integer.
passo = '123456789012345678'.
do.
table_pai_linha-matnr = passo.
append table_pai_linha to table_pai.
passo = passo + 1.
if passo = '123456789012345683'.
exit.
endif.
enddo.
lo_nd_pai = wd_context->get_child_node( 'PAI ').
lo_nd_pai->bind_table( new_items = table_pai set_initial_elements = abap_false ).
cont = lo_nd_pai->get_element_count( ).
do.
lo_nd_pai->SET_LEAD_SELECTION_index( cont ).
lo_el_pai = lo_nd_pai->get_element( ).
lo_nd_filho = lo_el_pai->get_child_node( wd_this->wdctx_filho ).
lo_el_filho = lo_nd_filho->create_element( ).
lo_nd_pai->get_attribute( exporting name = 'matnr' importing value = passo ).
table_filho_linha-matnr_filho = passo.
lo_el_filho->set_static_attributes(
exporting
static_attributes = table_filho_linha ).
lo_nd_filho->bind_element( new_item = lo_el_filho set_initial_elements = abap_false ).
cont = cont - 1.
if cont = 0.
exit.
endif.
enddo.
thanks,Yogesh,
I read the article.
So, If I set the node "filho" as singleton I can't fill this node with elements for all elements of node "pai".
The elements will be lost. It is that I don't understand, if the elements will be lost, there are no reason to use singleton, I can't imagine when I could use this option.
If I want to fill all the context in one time, I have to set the node as non-singleton.
Is all that I said correct?
sorry for the quantity of questions, but I'm new in WD4Abap and I want to learn very much.
Thanks a lot -
EJB - Master Detailing Help.
Hi,
I am new to EJB & to JDeveloper.
I am tring to use EJB to display table information where one table is the master and second table displays the info according to the master.
Here is what I have done so far:
I created EJB Diagram using drag & drop method from connection, then I created EJB Entity Facade Objects, just like ADF, it created view & link.
In pageflow, I created uix page to display the results. But the problem is that when I use master detail (one to many, etc), and run the page, I get full information from both tables rather than record by record like ADF does.
The example I followed is on the following link.
http://www.oracle.com/technology/products/jdev/collateral/tutorials/9050/adfuix_tut.html
Thank you.This is not a clustering issue. Pls post your question to relevant newsgroup.
FWIW, NoClassDefFoundError means the corresponding class is not found
in the classpath.
Kumar
F40 wrote:
> EJB : Test .Unable to initialize method info for remote or home interface.The error is java.lang.NoClassDefFoundError: [Lcom/borland/dx/dataset/DataSetData;
-
Master Detail Help -- very urgent
There are two things I need to do:
Auto query the form querying on a detail record week_ending and also on a master record.
Means this is what query should like :
select * from user_table a, week_ending_table b
where
a.id = b.user_id
and
a.user_id = portal30.wwctx_api.get_user
and
b.week_ending = '02-MAR-89';
So when I query this is the query I would like to see but not when i click query button, I want to see it when i bring query up.
Please help!Hi,
I have written what I needed to in reply to the other question, but just thought if something.
I want week ending hardcoded like 99-MAR- 02. In Method 1 , where do I put that? You have used variable l_week_ending but never defined what it is. One thing is I am not really querying on detail, I just want week ending to always be a certain date...
Thanks,
Amrita -
Master Detail Help! Please
I have a Mater detail form. When I enter a record and then press CREATE. The record disappears. Is there a way to insert the record and then query back from the DB so that the detail can be added?
Found my problem after three days. It was the Process Row of MASTER process. I did not have the Return Key into Item field filled in.
-
Help needed in Master Detail Form - 2 level of details
Hi,
I have a form with 2 levels of Master Detail and a Find window
The Datablocks are
- Batch
- Headers
- Lines
- Manual datablock for Find Wndow
I have created relation between Bacthes and Headers with Batch Id
I have created relation between Headers and Lines using HeaderId.
The issue is that,
If I search with '%' in Batch block, by default it will show results in 'Headers' and 'Lines' block.but if i navigate to the next record in batch block , only Headers block shows results but Lines block does not show result.
If I search from Find window also, only Batch and Headers block shows results but Lines block will be empty.
In the 'Batch' block if I search with specific data , the screen shows results in 'Headers' and 'Lines' block.
Can you please help me solve it.
I have written a PRE-QUERY on Batches block to set where clause from Find window.
I have written a PRE-QUERY in Headers block to set where clause from Find window
Thanks,
Kamath.
Thanks,
GowtamHi,
When you execute normal not by searching through ENTER_QUERY mode. Then data is coming in all blocks
- Yes. Once I go to the Form if I search using '%' in batch block or search for a particlaur record i Batch block, the results shows up in Headers and Lines block.
Ex: say there are 2 records in Batch block(A and B) and I search by %, by default i get 1 batth record (A) and corresponsding headers and lines
now when i use down arrow key in the batch block, second record(B) will be showed in batch block. relevant Headers block records will be shown but Lines block does not get queried.
Similarly if coem to the Form from search window then also, Batch and Header blcoks wil be shown but not Lines block
PREQUERY at Batch Level_*
V_WHERE := 'WHERE 1 = 1';
IF :XXYH_ICAN_CALC_WB_FIND.PERIOD IS NOT NULL THEN
V_WHERE := V_WHERE || ' AND PERIOD = '''||:XXYH_ICAN_CALC_WB_FIND.PERIOD||'''';
END IF;
IF :XXYH_ICAN_CALC_WB_FIND.BATCH_ID IS NOT NULL THEN
V_WHERE := V_WHERE || ' AND BATCH_ID = '''||:XXYH_ICAN_CALC_WB_FIND.BATCH_ID||'''';
END IF;
IF V_WHERE IS NOT NULL THEN
set_block_property('XXYH_ICAN_WB_BATCHES',DEFAULT_WHERE,V_WHERE );
END IF;
PRE-QUERY at Header Level_
IF :XXYH_ICAN_CALC_WB_FIND.BATCH_ID IS NOT NULL THEN
V_WHERE := V_WHERE || ' AND BATCH_ID = '''||:XXYH_ICAN_CALC_WB_FIND.BATCH_ID||'''';
END IF;
IF V_WHERE IS NOT NULL THEN
set_block_property('XXYH_ICAN_WB_TRX_HEADERS',DEFAULT_WHERE,V_WHERE );
END IF;
Thanks,
kamath. -
HELP: Error while insert in master-detail form!!!
Hello
I have created a master-detail form and when I tried to insert a new record I got an error that the field on the detail table that references the primary key on the master table can not be null. I don't understand this error because I thought that when you create a master-detail form and you insert a new record the field that make the references in the detail table to the primary key on the master table will be automatically filled, am I wrong??. Can anybody tell me what is going on??. The primary key of my master table is filled with a trigger before insert, is that the problem??.
Please Help me is really urgent
Ana MariaI am still new to this, but maybe this will help.
1. Double check that your foreign key link definition in the detail table is referencing the correct column in the master table. If this is not present or referencing the column, this may be causing the problem. Self evident, but sometimes it is the simple things that get us.
2. I have not used a trigger yet, but could there be validation being done in the form before the trigger is firing. Therefore, there would not be a value in the detail part of the form.
Hope this was of some help. -
Help needed to create a master-detail JSP page using OAF.
I like to create a master-detail JSP page using OAF. If any help or guide will be appreciate.
- KausikA Master Detail Page is a basically a game between two VOs(Master and Detail mostly connected through a View Link). You can also have a look at the View Link section in the Dev guide. Page Layouts is one thing which you can take a call yourself.
Regards
Sumit -
Data Template---master details query--Help
Hi
we are using XML Publisher attached to R12 , we are using data template ( .XML file) in data definition .
we have a requirement for master details report. for that we have parent query and child query .the data coming to parent query should be the parameter to child query
Exp-- Parent Query-- select empno from emp
Child Query --select * from dept where empno=:p_empno (p_empno =empno from Parent query )
For this requirement we are creating a data template (.XML file) . we are successfully to write for the parent query, but we fails when come to child query. Please help us how it can be wrote in data template . You can send any example related to this issue.Parent Query - select empno as emp_no from emp
Child Query - select * from empno where empno=:emp_no -
Very strange behaviour master-detail-detail please help
Very strange behaviour master-detail-detail please help
Hello,
I have a parent-child-grandchild report which show's some really strange behaviour.
The data template has 3 queries Q1, Q2 and Q3.
Q2 is bound to Q1 using a bind variable
Q3 is bound to Q2 using another bind variable
For a certain record in Q1 the output should be
2 records in Q2
and 1 record in Q3 for each record in Q2
Q1 record
Q2 record A
Q3 record AA
Q2 record B
Q3 record BC
The results conforms to the expected output.
For another record in Q1 the output should be
2 records in Q2
and 2 records in Q3 for each record in Q2
Q1 record
Q2 record A
Q3 record AA
Q3 record AB
Q2 record B
Q3 record BC
Q3 record BD
In stead of the expected output, the result shows
Q1 record
Q2 record A
Q3 record AA
Q3 record AB
Q2 record B
Q3 record AB
For another record in Q1 the output should be
5 records in Q2
and 2 records in Q3 for each record in Q2
Q1 record
Q2 record A
Q3 record AA
Q3 record AB
Q2 record B
Q3 record BC
Q3 record BD
Q2 record C
Q3 record CE
Q3 record CF
Q2 record D
Q3 record DG
Q3 record DH
Q2 record E
Q3 record EI
Q3 record EJ
In stead of the expected output, the result shows
Q1 record
Q2 record A
Q3 record AA
Q3 record AB
Q2 record B
Q3 record BC
Q3 record BD
Q2 record C
Q3 record CE
Q3 record CF
Q2 record D
Q3 record DG
Q3 record DH
Q2 record E
Q3 record DH
So for the last record of Q2 I don't get the appropriate records from Q3 when there are multiple records to be shown, but only the last record which belongs to the previous Q2
What is going on?
Please help me out...
Kind regards,
Jan-MarcelHi Tim,
Thanks for your reply. Below you will find the datatemplate on the scott/tiger schema.
Please help me out.
Kind regards,
Jan-Marcel
<dataTemplate name="scott" description="Template scott" dataSourceRef="otcy001" version="1.1">
<parameters>
<parameter name="p_deptno" dataType="number"/>
</parameters>
<dataQuery>
<sqlStatement name="Q1">
<![CDATA[
select empno mgr_empno
, ename mgr_name
, job mgr_job
, hiredate mgr_hiredate
, sal mgr_sal
, comm mgr_comm
from emp
where deptno = nvl(:p_deptno, deptno)
and mgr is null
]]>
</sqlStatement>
<sqlStatement name="Q2">
<![CDATA[
select empno mgr2_empno
, ename mgr2_name
, job mgr2_job
, hiredate mgr2_hiredate
, sal mgr2_sal
, comm mgr2_comm
, mgr mgr2_mgr
from emp
where mgr = :mgr_empno
]]>
</sqlStatement>
<sqlStatement name="Q3">
<![CDATA[
select empno emp_no
, ename emp_name
, job emp_job
, hiredate emp_hiredate
, sal emp_sal
, comm emp_comm
, mgr emp_mgr
from emp
where mgr = :mgr2_empno
]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="G_mgr1" source="Q1">
<element name="q1_mgr_empno" value="mgr_empno"/>
<element name="q1_mgr_name" value="mgr_name"/>
<element name="q1_mgr_job" value="mgr_job"/>
<element name="q1_mgr_hiredate" value="mgr_hiredate"/>
<element name="q1_mgr_sal" value="mgr_sal"/>
<element name="q1_mgr_comm" value="mgr_comm"/>
<group name="G_mgr2" source="Q2">
<element name="q2_mgr_empno" value="mgr2_empno"/>
<element name="q2_mgr_name" value="mgr2_name"/>
<element name="q2_mgr_job" value="mgr2_job"/>
<element name="q2_mgr_hiredate" value="mgr2_hiredate"/>
<element name="q2_mgr_sal" value="mgr2_sal"/>
<element name="q2_mgr_comm" value="mgr2_comm"/>
<element name="q2_mgr2_mgr" value="mgr2_mgr"/>
<group name="G_emp" source="Q3">
<element name="q3_emp_empno" value="emp_empno"/>
<element name="q3_emp_name" value="emp_name"/>
<element name="q3_emp_job" value="emp_job"/>
<element name="q3_emp_hiredate" value="emp_hiredate"/>
<element name="q3_emp_sal" value="emp_sal"/>
<element name="q3_emp_comm" value="emp_comm"/>
<element name="q3_emp_mgr" value="emp_mgr"/>
</group>
</group>
</group>
</dataStructure>
</dataTemplate> -
URGENT HELP PLS : Issue with Multi Level Master Detail block
This is an issue someone else had posted in this forum few years back but there was no solution mentioned, I have run into this same issue , The problem is as explained below.
Any help on this is appreciated.
Scenario:
There are 3 Blocks in the form : A (Master Block)
: B (Detail of A )
: C (Detail of B )
There is master detail relation created between A and B and B and C. So initially when we query for a record in Master A, it shows all records properly in B and C.
Now if i navigate to the first record of B , and then second record of B , records corresponding to that record shows up properly in C block.
Till now everything works fine.
Issue 1:
But in case after querying initially on Master Block A,If I go directly to the second record of B block, it clears the whole B block and C block.
Issue 2:
Same thing happens if I am on C block ( corresponding to second record of B block) and then navigate to first record in B block , it again clears the whole B block and C block.
Please Help !!
Thanks !Thanks Xem for Your reply , I tried those settings but it did not help..here is the original link that to the thread that talks about the same problem ,
Issue with Multi Level Master Detail block
The last update to this was the following :
"I figured out that this is happening because Block Status is set to 'Changed' and this is causing it to clear out the blocks.
But cant figure out why the status is setting to 'Changed' "
Any Help from the form Gurus on this form in this matter is truely appreicated !!
Thanks,
Zid. -
Help! Master-Detail-Detail problem!
Dear all,
I am using Jdev.10.1.3, ADF + BC.
I have 3 tables: table1(Master), table2(Detail, foreign key set, reference to tabel1) and table3(Detail, foreign key set, reference to table2).
I created an edit form by the following steps:
1) Selected table1 from the Data Control Palette --> Forms --> ADF Form....
2) Selected table3 from the Data Control Palette --> Master-Details --> ADF Master Table, Detail Table
3) Delete the "Submit" button in Master Table
4) Change the "Submit" button to "Delete" (with backing bean) in Detail Table
5) Added 3 buttons (with backing bean) at the bottom of the form (i.e. Save, Delete, Cancel)
6) There is a menu at the top of the form
7) e.g. there are 2 records in Master table and each record contains 3 Detail records
The data retrieve is no problem.
When I clicked the radio button for the first record in the Master table, and then click the Save/Delete button at the bottom of the form. No problem.
However, when I clicked the radio button for the second record in the Master table, and then click the buttons at the bottom of the form.
Duplicate Menu was displayed. Sometimes duplicate buttons were displayed. And the button didn't go to the backing bean.
I don't know why and how to solve the problem??
Hope someone can help me.
Thanks for any suggestion.
Regards.Hi All,
Just in case anyone has same problem. Since I was not able to get help here I created a tar and we figured that the problem was with the system when I upgraded. System created triggers that were fighting with the sequences that I had manually created.
Disabled triggers and all is working fine. You still need to watch future applications just in case.
Later,
d. -
Master/Detail data error problem -- Please Help
Hi All,
I just created a M/D form for two of my tables (Organization & Contact tables) using wizard with existing sequences to create app. Everything looks great when viewing an existing account and making modifications.
My problem stems when I try to create a new account, the Organization form comes up. After entering data and hit 'Create' I get error ORA-01403: No data found. Yet it creates account. Is there a way to get both M&D forms up at the same time with no error after entering data?????
I am too new to know what is going wrong and my manuals do not clarify anything. I'd appreciate any help from a master in Master/Detail forms. :o)
Thanks,
d.Hi All,
Just in case anyone has same problem. Since I was not able to get help here I created a tar and we figured that the problem was with the system when I upgraded. System created triggers that were fighting with the sequences that I had manually created.
Disabled triggers and all is working fine. You still need to watch future applications just in case.
Later,
d. -
Having problem with creating Master Detail form , please help
I have to work on a project to create a survey system using APEX, as am new on using this tool , am still facing some problems to finish my job..
i created Master/Detail form using wizard, the master form is working fine but am when i try to add data using the detail form its giving me error :
Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "A884FA378C851786DDFE3A33709CB23C", item checksum = "5F8B1EE5CD3D46437455F43B37B9A6A0"., update "ABA"."ABA_SURVEY_SUBCATEGORY_MAST" set "ASCM_CATEGORY_ID" = :b1, "ASM_SURVEY_CODE" = :b2, "ASSM_SUBCATEGORY_ID" = :b3, "ASSM_SUBCATEGORY_DESC" = :b4
i tried to go through the posts from others but i still dunno what is this error !!!& how to solve it..
my master data table have 2 primary keys.. the details data table have 3 primary key all of them using trigger to fire a sequence to get the next_val!!
am desperate & need help urgently for this ASAP.hello
here is the solution,i hope this might help u.
go to the code of your button and change write the following
go_block('name of your master block');
execute_query(no_validate);
and in the object navigator make the first item in the master
block that it should be displayed in the canvas and it must be a
navigable item too.not a display item.
thank you
Zeeshan Ahmad
Maybe you are looking for
-
How can I renew my match subscription?
I recently received a notice from Apple saying that my Match subscription could not be automatically renewed due to a problem with my payment option. I checked and everything was in order. However, I again received a notice saying that my subscriptio
-
Why the heck did Apples think that they had to revamp everything in Itunes. What was on the left is now on the right side. It wasn't broken, why did you have to fix it? Where is Home share hidden?
-
Error message when processing IDoc
Hi there, Greetings from Buenos Aires, Argentina. I'm trying to use the Migration Workbench in order to transfer to SAP the material master data. I have created an LSMW Objet and selected, under Mantain Object Attributes >> Object Type and Import Met
-
Use button to jump to certain section
Is there a way to get an inserted button on a fillable PDF in Adobe X Pro to jump to a specific section of a page, instead of just the top of the page?
-
Revision: 14083 Revision: 14083 Author: [email protected] Date: 2010-02-09 22:48:11 -0800 (Tue, 09 Feb 2010) Log Message: Removed svn:executable property from some .xml files in trunk. QE notes: None Doc notes: None Bugs: None Reviewer: None Te