on 10-07-2011 3:34 PM
Hi Guys,
I was wondering whether it is possible within standard SAP Business one 8.8 to prevent users from entering past date in the delivery date field on the Sales order screen. I have people making mistakes by entering 10/10/2010 instead of 10/10/2011. This caused problems with reports etc..
Is there a formatted search query i can create to warn/alert users with a message stating incorrect date entered? Please advice best course of action?
Regards
nick
Hi Nic.......
You can do this by two ways........
You can either stop users to do previous year entry by Locking the Last Year Posting Period or you may create a SP Transaction Notification to restrict so that you can never ever do entries in previous Year.........
Regards,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try:
IF @object_type = '17' and @transaction_type = 'A'
BEGIN
IF EXISTS (SELECT T0.DocEntry
FROM dbo.ORDR T0 INNER JOIN RDR1 T1 ON T1.DocEntry=T0.DocEntry
WHERE DateDiff(YY,T1.ShipDate, GetDate())>0 AND T0.DocEntry = @list_of_cols_val_tab_del)
BEGIN
select @error = 17,
@error_message = 'You are not allowed to post to previous year.'
END
END
Thanks,
Gordon
Hi Gordon,
I have tried to add this query to a Formatted search and i am receiving an error message:
1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Must declare the scalar variable "@object_type".
2). [Microsoft][SQL Server Native Client 10.0][SQL Server]Must declare the scalar variable "@list_of_cols_val_tab_del".
3). [Microsoft][SQL Server
Hi,
I have added the query on to the Stored Precedures on the SQL management studio under Programmability> stored precedures. I have created a new query and saved it under this location. It still allows me to add the sales order with previous date under the delivery date field.
Is the above steps correct? I have done this on my test database as i was not too sure on what to do..
Deepak,
The following code is already in this section? Can i just add Gordon query below the last "END" statement?
-- ADD YOUR CODE HERE
declare @islocked int
select @islocked = 0
if(@object_type = '17' and @transaction_type <> 'A')
select @islocked = U_LockedForEdit from [@A1WMS_Staging] where U_objType = '17' and U_docEntry = @list_of_cols_val_tab_del
if(@object_type = '22' and @transaction_type <> 'A')
select @islocked = U_LockedForEdit from [@A1WMS_Staging] where U_objType = '22' and U_docEntry = @list_of_cols_val_tab_del
if(@object_type = '202' and @transaction_type <> 'A')
select @islocked = U_LockedForEdit from [@A1WMS_Staging] where U_objType = '202' and U_docEntry = @list_of_cols_val_tab_del
if(@islocked <> 0)
begin
select @error = 999
select @error_message = 'Order Cannot be Updated/Canceled/Deleted as it is Locked in WMS'
end
Hi,
Are all your postings complete for the year 2010? If yes, then have you not set the period to 'LOCKED' under the posting period window?
Kind Regards,
Jitin
SAP Business One Forum Team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jitin,
All 2010 period codes under administrator > system initialisation > Posting periods has the closing period under Period status. We closed all period from previous months.
I want to prevent users entering previous dates only on the delivery date as we have a warehouse management application called Accellos which works on the delivery date field.
Hi,
The implications of different Posting Period Status.
When Posting Period status is set as:
Locked
Any data entry or journal entry will be disabled for all users. The functionality corresponds to the combination of field values 'Active' = No, 'Locked' = Yes from the previous versions.
Unlocked
Data or journal entry can be entered by authorized users in this period. The functionality corresponds to the combination of field values 'Active' = Yes, 'Locked' = No from the previous versions.
Unlocked Except Sales
Data and journal entry can be entered by authorized users within all document types except any sales document.
Work under this period status is allowed only for those users who have assigned 'Full Authorization' in General Authorizations form -> General group -> Period Status: Unlocked Except Sales.
Closing Period
Data entry and journal entry can be performed by authorized users within all document types.
Work under this period status is allowed only for those users who have assigned 'Full Authorization' in General Authorizations form -> General group -> Period Status: Closing Period.
So this means that data entry can be performed in all documents types by authorized user.
Please check the authorization.
Kind Regards,
Jitin
SAP Business One Forum Team
Hi,
I think i found out what you are looking for.
Go to the
Administration > System Initialization > Document Settings > General Tab and
check the working of following check box :
Block documents with earlier Posting Date
You can over-ride this condition if you check for Per Document tab in the Document Settings as well.
Check if this is what you are looking for.
Kind Regards,
Jitin
SAP Business One Forum Team
Hi,
Have you checked with other documents?
This is what I have found on Online Help (F1) for the checkbox :
Block Documents with Earlier Posting Date
Select to block the posting process of the documents that creates automatic accounting journal entries (invoice, credit memo, deposit, and payment documents).
Sales Order do not create a Journal Entry. Check the same thing with Purchase Order. PO also does not create a JE.
Kind Regards,
Jitin
SAP Business One Forum Team
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
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.