Skip to Content

EHS - CG36 - Import report - Set MSDS version from key file data

Hi.

This is in reference to thread EHS - CG36 - Import report - how to define MSDS version in key file?

I'm faced with the same client requirement, came across this discussion, and wondering if there was a solution to this.

I'm on ECC6.0. My client requests to retain the Version of the MSDS at the time of export (CG54 Dok-X, VER key file data) when it gets imported to another system (CG36). Example (similar to Roy's): If the reports in export system are 1.0 and 2.0, then they must be created in the import system the same, not 1.0 and 1.1.

Apparently, as Christoph has stated, the standard CG36 Import process doesn't make use of the VER key file data besides storing it into the Report's Additional Info (DMS Class charact.).

I tried to get around this via the user exit. In the IMPORT fm, I set the version/subversion of the report to be created but the C1F3 fm that does the actual report creation just ignores it. If you've done a similar approach, what have I missed? I'm also afraid if I have to clone the C1F3 fm...

I appreciate your thoughts and inputs.

Thanks in advance.

Excerpt from my fm ZC13G_DOKX_SDB_IMPORT:

FORM l_create_ibd_report...
...
  IF e_flg_error = false.

*   fill the report_head
    e_report_head-subid     = i_subid.
    e_report_head-sbgvid    = i_sbgvid.
    e_report_head-langu     = i_langu.
    e_report_head-ehsdoccat = i_ehsdoccat.
    e_report_head-valdat    = sy-datum.
    e_report_head-rem       = i_remark.
*beg-LECK901211-ins
    e_report_head-version    = i_ver.
    e_report_head-subversion = i_sver.
*end-LECK901211-ins

* Begin Correction 15.06.2004 745589 ***********************************
    IF ( l_api_subjoin_tab[] IS INITIAL ).

*     create the report
      CALL FUNCTION 'C1F3_REPORT_CREATE'
        EXPORTING
          i_addinf            = i_addinf
          i_flg_header        = true
          i_flg_subjoin       = false
        IMPORTING
          e_flg_lockfail      = l_flg_lockfail
          e_flg_error         = l_flg_error
          e_flg_warning       = l_flg_warning
        CHANGING
          x_api_header        = e_report_head
        EXCEPTIONS
          no_object_specified = 1
          parameter_error     = 2
          OTHERS              = 3.

    ELSE.
...

Edited by: Maria Luisa Noscal on Apr 8, 2011 8:23 AM

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Apr 08, 2011 at 06:11 PM

    Solution is to incorporate the logic used by tc CG36VEN, that is, the process of performing a direct table ESTDH update after the new report is saved into the database.

    Edited by: Maria Luisa Noscal on Apr 19, 2011 7:34 PM

    Add comment
    10|10000 characters needed characters exceeded