Coding ABAP using LDB PNP and authorizations problems

This post requires a blend of ABAP and HCM skills.
When coding my own ABAP using LDB PNP, the LDB will provide me with the employees selected but will skip those for which I do not have access (regarding Authorizations settings) to one or more of the infotypes declared in the program.
As a programmer I would like to receive from the LDB the information that an employee is skipped so that I can handle the exception.
Do you know how can I get this information from the LDB?
Thanks

I dont know if PNP can do it but PNPCE can:
at END-OF-SELECTION call macro PNP_GET_AUTH_SKIPPED_PERNRS
it will provide a list of skiped PERNRs
for further info see docu PNPCE

Similar Messages

  • Screen Change when using LDB - pnp

    Hi ,
    I am facing a strange problem.
    I am using LDB -> pnp and HRIN0013 as Master data rep ,
    in one of the programs that i developed.
    The Screen and program behave fine in the development server.
    Once i transport it to the production server, the Screen changes to something completely different.
    What i noticed is that in attributes -->'Report category assignment' , HRIN0013 is not present.
    This means that HRIN0013 has not been transported?
    What can the problem be and how can i fix it?? I need to get this in by tommorow. Help will be highly appreciated.

    Hi Sanchit,
    when I change the report class in an HR report, the system tells me for the change request number.
    This change request, introduces, I think, a new record in some customize tables, like t599C.
    There must be a record in this table, for the report class that you create.
    Hope this helps you,
    Carles

  • Reading Locked records from HR table using LDB PNP

    Hi,
    I am trying to read the table pa0168 using LDB PNP.
    But the problem is that get pernr staement does not retrieve locked records i.e where PA0168-sprps eq "X'.
    Can anybody help me with this.
    I have to use LDB  so i don't want a solution of writing a select * for the pa0168 table.
    hence i have to use get pernr statement but it should also retrieve locked records.
    how can i achieve that.? please help
    Thanks
    GT
    Message was edited by: GT

    Hi GT,
    In the START-OF-SELECTION event, set the parameter value
    pnp-sw-ignorelockedrecords = 'N'.
    Good Luck,
    Suresh Datti
    ( Pl award points if the answer helps you )

  • Record selection in IT0000 (Actions) using LDB PNP

    Hi Guys,
    I am writing a report using LDB PNP, where I need to EXCLUDE the employees, if an action has been done on IT0000 for the reporting start date and end date.
    Can anybody share the logic to do this using HR Macros or FM?
    Thanks,
    mini

    Hi miniSAP!
    I think this tip can help you.
    You can make your job at follow form:
    at "infotypes" declaration, use:
    INFOTYPES: 0000 MODE N.
    Inside "GET PERNR" event, you can get the informations using directly fm: HR_READ_INFOTYPE, because using "MODE N" at infotype declaration the standard system will not return any information about employee. In this form, you can make de filter of informations from fm HR_READ_INFOTYPE.
    Best regards!

  • What is the main diff b/n ldb pnp and pnpce?

    hi ,
    what is the main diff b/n ldb pnp and pnpce?
    thanks.

    Hi Arun,
      PNP/PNPCE  - Both are Logical Databases for PA Module
    In PNPCE - CE stands for Concurrent Employment.
    The differnces are:
    The PNPCE logical database supports the evaluation of HR master data. It includes the functions of the PNP logical database and offers additional evaluation options. Therefore, you should use the PNPCE logical database instead of the PNP logical database for all new developments.
    The enhanced functionality of PNPCE in comparison to PNP essentially concerns the evaluation of Concurrent Employment, that is the possibility to group evaluate several assignments/personnel numbers of a person. The new events 'GET PERSON' and 'GET GROUP' as well as an enhanced syntax for the INFOTYPES statement (addition AS PERSON TABLE) for the procurement of infotype data enable you to use the new functionality. The use of these new functions is optional. You can run a PNPCE report that does not use the new events and the addition for the INFOTYPES statement in a PNP-compatible session. Since the PNPCE also has an improved selection screen, each report benefits from this even if the report does not use the functions for evaluating Concurrent Employment.
    Hope this helps you.
    Regards,
    Chandra Sekhar

  • Filter Data using LDB PNP

    Hi,
    I'm looking to filter data in a report which uses LDB PNP.
    When i enter the 'start dates' and 'end dates' the values goes into PN-BEGDA and PN-ENDDA respectively.
    I want to know whether the GET PERNR statement will filter out the data based on 'start dates' and 'end dates'
    or do i have to loop at each infotype and manually filter out.
    varun

    >
    Rajesh Paruchuru wrote:
    > [Here is the answer from SAP|http://help.sap.com/saphelp_47x200/helpdata/en/4f/d527ba575e11d189270000e8322f96/content.htm]
    >
    >
    GET PERNR fills the internal tables of infotypes that are declared for
    >  each employee  using the INFOTYPES statement. The internal infotype table
    >  is filled with all records existing  between the lowest and highest
    >  system date. The internal table has the name Pnnnn,  where nnnn is the
    > infotype number
    >
    > - Rajesh.
    That means its useless to give a selection criteria on the selection screen.
    GET PERNR will get all records, means it will just filter the employee numbers nothing else, everything you will have to do manually by using loops.
    Varun

  • Obsolete statements while using LDB PNP

    Hi,
    I am using LDB PNP, while extended program check it is showing  many obsolete statements like-
    tables : PERNR.
    infotypes
    RP_PROVIDE_FROM_LAST.
    What is the alternate to all these above statements.
    I searched the forum, but could not found anything. Please provide example.
    Thanks,

    That will bevary from system settings, In the standard reports, it will never give you the error/warning/informaton messages. But custom programs it will give as a absolete, But i can see many experts will use the these Macro's, We are doing world largest HR implemetation, Still we are using the same, Not a problem, you can avoid those messages.
    Only one way of avoiding is Using Provide statements.
    Regards,
    Mallikarjuna

  • How to use LDB PNP with ABAP objects in a program

    Hello,
    I am wondering if anybody has used the HR logical database(LDB) PNP with user defined ABAP objects in a program? I am using the FM- <b>LDB_PROCESS</b> but its not working. Also assigning PNP in the attributes section of the program -- so that I can use predefined fields from the LDB and then invoking the FM doesn't work -- throwing 'Logical database already active' error.
    I suppose even with the ABAP objects and the new FM -- I should still be able to utilize the pre-defined fields of the PNP database -- and also the built in authorizations. I cannot use GET PERNR and REJECT as they give errors. I understand that the use of HR-macros (RP-PROVIDE-FROM-LAST and et al.) are not allowed as they use the table work area -- which is not allowed in ABAP-OOPS.
    I would really appreciate if anyone could show me some insight regarding this. Thank you.
    Kshitij R. Devre

    Hi Kshitij
    It would be really good if we could use both together. But as I know, it is not possible. "GET pernr." is an event-like loop statement and so cannot be used in OO context. And I guess, the same restriction holds for the "LDB_PROCESS" since it uses LDB-specific processing.
    What I suggest you is to use standard and BAPI functions.
    Sorry for giving bad news...
    *--Serdar

  • HR LDB PNP and customer infotypes in 640

    Hello,
    I encountered the following problem during an upgrade from 4.6C to SAP ERP Central Component 5.0. When using logical database PNP and customer infotypes the syntax check produces the following syntax error:
    - INCLUDE report "%_HR9731" not found
    I have added an example program below. Prerequisite for this program is that the cutomer infotype 9731 exists in the system.
    Has anyone experienced this problem before? And if so, is there a solution? I can program some workarounds, but I prefer a solution, which does not involve changing my code.
    Regards,
    Marcel
    REPORT ZTESTINFOTYPES.
    tables: pernr.
    infotypes: 0000,
    0001,
    0002,
    9731 mode n.
    start-of-selection.
    get pernr.
    write / p0002-pernr.
    end-of-selection.

    Hi all,
    "You will have to run report RPUMS40CCI (XPRA for generation of
    infotype include) for existing customer-defined infotypes.
    If you have not run this report then please do so.
    The report RPU40CCI creates the infotype include %_HRnnnn (nnnn =
    infotype number) and the additional data structure Pnnnn_AF (nnnn =
    infotype number) for the given infotype, provided that the correspondin parameter ("generate infotype include" or "generate additional data
    structure") are set on the selection screen. If the parameter "maintain only T77ID" is set, no infotype include or additional data structure is maintained, only those entered in table T77ID."
    Best Regards
    Silvio Galery

  • Hiding/Unhiding FIelds in HR-ABAP using LDB

    Hi All,
    I am working on HR Report and using LBD - PNP, it is showing a default selection screen.
    My requirement is that i want to hide few fields from display screen and add some standard fields on
    selection screen. Well i am able to hide the fields using
    LOOP at Screen... Endloop.
    I want to add couple of field that we can get after selecting it from 'Further Selection' Button and
    selecting Employee Group (PNPPERSG) and Employee Subgroup (PNPPERSK). Can any one assist how to get these
    fields displayed on screen using LOOP at Screen ... Endloop or any other possible solution.
    Thanks & Regards,

    Thanks for quick n loads of suggestions, Yah we can use existing HR Category or create new one. I am bit intrested in handling it in coding as for every report if standard HR report category doesn't work than i have to create and maintain new HR category. Same is the case with if we create variant of selection screen. (Neeed to create as many variant as many programs.)
    The coding i am using is:
      LOOP AT SCREEN.
        IF   SCREEN-GROUP1 = 'XDA' OR SCREEN-GROUP1 = 'MSL' OR SCREEN-GROUP1 = 'MCD' OR
    SCREEN-GROUP1 = 'SRT'
        OR SCREEN-GROUP1 = 'ORG' OR SCREEN-GROUP1 = 'YA1' OR SCREEN-GROUP1 = 'YA2' OR SCREEN-GROUP1 = 'YB1'
        OR SCREEN-GROUP1 = 'YB2' OR SCREEN-GROUP1 = 'YB3'  OR SCREEN-GROUP1 = 'ZB2'
        or screen-group1 = 'ZBK' OR SCREEN-GROUP1 = 'XPS' OR SCREEN-GROUP1 = 'PER' OR SCREEN-GROUP1 = 'ZB1'
        OR SCREEN-GROUP1 = 'DS2' OR SCREEN-NAME = '%_PNPBUKRS_%_APP_%-TEXT' OR SCREEN-NAME = '%_PNPBUKRS_%_APP_%-OPTI_PUSH'
        OR SCREEN-NAME = 'PNPBUKRS-LOW' OR SCREEN-NAME = '%_PNPBUKRS_%_APP_%-VALU_PUSH'
        or SCREEN-NAME = '%_PNPXBWBK_%_APP_%-TEXT' OR SCREEN-NAME = '%_PNPXBWBK_%_APP_%-OPTI_PUSH'
        OR SCREEN-NAME = 'PNPXBWBK-LOW' OR SCREEN-NAME = '%_PNPXBWBK_%_APP_%-VALU_PUSH'
        OR SCREEN-NAME = '%_PNPXPGPK_%_APP_%-TEXT' OR SCREEN-NAME = '%_PNPXPGPK_%_APP_%-OPTI_PUSH'
        OR SCREEN-NAME = 'PNPXPGPK-LOW' OR SCREEN-NAME = '%_PNPXPGPK_%_APP_%-VALU_PUSH'
        OR SCREEN-NAME = '%_PNPSTAT2_%_APP_%-TEXT' OR SCREEN-NAME = '%_PNPSTAT2_%_APP_%-OPTI_PUSH'
        OR SCREEN-NAME = 'PNPSTAT2-LOW' OR SCREEN-NAME = '%_PNPSTAT2_%_APP_%-VALU_PUSH' .
          SCREEN-ACTIVE = '0'.
          MODIFY SCREEN.
        *ELSEIF ( SCREEN-NAME = '%_PNPPERSK_%_APP_%-TEXT' OR SCREEN-NAME = '%_PNPPERSK_%_APP_%-OPTI_PUSH'*
                 *OR SCREEN-NAME = 'PNPPERSK-LOW' OR SCREEN-NAME = '%_PNPPERSK_%_APP_%-VALU_PUSH' ).*
          *SCREEN-ACTIVE = '1'.*
          *MODIFY SCREEN.*
       ENDIF.
      ENDLOOP.
    Here the fields i want to display is with ELSEIF statement it come under GROUP1 = SEL. In above code i was able to hide field PNPSTAT2 but not able to show PNPPERSK.
    These field PNPPERSK can be selected if we use 'Futher Selection' Button on initial selection screen.
    I appreciate if some one can assit me solving that.... Thanks again for quick response :).
    Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 4:16 PM

  • Syncing and authorization problem

    I had a iphone 4S and I recently bought a 5S. When Im trying to syns my itunes with my new iphone 5S it says something like this "Iphone could not sync because this computer is not authorized for the purchases made on this iphone." It says I should Authorize the computer, and I have but it still doesnt work. I remember one time I used another computer and bought a song via itunes, and it synced with my 4S, when my mac was on repair. Could this have anything to do with it?
    Best regards,
    Jack Hellberg

    I solved this, but how do I delete the post?

  • Trouble with my ipod getting hot when useing instagram app and also problems with my ipod closeing and returning to home screen unexpectedly?

    when i'm useing my ipod and i'm useing the instagram app. I feel my ipod starting to get really hot. i am also having problems useing app and them all a sudden closing on me and ipod will return to the home screen

    It is not unusual for the to get worm when using some apps.
    For the app problem see:
    iOS: Troubleshooting applications purchased from the App Store

  • Authentication and Authorization Problems with IIS 6 and Jrun 4

    Hello all,
    I am using IIS 6 with JRun 4 as my app server, and I am having problems trying to get authentication and role authorization with Windows Integrated Authentication to work. I have set up IIS 6 to pass-through the authentication credentials to Jrun, without using an anonymous user. What I have done is written a small test servlet that displays the username of the logged in user, and then tries to check if a user is in a test role that I set up in my database. I have specified that a roles table is to be used by specifying a JDBCLoginModule in Jrun's auth.config file. The code for the servlet is below:
    package testauthenticationapp;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class SecureTestServlet extends HttpServlet {
       private static final String CONTENT_TYPE =
          "text/html; charset=windows-1252";
       public void init(ServletConfig config) throws ServletException {
          super.init(config);
       public void doGet(HttpServletRequest request,
                         HttpServletResponse response) throws ServletException,
                                                              IOException {
          response.setContentType(CONTENT_TYPE);
          PrintWriter out = response.getWriter();
          out.println("<h3>REMOTE USER: " + request.getRemoteUser() + "</h3>");
          if (request.getUserPrincipal() != null){
             out.println("<h3>" +request.getUserPrincipal().getName() + "</h3>");
          } else{
             out.println("<h3>User Principal is null</h3>");
          if (request.isUserInRole("Test_Role")){
             out.println("<h3>User is in Test_Role</h3>");
          } else {
             out.println("<h3>User is NOT in Test_Role</h3>");
          out.close();
    1.  What I am seeing is that when request.getRemoteUser() is called, the username information is what I expect it to be. It is of the form <Domain>\<Username>. When I try to redisplay the username using the request object's Principal object, the call to request.getUserPrincipal() returns null. This is a little confusing to me since I thought that essentially getRemoteUser() was a short cut for calling getUserPrincipal().getName(), and if I get something for getRemoteUser, getUserPrinicipal should return something as well. I guess they work differently at some level. Has anyone ever encountered this before?
    2. When I call request.isUserInRole("Test_Role"), it returns false. I've checked the role name being called for typos in both my database and in the code, and that does not seem to be the case. I think the setup in auth.config is properly configured because I have created many other applications using declaritive FORM based authentication, and the role information was retrieved fine from the database. I would think that when I use request.isUserInRole in my servlet code it would use the same role information, but I could be wrong since this is a different type of authentication. Do you think that the reason request.isUserInRole() is returning  false could be tied to the fact that request.getUserPrincipal() is returning null (even though getRemoteUser() is returning a valid username)? How does request.isUserInRole() get its user information, by using getUserPrincipal().getName() or getRemoteUser()?
    Any help that is provided is appreciated. Thanks in advance.

    Try This...
    Close All Open Apps...  Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430

  • DHTML List (Image) with Sublist and authorization problems

    Dear all -
    I wonder if anyone can help with this DHTML drop-down menu query:
    We use hierarchical menus implemented as DHTML Lists (Image) with Sublists. When some of the items are hidden through authorization, the wrong headers appear for the menus.
    For example:
    Menu
      Item 1
        Subitem 1 of Item 1
        Subitem 2 of Item 1
      Item 2
        Subitem 1 of Item 2
        Subitem 2 of Item 2
    Say Item 1 and its subitems are all hidden through authorization controls. The heading for Item 2 then appears as 'Subitem 2 of Item 1' instead of 'Menu'.
    There's an example here:
    http://htmldb.oracle.com/pls/otn/f?p=11837:1
    Anyone know why this is happening?
    Thanks for your time.
    John.
    PS. Any idea where my previous post on this subject has disappeared to?

    Carl - in the example on htmldb.oracle.com, in Menu2 I'm hiding all the elements in Category 1 (parent and children), although not the 'grandparent' (Menu2).
    I'm therefore still expecting the menu title to be 'Menu2', because that's Category 2's parent.
    It doesn't appear to be an issue with the sequence of the items, because I've changed all those about and still got the same problem.
    To be more specific, again using the htmldb.oracle.com example, in Menu2 we have:
    Menu2
      Category 1 (Hidden)
        Item 1 of Category 1 (Hidden)
        Item 2 of Category 1 (Hidden)
        Item 3 of Category 1 (Hidden)
        Item 4 of Category 1 (Hidden)
      Category 2     
        Item 1 of Category 2     
        Item 2 of Category 2     
    And Scott - thanks for picking up the previous post - for some reason I couldn't for the life of me find that yesterday (in fact I still can't find it when I search).
    Thanks for looking into this.
    Regards,
    John.

  • Crystal Reports and Authorization Problems

    I am having an issue with Crystal Reports and User Authorizations.
    I was build a Crystal Report and import into SAP Business  One (SBO 8.8 PL18 HF). After that i give full authorizations for this report in some users. Then if the user login in SBO and choose to see the report his has the following error
    You are not permitted to perform this action - "The name of the Report " [Message 200-30]
    or
    You are not permitted to perform this action - "The name of another Crystal Report " [Message 200-30]
    This happen also if I edit a crystal report and re import the new version.
    If i change the user to Super User  then there is no Problem but i don't want something like this. Is something going wrong with Import Crystal Report and SBO menu items?
    Any Idea?
    Thanks In advance
    Edited by: Apostolis Andrikos on Feb 17, 2011 1:25 PM

    Hi Balakumar,
    I had tried also with the way that you suggested...
    Only if I give full authorizations for all the modules itu2019s possible for the user to open the crystalu2026
    And I said possible because sometimes with full Authorizations everything it is ok and sometimes not.
    The most strange thing is that if I choose to open a Crystal Report  the display error as i said before is
    for another Crystal Report in SBO menu.
    e.x I choose to run a Daily Cash Report from the User
    and the ERROR Said
    "You are not permitted to perform this action - Outgoing Payments Message 200-30"
    Thanks for your Response

Maybe you are looking for

  • Save Dialog box related

    hi all, my servlet has provision for downloading a file, i have coded to display a dialog box at time of downloading file. my prob : when click on file to download browser displays save dialog box in IE 6 on one machine but the same servlet instead o

  • How to Run F110 Check Payment with Sorting from Vendor Name?

    Hi All,   We have a problem when I run F110 to create checks for many vendors. How can I run the check number sorted from vendor name alphabetically?   We can print it according to the vendor name alphabetically however the check running number is no

  • Activity monitor does not show on all desktops/spaces

    Hi, I like to see what my processor load is and so I keep activity monitor running all the time, and I like to be able to see what's happening regardless of which Desktop/Space I'm working in at the time.  So I right clicked the activity monitor in t

  • Bug in prompts off of right clicking reports that have actions

    Build 22.71, Windows and Linux, going against either Oracle 9i or 10g. I right click a row in the session report and choose either kill session or trace session, and the window that appears... its first tab selected has the labels for the prompts, bu

  • Unable to update Lightroom 5.2 for WIN 7 - PC

    I recently bought Lightroom 5.2 (build 922700) and installed it on my Win 7 PC. Each time I use it I get the message saying New software for Lightroom is available. When I go to the site Adobe - Lightroom : For Windows : Adobe Photoshop Lightroom 5.5