Skip to Content
avatar image
Former Member

EH&S - .key file creation - interface

Dear all,

I would like to buid an interface MSDS documents + metadata between two systems, we would like to use some existing functionality (but without using Dok-X System).

Therefore I would like to use the following transaction and call the following function modules:

The following standard SAP transaction within SAP EH&S will be used to import MSDS documents: CG36 u2013 Import Reports. This transaction calls the userexit (maintain within SAP EH&S u2013 SPRO > Basic Data and Tools > Basic Settings > Manage User Exists > SRE_IMPORT (EHS_DXSDB) and following functional module: C13G_DOKX_SDB_PREIMP and C13G_DOKX_SDB_IMPORT. The Function modules will call a key file.

An ABAP will be developed to create the key file from the XML input. To be able to define the structure of the Key file, we need some examples. Within Report Information Management the system can Export a key file and MSDS in .PS file format, ones exported the files are not stored on the system. Therefor, could somebody send me some example MSDS structure key files?

Thank you in advance.

Kind regards,

Roy

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Mar 13, 2010 at 01:24 PM

    Hello Roy,

    Check this format

    DTY=SDB

    SID=SUB000000001

    PRN=MAT000000001

    STA=V

    LAC=En

    CPN=Demo CompanyName

    FFT=PS

    FNA=12345678.ps

    DAT=2010/02/02

    VER=1

    More information check the SAP Note 154233

    Thanks

    Jayakumar

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      My question is regarding the interfaces only but slightly diffrent. I want to duribute the Specification data of some of the classes only in a property tree but I am facing the problems. Please check the below points I have raised.

      This issue is regrding the distribution model. We want to transfer the EHS data from 4.6 to ECC 6.0. Below is the requirement:

      1. There are few classes which needs to be distributed and not all classes and its charecterstics in the property tree.

      2. I have created a distribution model for it and entered the classes which are relevant for e.g. Flash point is the class (SAP_EHS_1014_009) which is there in the dist model. So when I change any charecterstics value in this class and Run BD21 then I can see the Class in the list under the segment E1BP1077VH and the changed charecteristics is under the segment E1BP1077PR. Which seems to be correct- But when I change another charecterstics of another class (SAP_EHS_1013_013) which is not there in the dist model. Then BD21 and still I can see the new Charecte. in the WE02 though the class is not in the distribution model. Meaning its not filtering out the irrelavant charecterstics in the property tree. Thats the reason all property data is getting transfred.

      Is there is any customizing setting? I think as a Standard process it must filter out the changes of the classes which are not there in the distribution model. DO you have any hint on this?

  • Mar 13, 2010 at 05:15 PM

    Hello

    in addition to what has been explained by Jayakumar: If you analyze carefully the function modules you have mentioned you will find all "constants" in the key file which can be used in upload. Some of them are useful; some of them are mandatory etc.

    The procedure you are describing is used to do an "import". Coming back to your question:

    "I would like to buid an interface MSDS documents + metadata between two systems, we would like to use some existing functionality (but without using Dok-X System)."

    I am not so sure in which direction your are thinking.

    So this would be my questions:

    1.) Are both system SAP Systems having an installed EH&S ? If so you should use ALE distribution of the reports to bring them from one system to another

    2.) If target system is a SAP System but EHS not installed other options exists which one might use

    In addition:

    "Within Report Information Management the system can Export a key file and MSDS in .PS file format, ones exported the files are not stored on the system"

    (IN addition: if necessary the "PS" files could be stored. This is a matter of set up of the system)

    The approach with the export can not "directly" by used to do an import into a SAP system. You could use the SAP techniques to do the job without modifications in EH&S etc.but if the targetsystem is a SAP System, you should use ALE transfer of the documents

    Additionally:

    An ABAP will be developed to create the key file from the XML input.

    This is not "clear" enough to me. As explained by Jayakumar the key files is a simple "ASCII" File. So why using XML as an "intermediate" file type?

    To my knowledge in principle it should be possible to do this:

    SAP System with reports => transfer via ALE to SAP XI => transfer to a Non Sap or SAP System

    But if the target system is a SAP system: the ALE approach is much simpler (wihtout using the SAP XI middleware approach).

    With best regards

    C.B.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Christoph Bergemann

      Thanks!

      the issue was related to Windows/Unix indeed. In order to read the transfer directory, EH&S uses a external operating

      system command. Unfortunately the delivered command WWI_GET_DIR works

      only on server with Unix-Like operating systems.

      For servers with Window-NT operating system a specific command must be

      created.

      This is carried out in transaction SM69. Create in this way a command

      with the following values:

      Command name: ZWWI_GET_DIR

      Operating syst: WINDOWS NT

      Operating system command: cmd /c dir

      Aditional Parameters Allowed: <yes>

      So that the import uses this new command, this must be notified by the

      EH&S environment parameter 'REP_IMPORT_OS_COMMAND'.

      Therefore please start transaction SPRO, go to IMG-Activity

      'Environment, Health & Safety -> Basic Data and Tools -> Basic Settings

      -> Specify Environment Parameters' and change environmental parameter

      'REP_IMPORT_OS_COMMAND' to parameter value 'ZWWI_GET_DIR'.

      After this you can re-check transaction CG36.

      Thanks again.

      Kind regards,

      Roy

      Edited by: R. Derks on Apr 2, 2010 11:25 AM