Fnd_user last_logon_date query

Looking through the applsys.fnd_user table on our R12.1.1 EBS system, I see that the last_logon_date field on the table often has lots of entries where the last_logon_date is e.g. 01-APR-2011 05:57:36.
For those records, the last_updated_by is set to -1.
Our sites are not even open then, so staff won't be logging in manually.
I wonder what else might be causing the last_logon_date field to be updated?
I'm looking to housekeep our user records, and thought I could do so by looking at the last_logon_date field, but if the field is updated by something on the system, then I can't rely on it to know when users last used the system. Plus I think that field isn't updated if people log in via Discoverer.
Any advice much appreciated.
Thanks!
Edited by: 20100511 on Apr 4, 2011 9:58 AM

Hi;
Compare logon time wiht your scheduled CM. If you cant get details you could enable auditing and can see who login system and doing what
Concurrent manager-Find Scheduled CM
How can I check the all schedule CM jobs' time?
Regard
Helios

Similar Messages

  • Last login details in Apps 11i

    Hi All,
    Is there a script to find the last login details of a User in Oracle Apps 11i ?
    Thanks,

    Afia wrote:
    Hi All,
    Is there a script to find the last login details of a User in Oracle Apps 11i ?
    Thanks,Query FND_USER (LAST_LOGON_DATE column) -- http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=FND_USER&c_owner=APPLSYS&c_type=TABLE
    Also, see old threads for the similar topic -- https://forums.oracle.com/forums/search.jspa?threadID=&q=Connected+AND+Users&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Create alert for users not login in R12 for specific number of  days

    Dear experts
    we have R12.1.1 .
    i want to create auto alert for users who dont login to R12 application for defined period e.g 30 days .
    please tell me that can i implement this ?
    Regards

    i want to create auto alert for users who dont login to R12 application for defined period e.g 30 days .
    please tell me that can i implement this ?You can use Oracle Alert to do this. To check when was the last time the user logged in to the application, query FND_USER.LAST_LOGON_DATE (for example, SYSDATE - LAST_LOGON_DATE > 30).
    http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=FND_USER&c_owner=APPLSYS&c_type=TABLE
    Thanks,
    Hussein

  • Supplier User Management- Register Supplier User

    Supplier User Management > Register Supplier User
    I do this on the form and it sets up a supplier user with no problem. It even sets up the securing attribute for the user with the iSupplier Portal id.
    Is there a way to do this registering on the backend? An API I don't know about? Or some other way to do this?
    Thanks

    Not sure about APIsor WFlows, but I did some work on iSupplier a while ago, and found this SQL useful.
    #       iSUPPLIER APPS.PO_SUPPLIER_USERS_V VIEW
            GENERATES LIST OF iSUPPLIER USERS
            LINKED TO SUPPLIER TABLES
    SELECT *
      FROM apps.po_supplier_users_v;
    #        iSUPPLIER EXTERNAL SUPPLIER REGISTRATIONS
    SELECT   *
        FROM pos.pos_supplier_registrations psr
    ORDER BY psr.creation_date DESC;
    #        iSUPPLIER FND REGISTRATIONS
    SELECT fr.registration_id
         , fr.creation_date
         , DECODE(
              fr.registration_type
            , 'POS_REG', 'BY_CCC'
            , 'POS_SUPP_REG', 'ONLINE'
           ) status
         , fr.registration_status
         , fr.user_title
         , fr.first_name
         , fr.middle_name
         , fr.last_name
         , fr.email
         , fr.phone
         , fr.requested_user_name
      FROM apps.fnd_registrations fr;
    #        iSUPPLIER PRODUCTS AND SERVICES
    SELECT *
      FROM apps.pos_sup_products_services psps
         , apps.fnd_lookup_values_vl
    WHERE psps.vendor_id = '65352'
       AND fnd_lookup_values_vl.lookup_type = 'POS_SUP_PROD_SVC_STATUS'
       AND fnd_lookup_values_vl.lookup_code = psps.status
       AND fnd_lookup_values_vl.enabled_flag = 'Y'
       AND fnd_lookup_values_vl.start_date_active < SYSDATE
       AND (
               fnd_lookup_values_vl.end_date_active IS NULL
            OR fnd_lookup_values_vl.end_date_active > SYSDATE
    #        iSUPPLIER BANK ACCOUNT CHECKING
    SELECT   psbar.creation_date
           , psbar.request_status
           , fu.description supplier_user
           , fu.user_name supplier_username
           , pv.vendor_name supplier
           , psbar.last_update_date
           , fu2.user_name last_updated_by_userid
           , fu2.description last_updated_by_name
           , psbar.bank_name
           , psbar.bank_number
           , psbar.bank_branch_name
           , psbar.bank_branch_number
           , psbar.bank_branch_type
           , psbar.bank_account_name
           , psbar.bank_account_number
           , psbar.account_description
           , psbar.account_type
           , psbar.account_holder_name
           , psbar.notes_from_supplier
           , psbar.notes_from_buyer
           , psbar.address_line1
           , psbar.address_line2
           , psbar.address_line3
           , psbar.address_line4
           , psbar.city
           , psbar.county
           , psbar.state
           , psbar.zip
        FROM pos.pos_sup_bank_account_requests psbar
           , applsys.fnd_user fu
           , applsys.fnd_user fu2
           , po.po_vendors pv
       WHERE psbar.created_by = fu.user_id
         AND psbar.last_updated_by = fu2.user_id
         AND psbar.vendor_id = pv.vendor_id
         AND pvsa.purchasing_site_flag = 'Y'
    ORDER BY 1 DESC;
    #       iSUPPLIER APPS.PO_SUPPLIER_USERS_V VIEW
            GENERATES LIST OF iSUPPLIER USERS
            LINKED TO SUPPLIER TABLES
    SELECT   fnd_user.user_name user_name
           , fnd_user.creation_date user_creation_date
           , fnd_user.last_logon_date
           , po_vendors.vendor_name supplier
           , po_vendors.vendor_id supplier_id
              user_parties.person_first_name || ' '
              || user_parties.person_last_name
             ) user_party_full_name
           , user_parties.email_address
        FROM apps.fnd_user
           , apps.hz_parties user_parties
           , apps.hz_parties company_parties
           , apps.po_vendors
           , apps.hz_relationships vendor_relationship
           , apps.hz_relationships employment_relationship
       WHERE fnd_user.person_party_id = user_parties.party_id
         AND employment_relationship.object_id = company_parties.party_id
         AND employment_relationship.subject_id = user_parties.party_id
         AND employment_relationship.relationship_type = 'POS_EMPLOYMENT'
         AND employment_relationship.relationship_code = 'EMPLOYEE_OF'
         AND employment_relationship.start_date <= SYSDATE
         AND employment_relationship.end_date >= SYSDATE
         AND vendor_relationship.object_id = po_vendors.vendor_id
         AND vendor_relationship.subject_id = company_parties.party_id
         AND vendor_relationship.relationship_type = 'POS_VENDOR_PARTY'
         AND vendor_relationship.relationship_code = 'PARTY_OF_VENDOR'
         AND vendor_relationship.start_date <= SYSDATE
         AND vendor_relationship.end_date >= SYSDATE
         AND fnd_user.last_logon_date IS NOT NULL
    ORDER BY 2 DESC;
    #        iSUPPLIER SPECIFIC PROFILES
    SELECT DECODE(
              fpov.level_id
            , 10001, 'Site'
            , 10002, 'Application'
            , 10003, 'Responsibility'
            , 10004, 'User'
            , NULL, 'Not Set'
           ) profile_level
         , mw_level_values.mw_set_against set_against_id
         , fu.description person
         , fpot.user_profile_option_name
         , fpot.description
         , fpo.profile_option_name
         , fpov.profile_option_value
         , fpov.last_update_date
         , fpov.last_updated_by
      FROM applsys.fnd_profile_option_values fpov
         , applsys.fnd_profile_options fpo
         , applsys.fnd_profile_options_tl fpot
         , applsys.fnd_user fu
         -- TABLE BELOW GROUPS ALL DATA INTO A BIG UNION FOR USE LATER ON
         -- ALL RESPS, ALL APPLICATIONS, AND ALL USERS
    ,      (SELECT '10001 0' mw_level_id
                 , 'Set at Site Level' mw_set_against
              FROM DUAL
            UNION
            SELECT '10002 ' || fat.application_id
                 , fat.application_name
              FROM applsys.fnd_application_tl fat
            UNION
            SELECT '10003 ' || frt.responsibility_id
                 , frt.responsibility_name
              FROM applsys.fnd_responsibility_tl frt
            UNION
            SELECT '10004 ' || fu.user_id
                 , fu.user_name
              FROM applsys.fnd_user fu) mw_level_values
    WHERE fpo.profile_option_id = fpov.profile_option_id(+)
       AND fpot.profile_option_name = fpo.profile_option_name
       AND fpov.level_id || ' ' || fpov.level_value = mw_level_values.mw_level_id(+)
       AND mw_level_values.mw_set_against = fu.user_name(+)
       AND fpo.end_date_active IS NULL
    --   AND LOWER(mw_level_values.mw_set_against) LIKE
    --                           '%ccc internet procurement catalog administration%'
    --   AND LOWER(fpov.profile_option_value) LIKE '%gov%'
    --   AND LOWER(fpot.user_profile_option_name) LIKE '%one%time%'
    --   AND fpot.profile_option_name LIKE '%FND_OA_ENABLE_DEFAULTS%'
       AND fpot.user_profile_option_name IN
              ('POS: External Responsibility Flag', 'Apps Servlet Agent'
             , 'Application Framework Agent', 'Applications Servlet Agent'
             , 'Applications JSP Agent', 'Applications Web Agent'
             , 'Default Country', 'Node Trust Level', 'HZ: Generate Party Number'
             , 'Applications Portal Logout', 'GUEST_USER_PWD'
             , 'iSP Default Responsibility For External User'
             , 'POS: Allow Invoice Backdating'
             , 'POS: Default Responsibility for Newly Registered Supplier Users'
             , 'PON: External Application Framework Agent', 'POS: External URL'
             , 'Sourcing Default Responsibility For External User'
             , 'Responsibility Trust Level', 'Default Country'
             , 'GL Set of Books Name', 'Applications Portal Logout');

  • Error in procedure with cursor which has a select query in NVL

    cursor has a select statement in the NVL functiion
    sample query in given
    SELECT fu.user_name Core_ID,
    fu.description User_Name,
    fu.LAST_LOGON_DATE LAST_LOGON_DATE,
    TRUNC(SYSDATE) - TRUNC(fu.LAST_LOGON_DATE) DAYS_SINCE_LAST_LOGON,
    NVL((SELECT 'YES' FROM custmot.moto_rma_approvers mra
    WHERE mra.primary_approver = fu.user_name),'NO') PRIMARY_RMA_APPROVER,
    NVL((SELECT 'YES' FROM custmot.moto_rma_approvers mra
    WHERE mra.secondary_approver = fu.user_name), 'YES', 'ALL RESPONSIBILITIES',
    DECODE(fu.employee_id, NULL, 'USER ACCOUNT', 'ALL RESPONSIBILITIES' ))) END_DATE_WHAT
    FROM apps.fnd_user fu
    This query runs fine when it is run seperately. But when its defined in cursor in a procedure it throws up the following error.
    "Encountered the symbol "SELECT" when expecting one of the following:
    ( - + mod not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count c"
    can you please help us with this

    I noticed your statement has one additional end-bracket at the end. Probably this is just a typo. It should read like this:
    SELECT fu.user_name core_id,
           fu.description user_name,
           fu.last_logon_date last_logon_date,
           TRUNC (SYSDATE) - TRUNC (fu.last_logon_date) days_since_last_logon,
           NVL ((SELECT 'YES'
                   FROM custmot.moto_rma_approvers mra
                  WHERE mra.primary_approver = fu.user_name), 'NO')
                                                             primary_rma_approver,
           NVL ((SELECT 'YES'
                   FROM custmot.moto_rma_approvers mra
                  WHERE mra.secondary_approver = fu.user_name),
                'YES',
                'ALL RESPONSIBILITIES',
                DECODE (fu.employee_id,
                        NULL, 'USER ACCOUNT',
                        'ALL RESPONSIBILITIES'
               ) end_date_what
      FROM apps.fnd_user fuIf that doesn't help, you may make your cursor dynamic:
       OPEN c FOR 'SELECT fu.user_name core_id,
           fu.description user_name,
           fu.last_logon_date last_logon_date,
           TRUNC (SYSDATE) - TRUNC (fu.last_logon_date) days_since_last_logon,
           NVL ((SELECT ''YES''
                   FROM custmot.moto_rma_approvers mra
                  WHERE mra.primary_approver = fu.user_name), ''NO'')
                                                             primary_rma_approver,
           NVL ((SELECT ''YES''
                   FROM custmot.moto_rma_approvers mra
                  WHERE mra.secondary_approver = fu.user_name),
                ''YES'',
                ''ALL RESPONSIBILITIES'',
                DECODE (fu.employee_id,
                        NULL, ''USER ACCOUNT'',
                        ''ALL RESPONSIBILITIES''
               ) end_date_what
      FROM apps.fnd_user fu';

  • ORACLE E-BUSINESS SUITE 11i Query to find users who never logged in

    Dear, All -
    ORACLE E-BUSINESS SUITE 11i
    Is there a query to find out a list of users who were created but never logged into the system. I believe these users do no appear in FND_USER table since they never logged in.
    Thanks in advance!

    FAIRE wrote:
    Dear, All -
    ORACLE E-BUSINESS SUITE 11i
    Is there a query to find out a list of users who were created but never logged into the system. I believe these users do no appear in FND_USER table since they never logged in.
    Thanks in advance!All application users details are stored in FND_USER table (whether they logged in or not).
    To find the list of those users, please run this query:
    SQL> select *
    from FND_USER
    where LAST_LOGON_DATE is NULL
    and END_DATE is NULL;Thanks,
    Hussein

  • Help with SQL query

    Hi all,
    I need the last run date of each Discoverer report with the user name of who created the report. The following SQL does this, but the Last_Run date shows the same for each report which is wrong. If I run the SQL that shows me the last run date of each report it does show the correcct last run date. But when I add the extra code to sow me the user who created the report it goes wrong.
    I am running the query in Toad:
    SELECT DISTINCT
    *(SELECT TRUNC(MAX(DM.QS_CREATED_DATE))*
    FROM
    EUL9I.EUL5_QPP_STATS DM,
    EUL9I.EUL5_QPP_STATS STATS
    WHERE DM.QS_DOC_NAME = STATS.QS_DOC_NAME) LAST_RUN, Disco_Docs.Doc_Name "Discoverer Workbook"
    ,Trunc(Disco_Docs.Doc_Created_Date) "Workbook Create Date"
    ,CASE
    WHEN Instr(Disco_Docs.Doc_Created_By
    ,'#') = 0 THEN
    Disco_Docs.Doc_Created_By
    WHEN Instr(Disco_Docs.Doc_Created_By
    ,'#') > 0
    AND Instr(Disco_Docs.Doc_Created_By
    ,2) = 0 THEN
    (SELECT Fu.User_Name
    FROM Fnd_User Fu
    WHERE Fu.User_Id = Substr(Disco_Docs.Doc_Created_By
    ,2
    ,5))
    ELSE
    NULL
    END "Workbook Owner/Creator"
    FROM EUL9I.Eul5_Documents Disco_Docs
    ,EUL9I.Eul5_Access_Privs Disco_Shares
    ,EUL9I.Eul5_Eul_Users Disco_Users
    WHERE Disco_Docs.Doc_Id = Disco_Shares.Gd_Doc_Id(+) AND
    Disco_Users.Eu_Username(+) NOT IN ('EUL5', 'PUBLIC') AND
    Disco_Users.Eu_Id(+) = Disco_Shares.Ap_Eu_Id

    Your code formatted for readability...
    SELECT DISTINCT
          (SELECT TRUNC(MAX(DM.QS_CREATED_DATE))
           FROM   EUL9I.EUL5_QPP_STATS DM,
                  EUL9I.EUL5_QPP_STATS STATS
           WHERE  DM.QS_DOC_NAME = STATS.QS_DOC_NAME) LAST_RUN
          ,Disco_Docs.Doc_Name "Discoverer Workbook"
          ,Trunc(Disco_Docs.Doc_Created_Date) "Workbook Create Date"
          ,CASE WHEN Instr(Disco_Docs.Doc_Created_By,'#') = 0 THEN
                  Disco_Docs.Doc_Created_By
                WHEN Instr(Disco_Docs.Doc_Created_By,'#') > 0 AND Instr(Disco_Docs.Doc_Created_By,'#',2) = 0 THEN
                  (SELECT Fu.User_Name
                   FROM   Fnd_User Fu
                   WHERE  Fu.User_Id = Substr(Disco_Docs.Doc_Created_By,2,5))
                ELSE
                  NULL
           END "Workbook Owner/Creator"
    FROM   EUL9I.Eul5_Documents Disco_Docs
          ,EUL9I.Eul5_Access_Privs Disco_Shares
          ,EUL9I.Eul5_Eul_Users Disco_Users
    WHERE  Disco_Docs.Doc_Id = Disco_Shares.Gd_Doc_Id(+)
    AND    Disco_Users.Eu_Username(+) NOT IN ('EUL5', 'PUBLIC')
    AND    Disco_Users.Eu_Id(+) = Disco_Shares.Ap_Eu_IdThe code you've added (I assume that's the bit you bolded ) queries the same value for each row it returns. It's not tied into the main query in any way, so of course it will always return the same.

  • SQL query or view used internally by Discoverer Open Workbook from Database

    Hi Experts,
    I am involved in developing a web application wherein I have to display the 'All Workbooks' similiar functionality in the 'Open Workbook from Database' dialog box of Discoverer. Can anybody provide me with the background query or view that Discoverer uses to retrieve this data for workbook listing? Please let me know if my question is confusing and requires more details.
    Thanks
    Thomas

    Hi,
    If you just need the list of workbooks then you need to use the EUL_DOCUMENT table:
    SELECT u.User_Name          Owner_Name
    *,Doc.Doc_Name Workbook_Name*
    *,Doc.Doc_Updated_Date Last_Update_Date*
    FROM   Eul_Us.Eul5_Documents Doc
    *,Eul_Us.Eul5_Eul_Users Own_Usr*
    *,Fnd_User u*
    WHERE  Own_Usr.Eu_Id = Doc.Doc_Eu_Id AND
    To_Char(u.User_Id(+)) = Substr(Own_Usr.Eu_Username
    *,2*
    *,10);*
    If you want the exact same list then you need to do the above along with the sharing :
    SELECT DISTINCT
    case when instr(disco_docs.doc_created_by,'#')=0 then disco_docs.doc_created_by
    when instr(disco_docs.doc_created_by,'#')>0 and instr(disco_docs.doc_created_by,'#',2)=0 then (select fu.user_name from fnd_user fu where fu.user_id=substr(disco_docs.doc_created_by,2,5))
    else NULL
    end "Workbook Owner/Creator",
    disco_docs.doc_name "Workbook Name",
    disco_docs.Doc_Updated_Date  "Last Update Date",
    case when instr(disco_users.eu_username,'#')=0 then disco_users.eu_username
    when instr(disco_users.eu_username,'#')>0 and instr(disco_users.eu_username,'#',2)=0 then (select fu.user_name from fnd_user fu where fu.user_id=substr(disco_users.eu_username,2,5))
    else (select resp.responsibility_name from fnd_responsibility_tl resp where resp.responsibility_id=substr(disco_users.eu_username,2,5))
    end as "Shared Name / Responsibility"
    FROM
    eul_us.eul5_documents disco_docs,
    eul_us.eul5_access_privs disco_shares,
    eul_us.eul5_eul_users disco_users
    WHERE
    disco_docs.doc_id = disco_shares.gd_doc_id (+)
    and disco_users.eu_username(+) NOT IN ('EUL5', 'PUBLIC')
    AND disco_users.eu_id(+) = disco_shares.ap_eu_id;
    * Change the EUL_US to your discoverer schema...
    Then you will need to compare the current user with the sharing list or creator
    Good luck
    Tamir

  • SQL Query using Subquery to get the difference in budget versions

    Hi
    I am using the following query to find the difference between revenue budget changes from the previous version to latest version. However the second subquery is not working. Has somebody done a similar query before? Any help?
    select distinct b.name, b.segment1, a.version_number , a.version_name, a.change_reason_code, a.revenue, f.revenue, a.creation_date, d.full_name
    from PA_BUDGET_VERSIONS a, pa_projects_all b, fnd_user c, per_all_people_f d,PA_BUDGET_VERSIONS f
    where a.project_id = b.project_id
    and a.created_by = c.user_id
    and c.employee_id = d.person_id
    and a.budget_type_code = 'AR'
    and a.budget_status_code = 'B'
    and b.org_id in (147,707,140)
    and a.version_number in (select max(e.version_number) from PA_BUDGET_VERSIONS e where e.budget_version_id = a.budget_version_id
    and a.project_id = e.project_id)
    and a.budget_version_id = f.budget_version_id
    and f.version_number in (Select max(g.version_number) from PA_BUDGET_VERSIONS g where f.budget_version_id = g.budget_version_id
    and f.project_id = g.project_id and g.version_number < a.version_number)
    and a.creation_date between '01-JAN-09' and '30-JAN-09'
    order by b.segment1;

    Analytic functions to the rescue! (Now you'll only have one pass through the pa_budget_version table, instead of four!)
    Something like this, perhaps (assuming version_numbers are unique per project_id and budget_version_id):
    WITH a AS (SELECT project_id,
                      version_number,
                      version_name,
                      change_reason_code,
                      creation_date,
                      revenue,
                      row_number() over (partition by project_id, budget_version_id
                                         order by version_number desc) rn,
                      lag(revenue) over (partition by project_id, budget_version_id
                                         order by version_number desc) prev_ver_revenue
               FROM   pa_budget_versions
               WHERE  budget_type_code = 'AR'
               AND    budget_status_code = 'B'
               AND    creation_date BETWEEN to_date('01/01/2009', 'dd/mm/yyyy')
                                    AND     to_date('30/01/2009', 'dd/mm/yyyy'))
    SELECT DISTINCT b.name,
                    b.segment1,
                    a.version_number,
                    a.version_name,
                    a.change_reason_code,
                    a.revenue,
                    a.prev_ver_revenue,
                    a.creation_date,
                    d.full_name
    FROM   a,
           pa_projects_all b,
           fnd_user c,
           per_all_people_f d
    WHERE  a.project_id = b.project_id
    AND    a.created_by = c.user_id
    AND    c.employee_id = d.person_id
    AND    b.org_id IN (147, 707, 140)
    ORDER BY b.segment1;NB. untested.

  • Query to find all text attachments for items

    I am using the query below to try to find all active items for my org that have an attachment of type 33 (something we have defined I believe) and contain specific text. Some of the items appear to meet all criteria (active, right category, etc) but do not show up in my results. Can someone please take a look and see if there is a join missing, an outer join that should be used, or an overall easier way to do this query and get the text information?
    SELECT i.segment1 "Item Number",
    i.description "Item Description",
    u.user_name || ' (' || ppx.first_name || ' ' || ppx.last_name || ')' "Created By",
    i.creation_date "Created Date",
    to_number(r.revision) "Revision",
    to_char(r.effectivity_date, 'MM/DD/YYYY') "Effectivity Date",
    nvl(tx.short_text, '<No Drawing Info>') "Drawing Info / Attachment"
    FROM apps.mtl_system_items_b i,
    apps.mtl_item_revisions_b r,
    apps.fnd_user u,
    apps.per_people_x ppx,
    apps.fnd_attached_documents ad,
    apps.fnd_documents d,
    apps.fnd_documents_tl t,
    apps.fnd_documents_short_text tx
    WHERE i.organization_id = 90 AND -- for MBE only
    r.organization_id = 90 AND -- for MBE only
    ad.pk1_value = 90 AND -- for MBE only
    ad.entity_name = 'MTL_SYSTEM_ITEMS' AND
    (upper(tx.short_text) LIKE '%DWG%' OR
    upper(tx.short_text) LIKE '%SIZE%' OR
    upper(tx.short_text) LIKE '%DRAW%') AND
    tx.short_text != 'DWG NONE' AND
    d.document_id = t.document_id AND
    t.source_lang = 'US' AND
    t.LANGUAGE = 'E' AND
    to_number(ad.pk2_value) = i.inventory_item_id AND
    t.document_id = ad.document_id AND
    tx.media_id = t.media_id AND
    d.category_id = 33 AND
    i.inventory_item_status_code = 'Active' AND
    i.inventory_item_id = r.inventory_item_id AND
    u.employee_id = ppx.person_id AND
    u.user_id = i.created_by AND
    to_number(r.revision) =
    (SELECT MAX(to_number(r2.revision))
    FROM apps.mtl_item_revisions_b r2
    WHERE r2.inventory_item_id = i.inventory_item_id) AND
    r.effectivity_date =
    (SELECT MAX(r3.effectivity_date)
    FROM mtl_item_revisions_b r3
    WHERE r3.inventory_item_id = i.inventory_item_id)
    GROUP BY i.segment1,
    r.revision,
    i.description,
    u.user_name,
    ppx.first_name,
    ppx.last_name,
    i.creation_date,
    r.effectivity_date,
    tx.short_text
    ORDER BY i.segment1 ASC;
    Thank you!
    Message was edited by:
    matt.schutz

    There is no workbook/worksheet linkage to a business area. So you cannot search for a business area and find all the workbooks "attached" to that business area. The attachment of workbooks is at the folder level. It is actually possible, if you are sharing folders among business areas, to create a workbook with data from 2 or more business areas. I have tested that and it is indeed possible. In Discoverer Administrator you can check on folder dependencies to see what workbooks use the folder. Though in my version of Discoverer, there is a problem with Discoverer Plus, such that the workbook save in Plus is not creating this dependency information like it should. At least I have not found any way to take a business area and determine what workbooks would fall under it. Maybe someone else has found a way.
    John Dickey

  • Duplicates in Users form (FND_USER)

    Hi,
    In System Admin: Security User: Define,
    When I queried for some user "ABC", i got the error < ORA-01422:exact fetch returns more than requested number of rows >. Refer below link for reference.
    https://docs.google.com/leaf?id=0B5DraJWCbaqSMDkwZDlhM2UtM2I2Yy00NDk3LWEyZWMtZDA5MWMyZjEzNGI0&hl=en&authkey=CJGCnacC
    But in FND_USER table, there is only one record with the user ABC.
    Please provide solution how to fix this.
    Regards,
    a.v
    Edited by: user5835216 on Feb 6, 2011 10:49 PM

    I think you are probably posting in the wrong forum.
    Did you drop the unique index APPLSYS.FND_USER_U2 on APPLSYS.FND_USER (USER_NAME) ?

  • Connect by menu's/ submenu's query

    Hi,
    I am trying to create a query listing all menu's/ submenu's attached to a certain function.
    I would like to use the "connect by" statement.
    However i cannot get it right.
    So far i have made the following query.
    select distinct fnd_responsibility_vl.responsibility_name
    ,fnd_menus_vl.user_menu_name
    ,submenu.user_menu_name
    ,fnd_menus_vl.type
    ,fnd_menus_vl.menu_id
    ,fnd_menu_entries_vl.grant_flag
    ,fnd_form_functions_vl.function_name
    ,fnd_form_functions_vl.user_function_name
    ,fnd_user_resp_groups_direct.responsibility_id
    from apps.fnd_form
    ,apps.fnd_user
    ,apps.fnd_menus_vl
    ,apps.fnd_menus_vl submenu
    ,apps.fnd_responsibility_vl
    ,apps.fnd_user_resp_groups_direct
    ,apps.fnd_form_functions_vl
    ,apps.fnd_menu_entries_vl
    ,apps.fnd_menu_entries_vl subm_entries
    where fnd_form.application_id = fnd_responsibility_vl.application_id
    and fnd_user_resp_groups_direct.responsibility_id = fnd_responsibility_vl.responsibility_id
    and fnd_user_resp_groups_direct.responsibility_application_id = fnd_responsibility_vl.application_id
    and fnd_user_resp_groups_direct.user_id = fnd_user.user_id
    and fnd_form_functions_vl.application_id = fnd_form.application_id
    and fnd_form_functions_vl.form_id = fnd_form.form_id
    and fnd_menus_vl.menu_id = fnd_responsibility_vl.menu_id
    and fnd_menus_vl.menu_id = fnd_menu_entries_vl.menu_id
    and fnd_menus_vl.menu_id = subm_entries.menu_id (+)
    and submenu.menu_id = subm_entries.sub_menu_id
    and fnd_form_functions_vl.function_name ='AP_APXPAWKB'
    and fnd_user.end_date is null
    and fnd_responsibility_vl.end_date is null
    START WITH
    fnd_menu_entries_vl.menu_id
    CONNECT BY
    fnd_menu_entries_vl.menu_id = PRIOR fnd_menu_entries_vl.sub_menu_id
    Anyone can help me out on this?

    Hi,
    If you want to START WITH the rows that are not children of other rows, say
    START WITH  fnd_menu_entries_vl.menu_id NOT IN
                    SELECT  sub_menu_id
                    FROM    fnd_menu_entries_vl
                )Depending on your tables, you may be able to do something simpler and faster.
    Speaking of faster, Timur is right. You'll proably get better performance if you do a sub-query with the CONNECT BY on fnd_menu_entries_vl, and then join that result set to the other tables.

  • Duplicates error in user forms (FND_USER)

    Hi,
    In System Admin: Security User: Define,
    When I queried for some user "ABC", i got the error < ORA-01422: exact fetch returns more than requested... >. Refer below link for reference.
    https://docs.google.com/leaf?id=0B5DraJWCbaqSMDkwZDlhM2UtM2I2Yy00NDk3LWEyZWMtZDA5MWMyZjEzNGI0&hl=en&authkey=CJGCnacC
    But in FND_USER table, there is only one record with the user ABC.
    Please provide solution how to fix this.
    Regards,
    a.v

    Have you loaded any user data or responsibility data from sql?
    Check if the fnd_user_u2 index is present or not?
    Do the following to check if there are 2 users with the same user_name.
    select count(1) from fnd_user where user_name ='ABC'
    Do the following to check if the user has the same responsibility twice.
    select count(1),responsibility_id from fnd_user_resp_groups
    where user_id = (select user_id from fnd_user where user_name='ABC')
    group by responsibility_id having count(1) > 1
    If that does not give any clues, put a trace on before doing the query. Then do a tkprof to find the statement that gives you the error.
    Hope this helps
    Sandeep Gandhi
    Independent Techno-functional Consultant

  • Query to get users using a Form

    Hi All
    I would like to build a query to get all users who is having access to a form. I could get the cases
    where there is no submenus. But how can I handles cases were submenus also there. Please help. I have checked
    the other posts in this forum. But none is giving a possibility of giving single query for this.
    Kindly help.
    Version 12.1.3
    Thanks,

    I guess my question was confusing.
    I build a query like this to getthe information, but it will work only if the function is attached directly to the main menu. It will not work incase of submentus.
    SELECT distinct usr.user_name FROM
    FND_FORM_VL form,
    FND_FORM_FUNCTIONS_VL func,
    FND_MENU_ENTRIES_VL menu_l,
    FND_MENUS_VL menu_h,
    FND_RESPONSIBILITY_VL resp,
    FND_USER_RESP_GROUPS_DIRECT usr_resp,
    FND_USER usr
    WHERE func.form_id = form.form_id
    AND menu_l.FUNCTION_ID = func.FUNCTION_ID
    and menu_h.MENU_ID = menu_l.menu_id
    and form.form_name = :FORM_NAME
    and resp.MENU_ID = menu_h.menu_id
    and usr_resp.responsibility_id = resp.responsibility_id
    and usr.user_id = usr_resp.user_id ;

  • Query for onhand  qunatity  with particular date  for eam

    hi all ,
    following query are showing wrong value for on hand quantity with particular date mean work order issue date for quantity .
    can u show me where is problem in this query.
    SELECT   ood.organization_name, wrov.concatenated_segments item_number,
             wrov.item_description description, wrov.item_primary_uom_code uom,
            -- SUM (on_hand.on_hand) quantity_in_stock,
              SUM (on_hand.on_hand) + wrov.quantity_issued quantity_in_stock,
             we.wip_entity_name work_order_number,
             TRUNC (we.creation_date) work_order_date,
             fu.user_name work_order_made_by, wrov.quantity_issued,
             trunc(cic.material_cost,2) issue_rate_per_qty,
             wrov.quantity_issued * trunc(cic.material_cost,2) quantity_value,
             --SUM (on_hand.on_hand) - wrov.quantity_issued balace_qty,
             SUM (on_hand.on_hand)  balace_qty,
               SUM (on_hand.on_hand)
             * trunc(cic.material_cost,2) COST,
             eam.ATTRIBUTE1 EQUIPEMENT_NO
            --  gcc.SEGMENT6 equipement_no
        FROM wip_entities we,
             wip_requirement_operations_v wrov,
             org_organization_definitions ood,
             mtl_onhand_total_mwb_v on_hand,
             fnd_user fu,
             cst_item_costs cic,
             eam_work_orders_v eam
    --                    gl_code_combinations gcc,
    --                    WIP_TRANSACTION_ACCOUNTS  wta ,
    --                    WIP_TRANSACTIONS wt
       WHERE wrov.wip_entity_id = we.wip_entity_id
         AND ood.organization_id = wrov.organization_id
         AND wrov.inventory_item_id = on_hand.inventory_item_id
         AND on_hand.organization_id = ood.organization_id
         AND we.created_by = fu.user_id(+)
         AND cic.inventory_item_id = wrov.inventory_item_id
         AND cic.organization_id = wrov.organization_id
         --AND we.wip_entity_name = '179542'
         AND wrov.organization_id = nvl(:organization_id,wrov.organization_id)
                AND (we.wip_entity_name = :job_order_No OR :job_order_No IS NULL)
                and trunc(we.creation_date) between  nvl(:from_date ,trunc(we.creation_date)) and nvl(:too_date ,trunc(we.creation_date))
               and eam.WIP_ENTITY_NAME=we.wip_entity_name
               and eam.WORK_ORDER_STATUS in('Complete','Complete - No Charges' ,'Released')
    --                 and gcc.CODE_COMBINATION_ID  =wta.REFERENCE_ACCOUNT
    --                 and wta.TRANSACTION_ID =wt.TRANSACTION_ID
    --                 and we.wip_entity_id  =wta.WIP_ENTITY_ID
    GROUP BY ood.organization_name,
             wrov.concatenated_segments,
             wrov.item_description,
             wrov.item_primary_uom_code,
             we.wip_entity_name,
             we.creation_date,
             fu.user_name,
             wrov.quantity_issued,
             cic.material_cost,
              eam.ATTRIBUTE1
           --  gcc.SEGMENT6
           order by we.wip_entity_name

    I don't think there is any special predicate to do that, Code is simply getting all children of given asset and returning them (Offcource there is some ordering logic). If You want exact informaiton I would suggest to use json call that DAM is making i.e.
    HOST:POST/<PATH OF DAM>.assets.json
    Or decompile AssetListServlet.java ans see how it is implemeted
    Yogesh
    www.wemblog.com

Maybe you are looking for