cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

mass copy functionality in ehs

Former Member
0 Kudos
607

Hello Experts ,

How can we do mass copy functionality in sap specification workbench . Looks like easy experts can only do mass change . Do we have any standard way of doing this or some codes which we can write in rule editor which copies VAT from one place and add to other .

Regards,

K G

Accepted Solutions (0)

Answers (3)

Answers (3)

Mark-Pfister
Active Contributor
0 Kudos

Hello Krishna,

You can - using the standard functionality called "copy template" - copy all data or only specific data from specification A to specification B. Please read the online help to find out more on that.

It makes no sense to copy data from specification A to tens or hundreds specifications. If this is needed you should use inheritance instead (see online help for details).

Hope this helps

Mark

Former Member
0 Kudos

I want to copy composition data from one vat to other within same spec . and want to carry out at mass . looks like copy template sounds promising . but can it be used within spec ?

christoph_bergemann
Active Contributor
0 Kudos

Dear Krishna

now knowing the details of your "wish". In your case a "rule set" is the right option. You start froom hit list. Rule will read data in VAT A (of type composition) and write it to VAT B (of type composition)

C.B.

Former Member
0 Kudos

yes Chris ,

Thats correct . I was not able to find code in editor which says copy option after it reads VAT .

christoph_bergemann
Active Contributor
0 Kudos

Dear KIrshna

in parallel thread you have asked for a "rule example". One example is shnown in online help. Here composition is read and the calculation is started.(here density is calculated). I would expect that you can use something similar and just read component from  VAT A and the just write the same components etc. in target VAT. Not knowing the details of the SERC approach and the delivered rulesets as content here: You need such "writing" to Composition very often.

C.B.

Ralph_P
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Krishna,

a 1:1 copy of data can be done with a rule set whose .rul-file needs to be developed. However, just for copying data that's not rocket science.

Ralph

Former Member
0 Kudos

Ralph ,

Do you  know simple code to develop in rule editor which can copy vat within same spec .

Ralph_P
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Krishna,

That is described as Christoph mentioned. So the code should look like:

FACTS

RECORD

     INPUTCOMP(IN)

     INCOMPONENTS

     OUTPUTCOMP(OUT)

     OUTCOMPONENTS

END

RULES

RULE COPYCOMP

IF TRUE()

THEN

OUTPUTCOMP.NEW.OUTCOMPONENTS:=INPUTCOMP.INCOMPONENTS

COMMIT OUTPUTCOMP

END

END

I haven't tested this! And you need to take care of the correct mapping in the database.

Ralph

Former Member
0 Kudos

Thank you Ralph . Hope this works .

KG

Former Member
0 Kudos

Ralph ,

Just a quick question .How do I fit this in rule editor . Is there a way to import txt file into editor or do we have to insert these codes in editor .Sorry being new to editor , no idea where to put these logic .

christoph_bergemann
Active Contributor
0 Kudos

Dear Krishna

the "trick" is now the set up of the database; and the "issue" is: if you would like to be "very" flixible you need ot do a lot of set up.. e.g. any combination of VAT 1 and VAT (acording tomy understanding) would be one "configuration" in database; the rule as such is the same

(e.g. Standard composition => Legal Composition)

C.B.

Ralph_P
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Krishna,

If you have the rule editor then use it to create the rule, there is no point to then code manually. Also, the mapping database will be creted by the editor so you don't have to worry about it.

Ralph

Former Member
0 Kudos

I was struggling to find a command for copy and paste in IF  and Then ( To do ) fields in rule editor . other data elements can be put together easily .There should be some rule editor specific command to enter in these fields .

Ralph_P
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Krishna,

Just use Output := Input. The If true() will be added in the rul-file automatically.


Ralph

Former Member
0 Kudos

Can you show me screenshot of rule editor . I was not able to put that logic Output := Input. 

christoph_bergemann
Active Contributor
0 Kudos

Dear Krishna

EHS Expert (either easy or normal) does have a "different" purpose. These are dedicated for "calculating" not "copying"

For copying: you have only the functionality in CG02/Cg02BD nothing else. You can (if needed) extrakt via export and than upload via import but this is no user unteraction and doen normally by support etc.

Conclusion: Nothing in place. You need to look for your own enhancement.

C.B.