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

Similar Messages

  • 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!

  • 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 )

  • 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

  • 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

  • Filtering of the data based upon the selection screen data using ldb

    Hi Experts ,
    I am using ldb pnpce, for my report ,and i created my own report category with selection paramaters
    action type and payroll area
    now the problem is when i am giving the action type as Z0 ,the data to be extracted is not getting filtered
    based upon the action type ,the data consists the records having different action types other than Z0
    Please give me some solution for this

    Thanks Durga ,but the link wat ever u was for hiding the selection screen fields
    but my question is when am using get pernr event my data is not getting filtered with the selection screen paramater value
    i,e m giving action type as only hiring ,but m getting the data for all the action types ,its not filtering based upon my selection

  • Filter data using choice filter in an infopath form

    Hi
    I have been trying to filter the values in an Infopath form using the choice filter, on a page in sharepoint 2013
    but full data of the list does not get displayed in the form exceot the first field.
    Please help how can i get data filtered data in the form according to the Account name i select in the filter.

    Hi,
    According to your description, the other field does not display data except the first field.
    Have you created rule for every field to set value based on the choice filter ?
    You need to set the condition based on the choice field and then set the datafield for control.
    Here is a detailed blog for your reference:
    http://blogs.msdn.com/b/infopath/archive/2010/05/06/sharepoint-list-data-connections-in-infopath-2010.aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • Filter data using where statement : need to filter a variable if it starts

    Hi,
    in my loop statment , i am using a where condition.
    a variable has numbers and characters , i want to filter the variable using where statement identifying if it is acharacter not to enter into the loop.
    any suggestions . Thanks in advance.
    regards,
    Ry

    Hi ,
    try like this
    data:l_file_data(20) type c,
    oref   TYPE REF TO cx_root.
    data: l_amount type p decimals 2.
    l_file_data = '12A3'.
    try.
    l_amount = l_file_data.
    catch cx_root into oref.
    endtry.
    if oref is not initial.
    write: 'Miss Match'.
    endif.
    regards
    Prabhu

  • How to get a default variant screen using LDB.(HR-ABAP)

    Hello,
                   I have created a report using LDB PNP.Used HRBEN000 as a hr report category.
    Got a default selection screen, I want to add one more field, for this I have selected the field from further
    selection button, and displayed on the screen. Now i saved as a variant.
    how to get this default screen using the variant in the report/program when executed?
    Please help me.
    Thanks&Regards,
    Archana.

    Hi ,you camn always make your Z report category...if the field is present in further selection tab..
    if not you can create your own paramerter or select option.....
    but you have to handle it in your code ....as get pernr wont filter on its basis(parameter select optyin created by you)
    but why loop at screen is not working?
    let me know how you are doing...
    have to do it in at selection-screen output

  • Want to have own selection screen  in HR-ABAP report using LDB

    Hi experts,
            I am working on HR-ABAP report using LDB pnp and infotypes..But, here we get the built in selection criterion..but I want my own selection screen to be displayed..whats the solution for this??? Is it possible to create my own selection screen instead of default one..and how???
    Please help me..its very urgent..

    Hi,
    chk this out:
    Create Report Categories                                                                               
    In this step, you define the report categories and determine the layout
       of the standard selection screen for these report categories. You can 
       create report categories for programs or queries that are based on the
       PNP or PNPCE logical databases.                                                                               
    The definition of report categories is divided into two sections:                                                                               
    o   In the Change Report Category view, you define general attributes 
           such as sort order, input fields for date, and so on.                                                                               
    o   In the Change Selection Criteria view, you define which selection 
           fields of the logical database should be avaliable on the selection
           screen.                                                                               
    Example                                                                               
    You want to set up your system so that your employees can only start  
       evaluation reports for Payroll if they use a payroll area. Within a   
       payroll area, you should be able to select according to personnel     
       number. Additional selection criteria should not be possible and you  
       should not be allowed to enter a sort sequence.                       
    Standard settings                                                                               
    The standard system already contains report categories. You can find the 
    attributes of the report categories in the table.                                                                               
    Note the following five report categories in particular:                                                                               
    o   Report category ' ' is the SAP default report category for     
        programs that are based on the PNP logical database.                                                                               
    o   Report category PNPCE is the SAP default category for programs that  
        are based on the PNPCE logical database.                                                                               
    o   Report category '00000000' is the customer-specific default category 
        for programs that are based on the PNP logical database.                                                                               
    o   Report category '0PNPCE' is the customer-specific default category   
        for programs that are based on the PNPCE logical database.                                                                               
    o   Report category __X2001 is the default category for Queries  that    
        are based on an InfoSet of the PNP LDB.                                                                               
    o   Report category QUEPNPCE is the default category for queries that    
        are based on an InfoSet of the PNPCE LDB.                                                                               
    The default report categories are used when a report is called if    
        the report has not been assigned a report category.                  
    Parameters and Options for Report Categories of the LDB PNP and PNPCE  
    Parameters and Options in Screen Area General Data                     
       If you activate this parameter, you can only enter data on the data
       selection period if you use reports that have been assigned. The   
       same date entries are then used for the person selection as for the
       date selection.                                                                               
    o   Matchcode allowed                                                  
       If you activate this parameter, you have use of a Matchcode        
       pushbutton (search help) if you use reports that have been assigned.
       This pushbutton enables you to perform the person selection.                                                                               
    o   Sort allowed                                                       
       If you activate this parameter, you have use of a Sort pushbutton if
       you use report that have been assigned. This pushbutton enables you
       to define a sort order before you execute the report.                                                                               
    o   Organizational structure allowed                                   
       If you activate this parameter, you have use of an Org.Structure   
       pushbutton if you use reports that have been assigned. This        
       pushbutton enables you to perform the person selection.            
       Note:                                                              
       For more information about these options, see the online           
       documentation under this path:                                     
       SAP Library -> Human Resources -> Reporting in Human Resources     
       Management -> Standard HR Reports -> Report Selection Screen in    
       Human Resources Management.                                                                               
    Parameters and Options in Screen Areas Data Selection Period/Person    
    Selection Period/Payroll Area/Period/Year                                                                               
    o   Options for data selection period and person selection period (key 
        date and so on)                                                    
        Here you define which options for date and person selection are    
        available for reports that have been assigned.                                                                               
    o   Options for payroll area/period/year                               
        Here you define which options for selection using payroll          
        area/period/year are available for reports that have been assigned.                                                                               
    Parameters and Options in Screen Area Selection View                                                                               
    o   Type/Name                                                          
        This parameter enables you to use selection views to define report 
        categories. You use the selection view selected here to determine  
        which fields are available in the Dynamic Selectionsy.                                                                               
    Note:                                                              
        You create selection views for the PNP and PNPCE logical databases 
        in the Object Navigator (SE80):                                    
        1. Start the Object Navigator (SE80)                               
        2. Choose Workbench -> Edit Object.                                
        3. Choose the More... tab page and the Selection view on this tab  
        page.                                                              
        4. Choose Create.                                                  
        5. In the Create Selection View dialog box, choose the For any     
        tables option.                                                     
        6. In the Name of view field, enter a name for your selection view.
        7. In the Tables dialog box, enter the name of the table from which
        you want to use fields.                                            
        Note:                                                              
        When you enter the table name, observe the naming convention in    
        Personnel Administration:                                          
        Infotype number: nnnn -> table name: PAnnnn                        
        8. Choose Continue.                                                
        9. In the Functional groups area, define functional groups by      
        assigning a name and a number.                                     
        10. Assign fields from the selected tables to the functional groups
        by entering the number of the desired functional group in front of 
        each field.                                                        
        11. Save your entries.                                                                               
    For more information about adjusting the dynamic selections using 
    your own selection views, see the online documentation under the  
    following menu path:                                              
    SAP Library -> Human Resources -> Reporting in Human Resources    
    Management -> HR Standard Reports -> Report Selection Screen in   
    Human Resources Management -> Enhancing the Selection Screen -    
    Dynamic Selections.                                                                               
    If you do not want to offer dynamic selections, make the following
    settings:                                                                               
    -   LDB PNP: In the Selection view field, enter PNP_NO_FREE_SEL.  
    -   LDB PNPCE: Leave the Selection view field empty.                                                                               
    Parameters and Options in Screen Area Data Selection Period/Person   
    Selection Period/Payroll Area/Period/Year                                                                               
    o   Available input parameters, date or period entry (today, key date,
       all, and so on), and standard value.                             
       Using the Standard value option, you define which of the selected
       options is shown.                                                                               
    Parameters and Options in Screen Area CE Selection Fields                                                                               
    o   CE selection fields (external person ID, grouping reason, grouping
       value)                                                           
       Using the options in this area, you define whether the external  
       person Id, grouping reason, or grouping value are available on the
       selection screen.                                                
       Note:                                                            
       These parameters are only relevant for you if you implement      
       Concurrent Employment (see also note 517071).                                                                               
    Parameters and Options in Screen Area Selection view                                                                               
    o   Dynamic selections as dialog box                                  
        If this switch is set, you can call the dynamic selections as a   
        dialog box.                                                                               
    o   Dynamic selections active                                         
        If this switch is set, the dynamic selections of the logical      
        database are active at the start of the report.                                                                               
    Note that the following combinations are possible for the last two
        options mentioned:                                                                               
    Dyn.Sel. as dialog box/Dyn.Sel. active: inactive/inactive         
        Dyn.Sel. as dialog box/Dyn.Sel. active: inactive/active           
        Dyn.Sel. as dialog box/Dyn.Sel. active: active/inactive                                                                               
    Activities                                                                               
    1.  Choose Edit -> New entries.                                                                               
    2.  Enter an abbreviation and a long text for the report category.         
        The customer name range for report categories is 0-9.                                                                               
    3.  Select the For the PNPCE logical database checkbox, if you want to     
        create a report category for a program or for queries of the PNPCE     
        logical database.                                                                               
    4.  In the General Data screen area, choose the desired options.           
        If you want to use selection IDs, you must have first created and      
        grouped selection Ids. The IMG path to do this is given in the         
        parameter description section.                                                                               
    5.  In the Data selection period/person selection period or Selection      
        period screen area, choose the desired options.                                                                               
    6.  In the Selection view screen area, choose the desired options.                                                                               
    7.  In the CE selection fields screen area, choose the desired (only       
        possible for report categories of the LDB PNPCE).                                                                               
    8.  Save your entries.                                                                               
    9.  Choose the subactivity Permitted selection criteria.                                                                               
    10. Choose Edit -> New entries.                                                                               
    11. In the Select option field, use the input help to select each field    
        that should be available on the selection screen.                                                                               
    12. Select the checkbox in the 1.page column, if you want this selection   
        field to be available directly when you call the selection screen.                                                                               
    Further notes                                                                               
    13. If you want to copy entries, you still have to enter the selection     
        parameters again in the subsequent screen.                                                                               
    o   If you create the report category '000000000', a selection screen is   
        generated according to report category '00000000'for all reports for   
        which a report category has not explicitly been assigned.                                                                               
    Assign Report Categories                                                                               
    In this step, you assign a report category to your reports.                                                                               
    Example                                                                               
    You have created your own report, for example ZPCTEST1, and would like
        it to have the selection screen that corresponds to that of the       
        evaluation report for Payroll, which is assigned to report category   
        '__M00001'.                                                           
        Assign report category '__M00001' to the report.                                                                               
    Requirements                                                                               
    You must have defined the Report Categories.                                                                               
    Standard settings                                                                               
    SAP Standard Reports:                                                                               
    In the standard system, reports are assigned a report category. If you
        want to override these assignments, perform the activities described  
        here. If you want to assign report categories to standard reports using
        SE38, this represents a modification.                                                                               
    Customer-Specific Reports:                                                                               
    For reports you have developed yourself, you can either assign report 
        categories by performing the activities described here or directly in SE38.
    Recommendation                                                                               
    Only assign a report category if you have created your own reports or if  
    the selection screens in the standard system do not meet your             
    requirements.                                                                               
    Activities                                                                               
    1.  Choose Edit -> New entries.                                                                               
    2.  Perform the required assignment using the Program name and Report     
       category fields.                                                                               
    3.  Save your entries.                   
    reward if helpful
    regards,
    madhumitha

  • LDB PNP authorization check authorization object

    Hi,
    I have used LDB PNP for HR reports.
    We are using the authority check also, but the problem is all the records/data for all the people is being read by the report where some of the people data should not have been read as they belong to some other personal area that the role of the executer (user).
    Hence it appears that authorization check is not working properly.
    Following is how I am using it, Please suggest corrections or alternate way to correct this issue.
        rp-provide-from-last p0002 space gwa_outlist-begda 
                                                        gwa_outlist-begda.
        IF pnp-sw-found NE '1' OR
            pnp-sw-auth-skipped-record EQ '1'.
            EXIT.
        ELSE.
            ls_tab-vorna = p0002-vorna.
            ls_tab-nachn = p0002-nachn.
        ENDIF.
    Please reply with the corrections ore alterations,
    Thanks in advance.
    Akash.

    Hi,
    (1)
    Actually, if you're wirting report with PNP LDB, you do NOT need to do this hard-coded auth checking at all. Because the LDB abap code behind PNP has already do this job for you.
    So all you need to do is to ask you HR consultant or Basis consultant to modify the authority config of certain ROLE with t-code PFCG, and then assign that ROLE to certain user with t-code SU01.
    ABAP code behind PNP will automatically verify the current user according to his ROLE setting.
    (2)
    In some case you do not work with LDB report, then you need to do the authority check by yourself. General function  AUTHORITY_CHECK is what you need.  AUTHORITY_CHECK do the authority check by means of Authority Object.Belows are authority objects used in HR module(you can also see in PFCG if technial name switched on):
    P_ORGIN    HR: Master Data
    PLOG       Personnel Planning
    P_PCLX     HR: Clusters
    P_TCODE    HR: Transaction codes
    Sample of checking personal area:
    CALL FUNCTION 'AUTHORITY_CHECK'
         EXPORTING
              FIELD1              = ' PERSA'
              OBJECT              = 'P_ORGIN'
              USER                = 'SAPSUPPORT1'
              VALUE1              = 'Z001'  
         EXCEPTIONS
              USER_DONT_EXIST     = 1
              USER_IS_AUTHORIZED  = 2
              USER_NOT_AUTHORIZED = 3
              USER_IS_LOCKED      = 4
              OTHERS              = 5.  
    IF SY-SUBRC NE 2.
    MESSAGE E001(01) RAISING AUTH_FAILED.
    ENDIF.
    Reward if helpful pls!

  • LDB PNP authorization check at record level - rp_provide_from_last

    hi,
    i am using LDB PNP,
    I am using macro 'rp-provide-from-last' .
    I neeed to place a authorization check so that the user of the program should only be allowed to view records of the people which comes under the same personnel area as of the user of the program.
    Can you please guide me on how to implement this?
    thanks in advance,
    akash.

    Hi,
    (1)
    Actually, if you're wirting report with PNP LDB, you do NOT need to do this hard-coded auth checking at all. Because the LDB abap code behind PNP has already do this job for you.
    So all you need to do is to ask you HR consultant or Basis consultant to modify the authority config of certain ROLE with t-code PFCG, and then assign that ROLE to certain user with t-code SU01.
    ABAP code behind PNP will automatically verify the current user according to his ROLE setting.
    (2)
    In some case you do not work with LDB report, then you need to do the authority check by yourself. General function  AUTHORITY_CHECK is what you need.  AUTHORITY_CHECK do the authority check by means of Authority Object.Belows are authority objects used in HR module(you can also see in PFCG if technial name switched on):
    P_ORGIN    HR: Master Data
    PLOG       Personnel Planning
    P_PCLX     HR: Clusters
    P_TCODE    HR: Transaction codes
    Sample of checking personal area:
    CALL FUNCTION 'AUTHORITY_CHECK'
         EXPORTING
              FIELD1              = ' PERSA'
              OBJECT              = 'P_ORGIN'
              USER                = 'SAPSUPPORT1'
              VALUE1              = 'Z001'  
         EXCEPTIONS
              USER_DONT_EXIST     = 1
              USER_IS_AUTHORIZED  = 2
              USER_NOT_AUTHORIZED = 3
              USER_IS_LOCKED      = 4
              OTHERS              = 5.  
    IF SY-SUBRC NE 2.
    MESSAGE E001(01) RAISING AUTH_FAILED.
    ENDIF.
    Reward if helpful pls!

  • Make (LDB)PNP Fields obligatory on selection-screen

    I am using LDB PNP.. I want to make some fields of PNP as obligatory. How Can I do that?
    So far I am doing the following...
    <b>Initialization.
    PNPABKRS-LOW = '?'.
    Append PNPABKRS.
    At selection-screen.
    if PNPABKRS-LOW is initial.
    PNPABKRS-LOW = '?'.
    Message e100(z01).
    endif.</b>
    What you suggest ?
    Thanks
    Message was edited by: Saquib Khan

    You have to do this way,
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF SCREEN-NAME = 'PNPABKRS-LOW '.
          SCREEN-REQUIRED = 1.
          MODIFY SCREEN.
        ENDIF.
    ENDLOOP.

Maybe you are looking for

  • How do I know if my G4 is Airport or Airport Extreme-ready?

    Hi all, I have a few G4 (Grey and White). I don't remember their code names. I am trying to figure out if they accept Airport Extreme cards so I can network them. I don't see any info in the "System Profiler" (since there is no card installed). Can y

  • Saving fillable PDF file in Android Adobe Reader Mobile Application

    I'll do my best to explain my situation. 1. I open the fill-able PDF file from Google Drive with Android Adobe Reader Mobile Application. 2. I fill out the pdf form using the Android Adobe Reader Mobile Application. 3. Once I'm done filling-in the PD

  • Doubt in XML payload validation in PI 7.1

    Dear All, I understand that the PI message payload can be validated against a XSD/XML structure.. but i do not understand its advantage as the payload will by default be validated against our source data type.. then why do we need it to get validated

  • Link Documents to Purchase Order. How?

    Hi Everybody, I need help in linking documents which are available in DRAW , DRAD tables to Purchase order while creating a PO in ME21N. By passing material number to object key in drad table I can get the document number , version etc... How should

  • Canon Vixia HF100 24p and Final Cut Pro 7

    Hello all, Just got the HF100 and Final Cut Pro 7. New to both. My plan is to shoot everything at 1920x1080 @24p. I've heard though, that the 24p on this camera has 3/2 inserted to make it 60i. My goal is to remove the 3/2 and do all editing and fx a