Hiding selective fields in a report based on other field in the same report
I am trying to create a report of the inventory items. 2 of the fields in the report would be the sale price of the item, and one of the properties (prop1) from the Item Master Property tab.
Depending on whether Prop1 is Y/N, the price of the item should be displayed.
If Prop1 = N, Price is displayed
If Prop1 = Y, Price gets hidden
Using queries, is it possible to create this kind of reports?
I am using SAP 2005b PL 42.
Thanks for any suggestions....
Suda Sampath replied
It is definely possible !!
If you have already created your query pls paste the same here so that I can help you otherwise. I will give you a general guidelines and you can take it from there..
Using the CASE Statement inside your SELECT you can achieve this.
SELECT T1.ItemCode AS 'Item No.', T1.ItemName AS 'Item Description', CASE WHEN T1.QryGroup1 = 'N' THEN T0.Price ELSE 0 END 'List Price' FROM [dbo].[ITM1] T0 INNER JOIN [dbo].[OITM] T1 ON T1.ItemCode = T0.ItemCode WHERE T0.PriceList = 1