10-30-2007 8:34 AM
Hi,
I am using these queries one after other but can anybody tell me how to use
FM CHANGEDOCUMENT_READ_HEADERS and CHANGEDOCUMENT_READ_POSITIONS in place of these queries?
A) select objectclas
objectid
changenr
udate
into table i_cdhdr
from cdhdr
client specified
for all entries in i_data
where objectclas = c_lieferung
and objectid = i_data-vbeln
and udate in so_udate
and ( tcode = c_vl02n or
tcode = c_vl02 )
and change_ind = c_u.
B) Select objectclas
objectid
changenr
fname
into table i_cdpos
from cdpos
client specified
for all entries in i_cdhdr
where objectclas = c_lieferung
and objectid = i_cdhdr-objectid
and changenr = i_cdhdr-changenr
and tabname = c_likp
and fname in r_fname
and chngind = c_u.
10-30-2007 8:56 AM
Use the below details for calling : CHANGEDOCUMENT_READ_HEADERS
OBJECTCLASS c_lieferung
OBJECTID = i_data-vbeln
USERNAME = sy-unam
DATE_UNTIL = sy-datum
call other FM also in similar way.
10-30-2007 9:47 AM
I am using the first query and then the FM with following entries.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
CHANGENUMBER =
IMPORTING
HEADER =
EDITPOS = icdshw
But I am not getting the records while using the query I was getting records.
Pls suggect me..
10-30-2007 1:12 PM
Try using FM CHANGEDOCUMENT_READ instead:
call function 'CHANGEDOCUMENT_READ'
exporting
objectclass = c_lieferung
objectid = i_data-vbeln
tables
editpos = change_doc_int
exceptions
no_position_found = 01
wrong_access_to_archive = 02.
Rob