Approval Based Query

Hi Experts,
I am trying to make 1 approval for GRPO which is on condirtion i.e If the DElivery date of purchase order is 2months later than Posting date then when if the user makes the GIN before or after 10 days of the delivery date thenit should go for approval.What should be the query for these.Thanks in advance
mona.

Hi MOna,
Please try thr following:
SELECT top 1 'TRUE' FROM OPOR T0
WHERE DATEDIFF(mm,T0.DocDate, getdate()) > 2 AND T0.Docnum = <docnum>
where docnum u can pick by $[$ item.variable.1]
rgds,
Premraj
Edited by: PremRaj kaushik on Feb 17, 2009 10:05 AM
Edited by: PremRaj kaushik on Feb 17, 2009 10:07 AM

Similar Messages

  • In R12 can we have approval based on rules like Cost Cente or Account?

    Hi All,
    -In R12 GL can we have approval based on rules like Cost Centers or Account. I know a rule based on Amount can be setup
    -In R12 GL can we use the PO hierarchy and its Rules
    Thanks.

    Dear Srinivasan Muthu,
    Assuming that Red,Blue and white are the values for the chracteristic say Colour and if this assigned to
    a class type say 023 batch,while uploading the stock,the system asks the chracteristic value.
    Say suppose if you are entering 561in MB1C or 101 movement in MIGO for that material and if you
    select for Blue,then in MMBE you can click on the stock quantity and right click-->batch classification.
    The system shows for Blue colour.
    check and revert back.
    Regards
    Mangalraj.S

  • Problem in block based Query

    Respected Guru's
    I have a problem eith block bassed query.i have already used this block based query and it is working too.
    But here i am facing the the problem.why becuz i have used a global variable to pass value for execute it.
    and used 'set_block_property' to execute this query ..
    go_block('block name ')
    execute_query;
    But it si showing unable to perform the query..
    How i do this?? plez help me out...

    Dear...........
    There are some possible reasons.
    1- The items that are in data block , there is some field data is not database field and you set the property of this item is
    "Data Base Item" = 'Yes' , means this field is not in table.
    2- user right problem
    3- see the block property where set the property QUERY = NO\
    THX.

  • Infoset based Query creating locks on DSO Activations

    Hello Experts,
    We are current on SAP NetWeaver 7.3 on ORACLE data base version 11.2.0.3.0.
    We have a query thats built on top of an infoset ( Based on left outer join on 0material and 0mat_plant) when user executes the query its causing locks on DSO activations.
    DSO activations are on hold due to locks on following table RSRNEWSIDS. when BASIS investigated this issue they came up with following reason
    executing this infoset based query is causing the locks and if we kill this job the DSO Activations run fine.
    The design is as follows
    Infoset(0material --Lefter outer Join -- 0mat_plant) ---> MP ---> BEx Query.
    Question 1) Is it possible for a query to create locks and cause holds on DSO Activations? if so what would be the reason?
    Question 2) Any solution or any of you faced similar issue?
    any solution is highly appreciated and rewarded.
    Regards,
    Vamsi.

    Question 1) Is it possible for a query to create locks and cause holds on DSO Activations? if so what would be the reason?
    It all comes down to SID if a query needs an association between fact and dimensions it will use SID and if you doing an activation it readjusts the SIDS so needs to be locked for the most up to date data.
    Question 2) Any solution or any of you faced similar issue?
    Do your query execution before or after DSO activation.
    Cheers!
    Suyash

  • Master based query, not showing value of a particular field.

    There's a customer master based query, where there's an attribute named, "ship to number", when i apply the selection range or >=, or > for that master, my ship to number field comes blank, inspite of having full data in it.
    Whereas when i enter the selection screen as equal to (=) for that master, my field gets populated in the query.
    What can be the cause, the field is not in compounding with the master.

    Hi,
    This could be ALPHA conversion. Try giving a full number prefixing with 000 to make full length
    Hope this helps
    PV

  • Exception while retrieving deleted document using metadata based query

    Hi,
    I am using dbxml 2.4.11 on Mac OS 10.5. My xml documents are stored in the dbxml with some metadata. Index on metadata is built. After delete a document I get an exception (error code is DATABASE_ERROR) while trying to use metadata based query:
    com.sleepycat.dbxml.XmlException: Error: DB_NOTFOUND: No matching key/data pair found, errcode = DATABASE_ERROR
    at com.sleepycat.dbxml.dbxml_javaJNI.XmlResults_hasNext(Native Method)
    at com.sleepycat.dbxml.XmlResults.hasNext(XmlResults.java:136)
    at gov.nasa.gsfc.md.mms.dbserver.server.XmlDbServerImpl.selectDocuments(XmlDbServerImpl.java:111)
    at gov.nasa.gsfc.md.xdba.server.ApplicationServiceImpl.findDocument(ApplicationServiceImpl.java:99)
    the code used to query:
    query = ... /DIF[dbxml:metadata('md:Id')='1234']
    // Perform the query.
    XmlResults results = getXmlManager().query(query, context);
    while (results.hasNext()) {
    XmlValue xmlValue = results.next();
    DocumentDTO documentDTO = new DocumentDTO();
    XmlDocument xmlDocument = xmlValue.asDocument();
    XmlMetaDataIterator metadataIt = xmlDocument.getMetaDataIterator();
    XmlMetaData md = metadataIt.next();
    while (md != null) {
    String name = md.get_name();
    String value = md.get_value().asString();
    NameValuePair nameValuePair = new NameValuePair(name,value);
    documentDTO.addToMetadataList(nameValuePair);
    md = metadataIt.next();
    retVal.add(documentDTO);
    counter = counter + 1;
    results.delete();
    context.delete();
    As name and value of the metadata I use kind of Id. If I use the query with a never before existing Id, I get the expecting error code DOCUMENT_NOT_FOUND, which is ok.
    Anybody has an idea why?
    Thanks a lot,
    Hoan.

    Hi George,
    I use now version 2.4.16, built a new database, but I can't found any records using the code mentioned above. First I thought there would be problem on Mac, tried to install the whole database and app on linux, but the problem still persists. The query I am using is:
    collection('////usr/server/gcmdx/xmldb/data/live.bdbxml')/DIF[dbxml:metadata('md:docType')='DIF' and dbxml:metadata('md:internalId')='456']
    (Switching back to 2.4.11, I find the records inserted)
    I can send a record if you want.
    Thank you for your help,
    Hoan.

  • Rule based query

    Hi all,
    please forward information about Rule Based Query, actually i am nott getting what is rule based query, please help me out....
    Thanks and Regards,
    Santosh

    rule based optimizer is a older technique and cannot be used efficiently to optimize a query, now -a- days only cost based optimization would be effective and these are categories under which a query can be tuned. usually explain plan on a query would fetch you the rule or cost based information....Thank you

  • GRC AC ARM/ARQ: Approver based on Business Unit / Company...

    Dear all.
    I am wondering if it is feasible to stablishn approver based on a Business Unit / Company.
    That is to say:
    At the Access Request Creation functionality the requestor could indicate the first name, last name, ....and also it could indicate an specific company, or business unit.
    The requestor also assign some roles for some system.
    The requestor Submits the request and it goes to the approver assigned to the company
    Regards and thank you.

    Hi Neraaj. Thanks for your reply, was great!
    So now i am moving to next level. My idea is as follow:
    have a user requestor who creates Access Request. They set the user id, the name, last name and the Organization (not the department, not the company,...)
    I want to create a BRF+ to send the request to an Organizational owner for the Organization set by the requestor.
    For that i don't want to create an agent rule because i have to maintain the relationship Organization-Owner into the decision table.
    I want to create a BRF+ rule to fecth the owner of the Organization. Where is this owner set? I want to upload a Organizational strcuture into the Access Control organization Master Data. For each Access Control Organization view you can set different tabs AC users, AC roles and Owners. Just like into the image below:
    For that i suppose i need a DB Look up just to search for the Owner set in that tab but i am not pretty sure about:
    Where is this relationship located?. I have check at HRP100X tables and i found the organizations objects and more data but nothing like the approver.
    Once i have found this relationship i don't know if it is possible to get the owner into a variable and set this variable as the result of the function.
    Any advise will be well come.
    Regards and thank you.

  • Error message when checking Aggregates on Info-set based Query

    Hi All,
    I have an Info-set (Inner-join between Info-cube and DSO) based Query. When I checking whethere it is picking up the aggregates (which is created on Info-cube) or not in RSRT, it is giving me following message -
    I>> Row: 23 Inc: SHOW_AGGR_COMPARISON Prog: CL_RSDDK_AGGREGATE_COLLECTION
    RS_EXCEPTION 
    301CL_RSDDK_AGGREGATE_COLLECTION
    SHOW_AGGR_COMPARISON
    I have checked fully that whatever fields I am using in my Query are available in Info-cube's Aggregate.
    Even when I am running same query (which I have created on same Info-cube direclty) in RSRT, it is picking up the aggregates.
    I have put the Request status 'Rolled up data (Rollup)' in Info-cube in Info-set as well.
    Please guide me what I need to do for picking up the aggregates.
    Regards,
    Dheeraj Kumar Garg

    No it is possible as per SAP.
    Please read follwoing help-
    http://help.sap.com/saphelp_nw70/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    It is talking abou the Special Features of InfoCubes in InfoSets.
    For queries based on an InfoSet with an InfoCube, the system decides at runtime whether aggregates can be used for the InfoCube. This is the case if all the required InfoObjects of the InfoCube exist in an aggregate. The following InfoObjects are required:
    The key figures of the InfoCube selected in the query
    The characteristics of the InfoCube selected in the query
    The characteristics required for a join with other InfoProviders in the InfoSet.
    Furthermore, as a prerequisite for using aggregates, all the data required by an InfoCube must be readable using logical access. For an InfoCube within an InfoSet with InfoCubes, it is no longer possible to read part of the data from one aggregate and part of the data from another aggregate or the InfoCube itself.

  • Use of an Oracle Hint for a WebI-Universe BEX based-Query  ?

    Hi,
    can I use an Oracle Optimizer Hint like /*+ PARALLEL(MyFacttable, 8) */
    for a WebI- ./. Universe- ./.  BEX based-Query ?
    Is this possible  ?
    If Yes: How and where to implement this  ?
    Thank You !
    Martin

    Hi,
    BusinessObjects only communictates with the MDX Interface by way of SAP's OLAP BAPI over RFC.
    Everything else, OLAP engine, Data Manager, etc etc Cube abstraction over a Relational schema is handled by the BW application.
    so No, BO can't "inject" any cleverness into BW processing architecture.
    Regards,
    H

  • GUI-based query designer

    Will there be a GUI-based query designer in the works for a future release ?
    Rekha

    Yes, we have plans for a Visual Query Builder.
    Regards
    Sue

  • Approval Based on Query

    Hi,
    I want approval procedure for inventory transfer when my destination warehouse is 'ABM'
    I tried folowing 2 queries but not working
    SELECT 'TRUE' WHERE $[WRT1.WhsCode] = 'ABM'
    or
    SELECT DISTINCT 'TRUE' WHERE $[WRT1.WhsCode] = 'ABM'
    Please help
    thanks

    Let us take we have three warehouses
    According to this i have explained this
    Create one UDF on Header Level as To Warehouse
    SELECT 'TRUE' where $[$UDF]='warehouse1Code'
    SELECT 'TRUE' where $[$UDF]='warehouse2Code'
    SELECT 'TRUE' where $[$UDF]='warehouse3Code'
    Save this three quires.
    and select warehouse1 to warehouse1 user user defaults, same for 2 and 3.
    Go to Approval Stage and Create New Select the user as Warehouse 1 user
    Create same for 2 and 3
    1. Create Approval template 1 with orginaters 2 and 3 warehouse users. and stages as approval stage1 where warehouse 1 user is selected.
    Documents as Inventry transfer document.
    Terms Click on when the following applies.
    Quirey name Select the quirey name as  quirey with 1st warehouse
    Create for second and third warehouse as same.
    It will work fine for approval in inventory transfer.

  • Need help in GROUPING of COLUMN Based Query

    Hi,
    I am facing problem in generating a scenario:
    I have built a Query like this:
    SELECT
    a.sal,
    a.country
    FROM
    employee a,
    department d
    WHERE
    a.dept_code=b.dept_code
    I want the query where the Query will produce a result set based on SALARY based on COUNTRY.
    For example if the COUNTRY is US then it will show the breaking of SALARIES.If the COUNTRY is NON US it will club the SALRIES
    Any help will be needful for me

    Hi,
    Here's one way:
    SELECT       deptno
    ,       SUM (sal)     AS sal
    FROM       scott.emp
    GROUP BY  deptno
    ,            CASE
               WHEN  deptno = 30
               THEN  empno
           END
    ORDER BY  deptno
    ;Output:
    `   DEPTNO        SAL
            10       8750
            20      10875
            30       1600
            30       1250
            30       1250
            30       2850
            30       1500
            30        950In the table, there are 3 rows with deptno=10, and 5 rows with deptno=20, but the CASE expression returns NULL for all of them, so there is only 1 sub-group for each of those deptnos.
    Edited by: Frank Kulash on Mar 13, 2013 5:41 AM
    This is essentially the same solution that Jeneesh already posted. (Sorry, I didn't see that before.)

  • What's wrong with my approval procedure query ?

    Hi everybody,
    This is my query :
    SELECT DISTINCT 'TRUE' FROM RDR1 WHERE $[$38.U_Prix_plancher.number] >=$[$38.Price.number]
    What's wrong with that ?
    Thanks
    Ara

    Ara,
    The problem is not with your Query but the problem is with the way the Query gets trigerred for an Approval Process.
    SAP only recognizes the value of a $[$38.x.x] parameter when that particular row is active.
    I suggest you can test this by simply highlight that particular row which breaks the rule and try to Add the document and you will see that the Approval Procudure will fire.
    Also remember an Approval Procudure works only when you are in Add Mode and does not on Update.
    Regards
    Suda

  • Need help in PO Approval Group Query

    Hi,
    I need a Query which will list of users that has the Approval Group “BUYER” and “BUYER_DEMO” assigned to them.
    It will be needful if anyone provides me the Query
    Thanks and Regards

    Hi
    Try this.
    SELECT PAPF.employee_number
    ,PAPF.full_name
    FROM po_control_groups_all PCGA
    ,po_position_controls_all PPCA
    ,per_all_assignments_f PAAF
    ,per_all_people_f PAPF
    WHERE PCGA.control_group_name IN ('BUYER','BUYER_DEMO')
    AND PCGA.control_group_id = PPCA.control_group_id
    AND PPCA.position_id = PAAF.position_id
    AND PAAF.person_id = PAPF.person_id
    Thanks and Regards,
    JD

Maybe you are looking for

  • App Store not working?

    App Store not working

  • How to put a value from a V$ view into a variable?

    in my procedure, i use the following codes: SELECT v.VALUE INTO l_cputime FROM V$SYSSTAT v WHERE v.NAME ='CPU used by session'; But it always reports "table or view does not exist". Is anything wrong with my codes? I can SELECT * FROM V$SYSSTAT; in t

  • Adobe camera raw and the nikon D80 in photoshop CS version 8

    How can I open RAW files from my nikon D80 in photoshop CS version 8 ? At the moment I have to open and edit my RAW files through Nikon View NX and then convert the files to Jpeg, dump them in a folder and then re-open them as Jpegs in photoshop, it'

  • Does UTF8 support Kurdish characters?

    We are trying to globalize our Telco app to support Kurdish. Our requirement is this: (1.) Users should be able to enter data from the Oracle Forms clients in Kurdish and English? (2.) When quering data, Kurdish users should be able to query only the

  • SQL Statement Dump

    hi We are getting the following sql statement dump, and i am not able to understand what should be done here, would anyone please advise Registered qb: SEL$1 0xc4c8a150 (PARSER) QUERY BLOCK SIGNATURE signature (): qb_name=SEL$1 nbfros=1 flg=0 fro(0):