Hide our user defined query

Dear All Master Brains,
It is possible to hide our user defined query in Query Manager, apart from our user authorization.
I am waiting for your …………..
Regards,
Team work never fails.

Hi,
Only by authorizations you can hide the user queries.
Alternate way, If you have created those query for report purpose then you convert that query into QPLD, So that users cannot view the query you developed instead they can view the report alone.
I hope this could help you.
Regards
Raja.S

Similar Messages

  • PLD report from user defined query

    Hello experts,
    Is possible to create a new PLD report from a user defined query ?
    Thanks in advance.
    Best regards
    Andrea

    Hi,
    It is possible on Query Print Layout Design(QPLD) so Try to create QPLD.
    Check this link u can get presentation slide form SAP.
    [Query Pld from SAP site]
    First you can try to create the Query report with UDF filed.
    for example,
    SELECT T0.DocNum, T0.DocDate, T0.CardName, T0.CheckSum, T0.U_UDF1, T0.U_UDF2, T0.U_UDF3
    FROM OVPM T0 WHERE T0.DocNum>='%0' and T0.DocNum<='%1' ORDER BY T0.DocNum
    Steps to Develop a User Report in QPLD:-
    If you save your Query in Query Manager. Next you can do this,
    ->> Choose the Query Manager on Top Menu.
    ->> Open the Qeury Manager Window.
    ->> Select the specific Query report. and
    ->> Click the Create Report button in Bottom on Qeury Manager Window.
    ->> then, Open the Create User Report Window and Select the User Report(System) in Base Template.
    If you Change the QPLD name.
    ->> Click OK.
    ->> (or) If your Query Report have parameter. Click OK.
    Now your Query report was Created QPLD.
    Note: All SELECT statement fields will be Stored and Display in Repetetive Area1. and
    Parameter Fields are in Repetetive Area0 so you can Try to Copy & Paste the Field_ID's to Repetetive Area Header (or) Repetetive Area Footer.
    Example:
    ->> Open the QPLD and Goto Field index Window, then
    ->> Select the Repetetive Area Header & Repetetive Area Footer ncrease the Height on Properties Window.
    ->> Create the Formula fields in Repetetive Area Header & Repetetive Area Footer.
    ->> Which Field you want to print in header or footer. Drag the Field ID(in Repetetive Area) Copy & Paste to Formula Field.
    Can you see to your Query PLD? do this,
    ->> Choose the Tools on Top Menu.
    ->> Click the Queries. -> Query Print Layout...
    ->> Open the Query Print Layout Window.
    ->> Click Reports Tab and Double the Template (Requrie QPLD) on QPLD Window.
    ->> Customize and Save the QPLD.
    Can you see your Query PLD Preveiw and Print? do this,
    ->> Choose the Tools on Top Menu.
    ->> Click the Queries. -> Query Print Layout...
    ->> Open the Query Print Layout Window.
    ->> Select Template in Report Tab on QPLD Window.
    ->> Click Print Preview on Top menu.
    Close this thread if issue solved
    Regards,
    Madhan.

  • User defined query parameter in query generator

    Hi All,
    i am using query generator in SAP to print some records of user defined query. precisely, the details about sales employees are to be printed. now the columns which exist in the database (ie. sales employee code, name, cardcode) etc can be given as a parameter like [%0] and [%1]. but some user defined parameter such as sales commission does not show as such parameter. i want one column as
    select T0.doctotal, (T0.doctotal * [%0]) / 100  as brokerage from OINV T0
    --where [%0] is some commission percentage that the user will give while running this query
    This query gives correct results but it gives the parameter name as 'doctotal' while showing. any idea as to how to handle it properly in SAP?
    thanks in advance,
    Binita
    Edited by: Binita  Joshi on Sep 8, 2009 3:35 PM

    I sometimes defined a UDT only for getting the appropriate parameter entering window. The table has no data; I used it only for its field names in this window.
    (The parameter request can be placed inside a comment and the entered value is used setting an SQL variable like this:
    declare @d datetime
    /*select t.createdate from ordr t where t.createdate=[%0]*/
    set @d=[%0]
    This SQL variable can be used later in the real query.)

  • User defined query parameter in QLD

    Hi All,
    i am using query generator in SAP to print some records of user defined query. precisely, the details about sales employees are to be printed. now the columns which exist in the database (ie. sales employee code, name, cardcode) etc can be given as a parameter like %0 and %1. but some user defined parameter such as sales commission does not show as such parameter. i want one column as
    select T0.doctotal, (T0.doctotal * [%0]) / 100  as brokerage from OINV T0
    --where [%0] is some commission percentage that the user will give while running this query
    This query gives correct results but it gives the parameter name as 'doctotal' while showing. also, when I join 4-5 tables and union, it totally misinterprets the paramater. any idea as to how to handle it properly in SAP?
    thanks in advance,
    Binita

    Hi
    I know it list many value but u can try by this way....
    declare @a numeric(3)
    set @a = (select  top 100 docnum from oinv T1 where T1.[docnum]= [%0])
    select T0.doctotal, (T0.doctotal * @a) / 100 as brokerage from OINV T0
    Thanks
    Kevin

  • User defined Query in Print Layout

    Is it possible to print output of a user defined query in a Print Layout. For example: in Quotation
    Kentish

    Thanks for your input.
    But its not related to Query Print Layout. I wanted to print a query result in a Sales Quotation so that when you print the Sales Quotation, you get the result of the Query on the Sales Quotation
    Thanks
    Kentish

  • Prevent user defined query from being activated with the CopyTo function

    Hi, I have a user defined query defined in one of the quantity field (in the grid) in the goods receipt PO window.
    The query updates the quantity depending on the number of another line field. The query works great, but I dont want it to be activated when a user clicks the "Copy From" purchase order. When this happens the query gets activated and changes the quantity.
    The query is defined to be activated "when exiting altered column", i have not selected the "Refresh Regulary"
    Please help!

    Thank you so much for replying,
    this is my query, depending on the column U_Empaque (type of package), I look for the right conversion in the OITM table of the item. Then I use the number from the column U_Cantidad_Empaque (Quantity Of the Type of package) to multiply by the conversion factor that I have defined for the Item in the OITM user fields. The conversion is a standard conversion, so It needs to be modified by the user to set it to the real quantity of the unit of measure (or unit of inventory). The query works great, except for the CopyTo and CopyFrom functions.
    Iam using 2007 A patch 45.
    México's settings.
    SELECT
    CASE
    WHEN (SELECT 'TRUE' FROM OITM T0 WHERE T0.ITEMCODE = $[$38.1.0] AND T0.U_EMPAQUE1 = $[$38.U_Empaque.0]) = 'True' THEN (SELECT ($[$38.U_Cantidad_Empaque.0]) * T1.U_CONVERSION1 AS 'Respuesta' FROM OITM T1 WHERE T1.ITEMCODE = $[$38.1.0] AND T1.U_EMPAQUE1 = $[$38.U_Empaque.0])
    WHEN (SELECT 'TRUE' FROM OITM T0 WHERE T0.ITEMCODE = $[$38.1.0] AND T0.U_EMPAQUE2 = $[$38.U_Empaque.0]) = 'True' THEN (SELECT ($[$38.U_Cantidad_Empaque.0]) * T1.U_CONVERSION2 AS 'Respuesta' FROM OITM T1 WHERE T1.ITEMCODE = $[$38.1.0] AND T1.U_EMPAQUE2 = $[$38.U_Empaque.0])
    WHEN (SELECT 'TRUE' FROM OITM T0 WHERE T0.ITEMCODE = $[$38.1.0] AND T0.U_EMPAQUE3 = $[$38.U_Empaque.0]) = 'True' THEN (SELECT ($[$38.U_Cantidad_Empaque.0]) * T1.U_CONVERSION3 AS 'Respuesta' FROM OITM T1 WHERE T1.ITEMCODE = $[$38.1.0] AND T1.U_EMPAQUE3 = $[$38.U_Empaque.0])
    WHEN (SELECT 'TRUE' FROM OITM T0 WHERE T0.ITEMCODE = $[$38.1.0] AND T0.U_EMPAQUE4 = $[$38.U_Empaque.0]) = 'True' THEN (SELECT ($[$38.U_Cantidad_Empaque.0]) * T1.U_CONVERSION4 AS 'Respuesta' FROM OITM T1 WHERE T1.ITEMCODE = $[$38.1.0] AND T1.U_EMPAQUE4 = $[$38.U_Empaque.0])
    END

  • Alert based  on user defined query

    Hi
    I have defined user defined field U_Jobnumber.I need to stop /inform user if user is trying to enter the same u_Jonbnumber again .This is being done at sales order (header level)
    Can you please help me to provide solution
    (Points will be awarded based on solution or advice )
    Thank you
    Bishal

    Hi Bishal,
    Rather than using an alert, you could put validation code in the SBO_SP_TransactionNotification stored procedure to check for the same job number before the document is added. This is a permitted solution as SAP allow users to add their own sql code to this proc (provided it's not inserting or updating data in SBO system tables).
    To set up this solution (on a test system):
    1) Open SQL Studio Management
    2) In the Object Explorer expand the company database, expand Programmability and Stored Procedures
    3) Right-click the SBO_SP_TransactionNotification stored procedure and choose Modify. This will create an update script in the main window.
    4) Look for the following section in the script:
    --     ADD     YOUR     CODE     HERE
    5) Underneath the above section, paste the following code:
    if @OBJECT_TYPE = '17' and @TRANSACTION_TYPE in ('U', 'A')
         if exists(select DocEntry from ORDR where DocEntry &lt;&gt; cast(@LIST_OF_COLS_VAL_TAB_DEL as int)
                        and U_Jobnumber is not null and U_Jobnumber &lt;&gt; ''
                        and U_Jobnumber = (select U_Jobnumber from ORDR where DocEntry = cast(@LIST_OF_COLS_VAL_TAB_DEL as int)) )
              begin
                   set @ERROR = '9999' -- Set your own error code here
                   set @ERROR_MESSAGE = 'The Job Number entered has already been used on a previous sales order.'
              end
    6) Click on Execute and you should get a message stating that the update was successful
    7) Test adding a new sales order
    The above script will raise an error when the user clicks on Add if a job number has been specified on the sales order and that number has already been used. It will not check if a job number has not been specified
    Kind Regards,
    Owen

  • Problem regarding user defined query

    I have a problem with Formatted Search in the Item table of the Order window.
    We got some extra functionality for our Indian subsidiary and they are provided via Formatted Searches.
    So for example there is one SQL statement with mathematical computations like (don't ask! SQL is not for mathematics, i would do this with SDK!)
    snip ###
    if $[RDR1.Itemcode]= '880000000000'
    SELECT (convert(decimal(16,2),$[RDR1.U_V_Width])convert(decimal(16,2),$[RDR1.U_V_Height])convert(decimal(16,2),$[RDR1.U_Qty_Nos]))/1000000
    else
    select ((select slength1 from oitm where itemcode=$[RDR1.Itemcode]) * $[RDR1.U_Qty_Nos]) from oitm where itemcode= $[RDR1.ItemCode]
    snip ###
    The Search is defined with:
    Search by saved query
    Auto Refresh when exiting altered column Qty(Nos)
    Display saved values
    If i have only one line, all theses queries (5) are computed in just a second. But if there are 20 or more it takes 20 seconds to compute!
    It feels like all fields of all rows will be computed again if i change one of the corresponding fields!
    What can i do to minimize waiting period for the user?

    Hi Frank,
    This may be the current limiting factor in using formatted searches at the line level. There are known performance issues with using formatted searches in this way with the UI slowly grinding to a halt as the number of rows on the document increases. The situation gets worse if formatted searches are combined with an add-on that uses the validate event on row fields. Is it correct that your main company (without formatted searches) gets better performance?
    The only workaround is not to use formatted searches :-\
    I've heard the situation is better in SBO 2007A but I haven't tested it myself.
    Kind Regards,
    Owen

  • Dynamically create Datatable result from user defined query

    I have seen some close solutions, but not 100% for the following:
    1. JSF Datatable exists in JSP, but no columns defined
    2. Execute query and populate results to JSF with headings and data
    3. Binding this data to the Datatable
    I have managed to created column headers (facets) but can't identify how to populate the rows based on the resultset. If one does not have a resultset but rather a collection of domain objects, how does one bind the table to the displayable objects (domain) ?
    Thanks to the gifted one who leads me to enlightenment !
    -- The grass may be greener, but I'm looking for a maintenance free lawn.

    Hello,
    Congrats !!! you mamnaged to solve the problem.
    Please can you let me know how did u solve the problem as I'm also facing the same problem..
    Also another request Please can you let me know if there if any kind of good documentaion on jsf components as well as some examples.
    I'm using MyEclipse4.1
    Thanks for any help
    abhi

  • Executing user defined query

    Hi,
    I am trying to build an interface where a user will input his query(could be any query). His query is then executed and the results displayed along with the name of columns he gave in the query.
    for e.g. the user gives
    select * from dept
    the o/p shud be
    deptno dname loc
    10 ..... .....
    20 ...... .....
    How can we do this? i guess using metadata.
    Please suggest
    Ashish

    Ashish,
    There are several open-source (and commercial) projects available that already do what you are trying to achieve. You can find some on the Sourceforge Web site. Just do a search for "JDBC" and "SQL". One example is SQuirreL.
    Good Luck,
    Avi.

  • User Defined Query and Alerts

    Hello guys, I need to set up an alert that happens whenever a Sales Order or Purchase Order is added. I am happy with the alerts procedure but I cannot set up a query.
    Can anyone please help me set up queries that simply mean 'when SO added' and 'when PO added'?
    Many thanks

    OK Groovy - really glad you are following up on this.  Many financial folks like to have this kind of review (especially when they first get onto SAP B1) since it gives them a comfort level of being able to see what is done.
    Good time for you to take a look at the Query Generator and learn a bit of a new skill (PATH: Reports > Query Generator)!  Once you get the hang of it, you can be a real whiz!
    Here is the exact SQL used in their Alert Messaging System.  Type this in exactly as you see it below in the Demo or Test System just to try it out and get a hang of it...
    <b>SELECT
    T0.DocNum AS 'Doc Num',
    T0.UserSign AS 'User ID',
    T0.DocStatus AS 'Doc Status',
    T0.DocDate AS 'Post Date',
    FROM ORDR T0
    WHERE T0.DocStatus = 'O'
    ORDER BY T0.DocNum DESC</b>
    A few comments - the DocNum and UserSign fileds display the famous golden 'drill down' arrows which allow the person to take a look at the document and whoever process the transaction.
    An added bonus is that you can use this exact SQL to query many different tables and use them as their own individual alerts (for example, just substitute ORIN for ORDR and the system will display the AR Credit Memo - all the field names are the same!).
    A WORD OF CAUTION:  Remember this SQL is picking up orders with the status of 'O(pen)'.  It is very important how often you run this Alert Message because it might not report all orders created depending upon the time between order creation and SQL running to generate the alert.  Consider the following scenario: A firm has the alert come up weekly on Friday.  Monday a person creates an order 123, the warehouse ships on Tuesday.  Home office bills the order and closes it on Thursday.  When the alert message is generatedon FRIDAY, 123 will NOT be in the list since it now has a status of 'C(losed)'.  That scenario requires different 'WHERE' selection criteria dealing with dates...
    Good luck - Zal

  • User Defined Query Result Ordering ???

    I have a problem in Ordering my query to desired result.
    Example : In my WHERE clause I specify IN operator and give some values (Integer) : I want the result to be in the same order what I have specified in the In operator values ?.
    Faheem

    You can use a Decode in the order by clause
    e.g.
    select * from table
    where field1 in ('d', 'a', 'c', 'b')
    order by decode(field1, 'd', 1, 'a', 2, 'c', 3, 'b', 4)
    I have a problem in Ordering my query to desired result.
    Example : In my WHERE clause I specify IN operator and give some values (Integer) : I want the result to be in the same order what I have specified in the In operator values ?.
    Faheem

  • Updating an Array returned from a User Defined Query

    I have the following code in the AddRecordsToSave method of a window. I am
    unsure how to save a change I want to make to a field in an Array. I have
    tried to use LogAttr (as pointed out in my code by the >>>>>>>>
    characters) and am unsure if this is the proper way to update the field
    because the change is not reflected in the database after I save. What is
    the correct syntax for updating a field in an Array?
    I know the syntax must be easy, but am unable to kind any doc on how to do
    it.
    Thanks in advance for everyone's responses.
    Ken Ackimenko
    Sentai Software Corporation - World Headquarters
    (403)423-3113 Ext. 30
    [email protected]
    theControlEnt:TextNullable = new();
    theControlEnt.SetValue(UserDefaultValues.Control_Ent);
    AP_CONTROLQ : AP_CONTROLQuery = new();
    AP_CONTROLArray : array of AP_CONTROLClass = new();
    theClient: APClient = new();
    AP_CONTROLQ.AddAttr(attr=AP_CONTROLQuery.ATTR_CONTROL_ENT);
    AP_CONTROLQ.AddAttr(attr=AP_CONTROLQuery.ATTR_INVOICE_NO);
    AP_CONTROLQ.AddConstraint(attr = AP_CONTROLQuery.ATTR_CONTROL_ENT,
    operation = ConstraintOperation.OP_EQ,
    value=UserDefaultValues.CONTROL_ENT);
    AP_CONTROLArray = (Array of
    AP_CONTROLClass)(theClient.Select(AP_CONTROLQ));
    while theFlag.Value = TRUE do
    AP_TRANSArray.Clear();
    AP_TRANSQ.ClearConstraints(deep=FALSE);
    AP_TRANSQ.AddConstraint(attr = AP_TRANSQuery.ATTR_TRANS_NO,
    operation = ConstraintOperation.OP_EQ, value=theTransNo);
    AP_TRANSArray = (Array of AP_TRANSClass)(theClient.Select(AP_TRANSQ,
    ConcurrencyMgr.TR_CONTINUE));
    if AP_TRANSArray.Items > 0 then
    theTransNo.SetValue(theTransNo.Value + 1);
    GetCurrentRecord().Trans_No.SetValue(theTransNo.Value);
    else
    theFlag.Value = FALSE;
    for eachRecord in AP_CONTROLArray do
    BusinessClient.LogAttr(source = eachRecord, attr =AP_CONTROLQuery.ATTR_INVOICE_NO);
    eachRecord.INVOICE_NO.SetValue( theTransNo.Value + 1);
    end for;
    //theClient.Update(source = AP_CONTROLArray);
    //BusinessClient.LogAttr(AP_CONTROLArray[1],
    AP_CONTROLQuery.ATTR_SIMPLE);
    //AP_CONTROLArray[1].INVOICE_NO.SetValue(AP_CONTROLArray[1].INVOICE_NO.Value
    + 1);
    end if;
    end while;

    Hi Karthik,
    <b> a) To do this compilation - what are the standard XI jar files to be made as a part of build path. </b>
    Jar files are already comiled ones , you don't need to do again. just imnport in archives.
    <b>
    b) How do I reuse this udf in another message mapping - ?</b>
    Creatre an object for the class in archived jar in udf and call the respective udf.
    hope it is clear.
    Thanks,
    venu.

  • Create a user defined approval query

    anybody can help me whitch syntax i have to use to create a user defined query for an approval template please?
    for Exp: i want to create a query to check if a the customer in an invoice ="C0001"
    so select distinct 'true' where ????(current invoice customercode)="C0001"
    10x

    Hi.......
    Try This......
    Select Distinct 'True' From OCRD T0 where T0.CardCode='C0001' and T0.CardCode=$[OINV.CardCode.0]
    Hope this will solve the problem......
    Reagards,
    Rahul

  • Modifying/Updating User Defined Field in a Scheduled Task

    I've written a notification task to send an e-mail to a manager who has a contract employee with a contract that is about to expire.
    Once we isolate a user who has a contract about to expire, we send a notification to the manager. The date that the notification is sent out should be stored in the USR table in a user-defined field, "USR_UDF_LASTSENT."
    Updating this USR_UDF_LASTSENT field is where I'm having difficulty.
    I've tried using the UserManager in a couple of ways. Suppose I've isolated a single user using SearchCriteria and the UserManager and have a single User object called "currentUser." I want to store a Date object in the user defined field "USR_UDF_LASTSENT". Date today = new Date();
    I've tried: currentUser.setAttribute("USR_UDF_LASTSENT", today); //This will run without error, but when I check the DB there is no change to the attribute.
    With a defined instance of UserManager userManager, I've tried: userManager.modify("USR_UDF_LASTSENT", today, currentUser); //This errored out with this error - oracle.iam.identity.exception.NoSuchUserException: IAM-3054135:No user found for the criteria USR_UDF_LASTSENT-9/24/13 2:58 PM.:USR_UDF_LASTSENT:9/24/13 2:58 PM. It looks like it's doing a search rather than a modification.
    I've also tried using the entity manager in the following way:
    Date today = new Date();
    HashMap<String, Object> mapAttrs = new HashMap<String, Object>(); 
    mapAttrs.put("USR_UDF_LASTSENT", today); 
    EntityManager entMgr = Platform.getService(EntityManager.class); 
    entMgr.modifyEntity("User", currentUser.getEntityId(), mapAttrs);
    But it returns with this error: Failed: oracle.iam.platform.entitymgr.UnknownAttributeException: User : [USR_UDF_LASTSENT]
    Is my entityType, "User" inappropriate in this case? What should be used here?
    How can I Set or Update this user defined field from a scheduled task?

    Thanks guys. I did go to Identity System Administration console and chose 'Export' from under "System Managment" which I believe Kevin may have been hinting at. I got an xml export of the AttributeDefinitions for our user defined fields. In this file, there was a header for the attribute I was looking for:
    <AttributeDefinition repo-type="API" name="LastSent" subtype="User Metadata">
       <multiValued>
       <backendName>usr_udf_lastsent</backendName>
    I put the string "LastSent" in place of USR_UDF_LASTSENT in the EntityManager version of my attempt at this task. I believe this is what Kevin and delhi were getting at.
    This didn't work:
    Date today = new Date();
    HashMap<String, Object> mapAttrs = new HashMap<String, Object>(); 
    mapAttrs.put("USR_UDF_LASTSENT", today); 
    EntityManager entMgr = Platform.getService(EntityManager.class); 
    entMgr.modifyEntity("User", currentUser.getEntityId(), mapAttrs);
    But this did:
    Date today = new Date();
    HashMap<String, Object> mapAttrs = new HashMap<String, Object>(); 
    mapAttrs.put("LastSent", today); 
    EntityManager entMgr = Platform.getService(EntityManager.class); 
    entMgr.modifyEntity("User", currentUser.getEntityId(), mapAttrs);
    I wonder if currentUser.setAttribute("LastSent", today); would work... Hmm.

Maybe you are looking for

  • Please to help rookie with quad core on P35 Neo 2 (MS-7345)

    I bought a home built computer (specs below) for my sons almost a year ago and have had nothing but trouble with it.  After I finally realized that the graphics card was over-heating it worked better for a bit after replacing Radeon 9600 with some cr

  • Down payment for AUC error

    hello Gurus. we want to down payment against asset Purchase order using F-48. during Simulate the Document we get the following error. Account 26318501 is not a reconciliation account Message no. AU138 Diagnosis Processing terminated because account

  • Concurrent report ending in warning with status 127 (post upgrade to R12.1.

    Hi, We ran a concurrent report with Print options set for a custom report. The report is ending in warning with the below error: ------------- 1) PRINT   ------------- Printing output file. Request ID : 356879180       Number of copies : 1       Prin

  • My Ipod Touch 4G can't connect to my internet

    My Ipod Touch 4G won't connect to my internet anymore.  I have had this Ipod for about 2 months and have never had any noticeable problems with my internet connection, but today I left the house for an hour and when I came back I couldn't get it to c

  • Urgent help with OWB

    Hi, This is urgent. I have 5 tables to take from a source to a target schema. Each row of each table needs to be augmented with a warehouse_id and a date. I created a table called warehouse_tag which has two columns of warehouse_id and warehouse_date