cancel
Showing results for 
Search instead for 
Did you mean: 

Select statements used in POSDM Z-implementation

Former Member
0 Kudos

Dear Expert ,

The code being run by  ABAP team is hitting an upper limit.  We had reduced the transaction volumes to 10000 per batch and appears to be running OK. But when loads increase the system deteriorates.  we need to investigate the following.  

  1. 1.       The SQLs are using the indexes. ( Cost Optimizer). need to  re-create all the missing indexes, If any. ( else SQL goes for a table scan.) Need to knw How big this table is and whether an index has an impact is another issue…)
  2. 2.       Regarding the “time-out” error occurring for huge loads, why is a Dialog WP being assigned to run the job? Whereas, it should be typically be assigned to a background WP.

  Could you please help us to investigate and let me know the results. If necessary I may free to turn on the trace in the quality.

Kindly guide us how to proceed with this further ?.

Job :                       ZO_SD_SENDTOBW

Program:             /POSDW/PIPEDISPATCHER,

Variant:                BW

  "Fetch transaction type code from ZTVARVC table
  SELECT var_name var_value
  FROM ztvarvc
  INTO TABLE lt_var
  WHERE prg_name EQ lc_prg_name.

      SELECT plant distr_chan salesorg                "#EC CI_SGLSELECT
      INTO TABLE lt_pplant
      FROM /bi0/pplant
      WHERE plant   = lw_ct_plant-plant AND
            objvers = lc_objvers .

          SELECT ws_datab ws_datbi me_condrt            "#CR
                 salesorg distr_chan                  "#EC CI_SGLSELECT
          INTO TABLE lt_pcondrecno
          FROM /bi0/pcondrecno
          FOR ALL ENTRIES IN lt_pplant
          WHERE objvers = lc_objvers AND
                kschl = lc_cndtyp    AND
                distr_chan = lt_pplant-distr_chan AND
                salesorg   = lt_pplant-salesorg.

The below select is in loop and sort is also in the loop.

              SELECT rt_promo rt_dscdcl ad_name
              FROM  /bi0/prt_promo
              INTO TABLE lt_prt_promo BYPASSING BUFFER
              WHERE rt_prslfrm  LE lv_rt_prslfrm "c_transaction-businessdaydate
              AND rt_prslto   GE lv_rt_prslto ."c_transaction-businessdaydate.

      SELECT plant                                 "#CR
             distr_chan                               "#EC CI_SGLSELECT
             salesorg
        FROM /bi0/pplant
        INTO TABLE lt_plant
        WHERE plant = lw_plant_temp-plant
        AND objvers = lc_objvers.

        SELECT ws_datab                              "#CR
               ws_datbi
               kschl
               material
               me_condrt
               salesorg
               distr_chan
          FROM /bi0/pcondrecno
          INTO TABLE lt_pcond
          WHERE ( ( ws_datab  LE c_transaction-businessdaydate
            AND     ws_datbi  GE c_transaction-businessdaydate )
            AND   ( kschl  = lw_var1-var_value
            OR      kschl  = lw_var2-var_value ) ).

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Madhavan,

It is odd that you would expect someone in SCN, who know nothing about your implementation, would correct errors in, or be willing to redesign, your Z-code

It is even more odd that you would post a query about a POS-DM problem in a Production Planning forum.  I can't think of many SAP subjects that are as unrelated.

I suggest you close this post, and repost in a more appropriate forum, and pray for a very accommodating SCN member. 

BW functional issues at http://scn.sap.com/community/data-warehousing/netweaver-bw

ABAP issues at http://scn.sap.com/community/abap

Best Regards & Good Luck,

DB49