Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

performance

Former Member
0 Kudos

Hi,

i am fetching changenr from cdpos based on the requirement.

Then giving changenr for that material as input i am getting username and date.

I am getting desired result but cdpos is a cluster table so performance issue is there. so pls tell me is there any method or function module.

I am writing querries as follows:-

FORM extract_data_cdhdr.

*

itab_mara1[] = itab_mara[].

SELECT objectclas objectid changenr tabkey

INTO TABLE itab_cdpos

from cdpos

WHERE objectid IN S_MATNR " itab_mara1-objectid

AND TABNAME = 'MARC'

AND FNAME = 'STAWN'.

SORT itab_cdpos BY OBJECTCLAS OBJECTID CHANGENR.

Delete itab_cdpos where NOT tabkey+21(4) IN s_werks.

IF NOT itab_cdpos[] IS INITIAL.

SELECT changenr username udate OBJECTID

INTO TABLE itab_cdhdr

FROM cdhdr

FOR ALL ENTRIES IN itab_cdpos

WHERE OBJECTCLAS = itab_cdpos-objectclas

AND objectid = itab_cdpos-objectid

AND changenr = itab_cdpos-changenr.

if sy-subrc eq 0.

sort itab_cdhdr descending by udate.

SORT itab_cdhdr BY objectid.

endif.

Thanks,

Sandeep Garg

3 REPLIES 3

former_member150733
Contributor
0 Kudos

FM :

CHANGEDOCUMENT_READ_HEADERS - Change document: Read change document header

CHANGEDOCUMENT_READ_POSITIONS - Change document: Read change document items

CHANGEDOCUMENT_READ - Change document: Read and edit change documents

PLANNED_CHANGES_READ_HEADERS - Change document: Read change documentscheduling headers

PLANNED_CHANGES_READ_POSITIONS - Change document: Read and edit scheduling items

Regards,

Anish Thomas

0 Kudos

hi,

i used these function modules but these are asking for changenr.

And i donot have changenr. So i am using cdpos.

So can you tell me what to do.

Thanks,

SK Garg

0 Kudos

Hi Take a look at my blog plz :

/people/erwan.lebrun/blog/2007/03/09/documents-how-to-track-changes-through-abap href="/people/erwan.lebrun/blog/2007/03/09/documents-how-to-track-changes-through-abap:///people/erwan.lebrun/blog/2007/03/09/documents-how-to-track-changes-through-abap

Hope this helps,

Erwan