Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9680

Re: How to Import Comments History?

$
0
0

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.


Viewing all articles
Browse latest Browse all 9680

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>