cancel
Showing results for 
Search instead for 
Did you mean: 

Changing posting date based on BaseRef

0 Kudos
278

Hi Experts,

I want a query to use it for FMS to change the posting date of a "Delivery" (ODLN) based on the posting date of an "AR Reserve Invoice" (OINV) linked by a field in DLN1 called "Base Ref." $[$38.44.0] = OINV."DocNum".

However, if the user creates a new delivery from scratch (not using "Copy To" function) that is not linked to an "AR Reserve Invoice" the system should not give an error.

This field ("Base Ref.") should have the same value in all lines (if there's more than one line/item) and if the value is not the same then the query does nothing.

So the date will only be changed if its linked to a specific "AR Reserve Invoice"

Thank you in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

LoHa
Active Contributor
0 Kudos

Hi Yahya,

you want to do the Magic in a Header Field, but you can't get the informations from the lines, from there, because the Data is not written in the tables

regards Lothar

LoHa
Active Contributor
0 Kudos

Hi Yahya,

can you please show your FMS

regards

Lothar

0 Kudos

Hey Lothar,

This is the query I wrote:

Select Distinct(OINV."DocDate") from ODLN

Inner Join DLN1 On ODLN."DocEntry" = DLN1."DocEntry"

Inner Join OINV on OINV."DocNum" = $[$38.44.0]

but it doesn't take into consideration if $[$38.44.0] is the same for all rows in this Delivery.