Skip to Content
0
Former Member
Feb 15, 2011 at 02:28 PM

Formatted search

52 Views

Hi

I will be very grateful if someone can help me with this query for a formatted search. The client want the user doing the purchase order to only see certain cost centres. So when a certain user uses SHIFT F2 only a list of certain cost centres must appear for the user to choose from.

So I have this query -

SELECT 'OcrCode' =

CASE

WHEN T0.UserSign = 55 THEN

here I need this list - 'HOS' or 'TO' or 'TBC' or 'MC' or 'LOG'

END

FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry

INNER JOIN OOCR T2 ON T1.OcrCode = T2.OcrCode

INNER JOIN OUSR T3 ON T0.UserSign = T3.INTERNAL_K

WHERE T0.[DocNum] = $[OPOR.DocNum]

But it doesn't work.