‎2011 Sep 05 1:45 PM
helo all
i have to display a report in a heirarchical tree structure . I am able to display the report in heirarchical format .
The following is my requirement . I'm able to do it for 2 nodes . but how to build the nodes for the below requirement .
Step 1 : Once User enters DB, Go to CHVW with No Receipt Indicator as Space and CHARG as DB # Entered on screen(Parent Node)
Step2: Check the Movement indicator if it is u2018Bu2019 then itu2019s a Raw material No further Drill Down (Last Node), If It is u2018Fu2019 then Go to Step 3.
Step 3: Get all the Unique DB # and Corresponding Orders, Display only DB# on Output (Child Nodes)
OUTPUT - ALV TREE STRUCTURE
If User Clicks on any DB# (Child Node):
Then DB# Selected Will Become a Parent Node, Repeat the Same Process from 1 to 3.
Table: CHVW DB# ïƒ Order ïƒ DB# ïƒ Order
Tree
DB1
- DB1.1
- DB1.1.1
- DB1.1.2
- DB1.1.3
- DB1.1.3.1 -
ïƒ DB # of Raw material No further drill Down
- Material Document -
ïƒ Display Material Doc #
- DB1.2
- DB1.3
- DB1.3.1
- DB1.3.2
can anone give me some clue..
‎2011 Sep 05 2:23 PM
make sure your node keys are unique. that should be the most important Trick.
‎2011 Sep 05 2:24 PM
Hi,
instead of pasting your specification, could you ask your question clearly? You're able to "do it" for 2 nodes? Do you mean you have created one parent DB1 and its child node DB1.1? And now why can't you add a child DB1.1.1 to DB1.1, what happens exactly? (I ask because adding a node just requires to indicate its relationship to another node)
Sandra
‎2011 Sep 05 2:36 PM
Yea Sandra , You are right .
let me explain my requirement clearly .
first of all i need to use only table CHVW for my requirement .
the user enters the batch number in the selection screen. For that batch number, i have fetch the production order number and batch number .this forms the first node .
For the second node , i have to again select from Chvw table using the production order numbers obtained from the first select statement . the batch numbers obtained from this select query will form the second nodes. IF the movement type indicator is B ,then these is the last node
otherwise we have to repeat above procedure untill we movement type indicator for a particular batch number is 'B'.
i'e for each of the batch numbers in the second nodes, i have to again get the production orders and for that production orders i have to fetch the batch numbers again .these will form the 3rd node .
if at this step the movemtn type indicator is 'B' ths is the last node. other wise the same step should be repeated.
could u plz give me some clue ....
‎2011 Sep 05 3:03 PM
I did read your clarification, but still i dont really understand where parent and child relations come into play here.
What is it specifically where you struggle? And how do you struggle?
Do you get a dump or what?
Do you struggle adding a second node on first level?
Do you struggle adding a child node?
How far do you get until now?
‎2011 Sep 05 3:11 PM
Same remark as Florian
Moreover, could you tell us which technology (class, function module, other...) you used for your hierarchical report?
And if you can paste your code of the tree building (please we're not interested in the CHVW part, which is not the issue), that would be fine too!
Sandra