cancel
Showing results for 
Search instead for 
Did you mean: 

best way to join CDHDR and CDPOS

Former Member
0 Kudos

Howdy,

I neeed to get some change documents for a customer and so I was thinking of joining CDHDR and CDPOS.

Don't suppose anyone could tell me the bset way to join CDHDR and CDPOS?

would this be okay (dunno which was round to put CDHDR and CDPOS 😞

SELECT *

INTO TABLE itab_change

FROM cdhdr INNER JOIN CDPOS

ON cdhdrobjectid = cdposobjectid

WHERE

objectclas = 'DEBI'

objectid = p_kunnr.

Accepted Solutions (0)

Answers (2)

Answers (2)

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Steve,

CDPOS is a cluster-table -> no join!

But logically complete key of CDHDR has to be equal in CDPOS.

From performance point of view, own database selection can be faster - otherwise FM will be easier.

Regards,

Christian

Former Member
0 Kudos

Hii,

Also try function module

CHANGEDOCUMENT_READ_POSITIONS.

Regards,

Amit Trivedi

Former Member
0 Kudos

<i>Look for FM's CHANGEDOCUMENT or something similar. There is no need to do a select query.</i>

Also refer the help:

http://help.sap.com/saphelp_47x200/helpdata/en/2a/fa01d0493111d182b70000e829fbfe/frameset.htm

The FM is <b>CHANGEDOCUMENT_READ</b>

Regards,

Subramanian V.

Message was edited by: Subramanian Venkateswaran