cancel
Showing results for 
Search instead for 
Did you mean: 

Delivery Date in Invoice Form

Former Member
0 Kudos
599

Hello, has anybody an idea how to print the Date of the delivery in the invoice? This is necessary in germany. I did´t find an variable in INV1 or in OINV. Am i blind again, or must i create an userfield in the Invoice?

thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

FOA
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Andre,

In table INV1 the field is called ShipDate. You can display it int the matrix selecting the "Form Settings" and enable the "Del.Date" Column.

In the DI API corresponds to the property "DocDueDate" while processing a Delivery document.

Help:

DocDueDate Sets or returns the document due date (for example, Delivery Date in sales orders, Value Date in invoices, Valid To in quotations, and so on).

Let me know if you have further questions.

Regards,

Felipe

barend_morkel2
Active Contributor
0 Kudos

Hi Andre,

The delivery date will only be in the Delivery document.

Thus if you create a Invoice "from scratch" and don't access a delivey doc as a base document - you won't have a delivery date.

If the invoice was created using a delivery doc as a base - you can query the ODLN table to get the delivey date (DocDueDate). Obviously you'll use the BaseEntry, and BaseLine from INV1 to get the correct delivery line info to query ODLN.

Former Member
0 Kudos

"Thus if you create a Invoice "from scratch" and don't access a delivery doc as a base document - you won't have a delivery date."

Sure in Germany then is the Invoice Date the Delivery Date.

"If the invoice was created using a delivery doc as a base - you can query the ODLN table to get the delivey date (DocDueDate). Obviously you'll use the BaseEntry, and BaseLine from INV1 to get the correct delivery line info to query ODLN."

I thought like this, i am just wondering that SAP doesn't confirm with the german law about invoice printing....

AlexGrebennikov
Active Contributor
0 Kudos

Hi Andre!

It's not so difficult to implement your task.

1. write an query to retrieve ShipDate from Delivery

it could be like following lines:

[code] IF $[INV1.BaseType] = 15

BEGIN

SELECT

T0.DocDueDate -- <i>or T0.DocDate</i>

FROM

ODLN T0

WHERE

T0.DocEntry = $[INV1.BaseEntry]

END

ELSE

BEGIN

SELECT $[OINV.DocDate]

END[/code]2. Create UDF for Invoice matrix

3. Link the Query to that field (autoexecuting on ItemCode column)

That's it!

Hope it'll help..

Former Member
0 Kudos

hmm sonething doesn´t work

T0.DocEntry = $[INV1.BaseEntry] makes error!

cause T0.DocEntry is like 0 or 1 or 2

and $[INV1.BaseEntry] is like 0,00 or 1,00 etc...

AlexGrebennikov
Active Contributor
0 Kudos

It's strange occurrence, but try[code] WHERE

T0.DocEntry = CAST($[INV1.BaseEntry] as Int)[/code]