cancel
Showing results for 
Search instead for 
Did you mean: 

Lead

06-17-2010 11:36 AM
233 views 2 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi

Can we create Sales Quotation / Sales Order if business type is Lead . If i want that user should not be able to create Sales Quotation / Sales Order if businnes partner type is Lead. What can be done . if through stored procedure what it will be

Thanks

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

former_member196081
Active Contributor
0 Likes

Hi

Try this for sales order.......

if @object_type = '17' and @transaction_type in (N'A', N'U')

begin

-- in variable @list_of_cols_val_tab_del is cardcode of BP

if exists (Select t1.cardtype from ocrd t1 inner join ordr t0 on t1.cardcode = t0.cardcode where t0.docentry=@list_of_cols_val_tab_del and t1.cardtype = 'L')

begin

select @error =1

select @error_message = 'Lead not allowed'

end

end

same you can customize for quotation

regards

Deepak Tyagi

Answers (1)

Answers (1)

ashutosh_tomar
Contributor
0 Likes

Hi Manish,

Try this for Quotation:

IF @Transaction_type = 'A' AND @Object_type='23'

BEGIN

IF EXISTS

(

SELECT T0.CardType FROM OCRD T0

INNER JOIN OQUT T1 ON T0.cardCode=T1.CardCode

WHERE T0.DocEntry = @list_of_cols_val_tab_del

AND (T0.CardType = 'L')

)

BEGIN

SELECT @Error = 1,

@Error_message = 'Bussiness Partner is Lead type, You can not add Document !'

END

END

Regards