Approval Query For A/R Delivery
Hi
I have made a query for Approval Procedure, only those Delivery documents will go for approval for which A/R Down payment Request has not been made. But it is not working properly Kindly Correct the query.
SELECT Distinct 'True' where dln1 t0 inner join odln t1 on t0.docentry = t1.docentry inner join ordr t2 on t0.baseentry = t2.docentry and t2.docentry not in (Select distinct t4.baseentry from dpi1 t4) and
t2. docentry = $[DLN1.Baseentry]
Thanks
Rashid
Hi Rashid,
B1 does not support approval queries on document lines. you can query only document header.
you can either try to workaround it with all sorts of aggregate UDFs in the header, or alternatively take a look at:
[http://www.beonesolutions.com/ip/Solutions/ap.html|http://www.beonesolutions.com/ip/Solutions/ap.html]
all details, including the ability to query all document tables, are in:
[http://www.beonesolutions.com/files/Approval_Pro_Brochure.pdf|http://www.beonesolutions.com/files/Approval_Pro_Brochure.pdf]
Gilan
Similar Messages
-
Approval Query for a specific customer group
Dear Experts,
Following is the scenario, customer deals with whole sale and retail customers group. The client wishes to ensure that If the whole sales customer group account balance greater than zero then while making a sales order or invoice it should trigger approval.
SaravananHi Saravnan......
Thy this Approval Query and just put the Group Code for your customer in this group code's inverted comma....
SELECT Distinct 'TRUE' From OCRD T0 Where T0.Balance>0 and GroupCode=' '
And T0.CardCode=$[ORDR.CardCode.0]
If above does not work then use below...
SELECT Distinct 'TRUE' From OCRD T0 Where T0.Balance>0 and GroupCode=' '
And T0.CardCode=$[$4.0.0]
Regards,
Rahul -
Approval Query for Invoices with Items Onhand below zero.
Dear Experts,
I would like to make an approval procedure applicable on A/R Invoice.
When ever one of the Invoice items OnHand amount is below ZERO - I need the Approval Procedure to Popup and this way the Produce of the Invoice will be blocked.
Is there any way to write a query on Approval Template for that?
Thanks!
Regards,
D.MedalionHi D.Medalion
Please Follow some step
First Create Approval Stages in Administration ->Approval Procedures->Approval Stages
First -
Administration ->Approval Procedures->Approval Templates->Documents-> Click On A/R Invoice .
Second- Administration ->Approval Procedures- Approval Templates->Terms->When the Following Applies->Click Tick On Deviation from Commitment and ration Drop Down Choose Greater or Equal
Thanks & Regard
Khan Imran -
Approval Query for AP Invoices Containing Budget Related GL Account
Hi Experts,
I would like to create a approval template for all AP invoices that include a GL account that is related to the budget. Can you please help me with the approval query?
Thank you!
JaneHello Gordon Du,
"B1 approval will only apply to document level. If you want to check line level, only the first line can be subjected to."
I was thinking to trigger the approval process based on a document (AP invoice) containing relevant cost centres on a line by line basis as entered via one of the enabled dim fields.
Writing a trigger query for each cost centre effected? This does not appear to be a good solution, what is a better direction. Is there another way? (PO are not yet used via SAPB1)
Currently my invoices add, but do not trigger the approval process based on my attempts thus far.
Can the originator manually choose an approval pathway?
If this is against posting etiquette delete and advise.
I am a relative newbie to SAP B1, so am happy to be pointed to relevant help files. I arrived via google searching and arrived here.
Thankyou. -
Approval Query for Receipt from production
Hi experts,
I want to define an approval process for receipt from production.
The condition is below:
Only if it is " Receipt from production" then the goods receipt document should go to approval of quality.
If is any unplanned direct goods receipt then system should allow to add it straightly.
To do so, Please provide me the required query.
regards
Ravindran SrinivasanHi Ravindran,
I once encounter same problem like this. And I found out that, unfortunately, approval procedure can't work on receipt from production document.
Yes, we all know that receipt from production and inventory goods receipt are actually same object type in SAP B1 and stored in same table. But, try it by yourself in your testing database, even if you apply the approval templates for goods receipt document, and you apply the condition as "always", you won't get prompted for approval if you try to add the receipt from production document.
However, I said this based on my experience with version prior to 8.81 and 8.82. But somehow I have a strong feeling that this issue still not yet realized by SAP.
Best Regards,
Hendry Wijaya -
Approval Query for Sale Delivery Problem
Hello,
I have to set approval procedure of Sale Delivery in following condition
If i add sale order for Specific item for 10 Qty for example C01 customer & after that i add sale order for same item qty 10 for another customer ie C02 & i have stock for that item 50 but user give delivery first to C02 in staid of C01 but C01 give me first order
on this condition i have to set approval user can't deliver second sale order first he have to take approval from manager to do this & he deliver first order first then then don't have to need approval.
Can any one help me?Hi,
Row level approval is not possible in SBO.
You may check this for your reference: http://www.beonesolutions.com/ip/Solutions/ap.html
Thanks,
Joseph -
Approval Query for Prepaid customers
Hi, I need help with a query. I want an approval screen to pop up when a user tries to add a delivery for a prepaid customer and the customer has not paid. The following query get me a "Could not commit transaction" error.
In our system, customers with prepaid terms have -1 in the GroupNum field.
SELECT Distinct 'TRUE' From OCRD T0 INNER JOIN ODLN T1 ON T0.CardCode = T1.CardCode WHERE $[OCRD.GroupNum] LIKE '-%' AND $[OCRD.Balance] + $[ODLN.DocTotal] <= 0
Any help would be appreciated. ThanksHi,
Try this:
SELECT Distinct 'TRUE'
From OCRD T0
WHERE T0.CardCode = $[ODLN.CardCode] AND T0.GroupNum <0
AND T0.Balance + $[ODLN.DocTotal] <= 0
Thanks,
Gordon -
Approval Query for Outgoing Payment
Hi All Experts,
I have to Create Approval for Outgoing Payment where payment means is Cash,Cheque or Bank Transfer but not Credit Card.
In other words approval should be raised for all payment means other than Credit card payment means.
For which I have Created Query as follows
select Distinct 'true' FROM dbo.OVPM T0
Left join dbo.VPM3 T1 on T0.DocEntry=T1.Docnum
WHERE T0.CreditSum=0 And T1.CreditAcct is null
payments goes for approval but Credit Card payment also goes for Approval which is not required.
Please Help me to Correct the Query.
Regards,
Gayatri Shukla.Hi,
Little modification to your query. Try this.
select Distinct 'true' FROM dbo.OVPM T0
Left join dbo.VPM3 T1 on T0.DocEntry=T1.Docnum
WHERE T0.CreditSum = 0
Regards,
Amrut Sabnis. -
Query Based Approval Procedure for Sales order .
Hi
I have created query for SO which results above 5000 d 50,000 .
By using this each query i created two seperate Approval Procedures which So is >5000 d >50000.
If So>5000 Approval Procedure wants to activate same thing for >50,000., Bur approval Procedure is not working wat will be the cause. i have linked this query In Terms as when the following applies.
If SO >5000 approved by user A.
If SO>50,000approved by User A & B.
Regards
GiridharanHi Giri
Your query for the first should be as follows:
SELECT DISTINCT TRUE
WHERE $[$29.0.NUMBER] > 5000 AND $[$29.0.NUMBER] < 50000
For the second query:
SELECT DISTINCT TRUE
WHERE $[$29.0.NUMBER] > 50000
The query you were trying to use is looking at the table which will only apply to documents already posted, and as that query is not being filtered specifically it is bringing back all the records and getting confused. You must reference to the runtime value of the document being posted.
Kind regards
Peter Juby -
Query for terms in approval template of approval procedure
dears
i need to write a user query for approval template terms that chek for any price zero in invoice items .
i tried the true query
select 'true' from inv1 where $[inv1.price]=0
however the invoice executed without asking for approval procedurs.
any help will be appreciated!!
talalHi,
Its not possible on row level Price.
Try to Document total procedure, it will work.
SELECT Distinct 'True' FROM OINV T0 WHERE $[OINV.DocTotal]='0.00'
Thanks,
Madhan. -
Dear Sir / Madam;
Please Help, We try to made Query for PO Approval with condition if PO Type "ITEM" have to approve by Purchasing Manager, but for PO Type "SERVICE" have to approve by General Affair Manager.
We Create Query for this condition " SELECT * FROM OPOR WHERE T0.[DOCTYPE]='I'
We already create the stage, and this query is not work. But if try to set the total Doc greater than 1000000, it is work.
Dear Sir / Madam, please help me to send me the right query ?
Thanks for your help
Regards
PetrusHi,
I suggest to add select distinct 'true' or select 'true' for in your query like previous answer.
Here are the solutions for your problem:
A. for doc type is not as same as service :
SELECT distinct 'true' FROM OPOR T0
where $[OPOR.doctype] = N'S'
B. For doctype is not as same as item:
SELECT distinct 'true' FROM OPOR T0
where $[OPOR.doctype] = N'I'
Both have been tested and work well.
Rgds, -
I have updated SBO_SP_TransactionNotification for validating sales order.The query is as follows -
if @object_type = '17' and @transaction_type IN ('A')
begin
declare curItem cursor for Select PriceBefDi,ItemCode,SeriesName FROM
RDR1 INNER JOIN ORDR ON RDR1.DocEntry=ORDR.DocEntry
INNER JOIN OUSR ON OUSR.UserId=ORDR.UserSign
INNER JOIN NNM1 ON NNM1.Series=ORDR.Series
WHERE ORDR.DocEntry=@list_of_cols_val_tab_del AND USER_Code<>'manager'
declare @dblPrice numeric(10,2),@dblItemPrice numeric(10,2)
declare @strItemCode varchar(20),@strSeriesName as varchar(40)
open curItem
fetch next from curItem into @dblPrice,@strItemCode,@strSeriesName
while @@fetch_status = 0
begin
SET @dblItemPrice=(select price from itm1 where itemcode=@strItemCode and pricelist=(select listnum from opln where listname='Sales price list' ))
if @dblItemPrice>0 and charindex('DEM',@strSeriesName)=0
begin
if @dblPrice<@dblItemPrice AND charindex('REP',@strSeriesName)=0
begin
set @error =1
set @error_message = 'The price of the item ' + @strItemCode + ' should be equivalent to sales price list i.e.' + cast(@dblItemPrice as varchar)
end
else
begin
if @dblPrice>@dblItemPrice
begin
set @error =1
set @error_message = 'The price of the replacement item ' + @strItemCode + ' should not be greater than sales price list i.e.' + cast(@dblItemPrice as varchar)
end
end
end
fetch next from curItem into @dblPrice,@strItemCode,@strSeriesName
end
close curItem
deallocate curItem
end
This stored procedure is working correctly as per the requirement.Sales order can not be added if the price is less than sales price list.
Now I want to remove this validation and add approval for this.If the rule is violated ,then the document will go for approval.In SAP I have created query for approval as,
SELECT DISTINCT 'True' FROM OITM WHERE ITEMCODE=$[$38.1] AND U_Discount_Percent < $[$38.15]
UNION
SELECT (CASE WHEN $[$38.14]<>(select price from itm1 where itemcode=$[$38.1] and pricelist=(select listnum from opln where listname='Sales price list' ))
THEN 'True' ELSE 'False' END)
Here I am getting the price as varchar.Is it possible to call stored procedure SBO_SP_TransactionNotification from query ?Hi Dilip,
I have tried the following query for approval :
SELECT 'TRUE'
FROM OITM JOIN ITM1 ON OITM.ItemCode=ITM1.ItemCode
JOIN OPLN ON OPLN.ListNum=ITM1.PriceList AND UPPER(LTRIM(RTRIM(OPLN.ListName)))='SALES PRICE LIST'
WHERE OITM.ItemCode =$[$38.1.0] AND $[$38.14.NUMBER] != ITM1.Price
It works for all the lines in Sales Order.Even If there is a single item with Price before Discount not equal to Sales Price List Value,
System will send the document for approval.
I have put the condition $[$38.14.NUMBER] ! = ITM1.Price assuming that the price in SO should be exactly equal to Sales Price Price List .
Try this query at your end and let me know the result.
Thanks and Regards,
Pooja Singh. -
Hi all,
I set up an approval procedure for sales orders, the term is based in this user query:
SELECT DISTINCT 'TRUE' WHERE $[$38.14.Number]<$[$38.U_PrecMin.Number]
We need that query working for every single row of the sales order, because it only works when it's true on row one, but when a unit price is less than the value of that UDF on row two or above, the procedure does not work.
Any suggestion?
ThanksHi......
Try this in SP Transnotification.......
If @Object_type='17' and (@transaction_type ='A' or @transaction_type ='U')
BEGIN
declare @Item1 as varchar(100)
declare @minline1 int
declare @maxline1 int
declare @Price1 float
declare @Price2 float
set @minline1 = (select min(T0.linenum) from RDR1 T0 where T0.docentry=@list_of_cols_val_tab_del)
set @maxline1 = (select max(T0.linenum) from RDR1 T0 where T0.docentry=@list_of_cols_val_tab_del)
while @minline1<=@maxline1
begin
select @Item1=T0.itemcode from RDR1 T0 where T0.docentry=@list_of_cols_val_tab_del and T0.linenum=@minline1
select @Price1=T0.Price from RDR1 T0 where T0.docentry=@list_of_cols_val_tab_del and T0.linenum=@minline1
select @Price2=T0.U_PrecMin from RDR1 T0 where T0.docentry=@list_of_cols_val_tab_del and T0.linenum=@minline1
if @Price1<@Price2
begin
set @error=-1
set @error_message = 'Price is Less ' + @Item1
End
set @minline1=@minline1+1
end
End
Regards,
Rahul -
Approval Query to skip for one Vendor Group - Not working
Dear All,
I am trying to create an approval query wherein when a user creates a Purchase Order for a Particular Vendor Group then the approval check is not required and for other Vendor Group approval check is required. The query is as under :
SELECT distinct 'true' FROM OPOR T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode INNER JOIN OCRG T2 ON T1.GroupCode = T2.GroupCode WHERE T2.GroupName <> 'Supplier Own Group'
I don't want that which vendors are in Supplier Own Group check go for an approval process. Means all vendors in this group should get skipped for approval.
How to achieve this because this query seems not to be working in the approval process because when a user creates a PO whose Vendor group is under Supplier Own Group then also the approval checking is happening.
Please help how to resolve this issue.
Regards,
DepikaHi,
Try this
SELECT distinct 'true' FROM OPOR T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode INNER JOIN OCRG T2 ON T1.GroupCode = T2.GroupCode
AND T2.GroupName <> 'Supplier Own Group' where T0.CardCode = $[$4.1.0]
Hope this helps,
Son. -
Query regarding approval policies for custom Role
Hi ,
1.In OIM 11g R2 . I have created a Role named SecurityAdmin. Assigned it to a user named User1.
Logged in as User1 and searched for another user say User2
2.Modified its Profile and when clicked on save .Request was created and went to approval process.
Similar thing happened when i tried to disable the user and assign roles to User2.(Note : I am logged in as User1 not xelsysadm)
Created two auto approval policies for assign roles and Modify user profile
Query : Do i have to create approval policy for each process like Disable User, Enable user , etc ?
Is there any generalized way that i make a policy on high level that if Role is Security admin Request goes to Auto Approval.
Please help.
Thanks in advance.>
Query : Do i have to create approval policy for each process like Disable User, Enable user , etc ?You have to create approval policy for each of these request types.
Is there any generalized way that i make a policy on high level that if Role is Security admin Request goes to Auto Approval.
Please help.In approval policies you can select Auto Approval checkbox and write a rule Requester.Role Name Equals Security admin
Maybe you are looking for
-
How to search data with multiple parameters =SESSION
Dear Günter Schenk Please help I have two Tables with many fields 1. tbl_users 2. tbl_transection Now problem is that I want when user login he make search in " tbl_usr_transection " related its own Transactions other then he view all use
-
How do I upload a file to icloud in multiple formats?
I have noticed that when I upload a file to the iWork app of iCloud and I wish to download it, it provides me with a drop down list multiple formats (i.e. Pages, PDF or Word) however only one option (the file type I uploaded it is availible). I wish
-
HT201493 Why can't i see my friends contact picture in this app?
In find my friends app i can not see my friends photo but it is in my contact list on my iphone.Does anyone know why?
-
ExecutorService and awaitTermination
I have an executor service(MainES), which in turn starts a thread. This thread in turn use an executor service to execute(S1) say 10 threads(T1-T10). T1-T10 say sleeps for 20 secs. My question is when I awaitTermination on the MainES, why does it ret
-
So this morning I leave the phone ontop of my car....I know stupid thing to do. As I get out on the the main road I hit the gas to get going and i hear it ontop of the car and see it in the rearview mirror. 3 cars behind me ran it over. As I'm standi