Level Order binary traversal
Hi,
I need to do a Level Order binary traversal. Is there an easy way to do it. I'm not very good at java so any help will be appreciated
thanks
The purpose of the exercise is to teach you Java. So:
[Tree Traversal|http://en.wikipedia.org/wiki/Tree_traversal]
[Java Tutorials|http://java.sun.com/docs/books/tutorial/]
Take a first stab at it. Post your code and ask specific questions when you get stuck.
Similar Messages
-
Planned Orders -Order level & Order path fields
Dear all,
In Planned Orders , in the components tab , the following fields are assigned/populated with some values by the system.
Order level
Order path
Assy Order Level
Assy Order path
Please clarify , on what basis or what is the logic behind this ?
Thanks,
SheikHi Sheik,
I can't see in the online display of a planned order any of the fields that you have mentioned.
Nevertheless, these fields exist in RESB table; in my understanding they are used by SAP inner logic, and am not sure that they make any sense for other use.
Regards,
Mario -
I want to change the top level order of itunes playlists
This is rather odd problem. There is a lot of information available regarding organising tracks within playlists but I want o change the top level order of the playlist themselves.
I have an ipod to car CD player adaptor that can select itunes playlists as if they were single CDs. The problem is that the adaptors works through the list of itune playlists in order i.e. the first "CD" is the "classical music smart playlist" followed by the other default smart playlists and then by my own playlists. What I want is force the smart playlists to the bottom of the top level list so that the adaptor finds my playlists first. I am considering deleting all smart playlists but I see some value in keeping them. I think the answer is no it can't be done but I be interested to hear if anyone has some ideas on this.
N.B. I am using itunes 12.01.26 on my Macbook to manage my itunes library.Hey guys m I got the answer for the below question.
Oracle have few Restriction and limitation on such Advanced table in sorting the data,
Few of them are as mentioned below ...
1. Sorting is not allowed for tables that allow inserts.
2. Sorting is not supported for tables containing updateable columns
3. Sorting is disabled when the Select column is checked for a row in a table or when Hide/Show is present in a table.
Because of the above limitations , we cannot sort or override the existing alphabetical name sort order to Date applied sort order on the View Applicant advanced table.
You can observe that , View Applicant page is having an option called "Update Status" which allow us to update applicant’s status or rating in the Advanced table.
On such updatable advanced tables, oracle does not allow us to override the sort order on any of the table columns.
Keeping it in a nutshell , I can say it's does not allow us to change the sort order of the view applicant advanced table ( which is having updateable columns ) to sort them in Date applied instead of Name( which is default ). -
At what levels order can block through credit mgt
Hi,
At what levels order can block through credit mgtHi
We may need credit check at delivery level and PGI level because if the customer limit does not exceed at sales order level but at the time of delivery date and PGI date his credit limit exceeded then we can block doing delivering the stock or block PGI for that customer .
There are different scenario like,
1) If you want to credit management on delivery level then it usefull in tranpoter bill payment is pending or not how much amt is pending.
2) Also required on customer, if customer has not proper balance then you can use that.
Regards
raja -
Collective Planned orders Scheduling for lower level orders with reference to the Superior order
Hi All,
Collective planned order scheduling.
I have been trying to reschedule the superior planned order and i was expecting the lower level planned orders to reschedule based on the superior planned order.
My problem is
when i try to reschedule the superior planned order the system is not rescheduling the lower level planned orders.
For example if i change the basic finish date of superior planned order as 30/09/2014 and reschedule the planned order it is only scheduling the header planned order and the lower level planned order is not scheduling.
Could some one tell me why this is not happenning at planned order level.
As the rescheduling of collective order will work at production order level but for some reason it is not happening at planned order level(as there is no option available to do so).
Please give your thoughts on this asap.
Mahee.Hello Mahee
Please observe that your system is working as designed. Planned orders are scheduled independently, even when they are part of a network/collective order. Note 152319 explains the planned order scheduling in detail and it provides the following information:
* No scheduling of overall networks is executed although a directly manufactured component is assigned.
Note that no scheduling of the overall network is executed for planned orders. For the components requirements dates are determined. In order to cover them, planned orders are created in the next MRP run. Since the requirements are not managed using the exact time, the results of the planned order scheduling and of a scheduling of the overall network of the converted collective order can differ.
BR
Caetano -
Hi All,
I am using Essbase XMLA interface .
As levels are ordered from lowest to highest starting from the root level. Essbase orders them in the reverse direction—level 0 is the leaf level, and level 1 is the parent of the leaf level.
Is there any way to get the level in normal order - level o parent and level 1 as child ?Incidentally we had been trying to use Essbase studio as an option.But there are 2 oints that we are trying to investigate.
1) Can we bypass deployment of data and metadata everytime through Essbase studio after the initial outline is delpoyed? In the system architecture the relational tables are populated using ODI. We would like to load the data and metadata through ODI into the cube. Eeven then can we implement drill thru bypassing deployment through Essbase Studio?
2) If Essbase studio is imperative for drill through then what are the batch automation options for deployment through Essbase studio? Ideally the option should be after the relational tables are populated through ODI then the Essbase deployment should be invoked and batch script should load the data and metadata through Essbase Studio.
Please advise.
Thanks,
Anirban -
Hi,
I have a Grid with a collapse Level =1; This however messes up the order of the other columns in the query. Is there a way to fix this? For example the first column is customer name and the second is Date. However the date is not in order when I use a collapse level = 1.
Thanks
Edited by: Costas Ioannou on Jun 16, 2009 2:07 PMHI,
The grid will be sorted by the collapse level.
if you would like to use more collapse levels (collapse by Customer Code, Date, etc). you should have to write different queries.
Otherwise use order by Customer Name, date in your query when you executing.
Regards,
J. -
Line level Order type by Oracle iStore
We have requirement to have different order types at line level based on item Ordered. Is it possible without customization such that...
Order Header Order type = Standar Order
Order Line Order type -
Line 1 - Billing only order type
Line 2- Standard Order type.
Appreciate your help.thanks for reply. We are on 11.5.10.
Does any one confirm where the Order type is being picked for iStore? is that from customer set up or ASO: Default order type profile at responsibility level? -
Net Value Key figure in Service Level: Order Items OSD_C12
Hi,
I'm trying to set up the Sales Analysis Business content for my Customer but I don't get the Net Value key figure to work. My customer uses TS as price unit (1 TS = 1000 PC). The net price are set to 35EUR / 1 TS. In BW the Net value don't consider the price unit and the Net value 3700EUR on the order is displayed as 3 700 000EUR.
Another problem is that the price is not always defined in TS. Some times the price is defined by PC.
Regards KristofferHi,
I'm trying to set up the Sales Analysis Business content for my Customer but I don't get the Net Value key figure to work. My customer uses TS as price unit (1 TS = 1000 PC). The net price are set to 35EUR / 1 TS. In BW the Net value don't consider the price unit and the Net value 3700EUR on the order is displayed as 3 700 000EUR.
Another problem is that the price is not always defined in TS. Some times the price is defined by PC.
Regards Kristoffer -
I must make a method that takes the variable "item" and put it in a string, for each element of the binary tree, but per levels..for example:
1
2 3 6
5 4must return this string: 1 , 2 , 3 , 6 , 5 , 4
The tree is something like:
public class BinTree{
private Node root;
public class Node{
public Node left;
public Node right;
public int item;
}Thank you very much :)Sorry, I didn't specify: I can use recursion,Level order traversals are normally performed using a queue.
but in this case I don't know how to do it "per levels"..can
someone help me? Sure: use a queue and try to do it first on a pice of paper.
Also if you don't write the method,I won't. ; )
What would you learn from that? Perhaps a little, but you'll learn far more by doing it yourself.
just to tell me how to go through the tree in this
case. ThanksHere's some pseudo code:
LEVELORDER(root)
queue.enqueue(root)
WHILE queue not empty
n = queue.dequeue()
IF n.left != null -> queue.enqueue(n.left )
IF n.right != null -> queue.enqueue(n.right)
END WHILE
END LEVELORDERAnd an example. Take the following tree: 5
3 8
1 4 6 9No apply that pseudo code:
queue = new queue
queue.enqueue(5)
while(queue is not empty) {
n = queue.dequeue() = 5
n.left != null, so queue.enqueue(3)
n.irght != null, so queue.enqueue(8)
(queue is now [3,8])
n = queue.dequeue() = 3
n.left != null, so queue.enqueue(1)
n.irght != null, so queue.enqueue(4)
(queue is now [8,1,4])
n = queue.dequeue() = 8
n.left != null, so queue.enqueue(6)
n.irght != null, so queue.enqueue(9)
(queue is now [1,4,6,9])
n = queue.dequeue() = 1
n.left == null
n.irght == null
(queue is now [4,6,9])
n = queue.dequeue() = 4
n.left == null
n.irght == null
(queue is now [6,9])
n = queue.dequeue() = 6
n.left == null
n.irght == null
(queue is now [9])
n = queue.dequeue() = 9
n.left == null
n.irght == null
(queue is now [])
queue is empty, end while.
}As you can see, the items are dequeued in the following order: 5, 3, 8, 1, 4, 6, 9.
Good luck. -
Where did My B_Tree in-order-trave go wrong ?
Hi
Could someone check my code please
I am trying to in-order trave a Binary tree
The left hand side seams Ok .
But when I reach the root and then move to the right .... ?
Is there is another way to re write my code . It seams to be too long
Thanks
import java .io .* ;
public class BTreeA {
// instance variabels FOR A STUDENT
public String StId;
public String StName;
public int countL = 0 ;
public int countR =0 ;
// intialise the left and right children to null
private BTreeA left = null;
private BTreeA right = null;
static BTreeA root = null; // Used to keep track of top of tree
static BTreeA temp = null; // temprary binary tree intialised to null
static BTreeA ptemp = null; // the parentof the cheldrin intialised to null
static BTreeA ctemp = null; // the parentof the cheldrin intialised to null
static BTreeA c2temp = null; // the parentof the cheldrin intialised to null
// This method is used to add a new node into the tree.
//////ccccccccccccccccccccccccccccccccccc////////////////
//////ccccccccccccccccccccccccccccccccccc////////////////
//////ccccccccccccccccccccccccccccccccccc////////////////
// the constructor method
public BTreeA(String id, String name) {
// App-spec part
this.StId = new String(id);
this.StName = new String(name);
// Data structure part
this.left = null;
this.right = null;
// Find out where new node is to go and insert it
if(root == null) { // There's no tree yet
root = this; // the first node is located in the root
System.out .println (" this is the first node inserted in the root " );
}else { // there is a tree and the root is occupied
temp = root; // when the root is occupied
// make the temp equal the root
// loop
while (temp != null) { // descend tree to find parent for
// the new node (( we know that temp != null becausewe made it
// equals to the root
ptemp = temp; // make the temporary parent equal to the temp
// ie equal to the root as well for the start of the loop
// and each time the loop restarts ptemp = new position of temp
if(this.StId.compareTo(temp.StId)< 0){
temp = temp.left; // move to the left
countL ++ ;
// System.out .println ("Moving to the left, and this is the move No. : " + countL );
// temp = null ; // to getout of the loop
}else{
temp = temp.right;
countR++;
// System.out .println ("Moving to the right, and this is the move No. : " + countR);
// temp = null ; // to getout of the loop
}// end if
}// end of loop
// here we insert the node into the tree
if(this.StId.compareTo(ptemp.StId) < 0 ){
ptemp.left = this;
// countL++;
// System.out .println ("The new node will be inserted the left for move No. : " + countL );
}else{
//if(this.StId.compareTo(ptemp.StId) < 0 ){
ptemp.right = this;
//countR++;
// System.out .println ("The new node will be inserted the right for move No. : "+ countR );
}// end of nested if
}// end of method
// Useful method for debugging
// print out all nodes in the tree
// in sorted order, "inorder traversal"
// Hint: Should take about 10 or 20 lines of code
// ... if you think you need more then your logic
// is probably more complicated than it needs to be.
//////s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/////
//b/b/b/b/b/b/b/bb/b/b/b/b/b/b/b/b/b/b'/b
public void InOrderTraverse() {
// start from the root
c2temp = root ;
temp = root ;
while (temp != null ){
ptemp = temp ;
// if( ptemp != null ) {
while (ptemp != null ){
temp = ptemp ;
ptemp = ptemp.left ;
// then print the information of that child
System.out.println("\n"+temp.StId); // Write out the ID field
System.out.println(temp.StName ); // Student name
System.out.println( "***OOOOO***oooo***OOOO***");
// here we find the parent for the child
while(temp != null ){
ctemp = temp; // the value of the child
temp = c2temp ; // ie = root
// in here we look for a node before the last one
while (temp.StId .compareTo (ctemp.StId )>0){
ptemp = temp ;
temp = temp.left ;
//// KKKKKKKKKKKKKKKKKKKKKKKK ;;;;;
/// from here we check if we can start to go right ////
if ( ptemp.right != null
&& ptemp.StId .compareTo (ptemp.right.StId )<=0){
System.out.println("\n"+ptemp.StId); // Write out the ID field
System.out.println(ptemp.StName ); // Student name
System.out.println( "***OOOOO***oooo***OOOO***");
ptemp = ptemp.right ;
c2temp = ptemp ;
temp = ptemp ;
// go to the last child in the left
while (ptemp != null && ptemp.left != null ){
temp = ptemp ;
ptemp = ptemp.left ;
System.out.println("\n"+ temp.StId); // Write out the ID field
System.out.println( temp.StName ); // Student name
System.out.println( "***OOOOO***oooo***OOOO***");
ptemp = temp ;
}else {
temp = ptemp ;
System.out.println("\n"+temp.StId); // Write out the ID field
System.out.println(temp.StName ); // Student name
System.out.println( "***OOOOO***oooo***OOOO***");
} // end of if
}// end of here we find the parent for the child
} // end first loop
} // end of void trversal method
///// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM ////////////////
///// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM ////////////////
///// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM ////////////////
///// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM ////////////////
// // in here we search for a student
public void Search(String id) {
int val;
temp = root;
while (temp != null) { // descend tree to find parent for
if((val = id.compareTo(temp.StId)) == 0) {
System.out.println("\n"+"Student ID "+id+" is in the tree!");
System.out.println("\n"+"Student name is : "+temp.StName);
temp = null; // to get out of loop
else if (val < 0)
temp = temp.left;
else temp = temp.right; // else it must be greater
///pppppppppppppppppppp rrrrrrrrr iiiiiiiiiii nnnnnnnnn ttttttttt //
public void printAll (){
// start from the root
temp = root ;
// loop and check for null
while ( temp != null ){
// if both left and right children do not exist
if( temp.left == null && temp.right == null ){
// then print the information of that parent
System.out.println("\n"+temp.StId); // Write out the ID field
System.out.println(temp.StName ); // Student name
System.out.println("\n"+"************");
// move to the left
temp = temp.left ;
}else { // if any of the children exist then
// check the left
if (temp.right != null ){
temp =temp.right ;
}else{
if(temp.left != null ){
temp = temp.left ;
}// end of if
}// end of if
}// end of if
} // end of loop
} // end of void method
// protected void intrav(pTwoChildNode p){
// if(p == null)
// return;
// intrav(p.getLeft());
// System.out.print(p.getData()+" ");
// intrav(p.getRight());
///////////ooooooooooooooooooooooooooooo///////////////
///go throu the tree and sorted out
public void sortBTree (){
BTreeA standBy = root ;
while (standBy != null && standBy.left != null && standBy.right != null ){
// compare
if(standBy .left .StId.compareTo (standBy .StId) < 0 ){
temp = standBy ;
temp .StId = standBy .left.StId ;
temp.StName = standBy.left .StName ;
standBy .left.StId = standBy.StId ;
standBy.left.StName = standBy.StName ;
standBy .left .StId = temp.StId ;
standBy .left .StName = temp.StName ;
System.out.println("\n"+temp.StId); // Write out the ID field
System.out.println(temp.StName ); // Student name
System.out.println("\n"+"************");
System.out.println("\n"+standBy.StId); // Write out the ID field
System.out.println(standBy.StName ); // Student name
System.out.println("\n"+"************");
// standBy = standBy.right ;
//move to the left
// standBy = standBy.left ;
}else{
if(standBy .left .StId.compareTo (standBy .StId) > 0 ){
standBy = standBy.right ;
///////////ooooooooooooooooooooooooooooo///////////////
///////////ooooooooooooooooooooooooooooo///////////////
public static void main(String Args[]){
new BTreeA("7", "Fergal");
// root.InOrderTraverse();
new BTreeA("9", "Frank");
//root.InOrderTraverse();
new BTreeA("6", "Fiona");
// root.InOrderTraverse();
new BTreeA("8", "John");
//root.InOrderTraverse();
new BTreeA("3", "Elizabeth");
// root.InOrderTraverse();
new BTreeA( "2", "Nuara");
// root.InOrderTraverse();
new BTreeA("1", "Aziza");
// root.InOrderTraverse();
new BTreeA("10", "Radwan");
root.InOrderTraverse();
new BTreeA("0", "Sommer");
root.InOrderTraverse();
new BTreeA( "-1", "Tibrah");
root.InOrderTraverse();
root.Search ("1");
root.Search ("123");
// root.sortBTree ();
// print all the contents of the tree
// root.printAll ();
// GIVE YOURSELF TIME TO READ THE SCREAN
System.out.println ("\n"+"\n" +"Please Press ENTER to terminate the application ." ) ;
try {
System.in.read ();
}catch (IOException e ){
}Please use the formatting tags.
import java .io .* ;
public class BTreeA {
// instance variabels FOR A STUDENT
public String StId;
public String StName;
public int countL = 0 ;
public int countR =0 ;
// intialise the left and right children to null
private BTreeA left = null;
private BTreeA right = null;
static BTreeA root = null; // Used to keep track
ack of top of tree
static BTreeA temp = null; // temprary binary tree
ree intialised to null
static BTreeA ptemp = null; // the parentof the
the cheldrin intialised to null
static BTreeA ctemp = null; // the parentof the
the cheldrin intialised to null
static BTreeA c2temp = null; // the parentof the
the cheldrin intialised to null
// This method is used to add a new node into the
tree.
//////ccccccccccccccccccccccccccccccccccc//////////////
//////ccccccccccccccccccccccccccccccccccc//////////////
//////ccccccccccccccccccccccccccccccccccc//////////////
// the constructor method
public BTreeA(String id, String name) {
// App-spec part
this.StId = new String(id);
this.StName = new String(name);
// Data structure part
this.left = null;
this.right = null;
// Find out where new node is to go and insert it
if(root == null) { // There's no tree yet
root = this; // the first node is located in the
System.out .println (" this is the first node inserted in the root " );
}else { // there is a tree and the root is occupied
temp = root; // when the root is occupied
// make the temp equal the root
// loop
while (temp != null) { // descend tree to find
find parent for
// the new node (( we know that temp != null
l becausewe made it
// equals to the root
ptemp = temp; // make the temporary parent equal
ual to the temp
// ie equal to the root as well for the start of
f the loop
// and each time the loop restarts ptemp = new
w position of temp
if(this.StId.compareTo(temp.StId)< 0){
temp = temp.left; // move to the left
countL ++ ;
// System.out .println ("Moving to the left, and this is the move No. : " + countL );
// temp = null ; // to getout of the loop
}else{
temp = temp.right;
countR++;
// System.out .println ("Moving to the right, and this is the move No. : " + countR);
// temp = null ; // to getout of the loop
}// end if
}// end of loop
// here we insert the node into the tree
if(this.StId.compareTo(ptemp.StId) < 0 ){
ptemp.left = this;
// countL++;
// System.out .println ("The new node will be inserted the left for move No. : " + countL );
}else{
//if(this.StId.compareTo(ptemp.StId) < 0 ){
ptemp.right = this;
//countR++;
// System.out .println ("The new node will be inserted the right for move No. : "+ countR );
}// end of nested if
}// end of method
// Useful method for debugging
// print out all nodes in the tree
// in sorted order, "inorder traversal"
// Hint: Should take about 10 or 20 lines of code
// ... if you think you need more then your logic
// is probably more complicated than it needs to be.
//////s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/////
//b/b/b/b/b/b/b/bb/b/b/b/b/b/b/b/b/b/b'/b
public void InOrderTraverse() {
// start from the root
c2temp = root ;
temp = root ;
while (temp != null ){
ptemp = temp ;
// if( ptemp != null ) {
while (ptemp != null ){
temp = ptemp ;
ptemp = ptemp.left ;
// then print the information of that child
System.out.println("\n"+temp.StId); // Write out
e out the ID field
System.out.println(temp.StName ); // Student
udent name
System.out.println(
println( "***OOOOO***oooo***OOOO***");
// here we find the parent for the child
while(temp != null ){
ctemp = temp; // the value of the child
temp = c2temp ; // ie = root
// in here we look for a node before the last one
ne
while (temp.StId .compareTo (ctemp.StId )>0){
ptemp = temp ;
temp = temp.left ;
//// KKKKKKKKKKKKKKKKKKKKKKKK ;;;;;
/// from here we check if we can start to go right
if ( ptemp.right != null
&& ptemp.StId .compareTo (ptemp.right.StId
StId )<=0){
System.out.println("\n"+ptemp.StId); // Write out
ut the ID field
System.out.println(ptemp.StName ); // Student
udent name
System.out.println(
println( "***OOOOO***oooo***OOOO***");
ptemp = ptemp.right ;
c2temp = ptemp ;
temp = ptemp ;
// go to the last child in the left
while (ptemp != null && ptemp.left != null ){
temp = ptemp ;
ptemp = ptemp.left ;
System.out.println("\n"+ temp.StId); // Write out
ut the ID field
System.out.println( temp.StName ); // Student
udent name
System.out.println(
println( "***OOOOO***oooo***OOOO***");
ptemp = temp ;
}else {
temp = ptemp ;
System.out.println("\n"+temp.StId); // Write out
ut the ID field
System.out.println(temp.StName ); // Student
udent name
System.out.println(
println( "***OOOOO***oooo***OOOO***");
} // end of if
}// end of here we find the parent for the child
} // end first loop
} // end of void trversal method
///// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
///// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
///// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
///// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
// // in here we search for a student
public void Search(String id) {
int val;
temp = root;
while (temp != null) { // descend tree to find parent
for
if((val = id.compareTo(temp.StId)) == 0) {
System.out.println("\n"+"Student ID "+id+" is in the tree!");
System.out.println("\n"+"Student name is : "+temp.StName);
temp = null; // to get out of loop
else if (val < 0)
temp = temp.left;
else temp = temp.right; // else it must be
t be greater
///pppppppppppppppppppp rrrrrrrrr iiiiiiiiiii nnnnnnnnn ttttttttt //
public void printAll (){
// start from the root
temp = root ;
// loop and check for null
while ( temp != null ){
// if both left and right children do not exist
if( temp.left == null && temp.right == null ){
// then print the information of that parent
System.out.println("\n"+temp.StId); // Write out
out the ID field
System.out.println(temp.StName ); // Student
dent name
System.out.println("\n"+"************");
// move to the left
temp = temp.left ;
}else { // if any of the children exist then
// check the left
if (temp.right != null ){
temp =temp.right ;
}else{
if(temp.left != null ){
temp = temp.left ;
}// end of if
}// end of if
}// end of if
} // end of loop
} // end of void method
// protected void intrav(pTwoChildNode p){
// if(p == null)
// return;
// intrav(p.getLeft());
// System.out.print(p.getData()+" ");
// intrav(p.getRight());
///////////ooooooooooooooooooooooooooooo///////////////
///go throu the tree and sorted out
public void sortBTree (){
BTreeA standBy = root ;
while (standBy != null && standBy.left != null &&
& standBy.right != null ){
// compare
if(standBy .left .StId.compareTo (standBy .StId) <
< 0 ){
temp = standBy ;
temp .StId = standBy .left.StId ;
temp.StName = standBy.left .StName ;
standBy .left.StId = standBy.StId ;
standBy.left.StName = standBy.StName ;
standBy .left .StId = temp.StId ;
standBy .left .StName = temp.StName ;
System.out.println("\n"+temp.StId); // Write out the ID field
System.out.println(temp.StName ); // Student name
System.out.println("\n"+"************");
System.out.println("\n"+standBy.StId); // Write out the ID field
System.out.println(standBy.StName ); // Student name
System.out.println("\n"+"************");
// standBy = standBy.right ;
//move to the left
// standBy = standBy.left ;
}else{
if(standBy .left .StId.compareTo (standBy .StId) > 0 ){
standBy = standBy.right ;
///////////ooooooooooooooooooooooooooooo///////////////
///////////ooooooooooooooooooooooooooooo///////////////
public static void main(String Args[]){
new BTreeA("7", "Fergal");
// root.InOrderTraverse();
new BTreeA("9", "Frank");
//root.InOrderTraverse();
new BTreeA("6", "Fiona");
// root.InOrderTraverse();
new BTreeA("8", "John");
//root.InOrderTraverse();
new BTreeA("3", "Elizabeth");
// root.InOrderTraverse();
new BTreeA( "2", "Nuara");
// root.InOrderTraverse();
new BTreeA("1", "Aziza");
// root.InOrderTraverse();
new BTreeA("10", "Radwan");
root.InOrderTraverse();
new BTreeA("0", "Sommer");
root.InOrderTraverse();
new BTreeA( "-1", "Tibrah");
root.InOrderTraverse();
root.Search ("1");
root.Search ("123");
// root.sortBTree ();
// print all the contents of the tree
// root.printAll ();
// GIVE YOURSELF TIME TO READ THE SCREAN
System.out.println ("\n"+"\n" +"Please Press ENTER to terminate the application ." ) ;
try {
System.in.read ();
}catch (IOException e ){ -
Dear All,
We are in a Process to Develop certain Z-Reports.
One of the Z-Reports is Open Order Status, which includes following informations:
Sales Office--Customer Code-Sales Order No.--Item No.Material Description-Booking Qty--Delivered QtyOpen QtySales Unit of MeasurementRate/ Unit--Total Open Value (Open Qty*Rate)
Everything is fine, except Two columns, i.e.
1. Delivered Qty
2. Sales Unit of Measurement
The Problem is:
In Report, we are able to capture the Booking Qty (in terms of Sales Unit).
For example: If, in Sales Order Booking qty is 20 Months, Report shows 20.000 in Column: Booking Qty.
But, 5 Months have been delivered, then, instead of 5.000 Report shows 150.000 as in Column: Delivered Qty. Apparently, Column: Open Qty, shows -130.000 as open Qty.
Also, instead of picking Sales Unit of Measurement as Month, System is showing DAY/ TAG in Column: Sales unit of measurement.
My second Query is:
Is there any way to get information from Structure, in to Program? As, I referred few Standard Program (related to Sales UoM and Delivered Qty). In Standard Program, value is getting referred to Structure (say, VBMTV, for example).
Best Regards,
AmitHi Amit,
I guess, you have maintained/Created UoM in CUNI.
Sales Office(1)--Customer Code(2)-Sales Order No(3).--Item No(4).Material Description(5)-Booking Qty(6)--Delivered Qty(7)Open Qty(8)Sales Unit of Measurement(9)Rate/ Unit(10)--Total Open Value (Open Qty*Rate)(11)
8 = 6-7
11= 8*10 ( as you already said)
UoM_sales, VBAP_VRKME / VBEP_WMENG ( i think it will be fine, if we take Sch.Line order qtty, rather than Item level order qtty/Booking qtty, Delivery qtty LIPSD-G_LFIMG or you can take the same from document flow table too)
Hope you have done the same as above. or it would be helpful,how you are deriving/extracing the desired values from which tables
How you are calculating Open Qtty?
not sure about your second query. Trying to give some input in your first query. -
Dear Experts,
I have more than 1000 open orders in system, and i found VKM3 ll be good option to close the orders even at item level & orders partially delilvered , is it right way to do it?
or do i have any other easier option?
thanks & regardsDear Jitesh,
VKM3 is for releasing the orders which are blocked for delivery due to credit check.
You can try MASS and give reason for rejection as advised above.
But if i were in your place, i will go for a Zprogam which will call a BDC.
In the program i will call all the orders which do not have a delivery.
If you need to close the orders which are partially delivered, then you can write another condition to check the orders with delivery but delivery qty less than order qty and if so, edit the order delivery qty with the actual delivered qty.
The program will call the BDC (in which delete the sales order in case 1 and edit the qty field in case 2)
By writing a Z program, the advantage is i will be able to use this Zprogram in future, (i can even include the order type / order date etc as selection criteria in the Zprogram.)
Thanks & Regards,
Hegal K Charles
Edited by: Hegal . K . Charles on Nov 21, 2011 9:34 AM -
Hi,
We are using MSProject 2010 and Project Server 2010 with Enterprise resources. All resources on all projects in the enterprise are shared resources. We are finding that after resource levelling is applied to the project some resources are only
being assigned a fraction of their total availability, and in some cases Project will assign 0 hours to a resource for several consecutive weeks even though the resource has capacity for the week the task is scheduled to start.
For example: Let's say we have a task that is scheduled to start on 1-20-14. The task is a 112 hours of effort with no constraints and one resource assigned to it. The resource is available 40 hours per week for the next 4 weeks. After resource
levelling I would expect Project to assign the resource as follows: 40 hours in week 1, 40 hours the next week and 32 hours the next week, for a total of 112 hours. Instead, Project does not assign the resource to the task until week 4 (even
though the resource has capacity on the start date of the task) and pushes the finish date out. In some weeks the resource has 0h hours showing in the timephased grid on the Resource Usage sheet. We have experimented with the levelling settings and it
does not seem to matter which boxes are checked, but following is our preferred settings:
1. Levelling Calculations set to Manual
2. Look for overallocations on a day by day basis
3. Clear levelling values before levelling is CHECKED
4. Level entire project is selected.
5. Levelling order is Priority,Standard
6. Level only within available slack is CHECKED
7. Levelling can adjust individual assignments on a task is CHECKED
8. Levelling can create splits in remaining work is UNCHECKED
9. Level resources with the proposed booking type is UNCHECKED
10. Level manually scheduled tasks is CHECKED.
Does anyone have any ideas about why Project is not using the resource's available capacity?
Thanks, Judy
Judy WashingtonHi Judy,
The resource leveling command is not a resource optimization tool. It's only job is to resolve resource overallocations by delaying tasks. It will not:
Change resource assignment units to tasks.
Ensure the resource is "fully" utilized.
For example:
Resource with max units of 100% (the default).
Task A starts on 20 January until 22 January and the resource is assigned at 75%.
Task B starts on 21 January until 23 January and the resource is assigned at 50%
The resource is overallocated on Tuesday (peak = 125%) and Wednesday (peak = 125%).
Leveling produces this result:
Project did not drop the assignment to Task B to 25% to allow it to continue while Task A was going on -- it simply delayed B (at 50%) until A was scheduled to finish. -
How to compare the variances of production order type and get report
Hello All,
I want to compare the variances of production order type wise.
for ex. i want variances of order type PP 01 and PP 02 in a single report.Hi Sachin,
You have to maintain summarization hierarchies to achieve this.
1. Maintain summarization hierachies with hierarchy level - order type in the t.code.KKR0
2. Generate the hierarchy in KKRC
3. Run the report KKBC_HOE
Regards,
Mukthar
Maybe you are looking for
-
How do I open a microsoft Word 95 document in Pages?
How can I open a Microsoft Word 95 document in Pages?
-
Debugging PL/SQL in Oracle
Hi there, I'm needing some help on features of Oracle PL/SQL and the Oracle server. Does oracle provide a way for a user to debug SQL and/or PL/SQL statements? I'm currently using Oracle 8x and looking to probably use Oracle 9 or later version in the
-
Having trouble with my browser :(
I ordered a bb from uk since they dont have them in estonia. so here is no bis or bes :/ but it should work. my internet. the only option is hotspot browser but i need internet browser. how can i get it? I really need it!
-
Lightroom 4 Beta now available
http://labs.adobe.com/technologies/lightroom4/ http://blogs.adobe.com/lightroomjournal/2012/01/lr4betanowavailable.html and here's the forum: http://forums.adobe.com/community/labs/lightroom4
-
Logging problems after 10.5.6 upgrade
For some reason, my mail.log on 10.5.6 Server does not get any messages anymore. The last message has been on Feb 13, around 17:30. Around that time my machine received an update (I think 10.5.6 or maybe Security). Anyway, I have rebooted, but that d