Skip to Content
author's profile photo Former Member
Former Member

Copying DTPs


Has anybody managed to successfully copy DTPs ? Basically, I need to replicate a template DTP many times and do not wish to do this manually. We can with standard functionality copy InfoPackages but not DTPs it seems.

SAP have delivered new functionality to copy Transformations in sp16 which makes like a lot easier, but it seems they haven't delivered copying DTPs, or at least not as far as support pack 18 which is where we are.

Anybody tackled a custom program based on the methods of CL_RSBK_DTP ? I took a quick look and tried method COPY_NVERS_FROM_TEMPLATE but no joy.



Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Oct 28, 2008 at 10:35 AM


    > Hello,

    > Has anybody managed to successfully copy DTPs ? ...


    Just done it... 😊

    DATA: rx TYPE REF TO cx_root.
    DATA: r_dtp_src   TYPE REF TO cl_rsbk_dtp,
          r_dtp_dst   TYPE REF TO cl_rsbk_dtp,
          r_dtp_src_v TYPE REF TO cl_rsbk_dtp_v.
    DATA: dtp_src TYPE rsbkdtpnm VALUE 'DTP_...', " DTP technical name in here
          dtp_dst TYPE rsbkdtpnm.
        r_dtp_src   = cl_rsbk_dtp=>factory( dtp_src ).
        r_dtp_dst   = cl_rsbk_dtp=>factory( dtp_dst ).
        r_dtp_src_v = r_dtp_src->get_obj_ref_objvers( 'A' ).
        r_dtp_dst->copy_nvers_from_template( i_r_dtp_tpl = r_dtp_src_v ).
        r_dtp_dst->set_dtp_original( r_dtp_src->n_dtp ).
        r_dtp_dst->if_rso_tlogo_maintain~save( ).
      CATCH cx_root INTO rx.
        MESSAGE rx TYPE 'E'.

    If the dtp is a delta, then you won't be able to activate it. This code is used at your own risk!


    Add a comment
    10|10000 characters needed characters exceeded

    • The previous code was problematic. This method can be implemented, and, so far, it seems to work.

      If you use this code for yourself, as with any programs that use unreleased classes, you must test it thoroughly. If it causes problems in a production system, then SAP are unlikely to support you. USE AT YOUR OWN RISK


      public section.
         class-methods copy_dtp
            i_dtp type clike
            i_dtptxt type clike optional
            i_dtptxt_prefix type clike optional
            value(r_dtp_dst) type rsbkdtpnm
            error . 


       METHOD copy_dtp.
        DATA: rx TYPE REF TO cx_root.
        DATA: lr_dtp_src   TYPE REF TO cl_rsbk_dtp,
              lr_dtp_dst   TYPE REF TO cl_rsbk_dtp,
              lr_dtp_src_v TYPE REF TO cl_rsbk_dtp_v,
              lr_dtp_src_m TYPE REF TO cl_rsbk_dtp_m.
        DATA: l_dtp_src TYPE rsbkdtpnm,
              l_dtp_dst TYPE rsbkdtpnm,
              l_dtp_txt TYPE rsbkdtptext.
      * Get reference to source dtp
            l_dtp_src = i_dtp.
            lr_dtp_src   = cl_rsbk_dtp=>factory( i_dtp ).
      * Build texts for destination dtp
            l_dtp_txt     = lr_dtp_src->get_text( ).
            IF i_dtptxt IS SUPPLIED.
              l_dtp_txt = i_dtptxt.
            ELSEIF i_dtptxt_prefix IS SUPPLIED.
              CONCATENATE i_dtptxt_prefix l_dtp_txt INTO l_dtp_txt SEPARATED BY space.
      * Make M version of the source 
            lr_dtp_src_v = lr_dtp_src->get_obj_ref_objvers( 'A' ).
            lr_dtp_src_m = cl_rsbk_dtp_m=>create_from_template( lr_dtp_src_v ).
            lr_dtp_src_v = lr_dtp_src->get_obj_ref_objvers( 'M' ).
      * Make destination DTP from the M version of the source
            lr_dtp_dst   = cl_rsbk_dtp=>factory( l_dtp_dst ).
            lr_dtp_dst->copy_nvers_from_template( i_r_dtp_tpl = lr_dtp_src_v ).
            lr_dtp_dst->set_dtptext( l_dtp_txt ).
            lr_dtp_dst->save( ).
            r_dtp_dst = lr_dtp_dst->get_dtp( ).
          CATCH cx_root INTO rx.
            MESSAGE rx TYPE 'E' RAISING error.

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2008 at 02:13 AM

    Hi Kevin ,

    You are correct , it seems SAP has not given copy functionality till SP 18 . I think we cannot create Delta DTP more than one correct me if i am wrong . We can create FULL load DTP 's more than one .

    I have a small question for you Kevin , i have 4 million data daily loading into ODS . I have scheduled one full load thru DTP and it is taking 1 hr to load . If i create 2 more DTP's full load total ( three DTP's) . Will it

    decrease the load time . I tried this option in Development i dnt see any difference .

    Can you please suggest .



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member


      By creating the additional DTPs and entering disjunctive selections i.e. DTP 1 loads month 1 to month 4, DTP 2 loads month 5 to month 8 and DTP 3 loads month 9 to month 12, then you should see, I would estimate around a 50% reduction in overall load time. There are some standard overheads, which means you will not see your load time divided by 3 but you should see a significant improvement. You should consider the DTP settings though i.e. parallel processes, package size as you must ensure you are not overloading your system (remember BI 7 uses background processes for parallel processing, therefore if you load 3 DTPs in parallel with a standard parallel processing settings of 3 then you will need 9 background processes available in production to see a performance gain).

      Also, if you are loading to a standard ODS then you will need to wait until all 3 DTPs have completed before activating the ODS. However, if you are loading 4 million unique records daily, then you should consider loading to a write-optimised ODS. You can then load in parallel and there is no activation required.



  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2008 at 01:07 PM

    Hi Mat,

    I've used the above code, but when I try to activate the copied DTP it fails with the following error :

    Inconsistent user object DTP_4BTI5D3FP15V054D7X5FHYA0U for PSA /BIC/B0001687

    Error during creation of DDIC sources of Data Transfer Process DTP_4BTI5D3FP15V054D7X5FHYA0U

    Error when activating Data Transfer Process DTP_4BTI5D3FP15V054D7X5FHYA0U

    The original DTP used to copy from is active, it's a full load so should not be impacted by overlapping delta's etc.

    Any ideas please.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.