Report for Archived data by using exicutable program.

Hi,
In already existed Zreport data is fetching from table like below.
SELECT belnr bewtp budat lfbnr lfpos FROM ekbe INTO TABLE it_ekbe
                                               WHERE bewtp IN ('R' , 'Q') "Only IRs
                                                  AND budat IN s_date.
Like the above in the report fetchnig data from somany tables so mant times.
Now my requirment is the archived consultants archived old data. some table are archived some are not archived.
So i need to fetch the old data also from the archived files. Achived consultants given below details.
zarixmm3------------>zerox table for MM related tables after archived the data.
I searched in google got some code to fetch the data from archived fiels. The below code.
1. I fetched the key  archive key number from the zerox table.
SELECT archivekey  FROM zarixmm3 INTO TABLE it_get
                                   WHERE budat IN s_date
                                     AND werks IN s_werks.
CLEAR : wa_ekbe.
LOOP AT it_get INTO wa_get.
  v_arcdoc = wa_get-archivekey+0(6).
  wa_arcindx1a-archivekey = wa_get-archivekey.
  wa_arcindx1a-v_arcdoc = wa_get-archivekey+0(6).
  CLEAR : wa_get.
  APPEND  wa_arcindx1a TO  it_arcindx1a.
ENDLOOP.
SORT it_arcindx1a BY v_arcdoc.
REFRESH it_get.
CLEAR: v_arcdoc.
DELETE ADJACENT DUPLICATES FROM it_arcindx1a COMPARING v_arcdoc.
2. I passed the key in FMs.
LOOP AT it_arcindx1a INTO wa_arcindx1a.
  v_key = wa_arcindx1a-archivekey+0(6).
  CALL FUNCTION 'ARCHIVE_OPEN_FOR_READ'
    EXPORTING
      archive_document = v_key
*     archive_name     = wa_arcindx1-archivekey
      object           = 'MM_EKKO'
    IMPORTING
      archive_handle   = lv_handle
    EXCEPTIONS
      OTHERS           = 1.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    EXIT.
  ENDIF.
  DO.
    CALL FUNCTION 'ARCHIVE_GET_NEXT_OBJECT'
      EXPORTING
        archive_handle = lv_handle
      EXCEPTIONS
        end_of_file    = 1.          "nur die Ausnahmen, auf die man
    IF sy-subrc <> 0.                "wirklich reagieren will
      EXIT.
    ENDIF.
    CALL FUNCTION 'ARCHIVE_GET_TABLE'
      EXPORTING
        archive_handle        = lv_handle
        record_structure      = 'EKBE'
        all_records_of_object = 'X'
      TABLES
        table                 = git_ekbe_temp
      EXCEPTIONS
        end_of_object         = 0.
    LOOP AT git_ekbe_temp ASSIGNING <ls_ekbe>
                           WHERE bewtp = 'R' OR bewtp = 'Q'
                            AND budat IN s_date.
      MOVE-CORRESPONDING <ls_ekbe> TO wa_ekbe.
      APPEND wa_ekbe TO it_ekbe.
      MOVE-CORRESPONDING <ls_ekbe> TO wa_ekbee.
      APPEND wa_ekbee TO it_ekbee.
      CLEAR wa_ekbe.
      CLEAR wa_ekbee.
    ENDLOOP.
  ENDDO.
  CALL FUNCTION 'ARCHIVE_CLOSE_FILE'
    EXPORTING
      archive_handle = lv_handle.
  CLEAR wa_arcindx1a.
ENDLOOP.
Like the above i diid for all tables wich are used in the Zreport.
Please tell me i am going in right direction or not. The above logic taking time because it is reding entire data in the table.
If new logic is there please provide me to improve performance of the zreport.
Regards,
Maruthi S

Hi Friends,
I am waiting for solution aobve.
Regards,
Maruthi. S

Similar Messages

  • New report for Archiving data

    Hi to all,
    Can anybody kindly tell me how to solve the following:
    Due to the huge volume of records in the table ZMES_SEQ_DETAIL it required to archive the data based on the Date on which the record was created, which is 18 months older in the table ZMES_SEQ_DETAIL.
    Thanks in advance.
    Regards
    Simi

    Hi,
    SAP provides standard archive objects for standard tables. There is no archive object available to archive custom tables data (Z/Y tables). The option you have is to develop a custom archive object and related programs to archive data from the Z table.
    Checkout the following <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/2a/fa042d493111d182b70000e829fbfe/content.htm">link</a> for more details on developing archiving solutions.
    Hope this helps
    Cheers!
    Samanjay

  • I need the Log Report for the Data which i am uploading from SAP R/3.

    Hi All,
    I am BI 7.0 Platform with Support Patch 20.
    I need the Log Report for the Data which i am uploading from SAP R/3.
    I extract the DATA from R/3 into BI 7.0 DSO where I am mapping the GL Accounts with the FS Item.   In the Transformation i have return a routine on the FS Item InfObject . I am checking the Gl code into Z table for the FS Item .
    I capture the FS item from the Z table then update this FS item to Infobject FS item.
    Now i  need to stop the Data upload if i do not find the GL code in the Z table, and generate report for all GL code for which the FS item is not maintained in the Z table.
    Please suggest.
    Regards
    nilesh

    Hi.
    Add a field that you will use to identify if the GL account of the record was found in the Z table or not. Fx, create ZFOUND with length 1 and no text.
    In your routine, when you do the lookup, populate ZFOUND with X when you found a match (sy-subrc = 0) and leave it blank if you don't find a match. Now create a report filtering on ZFOUND = <blank> and output the GL accounts. Those will be the ones not existing in the Z table, but coming in from your transactions.
    Regards
    Jacob

  • How to take unreconcilled transactions report for a date range ?

    hi all,
    How to take unreconcilled transactions report for a
    data range ?
    we have taken unreconcilled transactons from
    external reconcillation using filter option mentioning
    range of dates,But when we take print out using PLD,
    it showing unreconcilled transactions for all dates.
    But our client requires it as a standard report from SAP ?
    Our client is using SAP B1 2005B PL39.
    Jeyakanthan

    Hi
    Financials -> Financial Reports -> Accounting -> General Ledger.
    In the 'Display' dropdown select, 'Unreconciled' .
    Hope this should help you.

  • Configuring reports for express data

    I am trying to configure reports for express data and in this regard I have done the following :
    1.Machine A having reports 9i Developer suite Release 2 and Pluggable Express Connection Editor
    installed on Windows 2000 professional.
    2.Machine B having which Express Server 6.3.4 installed on Windows 2000 professional.
    3.In Machine A created user OESDBA with Administrator privilige.
    In the reports I am able to connect to the Express Server and attach the database and choose the
    measure.Once all the other steps are done I am able to print the data on the reports.
    But if I use a parameter form in which I give the HOST,USER and PASSWORD then substitute the
    same in the express_server parameter value in the AFTER PARAMETER FORM trigger block then
    the report gives an error saying that
    Express query contains incorrect,missing or damaged information.
    How to solve this error ?
    Can any one help me out.

    Ramakrishnan,
    Express connectivity for Oracle9i Reports is installed by default as one of your pluggable data sources and it communicated directly with Express, which is a large change over Reports 6i in which you needed an Oracle8i database to talk to the Express database.
    For Oracle9i Reports, you need to have:
    1 - Express installed 6.3 or later.
    2 - Oracle9i Reports
    3 - The connection dialog (which is documented in the release notes if you need to set this up)
    That's it. When you click on the Express PDS to access the data, it will read the connection dialog information and you need to supply the logon information to the Express database.
    You should also look at the help topic for Express and you will find all the necessary documentation on configuring Reports and how to connect.
    Regards,
    The Oracle Reports Team jls

  • SCCM 2012 Report for Software registered in Add/Remove programs

    Hi
    Am looking to create an SCCM 2012 Report for Software registered in Add/Remove programs on windows 7 machines but dont have enough experience with report builder to do this.
    Was hoping someone could help.

    When i use the url i still only see the following categories
    Administrative Security
    Asset Intelligence
    Client Push
    Client Status
    Compliance and Settings ManagementHave looked through them all and that one is not there
    the only software ones are the following
    Report Software 01A - Summary of installed software in a specific collectionThis report provides a summary of installed software ordered by the number of instances found from inventory.
     Open Menu
    Report Software 02A - Product families for a specific collectionThis report lists the product families and the count of software in the family for a specific collection.
     Open Menu
    Report Software 02B - Product categories for a specific product familyThis report lists the product categories in a specific product family and the count of software within the category. This report is linked to Software 02C - Software in a specific product
    family and category.
     Open Menu
    Report Software 02C - Software in a specific product family and categoryThis report lists all software that is in the specified product family and category. This report is linked to Software 06B - Software by product name.
     Open Menu
    Report Software 02D - Computers with specific software installedThis report lists all computers with specific software installed. This report is linked to Software 02E - Installed software on a specific computer .
     Open Menu
    Report Software 02E - Installed software on a specific computerThis report lists all software installed on a specific computer.
     Open Menu
    Report Software 03A - Uncategorized softwareThis report lists the software that is either categorized as unknown or has no categorization.
     Open Menu
    Report Software 04A - Software configured to automatically run on computersDisplays a list of software configured to automatically run on computers.
     Open Menu
    Report Software 04B - Computers with specific software configured to automatically runDisplays all computers with specific software configured to automatically run.
     Open Menu
    Report Software 04C - Software configured to automatically run on a specific computerDisplays installed software configured to automatically run on a specific computer.
     Open Menu
    Report Software 05A - Browser Helper ObjectsThis report displays the Browser Helper Objects installed on computers in a specific collection.
     Open Menu
    Report Software 05B - Computers with a specific Browser Helper ObjectDisplays all of the computers with a specific Browser Helper Object.
     Open Menu
    Report Software 05C - Browser Helper Objects on a specific computerDisplays all Browser Helper Objects on the specific computer.
     Open Menu
    Report Software 06A - Search for installed softwareThis report provides a summary of installed software ordered by the number of instances based on search criteria for the product name, publisher, or version.
     Open Menu
    Report Software 06B - Software by product nameThis report provides a summary of installed software ordered by the number of instances based on selected Product Name.
     Open Menu
    Report Software 07A - Recently used executable programs by the count of computersThis report displays executable programs that have been used recently with a count of computers on which they have been used. The Software Metering client must be enabled for this
    site to view this report.
     Open Menu
    Report Software 07B - Computers that recently used a specified executable programThis report displays the computers on which a specified executable program has recently been used when you enable the software metering client setting.
     Open Menu
    Report Software 07C - Recently used executable programs on a specified computerThis report displays executables that have been used recently on a specified computer when you enable the software metering client setting.
     Open Menu
    Report Software 08A - Recently used executable programs by the count of usersThis report displays executable programs that have been used recently with a count of users that have most recently used them when you enable the software metering client setting.
     Open Menu
    Report Software 08B - Users that recently used a specified executable programThis report displays the users that have most recently used a specified executable program when you enable the software metering client setting.
     Open Menu
    Report Software 08C - Recently used executable programs by a specified userThis report displays executable programs that have been used recently by a specified user when you enable the software metering client setting.
     Open Menu
    Report Software 09A - Infrequently used softwareThis report displays software titles that have not been used during a specified period of time. You can specify a value that will represent the number of days that have elapsed since the last use (e.g. if you
    enter 90 days, you will see software that was not used in the past 90 days or more). You can also leave the Days not used field empty to see all software titles that were never used.
     Open Menu
    Report Software 09B - Computers with infrequently used software installedThis report displays computers which have software installed that has not been used for a specified period of time. The specified period of time is based on the value specified in the
    'Software 09A - Infrequently used software' report.
     Open Menu
    Report Software 10A - Software titles with specific multiple custom labels definedThis report allows you to view software titles based on matching of all selected custom label criteria. Up to three custom labels can be selected to refine a software title search.
     Open Menu
    Report Software 10B - Computers with a specific custom-labeled software title installedThis report shows all computers in this collection, that have the specified custom-labeled software title installed.
     Open Menu
    Report Software 11A - Software titles with a specific custom label definedThis report allows you to view software titles based on matching of at least one of the selected custom label criteria.
     Open Menu
    Report Software 12A - Software titles without a custom labelThis report displays all software titles that do not have a custom label defined.
     Open Menu
    Report Software 14A - Search for software identification tag enabled softwareThis report provides the count of installed software with a software identification tag enabled.
     Open Menu
    Report Software 14B - Computers with specific software identification tag enabled software installedThis report lists all computers that have installed software with a specific software identification tag enabled.
     Open Menu
    Report Software 14C - Installed software identification tag enabled software on a specific computerThis report lists all installed software with a specific software identification tag enabled on a specific computer.
     Open Menu

  • DART for archived data

    Hello Sap experts
    we have a requirement where business want us to execute dart process for archived data. We have opened the archived files for this but we have a doubt regarding use of t.code FTWB because i hope this t.code is also used if we need to run DART for archived data but we are not sure when this t.code is used & how?
    Kindly suggest.
    Thanks & Regards
    Deepak Garg

    Hi
    Follow the link,
    [http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAGTFDART/CAGTFDART.pdf]
    Regards.

  • AP Invoice Aging Report for past date

    hi guys,
    I am running R12.
    my requirement is to run AP invoice aging report for past dates (same like AP Trial Balance Report), but the seeded invoice aging report has no option to do so.
    would appreciate some help
    thanks in advance
    Ravi

    Hi Senthil,
    I am running R12.
    my requirement is to run AP invoice aging report for past dates (same like AP Trial Balance Report
    if u have any solution to this , please suggest me how to resolve this requierement.
    thanks in advance
    Ravi
    mail:[email protected]

  • Want to schedule WebI report for End date of Prior Month

    Hello Experts,
    We have WebI report created on top of Bex Query, We have key date as prompt for the report. Can we schedule the webi report for key date as last date of prior month, so if current month is February, my key date should be Jan 30 2011. I am not sure if this is possible?
    Thanks,
    Ravi

    You need to apply two FM to get the end day of the month.
    First you need to apply FM MONTHS_PLUS_DETERMINE. This will give you the date after 3 months.
                CALL FUNCTION 'MONTH_PLUS_DETERMINE'
                  EXPORTING
                    MONTHS        = 3   " << for 3 months
                    OLDDATE       = l_start_Date   " << 12/01/2007
                 IMPORTING
                   NEWDATE       = l_3_Date. " << 02/01/2008
    Then call the FM RP_LAST_DAY_OF_MONTHS . this will give you the end date of the month
      CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
        EXPORTING
          day_in            = l_3_Date  " << 02/01/2008
        IMPORTING
          last_day_of_month = l_3_Date  " < 02/29/2008
        EXCEPTIONS
          day_in_no_date    = 1
          OTHERS            = 2.
    Call both FMs again to get your another date(after 4 months).
    Regards,
    Naimesh Patel

  • New feature for Archive data in oracle database11g.

    Is there any new feature in oracle database11g for archiving data?

    Yes.
    For example :
    "optional archive log destination to be utilized in the event that the flash recovery area is inaccessible during backup"
    See the document under "Archive Log Management Improvements"
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28279/chapter1.htm
    Best Regards
    mseberg

  • Configuring reports for express data(2)

    We are in the process of configuring reports for express data.
    In this regard we have done the following steps:
    1.In the machine A reports 9i developer suite release 2 has been installed on Windows 2000
    Professional Edition with the following utilities - (a) Oracle Reports Builder and runtime
    support,(b) Oracle Express Connection Editor and (c) Oracle SNAPI are installed.
    2.Express Server 6.3.4 has been installed on Windows 2000 Professional Edition in machine
    B with Remote Operation SNAPI 6.3.4.0.
    3.Oracle 8i has been installed on Solaris and the Express Support Administrator and User
    Accounts have created and the xrb_admin.sql and xrb_user.sql have been run through the
    respective accounts.
    Queries
    1.We have still not run the Express Oracle8 External Procedures on the Oracle8
    gateway. Should we run this in order to get Express Data in Reports9i incase of the General
    Maintenance where the Express data fetches the data from the Oracle8 gateway on the fly
    ?We are also not able find the Express Oracle8 External Procedures downloads after
    extensive search on OTN.Please guide as to where can we find the downloads.
    2.What are the configurations settings that have to be done in the tnsnames.ora,sqlnet.ora
    and listener.ora ?

    Ramakrishnan,
    Express connectivity for Oracle9i Reports is installed by default as one of your pluggable data sources and it communicated directly with Express, which is a large change over Reports 6i in which you needed an Oracle8i database to talk to the Express database.
    For Oracle9i Reports, you need to have:
    1 - Express installed 6.3 or later.
    2 - Oracle9i Reports
    3 - The connection dialog (which is documented in the release notes if you need to set this up)
    That's it. When you click on the Express PDS to access the data, it will read the connection dialog information and you need to supply the logon information to the Express database.
    You should also look at the help topic for Express and you will find all the necessary documentation on configuring Reports and how to connect.
    Regards,
    The Oracle Reports Team jls

  • Can CJI3 , CJIA be used for archived data

    Hi,
    CN83 has the option to fetch archived data , however do not find any such option with CJI3 , CJIA etc .
    Like to know whether it is not feasible to used CJI3 etc for archived projects.
    With regards,
    Mrinal

    Hi Virendra,
    Thanks for yr reply.
    I get the message
    " Report CJI3 is not planned to be read from the archive".
    " Report CJIA is not planned for archiving object PS_PROJECT"
    With regards,
    Mrinal

  • BI Publisher Report for Archived OIM tables

    Hi
    We perfomed Request archival operation in our OIM DB using http://docs.oracle.com/cd/E29505_01/doc.1111/e14308/archival_utilities.htm. Now ARCH* tables are created and it has relevant details.
    Now our requirment is to create a new report to read data from this archived tables using BI publisher. We are looking something similar to OOTB Attestation Request and Approval Reports -> Request Details in BI.
    We created a new report called "Request Details from Archive tables" similar to the OOTB one in BI front end. Also modifed data template by replacing "request*" tables to "arch_request*" as below. When we try to gernerate report now it is not working as expected.
    Do we need to change anything else ? Please advise
    Modified data template for reference
    <dataTemplate name="ArchRequestDetails" description="Each group that contains the logged in user as its direct user. All groups that are administered by the above set of groups are visible to the logged in user.">
         <parameters>
              <parameter name="xdo_user_name" dataType="character"/>
              <parameter name="p_varchar_ReqFN" dataType="character"/>
              <parameter name="p_varchar_ReqLN" dataType="character"/>
              <parameter name="p_varchar_ReqUID" dataType="character"/>
              <parameter name="p_varchar_ReqID" dataType="character"/>
              <parameter name="p_varchar_ReqPID" dataType="character"/>
              <parameter name="p_varchar_ReqStatu" dataType="character"/>
              <parameter name="p_varchar_ReqTyp" dataType="character"/>
              <parameter name="p_ReqDtFrom" dataType="date"/>
              <parameter name="p_ReqDtTo" dataType="date"/>
              <parameter name="p_varchar_BenFN" dataType="character"/>
              <parameter name="p_varchar_BenLN" dataType="character"/>
              <parameter name="p_varchar_BenUID" dataType="character"/>
         </parameters>
         <dataquery>
              <sqlstatement name="sql_L1_AllRequests">
                   <![CDATA[ SELECT ReqID as RequestID, 
            decode(ReqAction, 'Create Entity', 'Self Registration', 'Add', 'Provision Resource', 'Disable',   'Disable Resource',   'Enable',   'Enable Resource',   'Revoke',   'Revoke Resource',   'Modify Entity',   'Modify Profile') as RequestType,   
            ReqUID as RequesterUserID,
            ReqDate as RequestDate, 
            CurStatus as RequestStatus,
            null as ParentRequestID
       FROM (select distinct
              req.req_key as ReqID,
              req.req_obj_action as ReqAction, 
              usr.usr_login as ReqUID,
              req.req_create as ReqDate,
              ost.ost_status as CurStatus
         from req left outer join rqu on req.req_key = rqu.req_key,
              ost,
              usr,
              act,
              usr usr2
        where rqu.usr_key = usr2.usr_key
          and req.ost_key = ost.ost_key
          and req.req_createby = usr.usr_key
          and usr2.act_key = act.act_key
          and usr2.act_key in (select aad.act_key
                from aad,usg,usr
                where usg.usr_key = usr.usr_key
                  and aad.ugp_key = usg.ugp_key
                  and usr.usr_key = (select usr.usr_key from usr where upper(usr.usr_login) = upper(:xdo_user_name)))
                  and (nvl(:p_varchar_ReqStatu,' ')=' ' or upper(ost.ost_status) like upper(:p_varchar_ReqStatu))
                  and (nvl(:p_varchar_ReqID,' ')=' ' or req.req_key like (:p_varchar_ReqID))
                  and req.req_create between :p_ReqDtFrom and :p_ReqDtTo
            union
            select
              req.req_key as ReqID,
              req.req_obj_action as ReqAction, 
              usr.usr_login as ReqUID,
              req.req_create as ReqDate,
              ost.ost_status as CurStatus
            from
              req,
              ost,
              usr
            where
              req.ost_key = ost.ost_key
              and req.req_createby = usr.usr_key
              and req.req_obj_action = 'Create Entity'
              and upper(ost.ost_status) like upper(:p_varchar_ReqStatu)
              and req.req_create between :p_ReqDtFrom and :p_ReqDtTo
              and ost.ost_status != 'Request Complete'
            union
            select req.req_key as ReqID,
              req.req_obj_action as ReqAction, 
              usr.usr_login as ReqUID,
              req.req_create as ReqDate,
              ost.ost_status as CurStatus
         from req,
              ost,
              usr,
              usr usr2,
              act
        where req.ost_key = ost.ost_key
              and req.req_createby = usr.usr_key
              and req.req_obj_action = 'Create Entity'
              and usr2.usr_login =(select upper(rqd.rqd_attr_value) from rqd where rqd.req_key = req.req_key and rqd.rqd_attr_name = 'Users.User ID')
              and usr2.act_key = act.act_key
              and upper(ost.ost_status) like upper(:p_varchar_ReqStatu)
              and req.req_create between :p_ReqDtFrom and :p_ReqDtTo
              and usr2.act_key in (select aad.act_key from aad,usg,usr
          where usg.usr_key = usr.usr_key
            and aad.ugp_key = usg.ugp_key and usr.usr_key = (select usr.usr_key from usr where upper(usr.usr_login) = upper(:xdo_user_name)))
            and ost.ost_status = 'Request Complete')
          UNION ALL
          SELECT distinct request.request_key as RequestID, 
            request.request_model_name as RequestType,
            usr1.usr_login as RequesterUserID,
            request.request_creation_date as RequestDate,
            request.request_status as RequestStatus,
            request.request_parent_key as ParentRequestID
       FROM usr usr1 JOIN request req1 ON usr1.usr_key = req1.requester_key,
            request,
            (select distinct req3.request_key rk,
              usr2.usr_first_name bfn,
              usr2.usr_last_name bln,
              usr2.usr_login buid
            from arch_request req3,
              arch_request_beneficiary reqb1,
              usr usr2
            where req3.request_key = reqb1.request_key
              and reqb1.beneficiary_key = usr2.usr_key
            UNION
            select distinct req3.request_key rk,
              usr2.usr_first_name bfn,
              usr2.usr_last_name bln,
              usr2.usr_login buid
            from arch_request req3,
              arch_request_entities re1,
              usr usr2
            where req3.request_key = re1.request_key
              and re1.entity_key = usr2.usr_key)user1
          WHERE
            req1.request_key = request.request_key
            and (NVL(:p_varchar_ReqFN, ' ') = ' ' or UPPER(usr1.usr_first_name) LIKE UPPER(:p_varchar_ReqFN))
            and (NVL(:p_varchar_ReqLN, ' ') = ' ' or UPPER(usr1.usr_last_name) LIKE UPPER(:p_varchar_ReqLN))
            and (NVL(:p_varchar_ReqUID, ' ') = ' ' or UPPER(usr1.usr_login) LIKE UPPER(:p_varchar_ReqUID))
            and (NVL(:p_varchar_ReqID, ' ') = ' ' or UPPER(request.request_key) LIKE UPPER(:p_varchar_ReqID))
            and (NVL(:p_varchar_ReqPID, ' ') = ' ' or UPPER(request.request_parent_key) LIKE UPPER(:p_varchar_ReqPID))
            and (NVL(:p_varchar_ReqStatu, ' ') = ' ' or UPPER(request.request_status) LIKE UPPER(:p_varchar_ReqStatu))
            and (NVL(:p_varchar_ReqTyp, ' ') = ' ' or UPPER(request.request_model_name) LIKE UPPER(:p_varchar_ReqTyp))
            and request.request_creation_date between :p_ReqDtFrom and :p_ReqDtTo
            and (NVL(:p_varchar_BenFN, ' ') = ' ' or (UPPER(user1.bfn) LIKE UPPER(:p_varchar_BenFN) and request.request_key = user1.rk))
            and (NVL(:p_varchar_BenLN, ' ') = ' ' or (UPPER(user1.bln) LIKE UPPER(:p_varchar_BenLN) and request.request_key = user1.rk))
            and (NVL(:p_varchar_BenUID, ' ') = ' ' or (UPPER(user1.buid) LIKE UPPER(:p_varchar_BenUID) and request.request_key = user1.rk))
    ORDER BY RequestID ]]>
              </sqlstatement>
              <sqlstatement name="sql_L2_Approver_BPEL" dataSourceRef="BPEL JDBC">
    SELECT distinct wfproductivity_view.username as ApproverUserID
    FROM wfproductivity_view
    WHERE identificationkey = :RequestID
    </sqlstatement>
              <sqlstatement name="sql_L2_Approver">
    SELECT distinct usr.usr_login as ApproverUserID
    FROM rqh join usr on rqh.rqh_createby = usr.usr_key
    WHERE rqh.req_key = :RequestID
    And rqh.rqh_status = 'Approved'
    </sqlstatement>
              <sqlstatement name="sql_L1_Beneficiaries">
                   <![CDATA[  SELECT distinct
      FirstName as BenFName, 
      LastName as BenLName,
      userid as BenUserID,
      usr_emp_type as BenEmpType, 
      UsrStatus as BenUserStatus,
      OrgName as BenOrg
    FROM
      (select distinct
        usr2.usr_login AS userid,    
        usr2.usr_last_name AS LastName,
        usr2.usr_first_name AS FirstName,    
        usr2.usr_emp_type AS usr_emp_type,
        usr2.usr_status AS UsrStatus,    
        act.act_name AS OrgName
      from req left outer join rqu on req.req_key = rqu.req_key,
        ost,
        usr,
        act,
        usr usr2
      where req.req_key = :RequestID
        and rqu.usr_key = usr2.usr_key
        and req.ost_key = ost.ost_key
        and req.req_createby = usr.usr_key
        and usr2.act_key = act.act_key
        and usr2.act_key in
          (select aad.act_key
          from aad,usg,usr
          where
            usg.usr_key = usr.usr_key
            and aad.ugp_key = usg.ugp_key
            and usr.usr_key = (select usr.usr_key from usr where upper(usr.usr_login) = upper(:xdo_user_name)))
        and (nvl(:p_varchar_ReqStatu,' ')=' ' or upper(ost.ost_status) like upper(:p_varchar_ReqStatu))
        and (nvl(:p_varchar_ReqID,' ')=' ' or req.req_key like (:p_varchar_ReqID))
        and (nvl(:p_varchar_BenUID,' ')=' ' or upper(usr2.usr_login) like upper(:p_varchar_BenUID))
        and (nvl(:p_varchar_BenFN,' ')=' ' or upper(usr2.usr_first_name)like upper(:p_varchar_BenFN))
        and (nvl(:p_varchar_BenLN,' ')=' ' or upper(usr2.usr_last_name)like upper(:p_varchar_BenLN))
        and req.req_create between :p_ReqDtFrom and :p_ReqDtTo
      union
      select
        (select rqd.rqd_attr_value from rqd where rqd.req_key = req.req_key and rqd.rqd_attr_name = 'Users.User ID') AS userid,
        (select rqd.rqd_attr_value from rqd where rqd.req_key = req.req_key and rqd.rqd_attr_name = 'Users.Last Name') AS LastName,
        (select rqd.rqd_attr_value from rqd where rqd.req_key = req.req_key and rqd.rqd_attr_name = 'Users.First Name') AS FirstName,
        (select rqd.rqd_attr_value from rqd where rqd.req_key = req.req_key and rqd.rqd_attr_name = 'Users.Xellerate Type') AS usr_emp_type,
        null AS UsrStatus,    
        null AS OrgName
      from req,
        ost,
        usr
      where req.req_key = :RequestID
        and req.ost_key = ost.ost_key
        and req.req_createby = usr.usr_key
        and req.req_obj_action = 'Create Entity'
        and upper(ost.ost_status) like upper(:p_varchar_ReqStatu)
        and req.req_create between :p_ReqDtFrom and :p_ReqDtTo
        and ost.ost_status != 'Request Complete'
      union
      select usr2.usr_login AS userid,
        usr2.usr_last_name AS LastName,
        usr2.usr_first_name AS FirstName,
        usr2.usr_emp_type AS usr_emp_type,
        usr2.usr_status AS UsrStatus,
        act.act_name AS OrgName
      from req,
        ost,
        usr,
        usr usr2,
        act
      where req.req_key = :RequestID
        and req.ost_key = ost.ost_key
        and req.req_createby = usr.usr_key
        and req.req_obj_action = 'Create Entity'
        and usr2.usr_login =(select upper(rqd.rqd_attr_value) from rqd where rqd.req_key = req.req_key and rqd.rqd_attr_name = 'Users.User ID')
        and usr2.act_key = act.act_key
        and upper(ost.ost_status) like upper(:p_varchar_ReqStatu)
        and (nvl(:p_varchar_BenUID,' ')=' ' or upper(usr2.usr_login) like upper(:p_varchar_BenUID))
        and (nvl(:p_varchar_BenFN,' ')=' ' or upper(usr2.usr_first_name)like upper(:p_varchar_BenFN))
        and (nvl(:p_varchar_BenLN,' ')=' ' or upper(usr2.usr_last_name)like upper(:p_varchar_BenLN))
        and req.req_create between :p_ReqDtFrom and :p_ReqDtTo
        and usr2.act_key in
          (select aad.act_key
          from aad,usg,usr
          where
            usg.usr_key = usr.usr_key
            and aad.ugp_key = usg.ugp_key and usr.usr_key = (select usr.usr_key from usr where upper(usr.usr_login) = upper(:xdo_user_name)))
        and ost.ost_status = 'Request Complete')
          UNION ALL
          SELECT distinct user1.bfn as BenFName, 
            user1.bln as BenLName,
            user1.buid as BenUserID,
            user1.bet as BenEmpType, 
            user1.bus as BenUserStatus,
            user1.bo as BenOrg
          FROM
            (select distinct req3.request_key rk,
              usr2.usr_first_name bfn,
              usr2.usr_last_name bln,
              usr2.usr_login buid,
              usr2.usr_emp_type bet,
              usr2.usr_status bus,
              act.act_name bo
            from arch_request req3,
              arch_request_beneficiary reqb1,
              usr usr2,
              act
            where req3.request_key = reqb1.request_key
              and reqb1.beneficiary_key = usr2.usr_key
              and usr2.act_key = act. act_key
              and (nvl(:p_varchar_BenUID,' ')=' ' or upper(usr2.usr_login) like upper(:p_varchar_BenUID))
              and (nvl(:p_varchar_BenFN,' ')=' ' or upper(usr2.usr_first_name)like upper(:p_varchar_BenFN))
              and (nvl(:p_varchar_BenLN,' ')=' ' or upper(usr2.usr_last_name)like upper(:p_varchar_BenLN))
            UNION
            select distinct req3.request_key rk,
              usr2.usr_first_name bfn,
              usr2.usr_last_name bln,
              usr2.usr_login buid,
              usr2.usr_emp_type bet,
              usr2.usr_status bus,
              act.act_name bo
            from arch_request req3,
              arch_request_entities re1,
              usr usr2,
              act
            where req3.request_key = re1.request_key
              and re1.entity_key = usr2.usr_key
              and usr2.act_key = act. act_key
              and (nvl(:p_varchar_BenUID,' ')=' ' or upper(usr2.usr_login) like upper(:p_varchar_BenUID))
              and (nvl(:p_varchar_BenFN,' ')=' ' or upper(usr2.usr_first_name)like upper(:p_varchar_BenFN))
              and (nvl(:p_varchar_BenLN,' ')=' ' or upper(usr2.usr_last_name)like upper(:p_varchar_BenLN))
            )user1
          WHERE
            user1.rk = :RequestID                 
    ]]>
              </sqlstatement>
              <sqlstatement name="sql_L1_RequestDetails">
    SELECT distinct
    null as ReqDetailsName,
    obj_name as ReqDetailsValue
    FROM
    req,
    rqo,
    obj
    WHERE
    req.req_key = :RequestID
    and req.req_key = rqo.req_key
    and obj.obj_key = rqo.obj_key
    UNION ALL
    SELECT distinct reqdet.detname as ReqDetailsName,
    reqdet.detval as ReqDetailsValue
    FROM
    (select req1.request_key rk,
    rbe1.rbe_entity_name detval,
    rbe1.rbe_entity_type detname
    from arch_request_beneficiary_entities rbe1,
    request req1
    where rbe1.rbe_request_key = req1.request_key
    union
    select req1.request_key rk,
    red1.entity_field_value detval,
    red1.entity_field_name detname
    from arch_request_entity_data red1,
    arch_request_entities re1,
    request req1
    where red1.request_entity_key = re1.request_entity_key
    and re1.request_key = req1.request_key
    and red1.entity_field_name != 'Organization'
    and red1.entity_field_name != 'User Manager'
    union
    select req1.request_key rk,
    act.act_name detval,
    red1.entity_field_name detname
    from arch_request_entity_data red1,
    arch_request_entities re1,
    request req1,
    act
    where red1.request_entity_key = re1.request_entity_key
    and re1.request_key = req1.request_key
    and red1.entity_field_value = act.act_key
    and red1.entity_field_name = 'Organization'
    union
    select req1.request_key rk,
    usr3.usr_login detval,
    red1.entity_field_name detname
    from arch_request_entity_data red1,
    arch_request_entities re1,
    request req1,
    usr usr3
    where red1.request_entity_key = re1.request_entity_key
    and re1.request_key = req1.request_key
    and red1.entity_field_value = usr3.usr_key
    and red1.entity_field_name = 'User Manager') reqdet
    WHERE
    reqdet.rk = :RequestID
    </sqlstatement>
         </dataquery>
         <dataStructure>
              <group name="AllRequests" source="sql_L1_AllRequests">
                   <element name="RequestID" value="RequestID"/>
                   <element name="RequestType" value="RequestType"/>
                   <element name="RequesterUserID" value="RequesterUserID"/>
                   <element name="RequestDate" value="RequestDate"/>
                   <group name="grp_AllApprovers" source="sql_L2_Approver_BPEL">
                        <element name="ApproverUserID" value="ApproverUserID"/>
                   </group>
                   <group name="grp_AllApprovers" source="sql_L2_Approver">
                        <element name="ApproverUserID" value="ApproverUserID"/>
                   </group>
                   <element name="RequestStatus" value="RequestStatus"/>
                   <element name="ParentRequestID" value="ParentRequestID"/>
                   <group name="Beneficiaries" source="sql_L1_Beneficiaries">
                        <element name="BenFName" value="BenFName"/>
                        <element name="BenLName" value="BenLName"/>
                        <element name="BenUserID" value="BenUserID"/>
                        <element name="BenEmpType" value="BenEmpType"/>
                        <element name="BenUserStatus" value="BenUserStatus"/>
                        <element name="BenOrg" value="BenOrg"/>
                   </group>
                   <group name="RequestDetails" source="sql_L1_RequestDetails">
                        <element name="ReqDetailsName" value="ReqDetailsName"/>
                        <element name="ReqDetailsValue" value="ReqDetailsValue"/>
                   </group>
              </group>
         </dataStructure>
    </dataTemplate>
    Thanks
    KK

    any help please ? if you need any more information to know more about the issue, please do not hesitate to ask.
    Thank you.

  • BI Publisher Report for Archived OIM

    Hi
    We perfomed Request archival operation in our OIM DB using http://docs.oracle.com/cd/E29505_01/doc.1111/e14308/archival_utilities.htm. Now ARCH* tables are created and it has relevant details.
    Now our requirment is to create a new report to read data from this archived tables using BI publisher. We are looking something similar to OOTB Attestation Request and Approval Reports -> Request Details in BI.
    We created a new report called "Request Details from Archive tables" similar to the OOTB one in BI front end. Also modifed data template by replacing "request*" tables to "arch_request*" as below. When we try to gernerate report now it is not working as expected.
    Do we need to change anything else ? Please advise
    Modified data template for reference
    <dataTemplate name="ArchRequestDetails" description="Each group that contains the logged in user as its direct user. All groups that are administered by the above set of groups are visible to the logged in user.">
    <parameters>
    <parameter name="xdo_user_name" dataType="character"/>
    <parameter name="p_varchar_ReqFN" dataType="character"/>
    <parameter name="p_varchar_ReqLN" dataType="character"/>
    <parameter name="p_varchar_ReqUID" dataType="character"/>
    <parameter name="p_varchar_ReqID" dataType="character"/>
    <parameter name="p_varchar_ReqPID" dataType="character"/>
    <parameter name="p_varchar_ReqStatu" dataType="character"/>
    <parameter name="p_varchar_ReqTyp" dataType="character"/>
    <parameter name="p_ReqDtFrom" dataType="date"/>
    <parameter name="p_ReqDtTo" dataType="date"/>
    <parameter name="p_varchar_BenFN" dataType="character"/>
    <parameter name="p_varchar_BenLN" dataType="character"/>
    <parameter name="p_varchar_BenUID" dataType="character"/>
    </parameters>
    <dataquery>
    <sqlstatement name="sql_L1_AllRequests">
    <![CDATA[ SELECT ReqID as RequestID,
    decode(ReqAction, 'Create Entity', 'Self Registration', 'Add', 'Provision Resource', 'Disable', 'Disable Resource', 'Enable', 'Enable Resource', 'Revoke', 'Revoke Resource', 'Modify Entity', 'Modify Profile') as RequestType,
    ReqUID as RequesterUserID,
    ReqDate as RequestDate,
    CurStatus as RequestStatus,
    null as ParentRequestID
    FROM (select distinct
    req.req_key as ReqID,
    req.req_obj_action as ReqAction,
    usr.usr_login as ReqUID,
    req.req_create as ReqDate,
    ost.ost_status as CurStatus
    from req left outer join rqu on req.req_key = rqu.req_key,
    ost,
    usr,
    act,
    usr usr2
    where rqu.usr_key = usr2.usr_key
    and req.ost_key = ost.ost_key
    and req.req_createby = usr.usr_key
    and usr2.act_key = act.act_key
    and usr2.act_key in (select aad.act_key
    from aad,usg,usr
    where usg.usr_key = usr.usr_key
    and aad.ugp_key = usg.ugp_key
    and usr.usr_key = (select usr.usr_key from usr where upper(usr.usr_login) = upper(:xdo_user_name)))
    and (nvl(:p_varchar_ReqStatu,' ')=' ' or upper(ost.ost_status) like upper(:p_varchar_ReqStatu))
    and (nvl(:p_varchar_ReqID,' ')=' ' or req.req_key like (:p_varchar_ReqID))
    and req.req_create between :p_ReqDtFrom and :p_ReqDtTo
    union
    select
    req.req_key as ReqID,
    req.req_obj_action as ReqAction,
    usr.usr_login as ReqUID,
    req.req_create as ReqDate,
    ost.ost_status as CurStatus
    from
    req,
    ost,
    usr
    where
    req.ost_key = ost.ost_key
    and req.req_createby = usr.usr_key
    and req.req_obj_action = 'Create Entity'
    and upper(ost.ost_status) like upper(:p_varchar_ReqStatu)
    and req.req_create between :p_ReqDtFrom and :p_ReqDtTo
    and ost.ost_status != 'Request Complete'
    union
    select req.req_key as ReqID,
    req.req_obj_action as ReqAction,
    usr.usr_login as ReqUID,
    req.req_create as ReqDate,
    ost.ost_status as CurStatus
    from req,
    ost,
    usr,
    usr usr2,
    act
    where req.ost_key = ost.ost_key
    and req.req_createby = usr.usr_key
    and req.req_obj_action = 'Create Entity'
    and usr2.usr_login =(select upper(rqd.rqd_attr_value) from rqd where rqd.req_key = req.req_key and rqd.rqd_attr_name = 'Users.User ID')
    and usr2.act_key = act.act_key
    and upper(ost.ost_status) like upper(:p_varchar_ReqStatu)
    and req.req_create between :p_ReqDtFrom and :p_ReqDtTo
    and usr2.act_key in (select aad.act_key from aad,usg,usr
    where usg.usr_key = usr.usr_key
    and aad.ugp_key = usg.ugp_key and usr.usr_key = (select usr.usr_key from usr where upper(usr.usr_login) = upper(:xdo_user_name)))
    and ost.ost_status = 'Request Complete')
    UNION ALL
    SELECT distinct request.request_key as RequestID,
    request.request_model_name as RequestType,
    usr1.usr_login as RequesterUserID,
    request.request_creation_date as RequestDate,
    request.request_status as RequestStatus,
    request.request_parent_key as ParentRequestID
    FROM usr usr1 JOIN request req1 ON usr1.usr_key = req1.requester_key,
    request,
    (select distinct req3.request_key rk,
    usr2.usr_first_name bfn,
    usr2.usr_last_name bln,
    usr2.usr_login buid
    from arch_request req3,
    arch_request_beneficiary reqb1,
    usr usr2
    where req3.request_key = reqb1.request_key
    and reqb1.beneficiary_key = usr2.usr_key
    UNION
    select distinct req3.request_key rk,
    usr2.usr_first_name bfn,
    usr2.usr_last_name bln,
    usr2.usr_login buid
    from arch_request req3,
    arch_request_entities re1,
    usr usr2
    where req3.request_key = re1.request_key
    and re1.entity_key = usr2.usr_key)user1
    WHERE
    req1.request_key = request.request_key
    and (NVL(:p_varchar_ReqFN, ' ') = ' ' or UPPER(usr1.usr_first_name) LIKE UPPER(:p_varchar_ReqFN))
    and (NVL(:p_varchar_ReqLN, ' ') = ' ' or UPPER(usr1.usr_last_name) LIKE UPPER(:p_varchar_ReqLN))
    and (NVL(:p_varchar_ReqUID, ' ') = ' ' or UPPER(usr1.usr_login) LIKE UPPER(:p_varchar_ReqUID))
    and (NVL(:p_varchar_ReqID, ' ') = ' ' or UPPER(request.request_key) LIKE UPPER(:p_varchar_ReqID))
    and (NVL(:p_varchar_ReqPID, ' ') = ' ' or UPPER(request.request_parent_key) LIKE UPPER(:p_varchar_ReqPID))
    and (NVL(:p_varchar_ReqStatu, ' ') = ' ' or UPPER(request.request_status) LIKE UPPER(:p_varchar_ReqStatu))
    and (NVL(:p_varchar_ReqTyp, ' ') = ' ' or UPPER(request.request_model_name) LIKE UPPER(:p_varchar_ReqTyp))
    and request.request_creation_date between :p_ReqDtFrom and :p_ReqDtTo
    and (NVL(:p_varchar_BenFN, ' ') = ' ' or (UPPER(user1.bfn) LIKE UPPER(:p_varchar_BenFN) and request.request_key = user1.rk))
    and (NVL(:p_varchar_BenLN, ' ') = ' ' or (UPPER(user1.bln) LIKE UPPER(:p_varchar_BenLN) and request.request_key = user1.rk))
    and (NVL(:p_varchar_BenUID, ' ') = ' ' or (UPPER(user1.buid) LIKE UPPER(:p_varchar_BenUID) and request.request_key = user1.rk))
    ORDER BY RequestID ]]>
    </sqlstatement>
    <sqlstatement name="sql_L2_Approver_BPEL" dataSourceRef="BPEL JDBC">
    SELECT distinct wfproductivity_view.username as ApproverUserID
    FROM wfproductivity_view
    WHERE identificationkey = :RequestID
    </sqlstatement>
    <sqlstatement name="sql_L2_Approver">
    SELECT distinct usr.usr_login as ApproverUserID
    FROM rqh join usr on rqh.rqh_createby = usr.usr_key
    WHERE rqh.req_key = :RequestID
    And rqh.rqh_status = 'Approved'
    </sqlstatement>
    <sqlstatement name="sql_L1_Beneficiaries">
    <![CDATA[ SELECT distinct
    FirstName as BenFName,
    LastName as BenLName,
    userid as BenUserID,
    usr_emp_type as BenEmpType,
    UsrStatus as BenUserStatus,
    OrgName as BenOrg
    FROM
    (select distinct
    usr2.usr_login AS userid,
    usr2.usr_last_name AS LastName,
    usr2.usr_first_name AS FirstName,
    usr2.usr_emp_type AS usr_emp_type,
    usr2.usr_status AS UsrStatus,
    act.act_name AS OrgName
    from req left outer join rqu on req.req_key = rqu.req_key,
    ost,
    usr,
    act,
    usr usr2
    where req.req_key = :RequestID
    and rqu.usr_key = usr2.usr_key
    and req.ost_key = ost.ost_key
    and req.req_createby = usr.usr_key
    and usr2.act_key = act.act_key
    and usr2.act_key in
    (select aad.act_key
    from aad,usg,usr
    where
    usg.usr_key = usr.usr_key
    and aad.ugp_key = usg.ugp_key
    and usr.usr_key = (select usr.usr_key from usr where upper(usr.usr_login) = upper(:xdo_user_name)))
    and (nvl(:p_varchar_ReqStatu,' ')=' ' or upper(ost.ost_status) like upper(:p_varchar_ReqStatu))
    and (nvl(:p_varchar_ReqID,' ')=' ' or req.req_key like (:p_varchar_ReqID))
    and (nvl(:p_varchar_BenUID,' ')=' ' or upper(usr2.usr_login) like upper(:p_varchar_BenUID))
    and (nvl(:p_varchar_BenFN,' ')=' ' or upper(usr2.usr_first_name)like upper(:p_varchar_BenFN))
    and (nvl(:p_varchar_BenLN,' ')=' ' or upper(usr2.usr_last_name)like upper(:p_varchar_BenLN))
    and req.req_create between :p_ReqDtFrom and :p_ReqDtTo
    union
    select
    (select rqd.rqd_attr_value from rqd where rqd.req_key = req.req_key and rqd.rqd_attr_name = 'Users.User ID') AS userid,
    (select rqd.rqd_attr_value from rqd where rqd.req_key = req.req_key and rqd.rqd_attr_name = 'Users.Last Name') AS LastName,
    (select rqd.rqd_attr_value from rqd where rqd.req_key = req.req_key and rqd.rqd_attr_name = 'Users.First Name') AS FirstName,
    (select rqd.rqd_attr_value from rqd where rqd.req_key = req.req_key and rqd.rqd_attr_name = 'Users.Xellerate Type') AS usr_emp_type,
    null AS UsrStatus,
    null AS OrgName
    from req,
    ost,
    usr
    where req.req_key = :RequestID
    and req.ost_key = ost.ost_key
    and req.req_createby = usr.usr_key
    and req.req_obj_action = 'Create Entity'
    and upper(ost.ost_status) like upper(:p_varchar_ReqStatu)
    and req.req_create between :p_ReqDtFrom and :p_ReqDtTo
    and ost.ost_status != 'Request Complete'
    union
    select usr2.usr_login AS userid,
    usr2.usr_last_name AS LastName,
    usr2.usr_first_name AS FirstName,
    usr2.usr_emp_type AS usr_emp_type,
    usr2.usr_status AS UsrStatus,
    act.act_name AS OrgName
    from req,
    ost,
    usr,
    usr usr2,
    act
    where req.req_key = :RequestID
    and req.ost_key = ost.ost_key
    and req.req_createby = usr.usr_key
    and req.req_obj_action = 'Create Entity'
    and usr2.usr_login =(select upper(rqd.rqd_attr_value) from rqd where rqd.req_key = req.req_key and rqd.rqd_attr_name = 'Users.User ID')
    and usr2.act_key = act.act_key
    and upper(ost.ost_status) like upper(:p_varchar_ReqStatu)
    and (nvl(:p_varchar_BenUID,' ')=' ' or upper(usr2.usr_login) like upper(:p_varchar_BenUID))
    and (nvl(:p_varchar_BenFN,' ')=' ' or upper(usr2.usr_first_name)like upper(:p_varchar_BenFN))
    and (nvl(:p_varchar_BenLN,' ')=' ' or upper(usr2.usr_last_name)like upper(:p_varchar_BenLN))
    and req.req_create between :p_ReqDtFrom and :p_ReqDtTo
    and usr2.act_key in
    (select aad.act_key
    from aad,usg,usr
    where
    usg.usr_key = usr.usr_key
    and aad.ugp_key = usg.ugp_key and usr.usr_key = (select usr.usr_key from usr where upper(usr.usr_login) = upper(:xdo_user_name)))
    and ost.ost_status = 'Request Complete')
    UNION ALL
    SELECT distinct user1.bfn as BenFName,
    user1.bln as BenLName,
    user1.buid as BenUserID,
    user1.bet as BenEmpType,
    user1.bus as BenUserStatus,
    user1.bo as BenOrg
    FROM
    (select distinct req3.request_key rk,
    usr2.usr_first_name bfn,
    usr2.usr_last_name bln,
    usr2.usr_login buid,
    usr2.usr_emp_type bet,
    usr2.usr_status bus,
    act.act_name bo
    from arch_request req3,
    arch_request_beneficiary reqb1,
    usr usr2,
    act
    where req3.request_key = reqb1.request_key
    and reqb1.beneficiary_key = usr2.usr_key
    and usr2.act_key = act. act_key
    and (nvl(:p_varchar_BenUID,' ')=' ' or upper(usr2.usr_login) like upper(:p_varchar_BenUID))
    and (nvl(:p_varchar_BenFN,' ')=' ' or upper(usr2.usr_first_name)like upper(:p_varchar_BenFN))
    and (nvl(:p_varchar_BenLN,' ')=' ' or upper(usr2.usr_last_name)like upper(:p_varchar_BenLN))
    UNION
    select distinct req3.request_key rk,
    usr2.usr_first_name bfn,
    usr2.usr_last_name bln,
    usr2.usr_login buid,
    usr2.usr_emp_type bet,
    usr2.usr_status bus,
    act.act_name bo
    from arch_request req3,
    arch_request_entities re1,
    usr usr2,
    act
    where req3.request_key = re1.request_key
    and re1.entity_key = usr2.usr_key
    and usr2.act_key = act. act_key
    and (nvl(:p_varchar_BenUID,' ')=' ' or upper(usr2.usr_login) like upper(:p_varchar_BenUID))
    and (nvl(:p_varchar_BenFN,' ')=' ' or upper(usr2.usr_first_name)like upper(:p_varchar_BenFN))
    and (nvl(:p_varchar_BenLN,' ')=' ' or upper(usr2.usr_last_name)like upper(:p_varchar_BenLN))
    )user1
    WHERE
    user1.rk = :RequestID
    ]]>
    </sqlstatement>
    <sqlstatement name="sql_L1_RequestDetails">
    SELECT distinct
    null as ReqDetailsName,
    obj_name as ReqDetailsValue
    FROM
    req,
    rqo,
    obj
    WHERE
    req.req_key = :RequestID
    and req.req_key = rqo.req_key
    and obj.obj_key = rqo.obj_key
    UNION ALL
    SELECT distinct reqdet.detname as ReqDetailsName,
    reqdet.detval as ReqDetailsValue
    FROM
    (select req1.request_key rk,
    rbe1.rbe_entity_name detval,
    rbe1.rbe_entity_type detname
    from arch_request_beneficiary_entities rbe1,
    request req1
    where rbe1.rbe_request_key = req1.request_key
    union
    select req1.request_key rk,
    red1.entity_field_value detval,
    red1.entity_field_name detname
    from arch_request_entity_data red1,
    arch_request_entities re1,
    request req1
    where red1.request_entity_key = re1.request_entity_key
    and re1.request_key = req1.request_key
    and red1.entity_field_name != 'Organization'
    and red1.entity_field_name != 'User Manager'
    union
    select req1.request_key rk,
    act.act_name detval,
    red1.entity_field_name detname
    from arch_request_entity_data red1,
    arch_request_entities re1,
    request req1,
    act
    where red1.request_entity_key = re1.request_entity_key
    and re1.request_key = req1.request_key
    and red1.entity_field_value = act.act_key
    and red1.entity_field_name = 'Organization'
    union
    select req1.request_key rk,
    usr3.usr_login detval,
    red1.entity_field_name detname
    from arch_request_entity_data red1,
    arch_request_entities re1,
    request req1,
    usr usr3
    where red1.request_entity_key = re1.request_entity_key
    and re1.request_key = req1.request_key
    and red1.entity_field_value = usr3.usr_key
    and red1.entity_field_name = 'User Manager') reqdet
    WHERE
    reqdet.rk = :RequestID
    </sqlstatement>
    </dataquery>
    <dataStructure>
    <group name="AllRequests" source="sql_L1_AllRequests">
    <element name="RequestID" value="RequestID"/>
    <element name="RequestType" value="RequestType"/>
    <element name="RequesterUserID" value="RequesterUserID"/>
    <element name="RequestDate" value="RequestDate"/>
    <group name="grp_AllApprovers" source="sql_L2_Approver_BPEL">
    <element name="ApproverUserID" value="ApproverUserID"/>
    </group>
    <group name="grp_AllApprovers" source="sql_L2_Approver">
    <element name="ApproverUserID" value="ApproverUserID"/>
    </group>
    <element name="RequestStatus" value="RequestStatus"/>
    <element name="ParentRequestID" value="ParentRequestID"/>
    <group name="Beneficiaries" source="sql_L1_Beneficiaries">
    <element name="BenFName" value="BenFName"/>
    <element name="BenLName" value="BenLName"/>
    <element name="BenUserID" value="BenUserID"/>
    <element name="BenEmpType" value="BenEmpType"/>
    <element name="BenUserStatus" value="BenUserStatus"/>
    <element name="BenOrg" value="BenOrg"/>
    </group>
    <group name="RequestDetails" source="sql_L1_RequestDetails">
    <element name="ReqDetailsName" value="ReqDetailsName"/>
    <element name="ReqDetailsValue" value="ReqDetailsValue"/>
    </group>
    </group>
    </dataStructure>
    </dataTemplate>
    Thanks
    KK

    any help please ? if you need any more information to know more about the issue, please do not hesitate to ask.
    Thank you.

  • Online report from archived data

    We have  Ztables as it contains a lot of transactional data growing very fast. hence we are planning to archive this ZTABLES using archiving objects.
    but once data is archived we might need to run reports at a later time(a online report ) and still need this data. How can we achive this?
    can i have details about the stratergy discussed it anyone tried the same?
    or is there some other way? we need to  reduce the data in ZTABLES for sure as it will be performance issue. can someone advice the best stratergy 4 the same?

    Hello.
    When you create an archiving object, you can assign it to an archive infostructure. This is a table that contains some of the fields of the table that you will archive and speeds up the access to archived objects (works like an index).
    Check in tcode SARI-Customizing-Create. After creating must activate.
    Then, will be created a table ZARIX... where you can see data in se16 like a normal database table.
    Example:
    Archive Object: SD_VBRK
    Archive Infosctrucure: SAP_SD_VBRK_002
    Table created: ZARIXSD3 (in my system).
    * Acess archive data
    SELECT SINGLE gentab FROM aind_str2
      INTO (w_gentab)
    WHERE archindex EQ 'SAP_SD_VBRK_002'
       AND active EQ 'X'.
    Also check this link:
    http://help.sap.com/saphelp_nw70/helpdata/EN/5c/11af98d55711d2b1f80000e8a5b9a5/frameset.htm
    Regards.
    Valter Oliveira.

Maybe you are looking for

  • Laptop Toshiba P50-A-K9M often freezes due to unknown reason

    Hi, My Toshiba P50-A-K9M constantly freezes due to unknown reason. My OS is Windows 7 64-bit. Initially I thought that it was due to overheating. However, when I enabled CPU temperature monitor I noticed that freezes happen even if the temperature is

  • Error in reconciling pluggable mapping

    Hello Everybody, When i try to reconcile pluggable maapings, i get the error "MMM1058: Access invalid property 1 in array property." Could any one suggest what can be the cause of this error. We are using OWB 10G R2 (10.2.0.2.0). Thanks in advance. S

  • Monitor Out Issue and 2K proxy from RED Issue

    I'm having two monitor issues since I updated to FCS3 (Color 1.5) The first is with most footage. Most any footage that I bring into Color 1.5 using the "Sent to" feature from FCP7 (720p, 1080p, etc) will not be displayed in my external monitor (JVC

  • DVD Player not reading CD or DVD

    I have a Satellite A665-56093 laptop, and the DVD/CD player was working, and now it won't read CD's or DVD's. The model  on the drive (according to device manager) is TSSTcorp CDDVDW TS-L633Y. When I put a CD or DVD in you can hear the computer tryin

  • Discontiguous selection model on a jtree

    Hi Frank I have a jtree bound to and adf model. i have set the branch accessor rule on the binding. when i set the selection model to discontiguous then it wont allow me to crtl select all the items . it does however allow me to select some of the it