Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

performance issue cdpos table

Hi All

I am facing performance issue with cdpos table.cdhr table is fine.

SELECT objectclas objectid udate changenr FROM cdhdr INTO TABLE gt_cdhdr

    WHERE objectclas = c_objclas AND udate = sy-datum.

  IF gt_cdhdr[] IS NOT INITIAL.

    SELECT objectid value_new  value_old changenr FROM cdpos INTO TABLE gt_cdpos

                         FOR ALL ENTRIES IN

                         gt_cdhdr WHERE

                         objectclas = c_objclas AND

                         tabname = c_tabname AND

                         fname = c_fname AND

                         changenr = gt_cdhdr-changenr.

c_objclass of cdhdr,cdpos are equal.

Please help on this.

Thanks

Vamsi

Former Member
replied

Hi,

If CDHDR is known then use OBJECTID  .

DATA: it_cdhdr TYPE TABLE OF cdhdr .

SELECT * INTO TABLE it_cdhdr
FROM cdhdr
WHERE
objectclas IN s_class AND
udate      IN s_udate AND
tcode      IN s_tcode .

CHECK it_cdhdr IS NOT INITIAL .

DATA: it_cdpos TYPE TABLE OF cdpos .

SELECT * INTO TABLE it_cdpos
FROM cdpos
FOR ALL ENTRIES IN it_cdhdr
WHERE
objectclas EQ it_cdhdr-objectclas AND
objectid   EQ it_cdhdr-objectid   AND
changenr   EQ it_cdhdr-changenr   AND
tabname    IN s_tabnm  AND
chngind    IN s_chngi  .

regards.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question