Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 i need query based approval

Author  Topic 

yamunaprakash
Starting Member

6 Posts

Posted - 2010-02-03 : 02:02:29
hello Sql experts
please help me for this query based approval my question is

I need a query based approval
If GRPO qty is greater than PO quanity then the GRPO should go for approval
if not GRPO should not go for approval
my Tables like OPOR(PO header),POR1(PO line level for PO ),OPDN(GRPO header) and PDN1(line level for GRPO)

pls its very urgent

thanks in advance

prakash

prakash

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-02-03 : 02:15:16
We need (very urgent):
table structure (best like create statement)
sample data
wanted output in relation to sample data


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

yamunaprakash
Starting Member

6 Posts

Posted - 2010-02-03 : 02:21:43
ex.SELECT T0.[DocNum], T1.[ItemCode], T1.[Dscription], T1.[Quantity],
T2.[DocNum], T3.[ItemCode], T3.[Dscription], T3.[Quantity]
FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry,
OPDN T2 INNER JOIN PDN1 T3 ON T2.DocEntry = T3.DocEntry
WHERE T1.[DocEntry] = T2.[DocNum] and
T1.[ItemCode] = T3.[ItemCode]

GROUP BY T0.[DocNum], T1.[ItemCode], T1.[Dscription], T1.[Quantity],
T2.[DocNum], T3.[ItemCode], T3.[Dscription], T3.[Quantity]
by seeing this ucan u write a query

prakash
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-02-03 : 02:26:21
quote:
by seeing this ucan u write a query

Sorry, no I cannot.
Without an example I am not able to understand what you want to do.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

yamunaprakash
Starting Member

6 Posts

Posted - 2010-02-03 : 02:41:00
ok i will explain in detail i am working on sap business one i have one purchase cycle which includes purchase order(PO) an GOODS RECEIPT PO (GRPO) along with their line level item now my questions is when my GRPO quantity is greater than PO quantity u should get a message saying that GRPO should go for approval and if it is not greater than PO then GRPO should not go for an approval .ex

PO NO POitemcode POitemdescription POquantity GRPPO NO GRPOitemcode GRPO itemdescription GRPOquantity
1 UCD7004a10NA000NA IFB Gift Voucher 12.000000 246 UCD7004a10NA000NA Shoppers Stop Gift Voucher 5.000000

prakash
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-02-03 : 02:51:56
Do you want to code that inside SAP application?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-03 : 03:49:40
these business rules need to be implemented at application level when you enter quantity field. Of course, this can be implemented in sql by means of trigger but you may be better off doing the business validations at your front end
Go to Top of Page

yamunaprakash
Starting Member

6 Posts

Posted - 2010-02-03 : 03:53:27
yes i need the code inside sap business one wefred

prakash
Go to Top of Page

yamunaprakash
Starting Member

6 Posts

Posted - 2010-02-03 : 03:54:23
hello visakh pls do write a query using trigger if possible

prakash
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-03 : 03:55:37
quote:
Originally posted by yamunaprakash

hello visakh pls do write a query using trigger if possible

prakash


nope. thats not a recommended method...you need to implement this at your sap end
Go to Top of Page

yamunaprakash
Starting Member

6 Posts

Posted - 2010-02-03 : 04:23:52
hello visakh please do help in solving this query i will be thankful very much i need to submit that query by afternoon 4.00 clock please
regards
prakash

prakash
Go to Top of Page
   

- Advertisement -