Application Development and Automation 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: 
Read only

cdhdr

Former Member
0 Likes
430

I need to join cdhdr and cdpos to obtain

From date From time To date To time

10.05.2008 5:12:40 Today Now

01.03.2008 1:24:20 10.05.2008 5:12:40

....

....

....

The series need to be like this.

How can I do this.

2 REPLIES 2
Read only

Former Member
0 Likes
391

Hi,

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.

There is no need to do a select query.

Also refer the help:

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

Regards

Kiran Sure

Read only

Former Member
0 Likes
391

Hi..

You can collect data from CDHDR table in internal table then loop at CDHDR internal table. call function module CHANGEDOCUMENT_READ_POSITIONS. pass cdhdr-changenr to FM and get values from CDPOS.

check below logic.

SELECT objectid "Object value

changenr "Document change number

udate "Creation date of the change document

utime "Time changed

username "Name of the person responsible in change document

INTO TABLE lt_cdhdr

FROM cdhdr

WHERE condition.

LOOP AT lt_cdhdr INTO ls_cdhdr.

  • Calling FM to get values from CDPOS

CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'

EXPORTING

changenumber = ls_cdhdr-changenr

TABLES

editpos_with_header = lt_cdred

EXCEPTIONS

no_position_found = 1

wrong_access_to_archive = 2

OTHERS = 3.

LOOP AT lt_cdred INTO ls_cdred.

statements...

ENDLOOP. "loop at lt_cdred

ENDLOOP. "loop at Lt_cdhdr

Regards,

N M Poojari.