on 06-01-2015 8:32 AM
Dear Experts,
I want to make Project mandatory field for Purchase request & Purchase Order Document. Please help me to provide SP_TN??
Regards
Mohamed Yousuf Ali M I
Try This
IF @object_type = '1470000113'
AND @transaction_type in ( 'A' ,'U')
BEGIN
IF EXISTS (
SELECT t1.DocEntry
FROM OPRQ t1
INNER JOIN PRQ1 t2
ON t1.DocEntry=t2.docentry
WHERE @list_of_cols_val_tab_del = t1.DocEntry
AND
ISNULL(t2.project, '') = ''
)
BEGIN
SET @error = -2
SET @error_message = 'Select the projects for the Purchase request'
END
END
IF @object_type = '22'
AND @transaction_type in ( 'A' ,'U')
BEGIN
IF EXISTS (
SELECT t1.DocEntry
FROM opor t1
INNER JOIN por1 t2
ON t1.DocEntry=t2.docentry
WHERE @list_of_cols_val_tab_del = t1.DocEntry
AND
ISNULL(t2.project, '') = ''
)
BEGIN
SET @error = -2
SET @error_message = 'Select the projects for the Purchase order'
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
IF @object_type = '22' AND (@transaction_type = N'A' OR @transaction_type = N'U')
BEGIN
IF ( SELECT opor.project from opor where opor.docentry=@list_of_cols_val_tab_del) is null
BEGIN
SELECT @error = -5001
SELECT @error_message = 'Please select project in project field'
END
END
For Purchase Request same just change object code and table name.
Regards,
Sachin
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.