cancel
Showing results for 
Search instead for 
Did you mean: 

Formatted Search for Service Type Invoice

krishnam_mathur
Explorer
0 Kudos

Hi Friends,

My problem is I have formatted search on Invoice Document number, to get the same number as delivery document number.

select t1.docnum from odln t1 where t1.docnum=(select $[$38.44])

This code works fine for Item Type Document, but not working for Service type.

Can anyone please help fix this for both type of documents.

Accepted Solutions (1)

Accepted Solutions (1)

kvbalakumar
Active Contributor
0 Kudos

Hi,

At Invoice lines, please make sure the BaseRef column is visible!

And, FMS query can be simplified as below

Select $[INV1.BaseRef]

OR , you can try this too

SELECT CASE WHEN $[$3.0.0] = 'I' THEN $[$38.44] ELSE $[$39.24.0] END

Regards,

Bala

krishnam_mathur
Explorer
0 Kudos

Thanks BalaKumar

SELECTCASEWHEN$[$3.0.0]='I'THEN$[$38.44]ELSE$[$39.24.0]END

This is working for document number. Can you help me with the posting date also..? I am facing similar issue. When Delivery is Service Type, the posting date is not getting copied..

kvbalakumar
Active Contributor

After selection of Delivery document number, it is quite easy to fetch the Delivery document date based on the document number from OINV.

Check the query below, but make sure to execute after getting Delivery document number at Invoice.

Select DocDate from ODLN where DocNum = $[ODLN.DocNum]

Regards,

Bala

krishnam_mathur
Explorer
0 Kudos

Thanks bro!

Answers (6)

Answers (6)

azizelmir
Contributor
0 Kudos

Hi Krishnam,

As per the above screenshots, you must use this FMS:

Select $[$38.44]

Please check it and let me know.

Thank you,

Aziz

azizelmir
Contributor
0 Kudos

Hi Krishnam,

Invoice Document with service type should be based on Delivery Document with Service Type.

Is this the case ? If yes, the formatted search must give you the Delivery Document number in your Invoice.

Thank you,

Aziz

krishnam_mathur
Explorer
0 Kudos

Hi Aziz,

Below is the screenshot. Please help me out.

azizelmir
Contributor
0 Kudos

Hi Krishnam,

"My problem is I have formatted search on Invoice Document number, to get the same number as delivery document number.

select t1.docnum from odln t1 where t1.docnum=(select $[$38.44])

This code works fine for Item Type Document, but not working for Service type. "

Please make sure that you have Delivery documents with Service type.

Thank you,

Aziz

krishnam_mathur
Explorer
0 Kudos

Hi Aziz,

Thanks for your reply. when the delivery document is Service Type the above query do not work, neither it gives any error. However its working fine for Item Type delivery document

agustin_marcoscividanes
Active Contributor
0 Kudos

Hi

in the service document, you have to use $[$39.24] for base ref in the invoice form, and $[$39.25] for the base key.

Kind regards

Agustín

krishnam_mathur
Explorer
0 Kudos

I am not able to get..

Baseref is a column in DLN1, i cannot find basekey

can you please provide me the query..?

agustin_marcoscividanes
Active Contributor
0 Kudos

Hi

when is it giving the error?

Kind regards

Agustín

krishnam_mathur
Explorer
0 Kudos

When i used below query, for item type AR invoice is getting the delivery document number. But service type no.

select t1.docnum from odln t1 where t1.docnum=(select $[$38.44])

When I use below query, neither Service nor Item type are getting the delivery document number.

select t1.docnum from odln t1 where t1.docnum=(select $[$39.44])

agustin_marcoscividanes
Active Contributor
0 Kudos

Hi

you have to create a new FMS, and instead 38 write 39.

Kind regards

Agustín

krishnam_mathur
Explorer
0 Kudos

This is giving error