cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Article id in CCO manager data base

0 Likes
337

Hello,

I wrote a query to view sales transaction from CCO manager data base,

I could find article description but couldnt found anywhere the article id is stored,

can you please tell me in which table the article of the sales transaction is stored:

select

t0.POS_SYSTEM_ID as'point of sale code',

t0.id as'receipt code ',

t1.[DESCRIPTION] as'item name',

sum(t1.QUANTITY)as'quantity',

t1.UNITGROSSAMOUNT as'unit price',

t0.DISCOUNTAMOUNT as'discount',

t0.TOTALGROSSAMOUNT as'total before discount and tax',

t0.TOTALTAXAMOUNT,

t0.TOTALNETAMOUNT as'total net',

t0.BUPAEXTERNALID as'customer code'

from [CCOCS].[RECEIPT] t0 innerjoin [CCOCS].[SALESITEM] t1 on t0.OBJECTKEY=t1.RECEIPT_OBJECTKEY

where t0.POS_SYSTEM_ID='P001'

groupby t0.POS_SYSTEM_ID ,

t0.id ,

t1.[DESCRIPTION] ,

t1.UNITGROSSAMOUNT ,

t0.DISCOUNTAMOUNT ,

t0.TOTALGROSSAMOUNT ,

t0.TOTALTAXAMOUNT,

t0.TOTALNETAMOUNT ,

t0.BUPAEXTERNALID

Kind regards

Nir

Accepted Solutions (1)

Accepted Solutions (1)

anderson_schmitt
Product and Topic Expert
Product and Topic Expert

Hello Nir,

You can find the Article ID in the table MATERIAL, column EXTERNALID

In your query, it is necessary to create a new join and link it with the table SALESITEM.

E.g.

left join [CCOCS].MATERIAL t2 on t1.mat_key = t2.OBJECTKEY

If your question in answered, kindly select the answer as "Right Answer". This helps other member of the community to follow and easily locate answers.

Anything else, please let us know.
Best regards,
Anderson Schmitt

Answers (0)