cancel
Showing results for 
Search instead for 
Did you mean: 

How to Import Comments History?

0 Kudos

Has anyone been able to import comments history into NW?  We recently upgraded from 7.0 MS to 10.0 NW, and the client is now asking for the Comments to be loaded from the old MS version to NW version.  Can anyone advise on how to do this?

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member200327
Active Contributor
0 Kudos

Hi Michael,

You can't just upload comments table into NW because it has RECORDID field that is generated.

I'd recommend method that Anjan suggested. Just be aware that it will change user ID and date. If you need to keep those you'll need to load each comment separately.

-Gersh

former_member191765
Active Participant
0 Kudos

I would suggest use standard SAP delivered classes to dump the comments into NW. the following code might help you.

         Data: lo_cmt_manager  TYPE REF TO cl_ujc_cmtmanager.

DATA: ls_cmt_db       TYPE ujc_s_compact_cmtbl,

         lt_cmt_db       TYPE ujc_t_compact_cmtbl.

TRY .

*     create comment manager

       CREATE OBJECT lo_cmt_manager

         EXPORTING

           i_appset_id         = <XYZ>

           i_appl_id           = <ABC>

           if_disable_security = abap_true.

     CATCH cx_ujc_exception.

       RAISE EXCEPTION TYPE cx_ujxc_cmt

         EXPORTING

           textid = cx_ujxc_cmt=>ex_cmt_mgr_err.

   ENDTRY.

   TRY.

       CALL METHOD lo_cmt_manager->add_cmts_fast

         EXPORTING

           it_compact_cmtbl = lt_cmt_db

           it_all_dim_mbr   = lt_all_dim_mbr_collection

         IMPORTING

           ef_inserted      = lf_success

           et_error_cmtbl   = lt_error_cmtbl

         CHANGING

           ct_message       = lt_message.

     CATCH cx_ujc_exception INTO lx_ujc_exp.

   ENDTRY.

bishwajit_das
Active Contributor
0 Kudos

Hi Michael,

I also donot know if there is any standard method to load comments from the old MS version to NW version.

But this can be done easily. As the comments table are nothing but just database tables included as BW object. So as already mentioned by Nilanjan, just take a dump of the comment table from the old system then you need to map the fields according to the comment table in NW, and upload the file into the new table.But make sure you have the same data types in the tables for both the different versions.

Former Member
0 Kudos

Hi Michael,

I dont think you will be able to do this directly.

You need to first take the dump of the comment history from MS. Then this should be directly uploaded into the comments table in the BW system. The name of the comments table is /1CPMB/XXYYYCMT; where XX is environment prefix (available in UJA_APPSET_INFO table), and YYY is the application (or model) prefix (available in UJA_APPL table).

Hope this helps.