cancel
Showing results for 
Search instead for 
Did you mean: 

Link Sales Order to AR Invoice

Former Member
0 Kudos

Hey everyone,

I imported historical data for one of my clients, Sales Orders and AR invoices, and they would like to have them linked so they can view them together in the Relationship Map.

My question is, what field do I have to fill in on the AR Invoice to link it to a Sales Order?

Any help will be appreciated, thanks!

Accepted Solutions (1)

Accepted Solutions (1)

former_member212181
Active Contributor

Hi John,
At the time of importing Invoices into SAP B1 thru DTW, you have to mention base type, base entry, base line no in INV1 table.
Base type of AR Invoice may be sales Quotation , Sales Order and Sales Delivery.


if you do this in this way, system will automatically close base document and you can see relation ship map also.

If you didnt do this, Sales order(or any base document) will remains open.

Thanks & regards

Unnikrishnan

Answers (2)

Answers (2)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

From sales order to Invoice:

ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry left join  INV1 T2 on  T2.[BaseEntry]  = T1.[DocEntry] and T2.[BaseLine]  = T1.[LineNum]

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

The fields to link are under Target Doc Entry from Sales Order Line (RDR1) and Base entry and base line in Invoice Line table (INV1).