Approval Tempate Terms Query Problem
I have a query that i've included in the Approval Tempate - Terms Tab, that checks to see if any order lines after discount price is less than a Item UDF minimum price for the item. It is as follows:
SELECT DISTINCT 'True'
FROM [dbo].[ORDR] T0 (nolock)
INNER JOIN [dbo].[RDR1] T1 (nolock) ON T1.[DocEntry] = T0.[DocEntry]
inner join [dbo].[OITM] T3 (nolock) on T3.ItemCode = t1.itemCode
where T0.[DocNum] = $[ORDR.DocNum]
and T1.INMPrice <= T3.U_LBSiMinPrice
My problem is that the Approval is not kicking off no matter the outcome of the query. Meaning if the price is < the minimum price or > the minimum price, the approval pop-up window does not appear.
Hi Scott,
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
-
Showing only Approved Metapedia Terms
This question is two fold:
1) Is there a way to only show approved metapedia terms?
2) How have others managed their metapedia terms in a "multi-tier" environment (dev / qa / prod)? Do you promote your terms / changes through different environments or do you manage your terms in one environment? What is SAPs suggested best practice here?
I'm trying to achieve the scenario where metapedia users only see approved terms. Right now we are controlling this through drafting the terms in one environment and then exporting / importing them into another environment as approved.
Thanks!!
TomThis can be achieved by setting up appropriate user permissions. Note that for Metapedia there are predefined user groups - Metapedia User, Metapedia Author, Metapedia Approver and Metapedia Administrator.
Among these groups Metapedia Users can only view approved terms. Metapedia Author, Approvers participate in the process of creating the draft definition, refining it and approving it. Once the term is approved, it is visible to Metapedia Users. Also if for some reason author starts revising an approved term - the changes made by the authors are not visible to Metapedia User until the revised term definition is approved.
Given this context, you should be able to manage all Metapedia activities in the same environment. You do not need to have separate Dev and Prod environment for Metapedia scenarios. -
Hello APEX people,
I posted my problem here:
Designing LOV Query Problem
What I have is a sequence like this:
CREATE SEQUENCE
DR_SEQ_FIRST_SCHEDULE_GROUP
MINVALUE 1 MAXVALUE 7 INCREMENT BY 1 START WITH 1
CACHE 6 ORDER CYCLE ;
What I need would be a SQL query returning all possible values oft my sequence like:
1
2
3
4
5
6
7
I want to use it as a source for a LOV...
The reason why I use the cycling sequence is: My app uses it to cycle scheduling priorities every month to groups identified by this number (1-7).
In the Admin Form, I want to restrict the assignment in a user friendly way - a LOV.
Thanks
JohannHere ist the solution (posted by michales in the PL/SQL forum):
SQL> CREATE SEQUENCE
dr_seq_first_schedule_group
MINVALUE 1 MAXVALUE 7 INCREMENT BY 1 START WITH 1
CACHE 6 ORDER CYCLE
Sequence created.
SQL> SELECT LEVEL sn
FROM DUAL
CONNECT BY LEVEL <= (SELECT max_value
FROM user_sequences
WHERE sequence_name = 'DR_SEQ_FIRST_SCHEDULE_GROUP')
SN
1
2
3
4
5
6
7
7 rows selected. -
Approval of Terms & Conditions
Terms and Conditions are often integral processes in forms submissions. Does FormsCentral have an elegant way of acheiving this in a way that meets strict legal standards. I can think of a few different ways of achieving this result, but would rather not have to recreate the wheel if someone else has acheived the same result.... especially when the terms and conditions are very lengthy. Can someone suggest a best practice for having a user approve multiple terms and conditions as part of a forms submission?
Have you considered using the "text box" to spell out your terms, in conjunction with a [Do you agree to this Specific Term?" check "yes" or "no"] ?? Terms can be located and read by user with clicking on the "question mark" symbol to show the "text box"
There is also the function of the "Skip Logic" which may be useful in conjunction with "Insert Page Break". Perhaps you could devote an entire page to the Terms & Conditions at Font size 9 or 10. (still readable and not too small) -
SQL+-MULTI TABLE QUERY PROBLEM
HAI ALL,
ANY SUGGESTION PLEASE?
SUB: SQL+-MULTI TABLE QUERY PROBLEM
SQL+ QUERY GIVEN:
SELECT PATIENT_NUM, PATIENT_NAME, HMTLY_TEST_NAME, HMTLY_RBC_VALUE,
HMTLY_RBC_NORMAL_VALUE, DLC_TEST_NAME, DLC_POLYMORPHS_VALUE,
DLC_POLYMORPHS_NORMAL_VALUE FROM PATIENTS_MASTER1, HAEMATOLOGY1,
DIFFERENTIAL_LEUCOCYTE_COUNT1
WHERE PATIENT_NUM = HMTLY_PATIENT_NUM AND PATIENT_NUM = DLC_PATIENT_NUM AND PATIENT_NUM
= &PATIENT_NUM;
RESULT GOT:
&PATIENT_NUM =1
no rows selected
&PATIENT_NUM=2
no rows selected
&PATIENT_NUM=3
PATIENT_NUM 3
PATIENT_NAME KKKK
HMTLY_TEST_NAME HAEMATOLOGY
HMTLY_RBC_VALUE 4
HMTLY_RBC_NORMAL 4.6-6.0
DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
DLC_POLYMORPHS_VALUE 60
DLC_POLYMORPHS_NORMAL_VALUE 40-65
ACTUAL WILL BE:
&PATIENT_NUM=1
PATIENT_NUM 1
PATIENT_NAME BBBB
HMTLY_TEST_NAME HAEMATOLOGY
HMTLY_RBC_VALUE 5
HMTLY_RBC_NORMAL 4.6-6.0
&PATIENT_NUM=2
PATIENT_NUM 2
PATIENT_NAME GGGG
DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
DLC_POLYMORPHS_VALUE 42
DLC_POLYMORPHS_NORMAL_VALUE 40-65
&PATIENT_NUM=3
PATIENT_NUM 3
PATIENT_NAME KKKK
HMTLY_TEST_NAME HAEMATOLOGY
HMTLY_RBC_VALUE 4
HMTLY_RBC_NORMAL 4.6-6.0
DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
DLC_POLYMORPHS_VALUE 60
DLC_POLYMORPHS_NORMAL_VALUE 40-65
4 TABLES FOR CLINICAL LAB FOR INPUT DATA AND GET REPORT ONLY FOR TESTS MADE FOR PARTICULAR
PATIENT.
TABLE1:PATIENTS_MASTER1
COLUMNS:PATIENT_NUM, PATIENT_NAME,
VALUES:
PATIENT_NUM
1
2
3
4
PATIENT_NAME
BBBB
GGGG
KKKK
PPPP
TABLE2:TESTS_MASTER1
COLUMNS:TEST_NUM, TEST_NAME
VALUES:
TEST_NUM
1
2
TEST_NAME
HAEMATOLOGY
DIFFERENTIAL LEUCOCYTE COUNT
TABLE3:HAEMATOLOGY1
COLUMNS:
HMTLY_NUM,HMTLY_PATIENT_NUM,HMTLY_TEST_NAME,HMTLY_RBC_VALUE,HMTLY_RBC_NORMAL_VALUE
VALUES:
HMTLY_NUM
1
2
HMTLY_PATIENT_NUM
1
3
MTLY_TEST_NAME
HAEMATOLOGY
HAEMATOLOGY
HMTLY_RBC_VALUE
5
4
HMTLY_RBC_NORMAL_VALUE
4.6-6.0
4.6-6.0
TABLE4:DIFFERENTIAL_LEUCOCYTE_COUNT1
COLUMNS:DLC_NUM,DLC_PATIENT_NUM,DLC_TEST_NAME,DLC_POLYMORPHS_VALUE,DLC_POLYMORPHS_
NORMAL_VALUE,
VALUES:
DLC_NUM
1
2
DLC_PATIENT_NUM
2
3
DLC_TEST_NAME
DIFFERENTIAL LEUCOCYTE COUNT
DIFFERENTIAL LEUCOCYTE COUNT
DLC_POLYMORPHS_VALUE
42
60
DLC_POLYMORPHS_NORMAL_VALUE
40-65
40-65
THANKS
RCS
E-MAIL:[email protected]
--------I think you want an OUTER JOIN
SELECT PATIENT_NUM, PATIENT_NAME, HMTLY_TEST_NAME, HMTLY_RBC_VALUE,
HMTLY_RBC_NORMAL_VALUE, DLC_TEST_NAME, DLC_POLYMORPHS_VALUE,
DLC_POLYMORPHS_NORMAL_VALUE
FROM PATIENTS_MASTER1, HAEMATOLOGY1, DIFFERENTIAL_LEUCOCYTE_COUNT1
WHERE PATIENT_NUM = HMTLY_PATIENT_NUM (+)
AND PATIENT_NUM = DLC_PATIENT_NUM (+)
AND PATIENT_NUM = &PATIENT_NUM;Edited by: shoblock on Nov 5, 2008 12:17 PM
outer join marks became stupid emoticons or something. attempting to fix -
Approval Templates' terms - help needed
Greetings, all!
I'm having troubles understanding the approval template terms (Modules->Administration->Approval Procedures->Approval templates:: Approval Templates setup form->Terms tab->Terms grid).
I think I know what the 'Total Document' and "Discount %" terms are but the rest are a haze to me.
Could anyone tell me how these are evaluated against a sales order for example.
Any help will be appreciated
Regards, YavorIt would help..If you could be more specific on which other ones you need to understand
Generally as the terms are worded..
Deviation from Credit Limit - If you have the Credit limit defined in the BP Master, it would validate against it
Deviation from Commitment - same as above about against Commitment limit
Gross Profit % - Document level Gross Profit would be validated
Discount % - Document level Discount would be validated
Deviation from Budget - This is when you use Budgets and if the Document causes an deviation from budget for that period... -
Approval Templates -Terms based on user query looks like cant work
Dear all,
How to use the "terms based on user query"? i try many time but it looks like cant work. do u have any example?
good day...
from
graceI have found the way:
A simple query to define a proper term in the approval stage:
declare @var int
set @var = 0
Select case(@var) when 1 then 'true' else 'false' end
Returns 'true'--> Will not execute the approval procedure.
@var = 1  Returns 'false'--> Will execute the approval procedure. -
Hi
Basically the problem is that my query is returning day instead of month...
Select MONTH($[OPOR.DocDueDate])
When I run this query on a PO with DocDueDate 22.05.14 (22nd of May) it will find that 22 is the month and give this error message:
Microsoft SQL Server - The conversion of a nvarchar data type to datetime data type resulted in an out-of-range-value
Any ideas?
BR
Kjetil SandvikHi Kjetil,
Could you please test this syntax ?
SELECT DATEPART(MONTH, $[OPOR.DocDueDate])
Regards,
Johan -
Approval Templates On Query Base Not working..
hi.
Plz have a look on uploaded image.
here i had highlighted that no of approvals are required at approval stages form
what is the meaning of 2 ,
->i think the 2 people approval we need compulsorily. Am i currect.
->In approval Stages i added two persons but i given no of approval need 1
what will happen . If any body one person will approve , will it approve the document am i currect.
And one more thing In Approval template under terms i am using query based on this one
the document should be approve if i give Doctotal total Greater than amount working fine
but i need query base approve..
what i need while adding the sales quotation if project code is not empty
it will take the approval
select t0.docentry from oqut t0 inner join qut1 t1 on t0.docentry=t1.docentry where t1.Project <>''
the above scenarios i will check it..
but i need your valuable suggestions...Thank u working fine..
last Question plz reply to me.
1)Is Approval Stages are unique means
in approval template if i use one approval stage in another approval template can i use same approval stage will it work...
2) in approval stage
Total authorization persons are 2
The below scenarios i am able to add the document i can able to update it.
no of approval 1
no of reject 1
what is the meaning
if out of 2 persons if any body approve the document document will add
if out of 2 if any one person reject then the document will reject
no of approval 2
no of reject 2
Two users should approve the document otherwise document should not be add
Two users should reject the document otherwise document should not be reject
no of approval 2
no of reject 1
two users should approve the document otherwise document should not be add
out of 2, one user should reject the document no need second users reject
no of approval 1
no of reject 2
one user is enough
two users need to approve the document
Plz clarify my doubt.
I am waiting for your reply.. -
Approval Templates' Terms range bug
Hi, all
I'm writing a SAP B1 addon that reads approval templates and tries to evaluate them. Today I noticed a very strange behavior in the SAP application itself. Here is what I do:
1. A new user called "MyUser" is defined and has permissions to create sale orders
2. A new approval template called "Discount Range" is defined. It covers sales orders only. Only one originator is defined for that template and that's the newly created one ("MyUser")
In the Terms tab of the new template for "Launch Approval Procedure" the "When the following applies" options is selected. In the grid below only the "Discount %" line is checked. The comparison ratio is set to "In range" and the corresponding value is " 3 - 8 ".
As far as I understand it all this should mean that approval procedure should be triggered for every sales order if it complies with the following:
- the user that created it is "MyUser"
- the discount percentage for the order document is in the range of 3 to 8, including the two numbers
I tested after that and all seems to work as expected.
The real problems comes when I try to set the range value in the following manner " 8 - 3 " - the interface itself allows though it may be wrong to write it this way. In this case the result is that only sales orders with a discount of 3 will trigger the approval procedure. That means that the only number that falls in the range of 8 to 3 is 3 - what about 7 or 4.5.
If I set the comparison ratio to "Not in range" and the range value to " 8 - 3 " the results are similar - this time any order that has a discount other than 3 will start the approval procedure. Once again the only number that falls in the range of 8 to 3 is 3.
I tried similar tests with negative numbers just to be sure:
For Example the correct range should be " -8 - -3 " while the odd-working should be " -3 - -8"
I'm using SAP B1 2005 A PL45. Is this bug fixed in later versions of SAP B1 or is there any workaround for it?
One more thing - what is the meaning of the "Undefined Type" approval template's term (does it trigger any approval procedures or not).
Thanks in advance
Edited by: Paul Finneran on Oct 1, 2008 2:09 PM
Edited by: Rui Pereira on Dec 23, 2008 2:37 PMIt would help..If you could be more specific on which other ones you need to understand
Generally as the terms are worded..
Deviation from Credit Limit - If you have the Credit limit defined in the BP Master, it would validate against it
Deviation from Commitment - same as above about against Commitment limit
Gross Profit % - Document level Gross Profit would be validated
Discount % - Document level Discount would be validated
Deviation from Budget - This is when you use Budgets and if the Document causes an deviation from budget for that period... -
Approval Procedure - User Query .....!!
Hi Experts,
In our organisation we have a approval procedure applicable on sales order. There are two authorizer authorises specfic users request. Now the problem is for a specific customer order can we use a separate query to change the authorizer ??
Example : -
Approval Stage 1 : Authorizer A : User 1, User 2
Approval Stage 2 : Authorizer B : User 3, User 4
Now, User 2 requires approval of specific customer order which will authorise by Authoriser B.
Is there any way to write a query on Approval Template for that
or User 2 has to be added on both the Approval Stage
or anything else ?? Please guide.
Regards,
SKHi,
There is no way to write a query on Approval Template for that. User 2 has to be added on both the Approval Stage.
Thanks,
Gordon -
How to approve iCloud terms and conditions in iOS7?
I just loaded iOS7 on my iPad 2, went through the set-up, and synched with my iMac as I always do. Then on using the iPad it keeps asking me to approve the iCloud terms and conditions. when I click on "view terms" it takes me to the Settings iCloud screen, where i can't view or accept terms. Meanwhile the iCloud features like mail are not working (though they are turned on in settings).
Can anyone offer help? ThanksI had the same problem (repeated "accept iCloud terms and conditions") on my iPhone 4s when I upgraded to 7.0.3, but my iPhone 4 and the two iPads worked fine. There were two other problems that might be connected. One was a frequent request to sign into iCloud and the other was an "iCloud keychain error" when I tried to turn on the iCloud keychain in settings. The "Find My Friends" trick did not work.
I was able to get some improvement by Restoring my iPhone from the iTunes backup (to my computer) created during the upgrade process. This allowed me to start the iPhone set-up process again. With this done I no longer was bothered by the frequent "accept..." and the frequent requests to sign into iCloud. I still have the "iCloud keychain error" problem.
Now how do I fix that? -
Reg: Query Problem for New Posting Period
Hi Xperts,
While I try to Map the A/P Invoices with their respective Outgoing Payment,
I used the following Query and it's Query Printlayout
SELECT T0.DocNum [Payment#], T0.DocDate [Payment Date],
T0.CardCode, T0.CardName, T1.InvoiceId, T2.DocNum [AP Inv#],
T2.NumatCard [Bill No.], T2.DocDate [Bill Date], T1.selfInv,
T1.SumApplied, T1.WtAppld, T0.NoDocsum
FROM [dbo].[OVPM] T0 INNER JOIN
[dbo].[VPM2] T1 ON T1.[DocNum] = T0.DocNum
INNER JOIN [dbo].[OPCH] T2 ON T2.[DocEntry] = T1.DocEntry
WHERE T0.Cardname='[%0]' and T0.DocDate='[%1]' and
T0.DocNum='[%2]'
I got the above query from our Expert Mr.Sambath only.
Now what is the problem is the query is retrieving the payment details of old Posting Period only and not the current posting period.
In detail, I used 'Primary' Series for FY08-09, Period indicator 'Default'
Now I'm using 'Primary1' Series for FY09-10, Period indicator '0910'
Thanx in adv.
Regards,
BalaHi Bala,
Looking at your query, it is not query issue ,it is your data issue.
Please check if you have data in VPM2 table which is bank transfer payment method
Thank you
Bishal
Edited by: Bishal Adhikari on Apr 9, 2009 8:48 AM -
Hi Greg,
I had created a view on a table which doesn't have Primary Key, but it has Unique and Not Null constraints on required columns.
I had wrote a procedure to query the data on VIEW. I have experienced strange problem, very first call to procedure will take more time than succeeding requests. For example from second request onwards, it returns data in < 2 Sec, but first transaction is taking 12 Sec to 30 Sec.
I thought that very first time VIEW is taking time to refresh it self. So, I added FORCE keyword in CREATE VIEW stattement. However, that doesn't helped out.
In my further investigation I came to know that base table on which VIEW created, has to be loaded in to memory before querying on VIEW.
So, I had executed a simple select statement on base table, before I execute VIEW query in procedure.
With this change I got results consistently < 2 Sec all the times.
My question is instead of executing the select statement on base table is there a way to load base tables data in memory before querying on VIEW?
Thanks,
SubbaraoHi,
A view is nothing but parsed SQL statements stored in the database, a view may or may not run faster. If you execute the SQL used to define the view how much time is it taking. If you want try looking at MATERIALIZED VIEW , that may help you.
thanks -
Date range query problem in report
Hi all,
I have created a report based on query and i want to put date range selection but query giving problem.
If i am creating select list selection then it is working fine means it will display all records on the particular date.
But what i need is that user will enter date range as creation_date1,creation_date2 and query should return all the records between these date range. i want to pass it by creating items, i created two items and passing creation_date range to display all records but not displaying and if not passing date then should take null as default and display all records
Here is the query:
/* Formatted on 2006/12/10 20:01 (Formatter Plus v4.8.0) */
SELECT tsh."SR_HEADER_ID", tsh."SALES_DEPT_NUMBER", tsh."COUNTRY",
tsh."LOCAL_REPORT_NUMBER", tsh."ISSUE_DATE", tsh."SUBJECT",
tsh."MACHINE_SERIAL_NUMBER", tsh."MACHINE_TYPE", tsh."MACHINE_HOURS",
tsh."STATUS"
FROM "TRX_SR_HEADERS" tsh, "TRX_SR_PARTS" tsp
WHERE (tsh.status LIKE :p23_status_sp OR tsh.status IS NULL)
AND (tsh.machine_type LIKE :p23_machine_type_sp)
AND ( tsh.machine_serial_number LIKE
TO_CHAR (:p23_machine_serial_number_sp)
OR tsh.machine_serial_number IS NULL
AND ( TO_CHAR (tsh.failure_date, 'DD-MON-YY') LIKE
TO_CHAR (:p23_failure_date_sp)
OR TO_CHAR (tsh.failure_date, 'DD-MON-YY') IS NULL
AND ( TO_CHAR (tsh.creation_date, 'DD-MON-YY')
BETWEEN TO_CHAR (:p23_creation_date_sp)
AND TO_CHAR (:p23_creation_date_sp1)
OR TO_CHAR (tsh.creation_date, 'DD-MON-YY') IS NULL
AND (tsh.issue_date LIKE :p23_date_of_issue_sp OR tsh.issue_date IS NULL)
AND (tsh.country LIKE :p23_country_sp OR tsh.country IS NULL)
AND ( tsh.local_report_number LIKE TO_CHAR (:p23_local_rep_num_sp)
OR tsh.local_report_number IS NULL
AND ( tsp.part_number LIKE TO_CHAR (:p23_part_number_sp)
OR tsp.part_number IS NULL
AND tsh.machine_type IN (
SELECT DISTINCT machine_type
FROM trx_sales_dept_machine_list
WHERE sales_department_id IN (
SELECT DISTINCT sales_department_id
FROM trx_user_sales_department
WHERE UPPER (user_name) =
UPPER ('&APP_USER.'))
AND SYSDATE >= valid_from)
AND tsh.sr_header_id = tsp.sr_header_id
can any one tell me wat is wroung in this query.
Any other way to write this?
Thank You,
AmitHi User....
Here is some date range SQL that my teams uses with some success:
For date columns that do not contain NULL values, try this (note the TRUNC, it might help with your "today" problem).
The hard coded dates allow users to leave the FROM and TO dates blank and still get sensible results (ie a blank TO date field asks for all dates in the future.
AND TRUNC(DATE_IN_DATABASE)
BETWEEN
decode( :P1_DATE_FROM,
TO_DATE('01-JAN-1900'),
:P1_DATE_FROM)
AND
decode( :P1_DATE_TO,
TO_DATE('31-DEC-3000'),:
:P1_DATE_TO)
For date columns that contain NULL values, try this (a little bit trickier):
AND nvl(TRUNC(DATE_IN_DATABASE),
decode( :P1_DATE_FROM,
decode( :P1_DATE_TO,
TO_DATE('30-DEC-3000'),
NULL),
NULL)
BETWEEN
decode( :P1_DATE_FROM,
TO_DATE('01-JAN-1900'),
:P1_DATE_FROM)
AND
decode( :P1_DATE_TO,
TO_DATE('31-DEC-3000'),
:P1_DATE_TO)
Note the 30-DEC-3000 versus 31-DEC-3000. This trick returns the NULL dates when the FROM and TO date range items are both blank.
I hope this helps.
By the way, does anyone have a better way of doing this? The requirement is given a date column in a database and a FROM and a TO date item on a page,
find all of the dates in the database between the FROM and TO dates. If the FROM date is blank, assume the user want all dates in the past (excluding NULL dates). If the TO date is blank, assume that the user wants all of the dates in the future (excluding NULL dates). If both FROM and TO dates are blank, return all of the dates in the databse (including NULL dates).
Cheers,
Patrick
Maybe you are looking for
-
Takes a long time to write email
I am using windows 7, internet explorer 8.1 . It takes a very long time to write an email, each letter typed, it takes a long time to appear on the page sometimes it don't appear.. Please help
-
Authentication for multiple AD domains
Hello, Currently we have MS AD datasource as UME for all our internal portal users. We also have spnego setup for authentication for our EP 7.0 The user path and group path is of the form dc=dom1 dc=company dc=domain dc=com. Now we are planning to
-
after installing firefox 5 I now cannot get by Google toolbar and all my bookmarks are on there. How do I go back to my previous version of firefox and get my Google toolbar back?
-
Change Font in Popup LOV?
Hello All, Apex 3.1 I need the font size for a value returned from a Popup LOV to be much smaller. How would I modify the popup LOV template in order to change the font of the values in the LOV, or if not the LOV itself, the font size of the return i
-
Can I use more than 1 camera with EOS utility simultaneously?
I have to manage 5 canon cameras to make them shots simultaneously. Is it possible to do this? Thanks.