Quantcast
Channel: SCN : Discussion List - SAP Business Warehouse
Viewing all articles
Browse latest Browse all 6437

DTP taking long time in Rules

$
0
0

Dear Guru's,

Design ..

RSCRM-BAPI ... query loading to a Table .

DTP loading from a table to cube . Indexes being deleted before loading.

Total records - 11 million ( monthly stock figures for all plants ).

Normally it used to take 2 days to finish it. But now its running for 4 days plus and loaded only 6.5 + million records.

The time taken in the rules for initial data packages was 45sec... slowly it increases to 1 min and then to 3 min .. now it is taking 1hr 40 min for each data package .

DTP settings:

The package size corresponds to package size in source It is determined dynamically at runtime. it is calculating as 20492

parallel packages = 3 .

 

Below is the code in the start routine .

 

If there is any modification required, kindly help .

 

 

                                                                                                                                                                                                                                DATA : v_id TYPE sysuuid_c,

           v_ts TYPE timestamp,

          v_vlow TYPE rrtmemnam.

*To get latest successful request from RSCRMMON

    SELECT a~batchid  a~timestamp

     INTO (v_id, v_ts)

     FROM ( ( rscrmmon AS a INNER JOIN rscrmparams AS b

              ON a~batchid =  b~parid )

            INNER JOIN rscrmbatvar AS c

              ON a~batchid = c~barepid )

    WHERE a~status = 'SUCC'

      AND c~var_nam = 'PORG'  " Purchase org

      AND c~varlow  = 'COCD'   " compaby code

    ORDER BY a~timestamp DESCENDING.

      EXIT.

    ENDSELECT.

*To get relevant aging date from selection (Varibales used)

    IF NOT v_id IS INITIAL.

      SELECT SINGLE varlow

           INTO v_vlow

           FROM rscrmbatvar

           WHERE barepid = v_id

           AND var_nam = 'ZAGE_FDO'.

      IF sy-subrc = 0.

        v_sage = v_vlow.

      ELSE.

        CONCATENATE sy-datum+0(6) '01' INTO v_sage.

      ENDIF.

    ELSE.

      CONCATENATE sy-datum+0(6) '01' INTO v_sage.

    ENDIF.

 

*To get Vendor

 

    LOOP AT SOURCE_PACKAGE INTO wa_source.

      IF wa_source-dim0loc_currcy EQ '#'.

        wa_source-dim0loc_currcy = ''.

        MODIFY SOURCE_PACKAGE FROM wa_source INDEX sy-tabix.

      ENDIF.

      MOVE: wa_source-dim0material TO wa_matpo-material,

            wa_source-dim_navatr001 TO wa_matpo-purorg.

      COLLECT wa_matpo INTO i_matpo.

    ENDLOOP.

 

    IF NOT i_matpo[] IS INITIAL.

      SELECT material /bic/yxx_ch031 /bic/yxx_ch030

      FROM /bic/pyxx_ch031

        INTO TABLE i_regven

        FOR ALL ENTRIES IN i_matpo

        WHERE material = i_matpo-material

          AND /bic/yXX_ch031 = i_matpo-purorg

          AND objvers = 'A'.

      SELECT material base_uom FROM /bi0/pmaterial

             INTO TABLE i_uom

             FOR ALL ENTRIES IN i_matpo

             WHERE material = i_matpo-material

               AND objvers = 'A'.

    ENDIF.

*To get Recon GL Code

    i_regven_gl[] = i_regven[].

    DELETE i_regven_gl WHERE regven IS INITIAL.

    IF NOT i_regven_gl[] IS INITIAL.

      SELECT * FROM /bic/pyxx_ch039

      INTO TABLE i_recgl

      FOR ALL ENTRIES IN i_regven_gl

      WHERE comp_code = i_regven_gl-purorg

        AND /bic/yxx_ch039 = i_regven_gl-regven

        AND objvers = 'A'.

    ENDIF.

*$*$ end of routine - insert your code only before this line         *-*

 

 

 

 

In the Transformation rules : there is no complicated code . It just replaces # with ' ' ( Blank ) for 10 characteristics.

 

please help.

Thanks & Regards,

Sudhir.


Viewing all articles
Browse latest Browse all 6437

Trending Articles



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