Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Select warehouse code from BP master record

Hi Experts

I need some help with a IF statement

basically this is what i wnat to do.

I have created a field on the BP master data record to show the warehouse code which this BP is linked to.

When creating an invoice for items for this BP (where i have defined a warehouse on its master reocrd) i want the warehouse code to be selected from the BP master data record instead of the deafulted warehouse code that automatically come up when you select the item

Can some one help me with the If statement

Start

IF IsNULL (Customer Whse) Read Item Whse

Else Read Customer Whse

End If

Thank you

Regards

Apsara

Former Member
Former Member replied

Hi Apsara,

Try:

SELECT IsNull(T0.U_WH,T1.DfltWH) FROM OCRD T0, OITM T1

WHERE T0.CardCode= $[$4.0.0\] AND T1.ItemCode = $[$38.1.0\]

Thanks,

Gordon

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question