2006 Mar 08 10:52 PM
hello
Can we create a table with a hierarchy?
For example I have a profit center hierachy, and I want to have a table with diffrent field from the diferent level of my hierarchy?
Do it exist a function or another thing for create this?
Thank you
J
hello
Can we create a table with a hierarchy?
For example I have a profit center hierachy, and I want to have a table with diffrent field from the diferent level of my hierarchy?
Do it exist a function or another thing for create this?
Thank you
J
2006 Mar 08 11:04 PM
Hi Jeremy,
I´m not sure if I undestood correctly, but to do hierachy on tables you would have to use as foreing key the fields you need on your new table, and add the new fields.
Another thing: I´m not sure if you can use hierachy on SAP (tables), if you kindly explain in more detail what you need...Ypu could get better help.
See ya,
Gabriel
2006 Mar 08 11:24 PM
I have a hierarchy on the profit center;
I would like create a table with this hierarchy
for example
in the first field I have the firts level
in the second field, i have the second level
...
2006 Mar 08 11:57 PM
Hi,
To achieve your purpose you can create a table with the following tables
Hierarcy
Hierarchy level
The highest Hierarchy will have the lowest Hierarchy level value.
for example if you have a Profit Center Hierarchy
Hie 1
Hie 2
Hie 3
Hierarchy 1 is the parent and Hierarchy 3 the lowest node.
So the values in your table could be like this
Hierarchy Hierarchy level
Hie1 1
Hie2 2
hie3 3
This way you can accomodate any number of Hierarchy levels.
Regards,
vara
2006 Mar 09 8:02 AM
Ok but do you know a program or another thing for transform this hierarchy to a table
J
2006 Mar 09 8:27 AM
Hi,
there is already existing table for profit center hierarchy : setheader, setleaf, setnodes ....
and there is also the function to create a table from this hierarchy :
call function 'K_GROUP_SELECT'
exporting
BUTTONS = 'X'
CLASS = '0106'
* CRUSER = '*'
field_name = 'RPRCTR'
* SEARCHFLD = ' '
SEARCHFLD_INPUT = ' '
SEARCHFLD_REQUIRED = 'X'
* SET = s_setnme-low
* START_COLUMN = 10
* START_ROW = 5
TABLE = 'GLPCT'
* TYPELIST = 'BS'
* UPDUSER = '*'
KOKRS = p_kokrs
KTOPL = 'RFR0'
IMPORTING
* CLASS_NAME =
SET_NAME = s_setnme-low
* SET_TITLE =
* TABLE_NAME =
* SETID = v_groupecentre
EXCEPTIONS
NO_SET_PICKED = 1
OTHERS = 2
.
Rgd
Frédéric
2006 Mar 09 8:26 AM
hi jeremy,
to understand the hierarchy of the table
goto transaction SQO2 CREATION OF INFOSETS
in here u need to give the table u want to join by table1 name AXXX
(ex profit center hierarchy )
and table name2
(ex second hierarchy )
and table name2
(ex third hierarchy )
and table name2
(ex fourth hierarchy )
so this will give u a clear picture of the tables along with fields so that the hierarchy is determined.
now if u want to create a ztable then u can use this option to understand the primary /foreign key relationship.
i hope u are trying to understand the relationship between the tables or trying to fill the gaps between them
in SQ02 just create an infoset and start analysing this table-field relationship .
hope this helps u out .
regards,
vijay.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |