SP_Transaction Notification to prevent -ve Stock at WHS
Dear All,
At our client place they have 10 Warehouses located in different locations .For preventing and blocking the users to raise any Sales Order and Delivary documents when the avilable stock is Zero and the A/R Invoice qty is higher than the available Stock in the warehouse .
Any SP_TR code for this other than the Basic settings in SAP B1 2007.
Thanks ,
Santosh
Hi Wish u Happy New year
First Enable the Block Negative Qty in ADMIN-Doc. setting ..ALso Enable the manage inv. by whse. Also in Inventory maser data inventory tab enable manage inv by whse...It will help u to manage min level and max level maintaning stock....
ALso enable the Automatic Item availablity check in document setting- per docu- sales order
SO whenever u r making the So if inventory is low then it will pop ups one screen the Item availlability check...
when ur making delivery and Invocie SAP will not allow th post if the invenory is lower in whse...
Giri
Similar Messages
-
Error Message in SP_Transaction Notification
Dear Experts,
is it possible to include for example the row number or the item code into the error message from the SP_Transaction Notification?
I have edit the SP to avoid that items with property 3 can be used in Sales Order. It works fine, but if there are 50 items or more in a sales order, it is very hard for the user to find out which item or which row number is mean.
Thanks,
JacquelineHi Jacqueline,
It may be possible to include dynamic values in the SP error however what if you have mutliple rows with Property 3?
What you coud do is add a UDF to the marketing lines, then apply the following formatted search to the field;
SELECT T0.\[QryGroup3\] FROM OITM T0 WHERE T0.\[ItemCode\] = $\[$38.1.0\]
Have it auto-refresh when the item code or name changes, this will then copy either N or Y to the field, all the items with Y in this new field will have property 3 set so the user can easily identify it.
Regards,
Adrian -
Transaction Notification to Prevent Duplicate Barcodes
Hi,
I please need a transaction notification to prevent users from using the same bar code on more than one item i.e. barcode xyz may only appear once in the codebars field in oitm.
Thanks
JacquesI assume you want to allow the empty bar code field.
Then nsert this in your SBO_SP_TransactionNotification stored procedure after the line
-- ADD YOUR CODE HERE
If @object_type = '4' and @transaction_type in ( 'A','U')
BEGIN
declare @B nvarchar(16)
set @B=(Select isnull(I.CodeBars,'') From OITM I
Where I.ItemCode=@list_of_cols_val_tab_del)
If @B!='' and exists
(Select I.CodeBars From OITM I
Where I.CodeBars=@B and I.ItemCode!=@list_of_cols_val_tab_del)
Select @error =12, @error_message = 'Duplicate bar code !!'
END -
Userexit to prevent negative stock in Sales order
Hi
Is there any userexit avilable to prevent negative stock in sales order.
When i an creating a sales order, the schedule lines are getting confirmed without posting any stock. In availablity check when click on ATP quantity it shows negative stock.
Despite having negative stock it is alllowing me to create sales order and create delivery but no PGI. It gets block at PGI. Now i want to know is there any Userexit through which i can prevent negative stock in sales order. Thats ig stock in negative , it should not allow to save the sales order.
Any help will be really useful.
Regards
Jalaj NakraExit MV45AFZZ will be useful.
-
Sp_Transaction Notification For Purchase Order Item Checking
Hello All,
I need to create a sp_Transaction notification for Purchase Order where system will check that the document to be added
with Vendor 'A' and ItemCode 'ERT' should not be be previously added for the same vendor 'A.
Example:-
Doc No. Vendor Item Code
1 A ERT
Is added
Next if the Purchase Order is added with same vendor and same Item then system should block the entry and throw a message
'Purchase Order Already Entered for Vendor 'A' with Item Code 'ERT'"
This checking will be done for each line item of currently entered Purchase Order Document.
Thanks ,
AmitHi Amit,
i found this on forum. Try this,
if @object_type = N'22' and @transaction_type in (N'A', N'U')
begin
declare @line1 int
declare @lin1 int
declare @out1 int
Set @out1 = 0
SET @lin1 = 0
Declare @Vend as varchar(200)
Declare @ItemCode as varchar(200)
Select @Vend = CardCode From OPOR Where DocEntry = @list_of_cols_val_tab_del
Select @line1 = Max (LineNum)FROM POR1 WHERE POR1.DocEntry = @list_of_cols_val_tab_del
While @lin1 < @line1
Begin
Select @ItemCode=ItemCode From POR1 Where DocEntry=@list_of_cols_val_tab_del and LineNum = @lin1
if (SELECT COUNT(T0.DocEntry) FROM POR1 T0 inner join OPOR T1 on T0.DocEntry = T1.DocEntry
WHERE T0.ItemCode = @ItemCode and T1.CardCode = @Vend)> 1
Begin
Set @Out1 = 1
Break;
END
Else
Begin
Set @lin1 = @lin1+1
Continue
END
END
Set @lin1 = @lin1 + 1
if @out1 = 1
begin
Set @error = 1
Set @error_message = 'Item Code in line ' + CONVERT(nvarchar(4), @lin1) + N'already Exists For This Vendor!'
End
END
Check this too Stored procedure in purchase order for duplicate item for a vendor
Thanks,
Joseph
Edited by: Joseph Antony on Jan 11, 2011 1:37 PM -
SP_Transaction Notification Query for Transaction Category field
Dear Experts,
I want to make Transaction Category field mandatory under Tax Tab on Sales Order document and being tried SP_Transaction Notification.
Please send me right query or any other solution.....
Thanks.....Hi!
Try this
IF (@object_type = '17')
BEGIN
if (@transaction_type in ('A','U'))
BEGIN
if exists ( Select R0.Docentry from ORDR R0, RDR12 R12 where R0.Docentry=@list_of_cols_val_tab_del and
R0.Docentry=R12.Docentry and (R12.Transcat is Null or R12.Transcat=''))
BEGIN
set @error = 0
END
ELSE
BEGIN
set @error_message='Enter the Transaction Code in Tax Tab'
set @error=1
END
END END
Regards,
[Thanga Raj K|Q3 Wrap-Up: What happened in the third quarter of 2009 in the SAP Business One Community] -
Use SP_Transaction notification for Production Oder
Hi all!
Can i use SP_Transaction notification for Production Order.
We have two user A and B is manager of A.
When A create a production order but A can not use Release function in order to chage status from Planed to Relase.
Only B can Release.
How can use SP_Transaction notification .
Thanks!Import this code into sp_transaction notifocation:
If @object_type =N'202'
begin
If (@transaction_type = N'A')
begin
declare @userBO nvarchar(2)
set @userBO = (select T0.usersign from OWOR T0 where T0.docentry=@list_of_cols_val_tab_del)
if @userBO = '1' --code user 'A'
begin
update OWOR
set status = 'R'
where docentry=@list_of_cols_val_tab_del
end
end
end
Then user A try to add document, click on add button, sp_transaction notification procedure will be executed, and status document will change to 'Released' -
SP_Transaction notification for Cash account non negative value
Hi I wrote the following SP_Transaction notification when cash account is going negative in outgoing payment.its working fine in 2005B.
But it is not working in 2007B.pl any one help me.
IF @transaction_type IN (N'A', N'U') AND (@Object_type = N'46')
BEGIN
if Exists ( select t0.currtotal from oact t0 inner join ovpm t1 on t0.AcctCode=t1.CashAcct
where t0.currtotal <=0 and t1.docentry=@list_of_cols_val_tab_del)
BEGIN
SELECT @Error = 1, @error_message = 'Cash account should not be negative!'
END
END
Edited by: ArulPrakasan P on Nov 21, 2008 1:42 PMNo , ia m not getting any error message in 2007B.
then i tried the following... I restored the 2005B database to 2007B.then it got upgraded to 2007B,then i tried to add the out going payment with the above SP_transactionnotification.
now i got the following error msg...
[microsoft] [sql native client] [sql server] : conversion failed when converting the varchar value '@list_of_cols_val_tab_del' to datatype int
Edited by: ArulPrakasan P on Nov 24, 2008 9:14 AM
Edited by: ArulPrakasan P on Nov 24, 2008 9:15 AM -
Advance Shipping Notification (Inbound delivery ) against stock transfer pu
Is it posible to create Advance Shipping Notification (Inbound delivery ) against stock transfer purchase order?
Pl confirm. and give me document.
Regards,
SanjayHi,
i don't think ur requirment can be mapped in STD SAP &
more over this query should be rasied in either SD or MM forum
best of luck
Regards
kumar -
Notification for iPad in stock?
I'm running out of memory on my iPad 4th generation Retina with 32GB, and I want to upgrade to the 64GB (I don't need the Air and I've already got a case for the 4th gen), but Apple's "Refurbished" page for it is confusing. It says:
http://store.apple.com/us/product/FD515LL/A/refurbished-ipad-with-retina-display -wi-fi-64gb-white-4th-generation
Available to ship: Out of stock
Available for pickup: Ships to Apple Store, [store near me]
So is it available to ship to an Apple Store or is it out of stock?
Is there some way to get notified when it's in stock or reserve it?It is indicating that when it is in stock it can be shipped to a store but is currently out of stock,
there is no alert or notification and refurbished items are not always available, you will simply have to keep checking back periodically. -
How do I add more things to my notification centre? Like stocks?
This is all I have on my notification centre! Can I add more like on the website?
click on Today then edit button on the bottom.
-
SP_transaction notification
Hi All,
What is this SP_transactionNotification? How to use this. I did not find any tabs in the menu for this.
Regards,Check this Link
SP_Tranaction Notification Procedure Explanation
[https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e991e2b9-0901-0010-0395-ef5268b00aaf] -
SP_Transaction notification Production order
Hello All:
I alwasy thought that you can do store procedure against production for some reason, but I just realized that production order OWOR does not have objtype. What can I do to alert user when creating proudction order of certain specific problem and prevent them from doing it?
Sincerely YoursHi ,
Production order type = 202
U can get effect on any change in po order.
IF @transaction_type IN (N'A', N'U') AND
(@Object_type IN ('202'))
BEGIN
SET @error = 10
SET @error_message = N'Check PO Order'
END
Regards,
Avijit -
Sp_transaction notification for serial number duplication
Hi All
I need your help with this sp , i found it here on the portal and its not working 100% please check and see if you guys can assisit me.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER proc [dbo].[SBO_SP_TransactionNotification]
@object_type nvarchar(25), -- SBO Object Type
@transaction_type nchar(1), -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255),
@list_of_cols_val_tab_del nvarchar(255)
AS
begin
-- Return values
declare @error int -- Result (0 for no error)
declare @error_message nvarchar (200) -- Error string to be displayed
select @error = 0
select @error_message = N'Ok'
declare @val nvarchar (1200) -- Error string to be displayed
declare @chrin nvarchar(30)
declare @item nvarchar(455)
declare @SysSer nvarchar(455)
declare @qry nvarchar(255)
declare @IntSer nvarchar(32)
declare @whs nvarchar(8)
declare @count int
declare @base nvarchar(6)
set @count = 0
-- ADD YOUR CODE HERE
IF @transaction_type IN ('A','U') AND (@object_type = '94' )
BEGIN
set @item = LEFT( @list_of_cols_val_tab_del, CHARINDEX(CHAR(9), @list_of_cols_val_tab_del,1) - 1)
set @SysSer = substring(@list_of_cols_val_tab_del, len(@item)+1, 30)
--set @qry = 'select intrserial from osri where itemcode =' + @item + ' and convert(varchar,sysserial) = convert(varchar,' + @SysSer + ')'
select @IntSer = intrserial from osri where itemcode = @item and convert(varchar,sysserial) = convert(varchar,@SysSer)
set @error_message = @IntSer
set @error = 1
select @error, @error_message
END
select @error, @error_message
END
and I have serial number checking on every transactions.
Rgds
BonganiHere is a working SP
declare @val nvarchar (1200) -- Error string to be displayed
declare @chrin nvarchar(30)
declare @item nvarchar(455)
declare @SysSer varchar(10)
declare @qry nvarchar(255)
declare @IntSer nvarchar(32)
DECLARE @count int
set @count = 0
--=========================
--S/N Duplication Check
--=========================
IF @transaction_type IN ('A','U') AND (@object_type = '94' ) -- For Goods Recipts
BEGIN
set @item = LEFT( @list_of_cols_val_tab_del, CHARINDEX(CHAR(9), @list_of_cols_val_tab_del,1) - 1)
set @SysSer = ltrim(rtrim(substring(@list_of_cols_val_tab_del, len(@item)+2, 30)))
select @IntSer = intrserial from osri where itemcode = @item and convert(varchar,sysserial) = @SysSer
SELECT @count = COUNT(*) FROM OSRI WHERE INTRSERIAL = @IntSer
IF @count > 1
BEGIN
set @error = 1
set @error_message = N'Duplicate S/N was found in the system for Item No.' +@item +' S/N : ' + @IntSer
END
END
Regards
Bongani -
SP_TRANSACTION NOTIFICATION GIVING ERROR
Hi Rahul,
I've tried solution provided by you. Actually it was a FMS earlier which worked well. But now we want to roll back SO instead of just notifying it.
here is the code
USE [Audio_Test]
GO
/****** Object: StoredProcedure [dbo].[SBO_SP_TransactionNotification] Script Date: 07/16/2011 16:25:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[SBO_SP_TransactionNotification]
@object_type nvarchar(20), -- SBO Object Type
@transaction_type nchar(1), -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255),
@list_of_cols_val_tab_del nvarchar(255)
AS
begin
-- Return values
declare @error int -- Result (0 for no error)
declare @error_message nvarchar (200) -- Error string to be displayed
select @error = 0
select @error_message = N'Ok'
-- ADD YOUR CODE HERE
IF (@object_type = '2') and (@transaction_type IN ('A', 'U'))
BEGIN
IF exists (select T0.CardCode FROM OCRD T0 Where (T0.GroupNum != 4 Or T0.GroupCode != 116) and (T0.UserSign = 16 or T0.Usersign2 = 16) and T0.CardCode =@list_of_cols_val_tab_del)
Begin
Select @error = -1,
@error_message ='You are not authorized to change payment terms and customer group'
End
END
If (@object_type = '17') and (@transaction_type in ('A' , 'U'))
BEGIN
Declare @Itemcode22 as varchar(255)
Declare @Qty as float
Declare @minline22 int
Declare @maxline22 int
Declare @lastday as datetime
Declare @onhand as float
Declare @openqty_s_order as float
Declare @openqty_p_order as float
set @lastday = GETDATE()
set @lastday = (SELECT CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(DATEADD(mm,1,@lastday))),DATEADD(mm,1,@lastday)),101))
set @minline22 = (select min(T0.linenum) from RDR1 T0 where T0.docentry=@list_of_cols_val_tab_del)
set @maxline22 = (select max(T0.linenum) from RDR1 T0 where T0.docentry=@list_of_cols_val_tab_del)
while @minline22 <= @maxline22
BEGIN
select @Itemcode22 = ItemCode from RDR1 where docentry=@list_of_cols_val_tab_del And LineNum=@minline22
select @Qty = Quantity from RDR1 where docentry=@list_of_cols_val_tab_del And LineNum=@minline22
set @onhand = (select isnull(sum(oitw.onhand),0) from oitw where (oitw.whscode = N'ANDHERI' or oitw.whscode = N'01') and oitw.itemcode = @Itemcode22 )
set @openqty_s_order = (select isnull(sum(openqty),0) from rdr1 where rdr1.shipdate <= @lastday and rdr1.itemcode = @Itemcode22 and (rdr1.whscode = N'ANDHERI' or rdr1.whscode = N'01') and rdr1.LineStatus = 'O')
set @openqty_p_order = (select isnull(sum(openqty),0) from por1 , opor where opor.docentry = por1.docentry and opor.U_ETA + 5 <= @lastday and por1.itemcode = @Itemcode22 and (por1.whscode = N'ANDHERI' or por1.whscode = N'01') and por1.LineStatus = 'O')
if @onhand = 0 and @openqty_p_order = 0 and @openqty_s_order = 0
BEGIN
set @error = '-1'
set @error_message = @Itemcode22 + ' Is OverBooked By '
END
if (@onhand + @openqty_p_order) <= @openqty_s_order
BEGIN
set @error = -1
set @error_message = @Itemcode22 + ' Is OverBooked By '
END
if (@onhand + @openqty_p_order) > @openqty_s_order
if @Qty > (@onhand + @openqty_p_order) - @openqty_s_order
BEGIN
set @error = -1
set @error = @Itemcode22 + ' Is OverBooked By '
END
else
set @error =0
set @error_message = 'OK'
set @minline22 = @minline22 +1
END
END
-- Select the return values
select @error, @error_message
end
If my SO contains all the items with overbooking the SP gives the error for last row.
Suppose user corrects the quantity then the transaction gets saved irrespective of the fact that there are items with overbooking.
Please help.
Thanks
MalhaarHi Rahul,
Sorry to have bothered you.SP worked well by removing else part.
The SP worked well by removing else part.
Thanks
Malhaar
Maybe you are looking for
-
Synchronisation of assets and equipment
Hi All, I'm busy trying to link our assets to our equipment. In SPRO, i am trying to add two more fields for synchronisation. I went to SPRO> Financial Accounting> Asset Accounting> Master Data> Automatic Creation of equipment master records> Assign
-
5.1 Audio Mapping Export
I am using Adobe Premiere CS6 and planning ahead to export a short film I'm working on for a DCP conversion service. (Link) When I emailed them they say that they require 5.1 sound to be exported in the following mapped channel order; Left, Right, Ce
-
I need a fax and my HP all in one is great, but I installed leopard and now only see modem driver for fax. I need the HP fax. I can print. Does the HP 2840 fax work with leopard? If not how can I go back to tiger? I regret the leopard, I see little o
-
Pasting HTML styles into Pages
Is there any way to get Pages to recognize basic HTML formatting styles? I'd like something with an h1 tag to map to Header 1 in my paragraph styles. Any ideas/workarounds?
-
Working on a MAC with a Kobo. ADE won't let me read DRM books - 4.0 crashes when opening library books (EVERY. SINGLE. TIME) so I installed 3.0 and now I get an "activation error". I have it authorized to my ID....WHERE IS THE STAFF TO ANSWER QUEST