cancel
Showing results for 
Search instead for 
Did you mean: 

spec import_inheritance data

Former Member
0 Kudos

Dear experts,

I m trying to export and import spec that has inheritance relationship. but after importing spec data, inheritance relation is getting deleted.

please advice me how to import data having inheritance relationship.

1> I tried using [restart inheritance]button to reload but nothing happens then

2> I tried [inheritance acitve/inactive]button to get back the relationship. and i got the the relationship but my instance in the property is

not the same. a new instance is been added.

does anybody has gone throught with this situation? please advice is you have an solution.

thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Ralph_P
Product and Topic Expert
Product and Topic Expert
0 Kudos

HI,

Kamal's response is not entirely accurate since you can, in fact, import inheritance relationships. Prerequisite is that in the target system the same inheritance templates are defined as in the source system. Using the DataEditor, you can then, in online-mode, migrate the relationship.

Ralph

christoph_bergemann
Active Contributor
0 Kudos

Dear all

with SAP EH&S standard import / export you can not (as explained by Kamal) (to my knowlegde) export / import relationship data. Supported is:" reference", etc. tab strips

You can import / export the specification and all the data and you can create in the target system the "inheritance" template but there is no useful further tool available to prepare by "mass" then relationship links (and then start the inheritance)

The DataEditor is (to my knowledge) only available as add on by SAP.

I did not try that but only for completeness:

If you have a source SAP and a Target SAP system you could try to "move" the data via ALE (i am not sure regaridng inheritance template but if i remember correct: as long as in the target system somebody has defined the "inheritance template" the ALE distribution approach should be possible).

May be refer as well to this link: https://scn.sap.com/message/2958249

Never tried to use LSMW in EH&S but it might be an option (may be refer to: http://www.consolut.com/en/s/sap-ides-access/d/s/doc/F-BAPI_BUS1077_REPLICATE)

and e.g.

http://www.se80.co.uk/sapfms/b/bapi/bapi_bus1077_savrepmul.htm

C.B.

PS: maybe this OSS might be of interest: http://www.stechno.net/sap-notes.html?view=sapnote&id=1486752

Ralph_P
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Christoph,

I didn't express properly what I meant, I admit it. In order to avoid confusion: You are correct, an inheritance cannot be imported using the standard import functionality. However, as I wrote, it can be migrated using the DataEditor.

As to LSMW: I'm on your level, I never used it within EH&S so I can't say whether it can be used for the "import" of inheritance relationships.

Ralph

Answers (4)

Answers (4)

Former Member
0 Kudos

We have a custom ABAP program that assigns our inheritance templates to the specs.  The Data Editor tool only work in Online Mode for assigning Inheritance Relationships.


To identify the inheritance relationship and distinguish between the target/source so you do not duplicate, you can build an SQVI query and easily get that information to then narrow down your loading to only those source Specs.   You will be able to see which ones have the inheritance relationship by looking at the values in.  TCGTPLREL-RECN_TPLH


Then once you load data to only those source specs using CG33, the inheritance job will get triggered  will automatically pass down the data the target specs.



christoph_bergemann
Active Contributor
0 Kudos

Dear Matt

it seems to be that you found a solution taking care the "inheritance topc"; is your solution "user friendly" (e.g. available via CG02 as exit?)

Inheritance is a nice option in EHS. But can be tricky in daily use

C.B.

Former Member
0 Kudos

The automatic assignment of the Inheritance Relationship is user friendly but totally custom. 

It is done automatically daily via a background job when new Specs are created based on logic that we have to identify the difference between the target and source (i.e. commercial product spec / formula spec).

Mass data loading is never user friendly though and always requires some degree of support from an SAP functional IT resource.

Former Member
0 Kudos

Hi,

Just a couple quick notes...

1. When you export data from EHS and those specifications has inheritance relationships, then the export file does not differentiate between locally maintained data, or the inherited data.

2. Importing that file in a new system will result in all locally maintained data without the inheritance relationship.

That means your inheritance specification will not be there, rather the data passed on is locally maintained.  This is why you need to identify your data migration strategy in such a way that you know which data points are being passed on through inheritance, and which data points are locally maintained.  You can then decide if you would rather keep it locally maintained or you can choose to create a property tree that does not contain inherited data points.

Regards,

Duncan.

christoph_bergemann
Active Contributor
0 Kudos

Dear Duncan

thanks for highlighting the topic once again. To my knowledge the only chance to "reuse" inheritance in a target SAP system is may be using an ALE scenario; Therefore base on generated IDOCs one could "reinstall" an inheritance scenario in a SAP target system; but the "inheritance template" can not be transferred using ALE; this need to be maintained in the target system;

And yes you are right: importing data is a challenge in EHS; os if there is the need to migrate data from SAP to SAP or Non SAP to SAP you should take your time in doing so. IN most cases you will not succeed in one run.

C.B.

PS: for those who love using LSMW: you can use (in my opion) as well LSMW approach wiht the ALE used in EHS context; LSMW can generate IDOCs, SAP system can receive and book the IDOCs in EH&S.

Former Member
0 Kudos

DEAR ALL,

Thank you so much for the quick responses.

I feel that above inheritance procedure is to tranport data between two sap systems or third party systems.But my requirement is to do changes in the same systems.

export spec..make some changes to export file ..then import back..in this process my inhertiance relationship is getting deleted as i explined above instances are getting added...

by the way, while importing i m using delete parameter [Spec. deletion type =1] in tr CG33.

i heard that DataEditor has this capability to do but we dont have this tool ...so i need to find the way out..please advice if there is any procedure to maintain the relationship..

and just wondering how do you guys are making changes to spec master(property tree data) on a daily basis.. I know there are bapi's (change and delete etc) to achieve this...does everybody are creating their own ABAP report??? or using standard import export pocess..???  PLS do share with me..

regards,

saleem

Former Member
0 Kudos

HI Saleem,

If you are working on the same system, the way of working - you mentioned is above is too hectic.

We are just scheduling the batch job with the program - RC1R0INH.

It has to be scheduled as a periodic job with start condition - After Event.

Event - SAP_START_EHS_INH_PROCESS

whenever there is a chage in specificaiton data, this job runs.

Regards

kamal

christoph_bergemann
Active Contributor
0 Kudos

Dear Saleem

regarding:

"I feel that above inheritance procedure is to tranport data between two sap systems or third party systems.But my requirement is to do changes in the same systems."

You misinterpret the use of  "inheritance"; inheritance (as reference) is a mechanism to maintain "easily" data on "spec level" in one SAP EH&S system; it is not related to "pass on" data from one SAP system, to a different one (here you use ALE distribution normally)

regarding:

"and just wondering how do you guys are making changes to spec master(property tree data) on a daily basis."

Don't really know what you are looking for. For daily maintenance user normally use "simply" cg02 in maintain mode and simply maintain something (what so ever);

Export and import is used "only" e.g.  if your company has done an aquisiton etc. This process is clearly not "designed" to be used on daily basis

If you have the demand to make "mass update" you should use the "Easy Expert" or the "Expert"; may be read this:

http://help.sap.com/saphelp_470/helpdata/en/32/b292c6f3de11d2b518006094b92d29/frameset.htm

You will find in EH&S customizing more hints regarding that and there is a number of OSS notes available etc.

C.B.

PS: may be check this link as well: http://scn.sap.com/blogs/SustaVergence/2012/10/12/safety-datasheet-authoring-in-6-clicks-or-less

PPS: regarding: I know there are bapi's (change and delete etc) to achieve this...does everybody are creating their own ABAP report??? or using standard import export pocess..???

My answer would be: yes and no:

yes: anybody is doing it by there own or the companies are buying the "content" from SAP. SAP provides as a "add on service". This "content" contains a number of "submodules" (please refer to SAP pages and marketplace etc.); one part are "programs" (to my knowlegde Expert rules) which can be used to populate by mass the property tree (based on input data); those companies who are not willing to buy this "add on" create normally so called "secondary data determination" programs (to be precide: function modules) (please refer to SAP EH&S standard documentation, customizing etc.) to do the job

No: if a e.g. secondary data determination program is created by your own it is highly recommended to use the EH&S "BAPIs" to manipulate the data; you should never use differemn techniques and it is strongly recommended not to try to use your "own" coding to manipulate "direct" EH&S tables.

E.g. refer to:

http://www.se80.co.uk/sapfms/b/bapi/bapi_bus1077_create.htm

http://www.se80.co.uk/sapfms/b/bapi/bapi_bus1077_delete.htm

http://www.se80.co.uk/sapfms/b/bapi/bapi_bus1077_getdetail.htm

http://www.se80.co.uk/sapfms/b/bapi/bapi_bus1077_getlist.htm

etc. (anything within this group: "bapi_bus1077" could be of interest


Former Member
0 Kudos

Dear Kamal,

the above inheritance process you mentioned is already configured and are maintaining with no issues.

i will be little specific about my requirement here..

i need to edit data in the property tree from outside ehs system...lets say from excel or 

as sap standard export procedure ...make changes.. then import....and mainitain my inheritance relationship as well...

for eg..in the property tree you are inherting data only for "general " folder ..

and the rest of the property tree is maintained without inheritance..and my point here is

i need to change the data lets say "Physical-Chemical Properties" "characteristics:color from red to black" for one spec its ok to do it in cg02 but let say i want to do for 10 spec ..

is there any way to upload from outside ehs system...lets say from excel or

as sap standard export procedure ...make changes.. then import....and mainitain my inheritance relationship as well...

i hope i m clear..

regards

saleem

Former Member
0 Kudos

hi chris

thanks for the reponse.

>Don't really know what you are looking for. For daily maintenance user normally use "simply" cg02 in maintain mode and simply maintain something (what so ever);

i know we can do changes in cg02 in the edit mode but user want to import from outside, lets say from excel..

bez doing changes in cg02 is time consuming...so is there anyway to achieve that..using standard sap procedure or we should develop our own report program to do this ???

regards

saleem

Ralph_P
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Saleem,

You can only export the data you want to change for the specifications you want to change. This will give you a dat-file, whose content looks like this:

+BS

+BV   $ESTRH

SRSID                          EH&S

SUBID                          000000385000

SUBCAT                         REAL_SUB

AUTHGRP                        EHS_PS

+EV

+BV   $ESTRI

SRSID                          EH&S

IDTYPE                         NAM

IDCAT                          EHS_OLD

IDENT                          XY0002

ORD                            0001

+EV

+BV   SAP_EHS_1013_001

$ESTVA-SRSID                   EH&S

SAP_EHS_1013_001_VALUE         N09.00101280

+EV

...

The above is an excerpt giving one value for one specification only! If you open this file with a  text editor you can change certain data and then reimport the whole thing. However, given the somewhat complicated structure of the file this is nothing I would recommend to my customers. Clearly, manual maintenance or the DataEditor is less prone to errors. But again, technically this would work.

Ralph

Former Member
0 Kudos

Hi Saleem,

With my knowledge, we have 2 different process available in SAP EH&S to do mass upload.

1. EH&S Expert

2. Idocs

About EH&S expert, you need to have a seperate licenses.

For Idocs - Inbound idocs structure to be developed, standard function modules available -

for ex - C14ALE_IDOC_INPUT_SUBMAS

Both the cases, not a ready solution to use.

You have to maintain the mapping table for each field from source file to SAP.

If everything is in place, you can do mass upload as you desired.

Regards

kamal

Former Member
0 Kudos

Hi Ralph,

This is what i m trying to do ...i know the export file structure is really complicated and its not user friendly..we are planning to develop inhouse tool for that...i know dataeditor is really a charm for our reqirement but after saps acquisition its not available now..

Ralph pls advice me while in this process i cant able to restore my inhertiance relationship..

as i said above..is there anyway for this...

regards,

saleem.

Former Member
0 Kudos

hi kamal,

thanks for the advice..

do u mean ehs expert rule...??? can you provide me little more specific details pls...

regarding idocs..pls share some help docs if you do have some..it would be really greaful..

as i have no experience in idocs..

regards,

saleem

Ralph_P
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Saleem,

definitely not. You cannot import inheritance relationships. If, during zthe import, the inheritance relationship is deleted, there is now way to restore it via an import.

Ralph

Former Member
0 Kudos

HI Saleem,

Here I can can find 2 different requirements based on your discussions.

1. Data load from out side SAP (XLS or different source)

2. Maintain inheritance relation ship within your data model.

for 1. Data load, multiple options specified in this blog. you have to take a decision - which method can be used.

for 2. Maintain Inheritance relation ship - Pls., don't club this to No. 1. as it is individual task in SAP system. You can't map and control this with any of the process specified for data load. Because the data model having such critical functionality (for ex - Real_GRP may linked to multiple REAL_SUBs or DG linked to Multiple REAL_SUBs).

This Inheritance relationship can be solved with the program i mentioned above, by scheduling the batch job periodically, whenever there is change in data - it will update the Inheritance relation ship.

About Idocs - discuss with your technical team (ABAP) about the functionality.

we have standard Idoc available for specificaitons - SUBMAS.

you can use the function module C14ALE_IDOC_INPUT_SUBMAS, to drive this Idoc.

No standard functionality available, where you can use directly.

Need some development efforts using standard idocs and function modules available.

Regards

kamal

christoph_bergemann
Active Contributor
0 Kudos

Dear Saleem

the options which Kamal explained are may be the best approach (e.g. use of ALE (refer to my thread as well)); the "inheritance" topic is a "technique" to manipulate/add data within EH&S. To use "export/imort" to "change" data is no option in my opinion. The "DataEditor" mentioned is one "chance".

May be check if you can change from "inheritance" to "Reference" as reference is supported n export/import. But in any case you need to deal with the "file" and this approach is not recommended. The manipulation of data can be done with "Easy Expert" and "Expert" which is the standard approach in SAP EH&S. As explained by myself the next option is to use one "secondary data determination" programs. Here you are "free" in design etc.

Now it depends a little bit on your "real business" case. As mentioned by Kamal an "EXCEL" import (as secondary data determination program) is one option; here you need to "simply" add a function module in the corresponding customizing creating a "hit list" in maintain mode; mark the specification to be updated and then try to process the "EXCEL" so that insert, update or delete may be possible.

In any case: if you use "inheritance" you need to understand the "basic" idea of this technique; this is not easy; by the way: by using a secondary data "exit" you can try to "insert""/update" etc. inheritance relationships by "mass" depending on user input etc.

Any optin mentioned so far is no! modification of EH&S but using the standard SAP EH&S "extension" points (like user exits etc.)

With best regars

C.B.

Former Member
0 Kudos

HI,

You can import and export the specifications. But not the relations ships. Inheritence templates are master data. You must create them manually in all environments.

follow the steps -

1. create inheritance templates (master data) in all environments in uniform way.

2. export the specifications and import them.

3. check the Relation ships, Available as you desired it's ok. or esle edit them.

Have one more short cut the program - RC1R0INH, which initiates the inheritance process.

Let me know still you have any doubts in the process.

Best Regards

kamal