on 04-21-2012 11:01 AM
Dear All,
Can any one provide me the stored procedure in sap business one for lock for PO and GRPO.
For Example:-
I have made two series name for purchase order one is PoDomestic and another is PoExport
I create one purchase order document of posting date 18.04.2012 of series PoDomestic
and create another purchase document of posting date of 19.04.12 of series PoExport
now when i want to make one new purchase order of posting date of 17.04.2012 for series PoDomestic it should not allow to add the document.Should throw an error that
'you can not make purchase order of earlier posting date'
and when i want to make one new purchase order of posting date of 18.04.2012 for series PoExport it should not allow to add the document.Should throw an error that
'you can not make purchase order of earlier posting date'
I mean to say that it should throw error for series wise.Means it should check the date and series both.
Thanks & Regards,
Aswini KUmar
Hi Aswini,
You can use SP_TN to validate your posting date.
Try this ,At backend under
Database ---> Programmability ---> Stored Procedures ---> SP_TransactionNotification
If (@object_type = '22') and (@transaction_type in ('A' , 'U'))
BEGIN
Declare @Lstdate as datetime
Declare @CurDate as datetime
set @Lstdate = (select MAX(opor.docdate) from OPOR where OPOR.Series = 420)
set @CurDate = (select OPOR.DocDate from OPOR where OPOR.DocEntry
= @list_of_cols_val_tab_del )
if @CurDate < @Lstdate
Begin
set @error = -1
set @error_message = 'Can Not Place Backdated Purchase Order'
end
end
This is for purchase order. It is assumed that series number for domestic one is 420. You can get this from NNM1 table. similarly you can add for export series and OPDN table by capturing objtype from opdn table.
Thanking you
Malhaar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aswini,
please repost this question into the correct forum again. Maybe have a look at the Forum Finder for the New SCN to see where this could fit best.
I'll put this post into moderation and it will get removed in the next days.
Best,
Oliver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
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.