cancel
Showing results for 
Search instead for 
Did you mean: 

ADOC Query

Former Member
0 Kudos

Hi,

We need to query the ADOC table to see if a SAles User has any linked documents ie we need to check open/close documents referring to him?

We just need to check the ADOC for this one user but not sure what query will do it ?

Look forward to your reply,

MB

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

The first thing you need to clarify is: what Sales Users are you referring? If it is a user in sales department, it is still a normal user with user code and user name available from OUSR. Run a simple query SELECT * FORM OUSR to see. You will find out the User ID there if it is a normal user.

Thanks,

Gordon

former_member204969
Active Contributor
0 Kudos

I think you are referring to a sales employee. First you can run a query to determine the SlpCode . Run the

Select * from OSLP

query and use the sales employee code you see here in the next (or a similar) query:

SELECT T0.[DocNum], T0.[ObjType], T0.[DocDate],
   T0.[CardCode], T0.[SlpCode] 
FROM ADOC T0 
WHERE T0.[SlpCode] =1

(Replace the 1 with the SlpCode you saw in the first query.)

Edited by: István K#rös on Feb 10, 2010 5:32 PM