on 06-04-2015 4:59 AM
Hi
Every One
Bellow Sp is Not Working ,,Any One help to Correct it
if @object_type='18' and @transaction_type='A'
Begin
if exists(SELECT DISTINCT 'TRUE' FROM OPCH T0 INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode WHERE T2.[ItmsGrpCod] IN ('117','110') AND T1.[TaxCode] IS NULL AND T0.[DocType] ='I' AND T1.DocEntry= @list_of_cols_val_tab_del)
Begin
set @error = '-2'
set @error_message = 'TAX Code is NOt Applicable For METAL AND SAND.... '
end
End
----RAMUDU
Hi Ramdu,
Please check this area.
"AND T1.[TaxCode] IS NULL "
Please give specific tax codes which is/ are not applicable.
SAP B1 won't allow to add AP Invoice without tax code.
Thanks
Unnikrishnan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
it not working sp
if @object_type='18' and @transaction_type='A'
Begin
if exists(SELECT DISTINCT 'TRUE' FROM OPCH T0 INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode WHERE T2.[ItmsGrpCod] IN ('117','110') AND T1.[TaxCode] <>'ZERO'AND T0.[DocType] ='I' AND T1.DocEntry= @list_of_cols_val_tab_del)
Begin
set @error = '-2'
set @error_message = 'TAX Code should be "Zero" For METAL AND SAND... '
end
End
The Document is Directly Added , if i took other Tax code ...
Please try below TN
if @object_type='18' and @transaction_type='A'
Begin
if exists(SELECT T0.DocEntry
FROM OPCH T0
INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
WHERE T2.[ItmsGrpCod] IN ('117','110')
AND T1.[TaxCode] <>'ZERO'
AND T0.[DocType] ='I' AND T0.DocEntry= @list_of_cols_val_tab_del)
Begin
set @error = '-2'
set @error_message = 'TAX Code should be "Zero" For METAL AND SAND... '
end
End
Thanks
Unnikrishnan
Hi Ramdu,
Try this...
Begin IF Exists(SELECT DISTINCT 'ERROR' FROM OPCH T0 INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode WHERE T2.[ItmsGrpCod] IN ('117','110') AND T1.[TaxCode] <>'ZERO'AND T0.[DocType] ='I' AND T0.DocEntry= @list_of_cols_val_tab_del) Begin set @error = '-2' set @error_message = 'TAX Code should be "Zero" For METAL AND SAND... ' END End
Regards,
SP Samy
Hi,
Please try the below:
if @object_type='18' and @transaction_type='A'
Begin
if exists(SELECT T0.DocEntry
FROM OPCH T0
INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
WHERE T2.[ItmsGrpCod] IN ('117','110')
AND T1.[VatGroup] <>'ZERO'
AND T0.[DocType] ='I' AND T0.DocEntry= @list_of_cols_val_tab_del)
Begin
set @error = '-2'
set @error_message = 'TAX Code should be "Zero" For METAL AND SAND... '
end
End
Regards,
Isaac.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.