cancel
Showing results for 
Search instead for 
Did you mean: 

How to differentiate open AR Reserve Inv from one cancelled by Credit Note?

Private_Member_370152
Participant
0 Kudos

Hi,

If I have two AR Reserve Invoices:

AR Reserve Invoice 1

-------------------------------

Create AR Reserve Invoice --> Copy to Delivery Order

AR Reserve Invoice 2

-------------------------------

Create AR Reserve Invoice --> Copy to Delivery Order --> Credit Memo

How do I differentiate these 2 invoices from looking at the OINV tables?

I know that you can see from SAP screen that Invoice 1 will show status as "Delivered",

while Invoice 2 will show status as "Closed"

But how do I tell from the tables if it is "Delivered" or "Closed"?

Thanks!

Ivan

Accepted Solutions (1)

Accepted Solutions (1)

azeemhafeez
Active Participant
0 Kudos

Hi Ivan,

Try this Query, hope this will solve your problem:

SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T1.ITEMCODE, T1.DSCRIPTION, T1.LINETOTAL, CASE T1.[TargetType] WHEN '-1' THEN 'Open' WHEN '15' THEN 'Delivery Order' WHEN '16' THEN 'Return' WHEN '14' THEN 'Credit Memo' else 'NA' end as 'Status'

FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.[DocDate] >=[%0] AND  T0.[DocDate] <=[%1]

Regards,

Azeem

Private_Member_370152
Participant
0 Kudos

Hi Azeem,

Okay thank you!

I see that that what I should look at is the TargetType column.

Thanks Kennedy for your suggestion too!

Regards.

Ivan

Answers (1)

Answers (1)

KennedyT21
Active Contributor
0 Kudos

HI Ivan,

You can check  by-  Does the A/R credit memo has the  A/R Reserve invoice DocNumber in the BaseDoc num in the Credit memo Lines.

Regards

Kennedy

Private_Member_370152
Participant
0 Kudos

Hi Kennedy,

Okay thanks for the reply.

I was thinking is there any easier way, because the way you suggested I will still have to compare with the AR Credit Memo table.

Thanks!

Ivan

KennedyT21
Active Contributor
0 Kudos

HI Ivan,

I think does not have any other way.

Regards

Kennedy