on 08-29-2012 3:48 PM
Hello expert
I have a question
I made an SBO transaction notification to fill the REF2 field in OIGE & OIGN but there is now an approval procedure and the document is first created as a draft. As a consequence the stored procedure is not working and I need to update the transaction notification to include draft as well
I sanyone able to help to write the stored procedure below for draft in OIGE and OIGN ?
Thank you
If
@object_type ='59' and @transaction_type in ('A','U')
Begin
If EXISTS
(
select DocEntry from OIGN
where DocEntry = @list_of_cols_val_tab_del
and isnull(Ref2,'') = ''
)
Begin
set @error_message = 'Please fill in REF. 2 field with shift+F2'
set @error = 1
END
END
HI
Try This....
For both Goods Issue & Goods Receipt
IF @object_type ='112' and @transaction_type in ('A','U')
Begin
If EXISTS
(
select DocEntry from odrf
Where DocEntry = @list_of_cols_val_tab_del
and ref2 is null and ( ObjType='60' or ObjType='59')
)
Begin
set @error_message = 'Please fill in REF. 2 field with shift+F2'
set @error = 1
END
END
Regards
Kennedy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi G. Delanoe,
Even if Ref2 field is left blank while punching receipt and or issue. Document goes for approval and got saved as draft.
After approval it will be converted into a valid document at that time of adding it by the originator why SPTN is not firing ?
And if document did not go for approval then obviously SPTN has to fire.
The issue is not clear to me.
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,
All Draft Document Stored in The ODRF,DRF1
Create the Store Procedure in This Tables
Thanks,
Nithi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nithi
I followed your instrucicones but does not work, does not validate the TN
TN itself, if it works ¡
I'm Doing Wrong?
IF (@object_type = 60) and @transaction_type in ('A','U')
BEGIN
DECLARE @Linea as int
SELECT TOP 1 @Linea = T1.LineNum+1
FROM ODRF T0 INNER JOIN DRF1 T1 ON T1.DocEntry = T0.DocEntry INNER JOIN OACT ON T1.AcctCode = OACT.AcctCode
WHERE T0.DocEntry = @list_of_cols_val_tab_del AND ISNULL(T1.OcrCode,'')=''
and (T1.[AcctCode] BETWEEN N'_SYS00000000267' AND N'_SYS00000000354')
IF @Linea >= 1
BEGIN
SET @error = 101
SET @error_message = 'Error en Linea Centro de Costos obligatorio'
END
END
Hi,
Approval and SP_TN is mutually exclusive. They may not co-exist.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi......
Try this............
IF (@object_type = '112' And (Select ObjType From ODRF
Where DocEntry = @list_of_cols_val_tab_del)='59'
AND @transaction_type IN ('A'))
BEGIN
Begin
If EXISTS
(
select DocEntry from OIGN
where DocEntry = @list_of_cols_val_tab_del
and isnull(Ref2,'') = ''
)
Begin
set @error_message = 'Please fill in REF. 2 field with shift+F2'
set @error = 1
END
END
Regards,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.