Authorisation Object for Organizational Unit.
Hi Experts
I have an query on user authorisation as follow,
As in my project I have two user as Maker & Checker. Maker is having Business Area B001 Authorisation and in checker is also having the different role with same Business area authorisation, Now my query is I wanted to sort this on Organisational Unit level. So is there any object available for to assign Org Unit level Authorasation. as like P_Origin is there in SAP sytem.. please guide me ...
Regards
Swapnil
Hi Swapnil,
You can use HR Master Data Customer-Specific object to include any fields from infotype 0001 to authorisation checks. Please check the |help.sap.com (http://help.sap.com/erp2005_ehp_02/helpdata/en/4e/74ba3bd14a6a6ae10000000a114084/frameset.htm) regarding use of this object. On the bottom of that page is a link for creating the object and activating the check against it.
Regards,
Saku
Similar Messages
-
Authorisation object for "PO text in the material master"
Hi,
My requirement is as below:
"All users can see the Purchase Order Text as usual, but only a few users should be allowed to create / change the PO Long Text.
For other users, the same should appear in display mode only (both in creation & in change mode, MM01 & MM02)."
Please let me know, How to map this.
As per my knowledge thsi is possible only thru authorisation. But I want to know what is the authorisation object for "PO text in the material master" (Pl note that only for PO text in the material master field). we want control on "PO text of material master"
Regards.
ChinnaHi,
The authorisation object is "M_MATE_MAT", pl check
Regards
Merwyn -
Authorisation Object for Payment Block Filed(ZLSPR) in FB02
Hi,
I want to restrict the authorisation to modify the field Payment Block to some of the users only in FB02 Tcode.
How can i achieve it.
My basis team said it can help me if i can give the authorisation Object for the same they can restrict the authorisation object to limited users.
regards
JayaHi Mallikarjun,
The authorisation Object given is related to Excise invoice ? So, please let me know how this would help in restricting modification of payment block filed in FB02?
regards
jaya -
Any business object for Organisation Unit Create
is there any business object for Organisation Unit Creation. BUS0018 is available but there it is not defined. basically on saving the Organisation Unit in PP01 Transaction, a workflow should be triggered to send a mail to the Requestor intimating him that the org unit has been created.
points will be awarded even to the slightest cues.Hi,
Did you check SWEHR2 to see if there are any clues there? I found object PDOTYPE_O there. But it triggers an event for BOR BUS1221. So depending on your needs you could use one of these maybe. The problem is PDOTYPE_O doesn't have any events, so you would need to create a subtype and delegate it. In the subtype you could create your own events which you could call using SWEHR3.
Regards,
Martin -
How to create authorisation object for save button please help in abap
how to create authorisation object for save button please help in abap
Hi
In general different users will be given different authorizations based on their role in the orgn.
We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
USe SUIM and SU21 T codes for this.
Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
This means you have to allocate an authorization object in the definition of the transaction.
For example:
program an AUTHORITY-CHECK.
AUTHORITY-CHECK OBJECT <authorization object>
ID <authority field 1> FIELD <field value 1>.
ID <authority field 2> FIELD <field value 2>.
ID <authority-field n> FIELD <field value n>.
The OBJECT parameter specifies the authorization object.
The ID parameter specifies an authorization field (in the authorization object).
The FIELD parameter specifies a value for the authorization field.
The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
You program the authorization check using the ABAP statement AUTHORITY-CHECK.
AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
ID 'ACTVT' FIELD '02'
ID 'CUSTTYPE' FIELD 'B'.
IF SY-SUBRC <> 0.
MESSAGE E...
ENDIF.
'S_TRVL_BKS' is a auth. object
ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
This Authorization concept is somewhat linked with BASIS people.
As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a profile and that profile in turn attached to a particular user.
Take the help of the basis Guy and create and use.
Regards
ANJI -
No value found for Organizational Unit BILL_ORG
Hi Experts,
I am creating a Service transaction - Incident and then creating a follow up document (RFC). Upon saving the follow up document the system shows the following error:
An error occurred in system FEDCLNT200 during account assignment
Message no. CRM_ORDER_MISC 060
Orgfinder: No value found for Organizational Unit BILL_ORG (Notification E CRM_OFI 002)
I am not using any billing unit and do not even require one - also made settings for billing unit in Master data>Organization Management> Cross-system assignment of Org.Units... but still facing the same error
Kindly help.
Regards.Hi Amit,
It has been a long time since I have seen this issue. As far as I remember, and also mentioned in my answer, if distributing the document to another system is not part of your process / requirement, then simply switch off the distribution via status management and transaction control.
Select the status profile and add transaction control to the status on which the error shows up.
Hope it helps !
Haseeb. -
Authorisation object for Case Management
Hi Gurus.
I need to create authorisation object for Case Management,
SCMG_T_CASE_ATTR-CATEGORY Field,SCMG_CATEGORY element,
I use the tx SU21 and Su20, asigned this object to Role. But no WORK.
In the Su20:
Field Name: ZCATEGORY
Data elelment: SCMG_CATEGORY.
Table Name: SCMGATTR_CATEGO.
In the SU21:
Object: ZCASE
Class: AAAB
Field Name:
ACTVT
ZCATEGORY
When I use tx SCASE, The condition not work.
I use the field name ZCATEGORY because the field name CATEGORY was used by SAP. But for USC_Y_CONT_CATEGORY element
Edited by: Alfredo on Aug 1, 2008 5:39 PMHi Alfredo,
Go to SU24 tcode and see if the transaction SCASE is being check/maintaned to the authorization object ZCASE.
If not then you need to do that so that when you add the tcode SCASE to a role then you will see the authorzation object ZCASE which you have created. You can edit the role and change the authorizations for the field, ZCATEGORY and maintain.
Generate the role and then assign it to the user. I think it must work.
If it doesnot work then as Alex said, you need to go and look where the Authority check statement is placed in the program behind the SCASE tcode.
Hope this helps.
Regards,
Kiran Kandepalli. -
Authorisation object for cost center
Hi all,
I need to know the authorisation object for the field COST CENTER in ME21N(creation of PO) screen. How to find it? Since I am creating roles for users with help of BASIS I need to know it. I need to restrict the values for the cost center field while creating the purchase order.
Thanks in advance.
Regards,
RajHello,
Master Data:
CO: Cost center master (K_CSKS)
CO: Cost center groups (K_CSKS_SET)
CO: Cost element master (K_CSKB)
CO: Cost element groups (K_CSKA_SET)
CO: Activity type master (K_CSLA)
CO: Activity type groups (K_CSLA_SET)
CO: Statistical key figures (K_KA03)
CO: Stat. key figure groups (K_KA03_SET)
Planning:
CO: Version (K_KA09_KVS)
CO: Planner profiles (K_TKA50)
CO: Cost center planning (K_CSKS_PLA)
CO: Cost element planning (K_CSKB_PLA)
CO: Budgeting (K_CSKS_BUD)
Regards
Mahesh Naik -
Tables for organizational unit
Hello!
I created an organizational unit including position and user id's.
In which tables this information is avaliable?
regards
yifatHi,
If you want to see the Organizational unit assigned to an employee, check PA0001 for that PERNR(Employee ID) and pick the ORGEH (Organizational Unit) and PLANS(Position).
If you just want to see the existence of org unit and position goto HRP1000 table and pick OTYPE = 'O' for organizational Unit and OTYPE = 'S' for positions.
If you want to see the relationship between them then goto table HRP1001. OTYPE = 'O' for org unit, OTYPE = 'S' for position and Check their relationship with OTYPE = 'P' for Person.
Regards,
Amit
Reward all helpful replies. -
Authorisation object for controlling te changes to "Delivery completed indi
hi
I want to know the authorisation object for controlling te changes to "Delivery completed indicator" in PO.
I want to give the authorisation to change to certain users only.
Best regards
SarThere is no authorization at field level.
Either the user has authorization to change an order or not. -
Authorisation object for field level
Hi all,
In support desk ,Is there any authorisation object for controlling field level changes such as category or priority by message processors.
BalamuruganHi.
Not that I know of. I was also looking for something like this and could not find anything.
I think there is even no logging if someone makes any changes to those fields. -
How to create authorisation object for report
hi
experts..
hw can u create authorisation object for the custom report.
Thanks& Regards
SpandanaHi,
In general different users will be given different authorizations based on their role in the orgn.
We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
USe SUIM and SU21 T codes for this.
Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
This means you have to allocate an authorization object in the definition of the transaction.
For example:
program an AUTHORITY-CHECK.
AUTHORITY-CHECK OBJECT <authorization object>
ID <authority field 1> FIELD <field value 1>.
ID <authority field 2> FIELD <field value 2>.
ID <authority-field n> FIELD <field value n>.
The OBJECT parameter specifies the authorization object.
The ID parameter specifies an authorization field (in the authorization object).
The FIELD parameter specifies a value for the authorization field.
The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
You program the authorization check using the ABAP statement AUTHORITY-CHECK.
AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
ID 'ACTVT' FIELD '02'
ID 'CUSTTYPE' FIELD 'B'.
IF SY-SUBRC <> 0.
MESSAGE E...
ENDIF.
'S_TRVL_BKS' is a auth. object
ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
This Authorization concept is somewhat linked with BASIS people.
As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a profile and that profile in turn attached to a particular user.
Take the help of the basis Guy and create and use.
Sy-SUBRC values
4 User has no authorization in the SAP System for
such an action. If necessary, change the user
master record.
8 Too many parameters (fields, values). Maximum
allowed is 10.
12 Specified object not maintained in the user
master record.
16 No profile entered in the user master record.
24 The field names of the check call do not match
those of an authorization. Either the
authorization or the call is incorrect.
28 Incorrect structure for user master record.
32 Incorrect structure for user master record.
36 Incorrect structure for user master record.
http://www.sap.ittoolbox.com/groups/technical-functional/sap-basis/please-how-to-create-an-authorization-object-386391 - 78k -
http://www.sap-abaprogram.blogspot.com/2007/11/what-is-use-of-
authorization-checks-to.html - 75k -
www.sapworld.hpg.ig.com.br/download/ab4query.pdf
with thanks,
Abaper. -
Authorisation object for Supplier field in Shopping Cart
Hi Team,
In Shopping Cart Source of Supply tab field Supplier is not getting displayed as it in hidden for some users, sor those users an authorisation object has to be provided to display the Supplier field.
Can you please Suggest me the authorisation object to be used to display Supplier field in Source of Supply tab of Shopping Cart.
Thanks & Regards,
Goutam Kolluru.Question is solved.
Answer can be find in bellow link
Field Supplier is not displaying in Shopping Cart with Std Roles SRM 7.0 -
Authorisation object for Purchase order release codes
Hi,
Can anyone let me know the authorisation object to be used for the PO release codes to be assigned in the ME28 and ME29N for the users.Hi,
Release code and groups detials for the PO authorisation is as follows.
M_EINK_FRG Release Code and Group (Purchasing)
FRGCO Release code
M_EINK_FRG Release Code and Group (Purchasing)
FRGGR Release group
Regards,
Sakthi -
Hierarchical + Analytical query for organizational unit parameters
Hello gurus,
I try for a couples of hour ago to make a query work as I would like.
Our application need to store some parameters for our organization units. These organization units are typically organized in in an hierarchy manner: one top unit with many level of child units. The parameters are stored into another table with 1:1 relationship.
For sake of visualisation, here is the data for the organization unit and parameter table in a more visual format:
SQL> select * from organization_unit;
UNIT_CODE UNIT_NAME PARENT_UNIT_CODE
00000 Top level
10 L2 unit #10 00000
10-01 L3 unit #10-01 10
10-02 L3 unit #10-02 10
20 L2 unit #20 00000
20-01 L3 unit #20-01 20
20-02 L3 unit #20-02 20
SQL> select * from org_unit_parameters;
UNIT_CODE PARAM1 PARAM2 PARAM3 PARAM4
00000 Default value Default value Default value {null}
10 {null} Value from 10 Value from 10 {null}
10-01 {null} {null} Value from 10-01 {null}
10-02 {null} {null} {null} Value from 10-02
20 Value from 20 Value from 20 Value from 20 {null}
20-01 {null} Value from 20-01 {null} {null}
20-02 {null} Value from 20-02 {null} {null}The application will query the parameter table to get a parameter value for a given unit.
The parameter resolution algorithm is rather simple: when querying a unit, the applicable parameter is the one defined at the requested level. If the parameter is not defined (null) at the requested level, the parameter value that must be returned is the next defined one in the parent hierarchy. In some rare cases, it can be null if a parameter is not defined anywhere from the requested level to top.
I've made a query that seems to work when querying for one unit at a time. It use hierarchical operators (start with + connect by) with a bit of analytical functions. Here is a test & raw output example:
SQL> WITH hierarchy
2 AS
3 (
4 SELECT ou.unit_code,
5 LEVEL AS lvl
6 FROM organization_unit ou
7 START WITH
8 ou.unit_code = '20-01'
9 CONNECT BY
10 ou.unit_code = PRIOR ou.parent_unit_code
11 )
12 SELECT h.*,
13 p.param1 AS param1_raw,
14 LAST_VALUE (p.param1 IGNORE NULLS) OVER (ORDER BY h.lvl DESC) AS param1_with_last,
15 FIRST_VALUE(p.param1 IGNORE NULLS) OVER (ORDER BY h.lvl ASC) AS param1_with_first,
16 p.param2 AS param2_raw,
17 LAST_VALUE (p.param2 IGNORE NULLS) OVER (ORDER BY h.lvl DESC) AS param2_with_last,
18 FIRST_VALUE(p.param2 IGNORE NULLS) OVER (ORDER BY h.lvl ASC) AS param2_with_first,
19 p.param3 AS param3_raw,
20 LAST_VALUE (p.param3 IGNORE NULLS) OVER (ORDER BY h.lvl DESC) AS param3_with_last,
21 FIRST_VALUE(p.param3 IGNORE NULLS) OVER (ORDER BY h.lvl ASC) AS param3_with_first,
22 p.param4 AS param4_raw,
23 LAST_VALUE (p.param4 IGNORE NULLS) OVER (ORDER BY h.lvl DESC) AS param4_with_last,
24 FIRST_VALUE(p.param4 IGNORE NULLS) OVER (ORDER BY h.lvl ASC) AS param4_with_first
25 FROM hierarchy h
26 LEFT JOIN org_unit_parameters p
27 ON h.unit_code = p.unit_code
28 ORDER BY h.lvl DESC;
UNIT_CODE LVL PARAM1_RAW PARAM1_WITH_LAST PARAM1_WITH_FIRST PARAM2_RAW PARAM2_WITH_LAST PARAM2_WITH_FIRST PARAM3_RAW PARAM3_WITH_LAST PARAM3_WITH_FIRST PARAM4_RAW PARAM4_WITH_LAST PARAM4_WITH_FIRST
00000 3 Default value Default value Value from 20 Default value Default value Value from 20-01 Default value Default value Value from 20 {null} {null} {null}
20 2 Value from 20 Value from 20 Value from 20 Value from 20 Value from 20 Value from 20-01 Value from 20 Value from 20 Value from 20 {null} {null} {null}
20-01 1 {null} Value from 20 {null} Value from 20-01 Value from 20-01 Value from 20-01 {null} Value from 20 {null} {null} {null} {null}Seems pretty good, the upper parameters are well «propagated» down with LAST_VALUE function. But, I don't understand why the use of FIRST_VALUE and oppposite ordering doesn't give the same result. A little more playing with the last query for getting the final result for a given unit code:
SQL> SELECT *
2 FROM
3 (
4 WITH hierarchy
5 AS
6 (
7 SELECT ou.unit_code,
8 LEVEL AS lvl
9 FROM organization_unit ou
10 START WITH
11 ou.unit_code = '20-01'
12 CONNECT BY
13 ou.unit_code = PRIOR ou.parent_unit_code
14 )
15 SELECT h.*,
16 LAST_VALUE (p.param1 IGNORE NULLS) OVER (ORDER BY h.lvl DESC) AS param1,
17 LAST_VALUE (p.param2 IGNORE NULLS) OVER (ORDER BY h.lvl DESC) AS param2,
18 LAST_VALUE (p.param3 IGNORE NULLS) OVER (ORDER BY h.lvl DESC) AS param3,
19 LAST_VALUE (p.param4 IGNORE NULLS) OVER (ORDER BY h.lvl DESC) AS param4
20 FROM hierarchy h
21 LEFT JOIN org_unit_parameters p
22 ON h.unit_code = p.unit_code
23 ORDER BY h.lvl
24 )
25 WHERE ROWNUM = 1;
UNIT_CODE LVL PARAM1 PARAM2 PARAM3 PARAM4
20-01 1 Value from 20 Value from 20-01 Value from 20 {null}Works well!
But, my ultimate goal is to create a view that resolve correctly all these parameters for each level of the organization with proper propagation rather then querying for each unit at a time. I played a bit, but without success. :( My current raw query is this one:
SQL> WITH hierarchy
2 AS
3 (
4 SELECT ou.unit_code,
5 LPAD(' ',2*(LEVEL-1)) || ou.unit_code AS tree,
6 LEVEL AS lvl
7 FROM organization_unit ou
8 START WITH
9 parent_unit_code IS NULL
10 CONNECT BY
11 PRIOR unit_code = parent_unit_code
12 )
13 SELECT h.*,
14 p.param1 AS param1_raw,
15 LAST_VALUE (p.param1 IGNORE NULLS) OVER (ORDER BY h.lvl DESC) AS param1_with_last,
16 FIRST_VALUE(p.param1 IGNORE NULLS) OVER (ORDER BY h.lvl ASC) AS param1_with_first,
17 p.param2 AS param2_raw,
18 LAST_VALUE (p.param2 IGNORE NULLS) OVER (ORDER BY h.lvl DESC) AS param2_with_last,
19 FIRST_VALUE(p.param2 IGNORE NULLS) OVER (ORDER BY h.lvl ASC) AS param2_with_first,
20 p.param3 AS param3_raw,
21 LAST_VALUE (p.param3 IGNORE NULLS) OVER (ORDER BY h.lvl DESC) AS param3_with_last,
22 FIRST_VALUE(p.param3 IGNORE NULLS) OVER (ORDER BY h.lvl ASC) AS param3_with_first,
23 p.param4 AS param4_raw,
24 LAST_VALUE (p.param4 IGNORE NULLS) OVER (ORDER BY h.lvl DESC) AS param4_with_last,
25 FIRST_VALUE(p.param4 IGNORE NULLS) OVER (ORDER BY h.lvl ASC) AS param4_with_first
26 FROM hierarchy h
27 LEFT JOIN org_unit_parameters p
28 ON h.unit_code = p.unit_code
29 ORDER BY h.unit_code;
UNIT_CODE TREE LVL PARAM1_RAW PARAM1_WITH_LAST PARAM1_WITH_FIRST PARAM2_RAW PARAM2_WITH_LAST PARAM2_WITH_FIRST PARAM3_RAW PARAM3_WITH_LAST PARAM3_WITH_FIRST PARAM4_RAW PARAM4_WITH_LAST PARAM4_WITH_FIRST
00000 00000 1 Default value Default value Default value Default value Default value Default value Default value Default value Default value {null} Value from 10-02 {null}
10 10 2 {null} Value from 20 Default value Value from 10 Value from 10 Default value Value from 10 Value from 10 Default value {null} Value from 10-02 {null}
10-01 10-01 3 {null} {null} Default value {null} Value from 20-02 Default value Value from 10-01 Value from 10-01 Default value {null} Value from 10-02 Value from 10-02
10-02 10-02 3 {null} {null} Default value {null} Value from 20-02 Default value {null} Value from 10-01 Default value Value from 10-02 Value from 10-02 Value from 10-02
20 20 2 Value from 20 Value from 20 Default value Value from 20 Value from 10 Default value Value from 20 Value from 10 Default value {null} Value from 10-02 {null}
20-01 20-01 3 {null} {null} Default value Value from 20-01 Value from 20-02 Default value {null} Value from 10-01 Default value {null} Value from 10-02 Value from 10-02
20-02 20-02 3 {null} {null} Default value Value from 20-02 Value from 20-02 Default value {null} Value from 10-01 Default value {null} Value from 10-02 Value from 10-02As you can see, it's not as I expected. I know there's something to do with a PARTITION BY clause, but don't know how.
Is anyone knows how to solve my problem?
Thanks
Bruno
For reproductibility purposes, here is the code to create sturcture and data:
Here is the format of my tables and some samble data:
CREATE TABLE organization_unit (
unit_code VARCHAR2(5 CHAR) NOT NULL PRIMARY KEY,
unit_name VARCHAR2(100 CHAR) NOT NULL,
parent_unit_code VARCHAR2(5 CHAR)
CREATE TABLE org_unit_parameters (
unit_code VARCHAR2(5 CHAR) NOT NULL PRIMARY KEY,
param1 VARCHAR2(100 CHAR),
param2 VARCHAR2(100 CHAR),
param3 VARCHAR2(100 CHAR),
param4 VARCHAR2(100 CHAR)
-- Inserting data
INSERT INTO organization_unit (unit_code, unit_name, parent_unit_code)
VALUES ('00000', 'Top level', NULL);
INSERT INTO organization_unit (unit_code, unit_name, parent_unit_code)
VALUES ('10', 'L2 unit #10', '00000');
INSERT INTO organization_unit (unit_code, unit_name, parent_unit_code)
VALUES ('10-01', 'L3 unit #10-01', '10');
INSERT INTO organization_unit (unit_code, unit_name, parent_unit_code)
VALUES ('10-02', 'L3 unit #10-02', '10');
INSERT INTO organization_unit (unit_code, unit_name, parent_unit_code)
VALUES ('20', 'L2 unit #20', '00000');
INSERT INTO organization_unit (unit_code, unit_name, parent_unit_code)
VALUES ('20-01', 'L3 unit #20-01', '20');
INSERT INTO organization_unit (unit_code, unit_name, parent_unit_code)
VALUES ('20-02', 'L3 unit #20-02', '20');
INSERT INTO ORG_UNIT_PARAMETERS (unit_code, param1, param2, param3)
VALUES ('00000', 'Default value', 'Default value', 'Default value');
INSERT INTO ORG_UNIT_PARAMETERS (unit_code, param2, param3)
VALUES ('10', 'Value from 10', 'Value from 10');
INSERT INTO ORG_UNIT_PARAMETERS (unit_code, param3)
VALUES ('10-01', 'Value from 10-01');
INSERT INTO ORG_UNIT_PARAMETERS (unit_code, param4)
VALUES ('10-02', 'Value from 10-02');
INSERT INTO ORG_UNIT_PARAMETERS (unit_code, param1, param2, param3)
VALUES ('20', 'Value from 20', 'Value from 20', 'Value from 20');
INSERT INTO ORG_UNIT_PARAMETERS (unit_code, param2)
VALUES ('20-01', 'Value from 20-01');
INSERT INTO ORG_UNIT_PARAMETERS (unit_code, param2)
VALUES ('20-02', 'Value from 20-02');
COMMIT;Now, I hoppe I got your reqs:
WITH hierarchy AS (
SELECT ou.unit_code,
LPAD(' ',2*(LEVEL-1)) || ou.unit_code AS tree,
LEVEL AS lvl,
param1 AS param1_raw,
param2 AS param2_raw,
param3 AS param3_raw,
param4 AS param4_raw,
SYS_CONNECT_BY_PATH(p.param1,'#') || '#' AS param1_path,
SYS_CONNECT_BY_PATH(p.param2,'#') || '#' AS param2_path,
SYS_CONNECT_BY_PATH(p.param3,'#') || '#' AS param3_path,
SYS_CONNECT_BY_PATH(p.param4,'#') || '#' AS param4_path
FROM organization_unit ou LEFT JOIN org_unit_parameters p
ON ou.unit_code = p.unit_code
START WITH parent_unit_code IS NULL
CONNECT BY PRIOR ou.unit_code = parent_unit_code
SELECT unit_code,
tree,
lvl,
param1_raw,
REGEXP_SUBSTR(param1_path,'[^#]+',1,GREATEST(1,REGEXP_COUNT(param1_path,'[^#]+'))) AS param1_with_last,
REGEXP_SUBSTR(param1_path,'[^#]+') AS param1_with_first,
param2_raw,
REGEXP_SUBSTR(param2_path,'[^#]+',1,GREATEST(1,REGEXP_COUNT(param2_path,'[^#]+'))) AS param2_with_last,
REGEXP_SUBSTR(param2_path,'[^#]+') AS param2_with_first,
param3_raw,
REGEXP_SUBSTR(param3_path,'[^#]+',1,GREATEST(1,REGEXP_COUNT(param3_path,'[^#]+'))) AS param3_with_last,
REGEXP_SUBSTR(param3_path,'[^#]+') AS param3_with_first,
param4_raw,
REGEXP_SUBSTR(param4_path,'[^#]+',1,GREATEST(1,REGEXP_COUNT(param4_path,'[^#]+'))) AS param4_with_last,
REGEXP_SUBSTR(param4_path,'[^#]+') AS param4_with_first
FROM hierarchy
ORDER BY unit_code
UNIT_ TREE LVL PARAM1_RAW PARAM1_WITH_LAST PARAM1_WITH_FIRS PARAM2_RAW PARAM2_WITH_LAST PARAM2_WITH_FIRS PARAM3_RAW PARAM3_WITH_LAST PARAM3_WITH_FIRS PARAM4_RAW PARAM4_WITH_LAST PARAM4_WITH_FIRS
00000 00000 1 Default value Default value Default value Default value Default value Default value Default value Default value Default value
10 10 2 Default value Default value Value from 10 Value from 10 Default value Value from 10 Value from 10 Default value
10-01 10-01 3 Default value Default value Value from 10 Default value Value from 10-01 Value from 10-01 Default value
10-02 10-02 3 Default value Default value Value from 10 Default value Value from 10 Default value Value from 10-02 Value from 10-02 Value from 10-02
20 20 2 Value from 20 Value from 20 Default value Value from 20 Value from 20 Default value Value from 20 Value from 20 Default value
20-01 20-01 3 Value from 20 Default value Value from 20-01 Value from 20-01 Default value Value from 20 Default value
20-02 20-02 3 Value from 20 Default value Value from 20-02 Value from 20-02 Default value Value from 20 Default value
7 rows selected.
SQL> SY.
Edited by: Solomon Yakobson on Nov 12, 2010 10:09 AM
Maybe you are looking for
-
Hi Team, After loading the data to DSO and Activating i find the following error.The DSO is activated.There is data in New table and error occurs while activating. The Errors are: 1.DSO ZPF_O07 is inconsistent; request DTPR_4IA4N9BCL2EN
-
How to change the font for a PE51 form
Hi, We are on ERP 2005 , MSS 1.0. A custom remuneration form has been created for printing paychecks. The same form is being used in ESS for employees to view their salary statement. However, the form displayed is not aligned and does not fit in the
-
Page shift due to vertical scroll bar issue
I'm working through a vertical scroll bar issue in my design, using a ProjectSeven CSS page template. When testing the site in my browsers (FF/Safari/IE/Opera), and IF the scroll bar is not present, the entire page shifts to the left (the width of th
-
How do i get an internet connection from my Mac to my iPad using a usb cable?
I have a Mac connected to the internet through a modem. However, i also want my iPad to share this connection through the usb cable. Is this possible? If not, is there any other way i can get my iPad to share the internet connection from my Mac?
-
SM36/37: Specification "After Job" does not work for Daily "periodcity"
I reviewed http://help.sap.com/saphelp_nw04/helpdata/en/20/2d513897110872e10000009b38f889/content.htm, which states what I am trying to do should work, but it does not. Here's the deal: 1. I have two jobs: "A" and "B". 2. "A" runs Daily. 3. I set-