Skip to Content

Introduction

Many times we are required to run more than one DTPs with processing mode ‘No Data Transfer; Delta Status in Source: Fetched’ that is init data load without data transfer. This will set the data mart flag for all the requests in source. There could be scenario where init DTP without data transfer is required to be scheduled. This document describes how to run init DTP without data transfer and also automate this through process chain.

What is init DTP?

Init DTP without data transfer is similar to init info package with update mode ‘Initialize Delta Process’ and ‘Initialize Without Data Transfer’. Init DTP is essentially a DTP with extraction mode (found on Extraction tab in DTP) ‘Delta’ but processing mode (found on Execute tab in DTP) is ‘No Data Transfer; Delta Status in Source: Fetched’. When init DTP runs, data mart flag for all the requests in source is set and they are not fetched in subsequent delta DTP run.

How to execute init DTP?

Only DTP with extraction mode ‘Delta’ can be executed as init DTP. Generally for a DTP, various processing modes can be used depending on type of source and target but to execute it as init DTP processing mode should manually be set to ‘No Data Transfer; Delta Status in Source: Fetched’ and hit the Execute button.

How to automate init DTP?

Problem is SAP does not allow to save a DTP with processing mode ‘No Data Transfer; Delta Status in Source: Fetched’. So you cannot schedule such DTP in process chain. Program ZBW_AUTO_INIT_DTP_WO_DATA performs this task. Code of the program is given below. When program is executed it prompts user for two inputs. First is for technical ID of delta DTP and second is for processing mode of DTP. Processing mode is available to select with F4 value help.

User will provide the technical ID of delta DTP and processing mode value 9 (‘No Data Transfer; Delta Status in Source: Fetched’) and execute the program. Program, in the background, will start the init request. This will save the user from manually setting the processing mode and executing the DTP.

Suppose you have a scenario where in you are creating a new info provider in BW system to store data for each year; and there may be more than one info providers where this activity needs to be followed. So at start of year, you are required to run the init DTP from all the sources to these new info providers.

Now, using the program provided below, this also can be automated using process chains. Create a variant in program for each DTP that needs to be run with init mode. Create a process chain and add the ABAP program step for each DTP providing DTP specific variant. This process chain can be scheduled to run the init DTP requests for all DTPs included in process chain.

Program Code:

*&———————————————————————*

*& Report  ZBW_AUTO_INIT_DTP_WO_DATA

*&

*&———————————————————————*

*& report facilitates run of delta DTP with processing mode

*& ‘No Data Transfer; Delta Status in Source: Fetched’

*&———————————————————————*

   REPORT  zbw_auto_init_dtp_wo_data.

**  data declaration

   data: lcl_dtp     type ref to cl_rsbk_dtp,

         lcl_request type ref to cl_rsbk_request,

         w_loc_dtp   type  rsbkdtpnm,

         lv_dtp      type  rsbkdtpnm,

         lv_mode     type  rsbkprocessmode,

         ls_dtpinfo  type  rsbkdtp.

**  parameter details

   selection-screen begin of block input with frame title text001.

   parameters: dtp_id  like lv_dtp,

               process like lv_mode.

   selection-screen end of block input.

   try.

**  check DTP is a delta dtp

     select single * into ls_dtpinfo from rsbkdtp

       where dtp = dtp_id and

             updmode = ‘D’. “delta mode

     if sysubrc <> 0.

       write: ‘DTP’, dtp_id, ‘is not a delta DTP.’. new-line.

       write: ‘Please select delta DTP for init operation.’.

       return.

     endif.

**  create DTP object

     w_loc_dtp = dtp_id.

     lcl_dtp = cl_rsbk_dtp=>factory( w_loc_dtp ).

**  create DTP request

     call method lcl_dtp->if_rsbk_dtp_execute~create_request

       receiving

         r_r_request = lcl_request.

**  change the processing mode of created request

     if ( process = ‘9’).

**  if input is 9, set request processing mode as NODATA

**  i.e. init without data transfer

       lcl_request->set_ctype( ‘NODATA’ ).

     elseif ( process = ‘1’).

**  if input is 1, set request processing mode as ASYNC i.e. normal

       lcl_request->set_ctype( ‘ASYNC’ ).

     endif.

   endtry.

   try.

**  start the data load request

     call method lcl_request->if_rsbk_request~doit

       exporting

         i_no_commit = rs_c_false.

     write: ‘Init request without data transfer for DTP’,

            dtp_id, ‘is in progress.’.

   endtry.


Program Execution:

     1. Execute program.

Image01.png

     2. Provide parameters.

Image02.png

Image03.png

     3. Execute the program. A init DTP request will be created and become active.

Image08.png

     4. Check the init request loaded in info provider target. Check that check box for ‘DeltaInit’ is ticked which means all requests in source are marked for data mart flag.

Image04.png

Also no records were extracted.

Image09.png


Automate Using Process Chain:

     1. Create a process chain and include the ABAP program step for above program.

Image06.png

     2. Provide the program variant saved for processing the DTP.

Image05.png

     3. Execute the process chain.

Image07.png

Request created as a result of execution of this process chain will be init DTP request without data transfer. You can create variants for other DTPs and add them too in the process chain to automate the operation.


To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

    1. Purvang Zinzuwadia Post author

      Dear Ram,

      I have already mentioned one simple scenario where this might be useful but actual scenario for which I needed this to be automated was different and is very real. To stick to core of topic, I have opted to not mention the details of the complex scenario but I am planning to detail out that part of my experience too. May be you will know soon enough.

      Thanks for reading the article,

      Purvang

      (0) 
  1. Sathiyabama Radhakrishnan

    Hi,

    We have an few instances where we are in need to trigger INIT after delta (self loops) in daily basis. In 7.3 we have an check box option for performing INIT but there is a situation where two delta DTPs cannot be created to same data target. So will this article be helpful to run the same DTP for INIT and delta process?

    Can you help me in this regard.

    Thanks

    Sathiya

    (0) 
    1. Purvang Zinzuwadia Post author

      Hi,

      It is clear that SAP does not allow two delta DTPs for same target. In your scenario, you want to execute init DTP after delta DTP. I would suggest that you use the program mentioned above and pass the same delta DTP with init option. I think that this should work because program does not change the DTP’s settings but it only alters it for request generation.

      Good luck, please post back if this works fine.

      – Purvang

      (0) 
  2. Shawn McDowell

    Thank you for sharing your work.  I have a scenario where I will use this on a occasional, but recurring basis.  “One-time” loads are never one time and this will allow me to complete automate a legacy process that includes the need for fetched DTPs.

    (0) 

Leave a Reply