‎2009 May 07 4:08 PM
Hi experts,
I need to fetch the UTIME,UDATE and TCODE from CDHDR table and field TABNAME from the table CDPOS table by passing or joining the PO tables (EKKO and EKPO) values.
Could any one show me how to do this with out effecting the performance.
If I pass ebeln to objectid of CDPOS table I am getting multiple entries , so will i need to join with EKPO or EKKO . I am confused on this.
Thanks in advance
sai
‎2009 May 07 4:15 PM
CDPOS is a cluster table , you cannot put a JOIN in this table.
a®
‎2009 May 07 4:20 PM
Hi
Pass Object Class = EINKBELEG and Tabname = EKKO or EKPO in CDPOS table and fetch the needed fields
If not pass the Object Class = EINKBELEG and Date(if you know) to CDHDR, take the Changenr and objectid and pass to CDPOS and fetch the required fields
Edited by: Anji Reddy Vangala on May 7, 2009 5:20 PM
‎2009 May 07 4:23 PM
Hi sai,
try this way to get the Change time and date for the Purchase orders...
SELECT * FROM cdhdr INTO TABLE change_tab
WHERE objectclas = 'EINKBELEG'
AND objectid = ekpo-ebeln.
SORT change_tab.
CONCATENATE sy-mandt ekpo-ebeln ekpo-ebelp INTO itemstring.
LOOP AT change_tab.
SELECT * FROM cdpos WHERE objectclas = 'EINKBELEG' AND
objectid = ekpo-ebeln AND
changenr = change_tab AND
( tabname = 'EKKO' OR
tabname = 'EKPO' ) .
ENDLOOP.
regards,
Prabhudas