I am creating formated search for business partner.I want to set SUNDRY DEBTORS DEALERS as Accounts Receivable when I select business partner type as customer and group as dealer.For else part I want to set SUNDRY DEBTORS CUSTOMERS as Accounts Receivable.For this I have used this query,
if (select top 1 GroupCode from ocrd where GroupCode=126 and CardType='C')=126
Select top 1 Segment_0 + '-'+Segment_1 '-'Segment_2 from OACT AS A,OCRD As B,
OCRG AS C Where B.CardType='C' and B.GroupCode=126 and A.AcctCode=B.DebPayAcct and
A.AcctCode='_SYS00000000256'
else
Select Segment_0 + '-'+Segment_1 '-'Segment_2 from OACT Where
AcctCode='_SYS00000000258'
I want to pass the value of group from the dropdown provided in business partner master data instead of GroupCode=126 .I want to pass the value from the dropdown of group as parameter in the query.