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

Access CDPOS table

Former Member
0 Likes
619

Hi everyone,

I have a requirement that is to get the user that made the last modification on a Purchase Requisition item. For that I made a select on the cdpos table. But this table is huge. I placed a lot of AND's on the code to get a little more performance but this select is taking a lot of time.

Isn't there another way to access this table?

If not, is there another way to improve my select?

CONCATENATE '100' it_items-banfn it_items-bnfpo INTO lv_tabkey.

SELECT changenr UP TO 1 ROWS FROM cdpos INTO CORRESPONDING FIELDS OF TABLE it_cdpos

WHERE objectid = it_items-banfn

AND objectclas = 'BANF'

AND tabkey = lv_tabkey

AND CHNGIND = 'U'.

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
557

Try to get the document change number (CHANGENR) from the CDHDR table for OBJECTCLAS and OBJECTID. Then use this change number to access the CDPOS table.

Regards,

Naimesh Patel

2 REPLIES 2
Read only

naimesh_patel
Active Contributor
0 Likes
558

Try to get the document change number (CHANGENR) from the CDHDR table for OBJECTCLAS and OBJECTID. Then use this change number to access the CDPOS table.

Regards,

Naimesh Patel

Read only

0 Likes
557

Thank you.

It's much better now.