cancel
Showing results for 
Search instead for 
Did you mean: 

custom property tree

former_member212503
Participant
0 Kudos

Hello Experts ,

I created a custom property tree with class which I copy from standard ( say color ) . I  used   the standard characteristics in the custom class and added few more custom characteristics as well . I want to share information on standard characteristics between sap provided property tree sand custom property tree . Any idea , how can I achieve this .

Accepted Solutions (1)

Accepted Solutions (1)

satya11719
Active Contributor
0 Kudos

Hi KG,

It is simple if you want to go ... go with all Z class n characteristics don't with standard and customized & it won't get update if you update in standard.

if you go with Z if you update one Z characteristics it will update other places where you used it.

Thanks

Satya

christoph_bergemann
Active Contributor
0 Kudos

Dear Satya

sorry; but your explanation  is "misleading" or might be "mislading" and will not solve the demand of Krishna (If I have understood the demand correct).

I believe this is the story (business case):

a.) we have one specification

b.) we have two different trees

c.) e.g. data exists in class "X" as part of one tree; and class X should be as well as part of second tree

d.) now if user select "tree1" either one characteristic should be "hided" or "added"; eg. user A should update characteristic X only if he use "Custom tree"; and if the same user switch to other tree either he/she can not see the characteristic or if so can not change data in this characteristic

And this is not possible in SAP EHS. By very "clever" approach something similar might be possible, but the efforts and risks are that high: I can not recommend to do it.

The crucial topic is the requirement as "but my requirement  is to add few more characteristics as well . Can we have option to hide charac from one property tree and hide from another one will really resolve my issue"

Still i have no clue about the business need of this demand. As explained:

If you are not satisfied with SAP Tree: generate your own ones with own classes and characteristics and maintain data (but then please accpet that you will be able to use "content"; and as explained. Never mix SAP "data model" with your data model (for same class !!!)

C.B.

former_member212503
Participant
0 Kudos

Hi Chris ,

The reason I asked this is because we have standard badi for this adjustment but not sure this requirement can be meet or not .

christoph_bergemann
Active Contributor
0 Kudos

Dear Krishna

up to now discussion was only for "how to set up classes"/property tree etc. I have no clue to which BADI you are refering to. As mentioned. what you describe; i have up to now never seen in "real life" and I don't understand the business case/business story/business need

E..g for "access story": either the user has access to data record with "all characteristics" or he/she does not have; there is no approach available I know to "limit" access rights in EHS for oe characteristic in a data record

C.B.

former_member212503
Participant
0 Kudos

Chris ,

There is one Badi for "Table based  value assignment " which has different methods . Determine ALV layout structure might be of interest . I agree many has adopted standard practice . Through this I was trying to meet this requirement .

christoph_bergemann
Active Contributor
0 Kudos

Dear Krishna

wow...  this BADI i have missed... checking e.g. this:

SAP ABAP IMG Activity EHSB_VAI_ADD_INF (BAdI: Enhancement of Table-Based Value Assignment) - SAP Dat...

I check as well: YM-IF_EX_EHSB_VAI_ADD_INF~~~~~~~~GET_ADD_CLASS_DEF (sorry german link only)

This seems to be true:

duing the creation of the screen showing the characteristics this BADi seesm to be called.Method

GET_ADD_CLASS_DEF is here the interesting one.

According to what I can see you can:

1.) remove one characteristic of a class so that it is not shown

2.) add a characteristic to be shown

etc.

Quite interesting is the "technical" part here. If you add here a characteristic to be shown this seems t be true:

the characteristic needs not to be assigned to a class as such (or can be assiogned ot customer class); it ixs explained the the IT framework will make sure that data which is maintained in this additional characetristic will be stored in data  base and therefore clearly will be shown again (and can get updaetd etc.)

Honestly. Now i need to correct my first feedback to you: But only with the help of an ABAPer you can move forward.

Coming back to your line of business need:

if property trees is as "Z_CUSTOM" additional characterisrtic should be shown; if tree is "STANDARD"it should not be shown. Now you need to check if you can "check" which tree is selected (i believe this can/should be possible) then you need to check which value assignment type need to be shown and then you can e.g. remove or add a characteristic

As mentioned. I have never had similar demand; therefore in past years i was very "focused" on generating trees etc. and not to check options like these,

C.B.

PS: the interseting thing is: you can use this BADI as well to decide if pharse code and text etc. should be shown; i can only remember that "somethere" in the system now a cusomizing option exsist to adjust the display "globally" But using this nice feature: may be some users will be "happier" than before.

Answers (3)

Answers (3)

christoph_bergemann
Active Contributor
0 Kudos

Dear Krishna

no clue what you would like to get if i check this ". I want to share information on standard characteristics between sap provided property tree sand custom property tree . Any idea , how can I achieve this ."

It is strongly recommended not ! to use SAP characteristics in customer classes; you will get more problems than to get something (as a result)

IN context of: . "If I enter color in std property tree , my requirement  is that it should also show up in custom property tree . but using custom class is blocking the feature"

your approach is completly wrong. You mix to many topics... Don't use SAP characteristics in own classes;

to prepare customs property trees based in "SAP classes" is quite simple and straightforward and nothing "comples" and discussed here often; just do a research here

Please check:

as well.

C.B.

PS: check may be as well:

former_member212503
Participant
0 Kudos

Hi  Chris ,

Are you saying it is not possible to have standard characteristics  ( eg color : SAP_EHS_1013_008_VALUE)  to be in two different class ( sap_ehs_1013_008 :standard property tree ) and( zsap_ehs_1013_008 :custom property tree ) for the purpose of sharing information between two ?  the reason why I am trying to set this is I want to use the standard characteristics in my new property tree after copying the class . I do not want to add extra new characteristics to the standard class as it will break the standard property tree use .

The reason behind this is in my new property tree some of the characteristics and class I see that I can use so that when one role updates some information in standard property tree , then the second role who uses custom property tree can see in custom property tree and vice versa take an example of color .

Hope the question is clear now not sure whether this can be achieved still . Let me know what is your thoughts around this .

Ralph_P
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Krushna,

just add SAP_EHS_1013_008 to your custom property tree. That solves your issue and doesn't create any new ones. As Christoph pointed out: Don't use SAP characteristics in Z-classes!

Ralph

former_member212503
Participant
0 Kudos

but my requirement  is to add few more characteristics as well . Can we have option to hide charac from one property tree and hide from another one will really resolve my issue . But no idea how security or we can handle this , no idea .

christoph_bergemann
Active Contributor
0 Kudos

Dear Krishna

no chance; not possible. Simply..

You have these "high level" variants:

1.) create Z class with Z Characteristics

2.) you can add Z characteristics to SAP class (DON'T DO IT)

3.) you can create Z Class and use SAP characteristics (DON'T DO IT)

BUt you can not "inherit" data from 1.) to 2.) etc. (or whatever combination)

I have checked other threads which have been created by you (e.g. discussion on UOM topics, hide characteristic topics etc.) . My current understanding seems to be:

by whatever reason you would like to "inherit" characteristic data/Class data from one location to the other and add at target addtional "characteristics (and therefore maintain on top some data)

I have no idea regarding this business need; never seen it.

This is not possible on this level. There is may be some option (may be) but I is a very "dirty" solution with many risks / tricks  etc.

C.B.

PS: please read very careful the documents i have linked to; there are some links refering to "similar" demand

Ralph_P
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Krishna,

There is simply no point in doing what you try to do. Simply add the VAT to both property trees. If a value in a characteristic of that VAT is changed using one of the trees, the change can also be seen using the other tree. You don't need any Z-characteristics for that.

Ralph

christoph_bergemann
Active Contributor
0 Kudos

Dear Krishna

using your example:

Characteristic SAP_EHS_1013_008_VALUE)  should be part of  two different class ( sap_ehs_1013_008 :standard property tree ) and( zsap_ehs_1013_008 :custom property tree ) f


1.) first: from SAP point of view this is a modification (no SAP "objects" should be reused like this)

2.) you can "share" the characteristic; but not the data in the value assignment


Example. you have two trees; one with SAP class "color" and second one with customer class having SAP characteristic "color" inside and may be on top characteristics; now you maintain data in STANDARD tree; if you switch to "customer" tree you will see no data in your customer class even if you have used the same characteristic


C.B.

satya11719
Active Contributor
0 Kudos

Hi KG,

I understood your question you want to share the info between Z characteristics & SAP characteristics right.

I dint understand one thing why you used standard class for Z characteristics, because this standard class provided by SAP can be used in so many places and why you can't create Z class for the same.

And can you give me clarification on which information your going to share (phrases ?).

Thanks

Satya

former_member212503
Participant
0 Kudos

because that characteristics is usable for new property tree eg color . If I enter color in std property tree , my requirement  is that it should also show up in custom property tree . but using custom class is blocking the feature . If I use custom characteristics , there is no point even getting to that point where I am right now .

Hope not it is clear ! 

Ralph_P
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Krishna,

What do you mean by "share information between standard tree and custom tree"?

Ralph