Restrict user on custom report by using P_orgin

Hi
I have a requirement of restricting the view of a custom HR report based on Personnel Area(PERSA). I am using the standard authorization object "P_ORGIN" and  call the following in my code, still I am not being able to restrict the view of the report based on PERSA.
The test user id created has the role rest
    CALL METHOD zyclmdmim_authority_chk=>zyxapm_authority_check
      EXPORTING
        infty = '0001'
        authc = 'R'
        persa = '0684'
      EXCEPTIONS
        noauthorization = 1
        OTHERS          = 2.
method zyxapm_authority_check.
  authority-check object 'P_ORGIN'
  id 'INFTY' field infty
  id 'AUTHC' field authc
  id 'PERSA' field persa.
  if sy-subrc <> 0.
    raise noauthorization.
  endif.
endmethod.
Regards
Swarnali
Edited by: swarnali_IBM on Jan 28, 2012 9:10 AM

Hi Swarnali
You can use codee below
CALL METHOD zyclmdmim_authority_chk=>zyxapm_authority_check
      EXPORTING
        infty = '0001'
        authc = 'R'
        persa = '0684'
      EXCEPTIONS
        noauthorization = 1
        OTHERS          = 2.
method zyxapm_authority_check.
  authority-check object 'P_ORGIN'
  id 'INFTY' field infty
  id 'AUTHC' field authc
  id 'PERSA' field persa.
  if sy-subrc NE  0.
    raise noauthorization.
  endif.
endmethod.

Similar Messages

  • How to create custom report plugin using child region report metadata

    Hi,
    I want to ask for help on how to create custom report plugin using child region report metadata. My idea is to create a child region, a classic report and set the condition to never.
    Then i will query the child report metadata from apex view and use it to create a custom report like using jquery jq-grid. Any idea how i can create a process that will use the child report
    metadata? I dont know how i can create a process just like how apex work, how apex render report, coz i want it to be control using the standard apex report attribute. This plugin will
    render according to the child report attribute.
    Is there anybody here had ever done this?

    Hi Nicolette,
    Thanks for the reply. I know where to find the metadata, just asking for idea on how the rendering process will be.
    Start from determining column heading, column order until finish rendering the report. The same way how apex
    render the classic report.
    Previously this imy my rendering process:
    FUNCTION GETCOLUMN(P_REGION IN APEX_PLUGIN.T_REGION,
                         P_PLUGIN IN APEX_PLUGIN.T_PLUGIN,
                         P_VALUE  IN VARCHAR2) RETURN SYS.DBMS_SQL.DESC_TAB2 IS
        VSQLHANDLER     APEX_PLUGIN_UTIL.T_SQL_HANDLER;
        VCOLCOUNT       NUMBER;
        VCOLNAMES       VARCHAR2(2000);
        VAJAXIDENTIFIER VARCHAR2(100);
        VPAGESIZE       TYPEATTR := P_REGION.ATTRIBUTE_04;
        VJSCODE         VARCHAR2(32767);
      BEGIN
        VSQLHANDLER := APEX_PLUGIN_UTIL.GET_SQL_HANDLER(P_SQL_STATEMENT  => 'select * from s_emp',
                                                        P_MIN_COLUMNS    => 1,
                                                        P_MAX_COLUMNS    => 999,
                                                        P_COMPONENT_NAME => P_REGION.ID);
        VCOLCOUNT := VSQLHANDLER.COLUMN_LIST.COUNT();
        FOR I IN 1 .. VCOLCOUNT LOOP
          VCOLNAMES := VCOLNAMES || '{name: "' ||
                       UPPER(VSQLHANDLER.COLUMN_LIST(I).COL_NAME) || '",';
        END LOOP;
        APEX_PLUGIN_UTIL.FREE_SQL_HANDLER(VSQLHANDLER);
        RETURN VSQLHANDLER.COLUMN_LIST;
      EXCEPTION
        WHEN OTHERS THEN
          APEX_PLUGIN_UTIL.FREE_SQL_HANDLER(VSQLHANDLER);
          RAISE;
      END GETCOLUMN;
    So this is how i get the header for my report plugin. The same method is use to get the value / data for each column. This process is work. So now
    i want to extend my plugin so that i will use all attributes from the child report to render my plugin. So the column header, column order, all will depend
    on the child report. And the column display condition is set, it will also check the condition before render the column. Sounds like i want to reinvent
    the normal apex rendering process but this is what i want to achieve.
    I need help to find the correct logic for my render process. Don't want too much for starting, just want to render the plugin correctly, same with child report,
    same columns alias, column ordering and column  conditional display.
    Thanks,
    akulala

  • HFM: How to restrict user to generate reports when there is a data load process going on?

    Hi Experts,
    I want to get some idea on how we can restrict one user of generating report when another user is loading the data for the same entity, assuming both the users were at different location and there is no communication between them.
    i am dealing same kind of problem in HFM. we have many users created, some users will be loading the data using FDMEE while some users will be generating the reports. the problem arises when one user is loading the data for a particular entity and at the same time another generates the report for the same entity. this shows wrong data in the reports as the data's were not updated.
    please suggest how we can come out of this problem.
    Thanks in advance for your valuable suggestions.

    I thought for a while that I could solve the problem creating a parameter in the main report and casting the first argument of my subreportprocesssing event handler to LocalReport and setting the parameter using the SetParameters method of the LocalReport
    object indicating when there was data to show or not. But this doesn't worked , the parameter value remains the same when I use it in expressions to change the visibility property of my subreports.
    Codelines

  • Restricting User from creating new records using when-validate-record

    Hi,
    I have a requirement for which I have to restrict he user from creating a record in the Supplier Master form if the suppliier type is 'Affiliate Supplier'.
    I have done the following setups
    Seq 10
    Description Restricting user from creating Affiliate records
    Level Function
    Enabled Yes
    Condition:
    Trigger Event WHEN-VALIDATE-RECORD
    Trigger object VNDR
    Condition "${item.VNDR.VENDOR_TYPE_DISP_MIR.value} is NOT NULL
    and
    ${item.VNDR.VENDOR_TYPE_DISP_MIR.value} LIKE 'Affiliate%'
    Processing Mode BOTH
    Context
    Level User
    Value User Name
    Action Sequence 1
    Type Message
    Action Description Saving Affiliate record
    Language ALL
    Message Type Show
    Message Text You Cannot Create Affiliate records Here
    Action Sequence 2
    Type Builtin
    Action Description Stop Proceesing
    Language ALL
    Action Enabled Yes
    Builtin Type RAISE FORM_TRIGGER_FAILURE;
    This is working good on one instance but when I moved it to another instance
    when I query the form and try to navigate to the bank accounts tab of the form which is based on a differnt block i.e VNDR_USES block, the when-validate-record trigger fires there also and stops the processing.
    Any suggestions on this would be higly appriciated.
    Thanks in Advance.

    Hi Srini,
    Yes, it does work...but in a Form Session if i Create more then one Item, in some cases it fires for the first records and not sleeps for the second.
    Sometimes it doesn't give any response.
    Appreciated if you divert to the link to check the Pacthes for 11.5.10 on Form Personalization.
    Please share any ideas/example if yiou have to achieve the below requirement.
    Requirement:
    Once New record is created , a Custom Procedure should be invoked.
    with out closing Form i am able to create n number of Items, so for every Item it should invoke Custom PLSQL Code on Save.
    Let me know if i can achieve the same in Custom.pll .....as i can use either of Options.(Form Personalization/Custom.pll)
    Thanks & regards,
    Edited by: user632004 on Mar 16, 2010 7:50 PM
    Edited by: user632004 on Mar 16, 2010 8:09 PM

  • UCCX 8.5 - Custom reports (not using Crystal)

    I have a customer requesting a report of the calls per hour per agent...Say I go into the reporting system that I have setup and the person is able to select a date range and queue name, the output should show a series of tables (one for each day) that includes agent name, with the number of calls taken per hour....
    can anyone point me in the right direction of a sql statement that would querry the database to do so?

    Custom reporting on the UCCX platform can be a real chore, luckily if what you're doing is only a modification of an existing report you can create the new report with minimal hassle.
    UCCX primarily uses stored procedures to generating report data, the procedure name and variables it consumes are provided in the report defintions provided with the HRC client (check the installed directory). This is an XML file you can parse.
    From there, you may customize to your hearts content and display to whatever interface deemed appropriate.
    You may wish to consult both the UCCX Database Schema and Historical Reports developer guide for your partitcular version of UCCX.
    HTH,
    Tanner Ezell
    www.ctilogic.com

  • How to restrict  redundant value in report while using left outer urgent

    Hi frineds
          i am developing pp report,
    i am using the select query,
      the output instead of one i ,got two for every one
    ex reason badm-- onlyone
    but igives badm
                    badm
      SELECT FMATNR FAUFNR FPSMNG GXMNGA GPERNR GBUDAT GGRUND GVORNR  GAUFPL  GIEDD H~GRDTX INTO CORRESPONDING FIELDS OF TABLE IT_AFPO_IDEL
             FROM AFPO AS F
             INNER JOIN AFRU AS G ON FAUFNR = GAUFNR
            INNER JOIN TRUGT AS H ON GGRUND = HGRUND
             LEFT OUTER  JOIN TRUGT AS H ON GGRUND = HGRUND
             WHERE F~MATNR IN S_MATNR AND
                   F~AUFNR IN S_AUFNR   AND
                  G~ISDD IN S_ISDD AND
                   G~IEDD IN S_IEDD AND
                   G~WERKS IN S_WERKS AND
                   G~XMNGA <> 0 .
    how can i restrict ,give me solution ,very urgent
    Thanks in advance
    Regards
    ds

    Hi Chandran,
                I got that Idea too. I created a authorized customer, I created a authorized Object and assigned to a role.But in the role, when I am changing the object to generate profile, it is asking to select list of customers from the customer table.If the customers are always constant then this would work,  but in my scenario, customers for the sales rep changes over time and when I ever reps open the query, they should see updated list of customers assigned to them only, as we update the master data everyday from source system and that shud reflect in the value help.
    I am trying User Exit to achieve this, but I am not getting proper ideas how to do this.
    Any Help on this issue with user exit code???
    Thanks in Advance
    regards,
    PNK

  • Help needed restricting users admin access to devices using ACS 4.2

    I have users that access the network via a VPN client to a PIX 515 which authenticates to the ACS (using the default group for unknown users) which uses an external Active Directory Database.
    The problem I have is that as the ACS authenticates these users, it now allows them admin access to the PIX. How do I restrict access? I have looked at NARs using the 'All AAA clients, *, *' approach but that just stops their VPN access. ( I have a separate group called 'PIX ACCESS' which will contained only defined users for admin access).
    Incidentally I have other devices on the network which are AAA clients, in particular Nortel switches. I can set the group settings for that RADIUS set up to 'Authenticate Only' (RADIUS Nortel option) and that works fine, I was expecting the ACS to have a similar setting for TACACS+.
    So how do I allow the unknown users to authenticate to their AD database but restrict them admin access to the AAA clients?

    Very common problem. I've solved it twice over the last 6 years with ACS. I'm sketchy on the details. But here goes. First option to explore is using RADIUS for VPN access, then TACACS on all the Cisco switches and PIX firewall. That would make it alot easier. I think that with TACACS, you can build a NAR based on TCP port number instead of IP address....
    http://www.cisco.com/en/US/products/sw/secursw/ps2086/products_tech_note09186a0080858d3c.shtml
    So you'd have a group with 3-4 Administrators that can access PIX CLI, and another group of VPN users that can't access the PIX but can VPN in. So on the VPN group, put a NAR that restricts access to SSH/Telnet TCP ports?
    This comes up everytime I install an ACS server, (every 2-3 years), and it's always a trick.
    Please let me know if this works for you. And if it doesn't, let us know how you fixed it. I think I can get back into the ACS I last did this with and take a look, but I'd have to call up and make a special trip.

  • Custom Report layout Using FOP

    I am using FOP as report server to print my apex regions as PDF. How can i print a report with custom layout. Plz provide me a starting point.

    I want to make a report withe the parent and child hirerechy. e.g
    parent data line 1
    parent data lie 2
    parent data line 3
    child No.1 data
    childe no. 2 data
    Child No. 3 data
    In case I print this report using the standard layout. It prints in one table withe the parent repeating for each child. I want to also inculde some things in the header and footer like company logo and signature.
    thanks,

  • How to Restrict user to copy reports to other folder except favorites

    Hi
    I have created web intelligence reports and saved it in folders
    now i have to give rights to the user
    that he should only copy that report to favorites not to any other folder
    how to restrict this in cmc pls somebody help me ....
    or else there is one more case
    user can chage the report but the changes should reflect only to him not to other user who see that report

    Hi
    I have created web intelligence reports and saved it in folders
    now i have to give rights to the user
    that he should only copy that report to favorites not to any other folder
    how to restrict this in cmc pls somebody help me ....
    or else there is one more case
    user can chage the report but the changes should reflect only to him not to other user who see that report

  • Restrict user to access report of a specific layout

    Hello experts,
    We have a std. CJI3 report. In this report I have created a layout (see screen shot) and I want a user to access only that data of the report which comes with this layout.
    Kindly suggest if there is a way to control the access in this way.
    I though of creating z-report using call transaction function (to call cji3) and use screen variant for it.. but I dont want to go this way..
    Kindly suggest.
    Thank You.
    Regards
    Saurabh

    That would work nicely, if you also implemented note http://service.sap.com/sap/support/notes/1113939.
    However, I doubt this will be enough for CJI3, which has "Free Selections" as well as "Extended Selections" AND DB-Profiles.

  • Restrict User Connections Using Logon Trigger

    Hi all,
    Now I am restricting user connections from selected terminals, using following logon trigger.
    It allows users with DBA privileged user.
    How to restrict DBA Privileged users users ?
    Note:- As per my application needs DBA privilege.
    CREATE OR REPLACE TRIGGER on_logon
    AFTER LOGON
    ON DATABASE
    DECLARE
    VPROGRAM VARCHAR2(30);
    Vusername VARCHAR2(30);
    VTERMINAL VARCHAR2(30);
    CURSOR user_prog IS
    SELECT UPPER(program),UPPER(username),NVL(TERMINAL,'X') FROM v$session
    WHERE audsid=sys_context('USERENV','SESSIONID');
    BEGIN
    OPEN user_prog;
    FETCH user_prog INTO Vprogram,Vusername,VTERMINAL;
    IF VTERMINAL NOT IN ( 'APP1','APP2','APP3')+
    and Vusername='ABUL'+
    THEN
    RAISE_APPLICATION_ERROR(-20001, 'You are not allowed to login');
    END IF;
    CLOSE user_prog;
    END;
    Thanks i Advance
    Abk

    Your application needs the DBA role? That is a terrible design-- it violates every principle of secure coding.
    Login triggers don't fire for users with the DBA role, so you won't be able to use a login trigger here. You could ditch the login trigger and configure invited and excluded nodes in the listener's sqlnet.ora file, i.e.
    tcp.validnode_checking = yes
    tcp.excluded_nodes = (hostname1,hostname2,hostname3)You'll have to restart the listener after making that change.
    Justin

  • Custom Report Layout in APEX 3.0 PDF

    How much freedom do we have when developing a custom report layout using BI Publisher when we create the template file using the Word XML add-on?
    Why I am asking is, I am trying to replicate several Crystal based reports that use multiple lines of for data. They group on several columns and display the grouped data on separate lines in the report.
    Grouping 1 Line one has customer detail information
    Next grouping 1 or more lines are provider of service line information
    Last Line count of detail lines for customer
    Or would I be better off porting these reports to Oracle Reports?
    Thank you!
    Tony Miller
    UTMB/EHN

    Marc, I was able to create reports based on a layout and a report query...Is it possible to let the end user (not apex developers) download the report layout, make modifications and load it again. They will only be changing the text and very rarely will modify the fields..
    Thanks
    Ashlee
    update: i found the following logic in the f4000 app on page 1405 for download
    declare
    l_report_document blob;
    l_file_ext varchar2(255);
    l_mime_type varchar2(255);
    begin
    for c1 in (
    select *
    from wwv_flow_report_layouts
    where id = :P1405_ID
    ) loop
    if c1.report_layout_type = 'RTF_FILE' then
    l_mime_type := 'application/rtf';
    l_file_ext := 'rtf';
    else
    l_mime_type := 'application/xml';
    l_file_ext := 'xml';
    end if;
    l_report_document := wwv_flow_utilities.clob_to_blob(c1.page_template,wwv_flow_lang.get_db_charset);
    sys.owa_util.mime_header (l_mime_type ,false);
    sys.htp.p('Content-Disposition: attachment; filename='||lower(replace(c1.report_layout_name,' ','_'))||'.'||l_file_ext);
    wpg_docload.download_file( l_report_document );
    end loop;
    end;
    and 1406 for upload
    declare
    l_report_layout clob;
    l_report_layout_id number;
    begin
    for c1 in (
    select blob_content from wwv_flow_files
    where name = :P1406_LAYOUT_FILE
    ) loop
    l_report_layout_id := wwv_flow_id.next_val;
    l_report_layout := wwv_flow_utilities.blob_to_clob(c1.blob_content);
    insert into wwv_flow_report_layouts (
    id,
    flow_id,
    report_layout_name,
    report_layout_type,
    page_template
    ) values (
    l_report_layout_id,
    :FB_FLOW_ID,
    :P1406_REPORT_LAYOUT_NAME,
    'RTF_FILE',
    l_report_layout
    end loop;
    end;
    are these the tables/apis i could use ?

  • How to locate the repository table relevant to my custom report. ?

    Hi
    I have to develop custom user  report  in  SAP GTS.
    User wants custom report with product, classification and tariff details.
    Please tell me, How do I locate the relevant  table and field from the the GTS SAP repository ?
    BTW, Where do I go from here and do some more research and understand the GTS schema or repository database understand the different tables and its purpose and also its relation, etc.
    Any pointers ?
    Your help is much appreciated. Many thanks in advance.
    -siva

    hi,
    open ur transaction and in menu goto system status and find program name.
    then in se37 open GET_TABLES func module.give program name and execute.
    u will get all tables related to that transaction.use the tables which have ur required fields.

  • Custom Report Layout with mutliple child tables

    I am trying to create a custom report layout (using Bi Publisher) where I have parent data (multiple jobs on a page) and several child tables for each job (JobDays and JobStops) and several child tables for JobDays (JobDayProviders, JobDayCrew). On the apex screen, I have a join on Jobs and JobDays and I am using functions to string each child row value for JobDayProviders and JobDayCrew together and putting a <br> in between so that they will format on separate lines within a cell. It works fine on the screen but when trying to print to pdf, it ignores these line breaks. I have also tried using <br></br> (saw an article that said just use HTML in bi pulisher) which puts two lines in between each value on the screen and is still ignored on the pdf.
    for example:
    Table hierarchy:
    Jobs table
    Job Stops
    Job Days
    Job Day Service Providers
    Job Day Crew
    Report Layout per job (will have mutlipe jobs to print, just printing 1 day per job):
    Jobs.col1 JobStops.row1 JobDay.col1 JobDayProviders.row1 JobDayCrew.r1
    JobStops.row2 JobDayProviders.row2 JobDayCrew.r2
    JobDayProviders.row3
    Thanks,
    Linda
    First, is there a way to get bi publisher to recognize the line breaks? If not, what is the best way to create a custom report for this scenario? I tried to create a report query with mutliple queries, but cannot determine how to link the child queries to the paren query. I have seen an example where a button is pressed to print one parent row and the id of that row is saved and referenced as a parameter in each of the queries, but if printing mutliple parents on a report, how would I link the child queries to the parent query?

    Helen,
    The best way for your case is to use a content folder and customize it whichever way you like.
    however, your question is about reports. the problem in reports is this that you have to use just one single query and the layout of the results of this query are displayed in a peculiar way.
    anyway. something similar but not exactly the same as what you wanted do is the following.
    use a query like the following: (with a union in between)
    SELECT COLUMN1,NULL , NULL ,NULL ,NULL
    FROM my_source_table
    WHERE myCriteria LIKE 'SoAndSo%'
    UNION
    SELECT NULL,COLUMN2 , COLUMN3, COLUMN4, COLUMN5
    FROM my_source_table
    WHERE myCriteria LIKE 'SoAndSo%'
    ---------- Now, have the following codes in the layout segments:
    <!--- header --->
    <table border="0" cellpadding="1" cellspacing="1" width="20%" align="center">
    <!--- body --->
    <tr align="center">
    <td><table border="0" cellpadding="1" cellspacing="0" width="30%" align="center">
    <tr align="center">
    <TH><#COLUMN1.FIELD#></TH>
    </tr>
    </table>
    </td>
    <TD class="report_cell" ALIGN="LEFT"><#COLUMN2.FIELD#></TD>
    <TD class="report_cell" ALIGN="LEFT"><#COLUMN3.FIELD#></TD>
    <TD class="report_cell" ALIGN="LEFT"><#COLUMN4.FIELD#></TD>
    <TD class="report_cell" ALIGN="LEFT"><#COLUMN5.FIELD#></TD>
    </tr>
    <!--- footer --->
    <TR><TD></TD></TR>
    this should produce a report with a table structure (you may see the whole if you give BORDER="1" in the main table tag). Within this table, the first column of the first row should be showing top-leftmost column value once (COLUMN1 value) and then the next rows would show last four column values as a table block on the right-bottom part.
    with kind regards,
    naqvi

  • Customized Reports running slow in PRD system.

    Dear all,
    All the zreports in our PRD system(900) is running very slow recently.
    Simple customized reports which used to and should take very less time
    are taking more than 10 mins. for execution. Some customized reports are not
    getting excecuted even after 30 mins. The program is not throwing dump
    because the instance profile parameter max_wprun_time has been extended
    to 99999.
    Pls. help regarding how to solve the problem.
    reg,
    Subhajit Sen Gupta.

    Hi,
    check these links for performance tips:
    http://www.erpgenie.com/abap/performance.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    Use se30 and st05 for analysis.
    **reward if helpful
    regards,
    madhu

Maybe you are looking for

  • How do I get the app to install with Configurator?

    Trying to set up a few iPads with all the same apps etc.  Have a VPP account (just started in Canada, whoot!), have purchased the apps, have the spreadsheets. Instructions for Configurator say to import the app, and then later when installing the app

  • Password Protection for pdf file

    Hi Gurus,   Wish u happy new year    Is there any possibility for giving the password for the pdf file from SAP so that it should be password enabled. Now am able to send the pdf file  attachment through mail. But my requirement is I have to give the

  • Photo Software and Apps

      Photo Software and Apps After you have uploaded your digital photos to your computer, you are almost ready to start editing. With many options for photo editing software, the possibilities are seemingly endless. There are many different tasks and o

  • Flat Panel LCD Computer Monitor Advice

    I'm building an FCP workstation and have been thinking about what type of computer monitor to purchase. My current monitor is a bulky CRT, so if anyone has any advice as far as what to look for in an LCD or good brands that have worked well for you i

  • Acrobat reader for ios 5.1

    How do I get an acrobat reader for my iOS 5.1?