How to use PNP LDB

Hi,
can anybody provide me demo code for using PNP ldb?
abc

tables pernr.
infotypes 0002.
data: begin of itab occurs 0,
      vorna like pa0002-vorna,
      end of itab.
data wa like line of itab.
*write 'abc'.
get pernr.
provide * from p0002
           BETWEEN PNPbegda AND PNPENDDA.
move p0002-vorna to itab-vorna.
append itab.
clear itab.
endprovide.
end-of-selection.
loop at itab.
write:/ itab-vorna.
endloop.

Similar Messages

  • How to avoid default selection screen in HR interfaces(using pnp ldbs)

    How to avoid default selection screen in HR interfaces(using pnp ldbs)

    Dear Rakesh,
    The report category is used to change the selection screen of programs that use the 'PNP' logical database.
    See links bellow:
    http://www.sapdevelopment.co.uk/hr/hr_repcat.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/15/229357553611d3967f00a0c9306433/frameset.htm
    Report categories for selection screen in HR programming
    Also visit the following blog:
    /people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports
    Regards,
    Naveen.

  • How to control PNP LDB using personnel are alone

    Hi all!
    Any body can tell me, how control the pnp ldb using personnel area and employee group. bcaz in the standard selection screen it is given as
    <u>selection.</u>
    Pers.area/subarea/cost cente :
    Employee group/subgroup
    Thx,
    palani

    Hi Palani,
    Open the ABAP report in change mode
         Select GOTO from Menu Bar
            Choose ATTRIBUTES from dropdown list
               New Window will pop-up
                   Click on button "HR REPORT CATEGORY"
                      New Popup will apeear
                         Report selects using:                                              
                         Master data
                         YOU will find lots of "rep.class" to choose here...
    Hope this will serve your requirement...
    Best Regards,
    Aslam Riaz

  • How to get locked records of a pernr while using PNP LDB

    is there any way to retrieve locked records of a pernr
    while using PNP LDB??currently the get pernr event is unable to load locked records of a pernr.

    Hi,
    PL use this piece of code in your Program..
    INITIALIZATION.
    PNP-SW-IGNORELOCKEDRECORDS = 'N'.
    Regards,
    Suresh Datti

  • How to use FTI_TR_CASH_FLOWS ldb in abap programming.

    I want to use FTI_TR_CASH_FLOWS  logical database in existing ABAP program but i am not able to use this logical data base in the program.Please suggest how to use this logical database in the program.

    I have developed a customized report and i want to use  logical database "FTI_TR_CASH_FLOWS" into my program . i don't know how to use SAPDBFTI_TR_CASH_FLOWS  into my report. how i pass data from my report to this LDB report. plz suggest.

  • Selection screen validation when using PNP LDB

    Hi guys,
    I want to validate my selection screen parameters.Thats is if somebody wants to run the program without giving any input parameters to the selection screen(trying to run the report with a blank screen) I want to pop up an error/information message so that it will return the selection screen.I am using PNP Logical database for my selection screen.Please help.Thanks in advance.
    Thanks,
    Karthik.

    Welcome to SDN.
    If you are using PNP logical data base then validating the fields will be little tricky...
    You canc check all the other fields in START-OF-SELECTION and if they are empty return eroor. Remember all the field s on the scree... so I will suggest you to choose HR report Category accordingly.
    Also,when it comes to date field then you need to check for the start and end dates rather than blank fields as SAP defaulted them to system start and end date.
    Still, I will prefer to create a HE Report Category for the PNP database and use the screen while validating....that will be easy...

  • Error In HR report using PNP LDB

    Hi ,
    I am new to ABAP Hr , while writing a report using LDB pnp it  is giving me an error like
    " In Unicode programs, the "-" character cannot appear in names, as it          
    does here in the name "PNP-SW-IGNORELOCKEDRECORDS".
    Can any one please help me what it is for , and how it can be removed .
    Thanx

    Hi abap,
    1. do not worry,
    2. Its just a warning message (and not an error message)
    regards,
    amit m.

  • Which include i can use instead of PNP LDB

    Hi Friends -
    Which standard include i can use for PNP  LDB  ?
    am working in abap webdynpro and need to use some macro like rp_provide_from_last  but for them we have to use pnp ldb and in abap webdynpro we can't define  LDBs    so  i need the standard Include prog which can fulfill my requirment ..
    Pls share your inputs on this.
    Regards
    Meeta

    Hi Txs for your quick turn,
    could you pls tell me what is wrong in my this code ,
    include DBPNPMAC .
    INFOTYPES 0000.
    DATA: pnp-sw-found,
    pnp-sy-tabix like sy-tabix.
    parameters :  p_begda like pa0001-begda,
                  p_endda like pa0001-endda.
    START-OF-SELECTION.
    RP_PROVIDE_FROM_LAST p0000 space p_begda p_endda .
    if PNP-SW-FOUND = 1 .
    write : / p0000-pernr,p0000-begda,p0000-endda.
    endif.
    end-of-selection.
    am not getting any output  but if  i use  LDB pnp and  get pernr i will get  ..
    but i cant use LDB  pls  suggest me what i shd do ?
    Regards
    Meeta

  • HR-ABAP: Defaulting Radio Button on Selection Screen of PNP LDB

    Hi all,
    I am using PNP LDB (Logical Database) for program which is used for Payroll Results.
    Now I have a requirement wherein it is necessary to select 'Up to today' as default on the selection screen.
    We are having 4.7C version of SAP. I tried following code in INITIALIZATION event:
    Initializing Selection Screen Data Selection Option to 'Up To Today'
    INITIALIZATION:
      MOVE:  'X'    TO    pnptimr4, " This is the option which I want as Default selection.
             space  TO    pnptimr1,
             space  TO    pnptimr2,
             space  TO    pnptimr3,
             space  TO    pnptimr5,
             space  TO    pnptimr6.
    But still I dont see this Radiobutton getting selected as Default selection while running the program.
    By Default it selects Option : 'Other Period' (pnptimr6).
    Any Idea how to resolve this ??
    Regards,
    Avinash

    hi...
    When the INITIALIZATION event occurs, you can set default values for the selection screen.
    The fields for the data selection are defined in structure QPPNP.
    Possible values for field PNPTIMED are:
    D     =      Today (key date)
    M     =     Current month
    Y     =     Current year
    P     =     To current date
    F     =     From today (from current date)
    The person selection fields are defined in include program DBPNPSEL. They are internal tables that must be filled using APPEND.
    so in intialization you have to write code as
    PNPTIMED : P.
    so up date will be defaulted in selection screen.
    award points if helpful.

  • PNP LDB custom selections

    Hi All,
    I have created a report using PNP LDB and assigned a master data report category. I have also created additional selections in my report, besides the selections offered by the LDB/report category.  The issue is, the additional selections that I have defined appear at the bottom of the screen below the standard selections.  I need my custom selections to be shown at the top of the screen and the standard selections below that.
    How do I do that ?! I appreciate any pointers.
    Thanks,
    Kiran.

    HI Kiran,
    use reporting catagiries .
    change selection as per  your requirment
    rex

  • RE:pnp LDB selection screen problem

    hi,
    hi friends iam facing one problem regarding hr ABAP selection screen ,in my program iam using PNP LDB for bonus details report
    i have using selection screen declaration present for single selection.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-006.
    SELECT-OPTIONS: S_ABKRS FOR P0001-ABKRS NO INTERVALS NO-EXTENSION,
    S_WERKS FOR P0001-WERKS NO INTERVALS NO-EXTENSION,
    S_BTRTL FOR P0001-BTRTL NO INTERVALS NO-EXTENSION,
    S_PERSG FOR P0001-PERSG NO INTERVALS NO-EXTENSION,
    S_PERSK FOR P0001-PERSK NO INTERVALS NO-EXTENSION.
    SELECTION-SCREEN END OF BLOCK B3.
    based on this selection iam fetching the information from infotypes using macros.
    now my requirement is iam fetch the information for multiple selections means like payroll areas z1,z2 and z3 payroll informations
    should be fetching once. pls any body knows solution please give me reply.
    thanks & regards,
    mgrao.

    hi jain thanks for your reply, iam already created report category and assigned my report. here iam giving my report selection
    declerations fully   below.
          S E L E C T I O N       S C R E E N                           *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001. " DECLEARED REPORT CODE LEVEL
    SELECT-OPTIONS: S_DATE   FOR SY-DATUM NO-EXTENSION.    "Bonus for Financial Year
    PARAMETERS:     P_BDATE  TYPE SY-DATUM OBLIGATORY,     "Bous payed as on
                    P_WKDAYS TYPE CHAR6.                                            "No.of Working Days     
    SELECTION-SCREEN END OF BLOCK B1.
    *SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-006.    " COMMENTED report level TAKING FROM LDB PNP    
    *SELECT-OPTIONS: S_ABKRS FOR P0001-ABKRS NO INTERVALS NO-EXTENSION,     "  Payroll area
                   S_WERKS FOR P0001-WERKS NO INTERVALS NO-EXTENSION,                       Personnel area   
                   S_BTRTL FOR P0001-BTRTL NO INTERVALS NO-EXTENSION,                          Personnel  sub area        
                   S_PERSG FOR P0001-PERSG NO INTERVALS NO-EXTENSION,
                   S_PERSK FOR P0001-PERSK NO INTERVALS NO-EXTENSION.   
    *SELECTION-SCREEN END OF BLOCK B3.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002. "REPORT CODE LEVEL SELECTION
    PARAMETERS: P_FORMCP TYPE PIN_RATE, " char6,    "Form C %    
                P_FORMEP TYPE PIN_RATE, " char6,                 "Exgratia %
                P_FORMBP TYPE PIN_RATE. " char6 .               "Bonus %   
    SELECTION-SCREEN END OF BLOCK B2.
    SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-004.
    PARAMETERS: L_REPORT TYPE ZHRD_FORMC AS LISTBOX VISIBLE LENGTH 40 OBLIGATORY . Report for list box   1 form c
    SELECTION-SCREEN END OF BLOCK B4.                                                                                2 exgratia
    the above selection is iam used first, now iam commented BLOCK B3 SELECTION  PARAMETERS  and taking the parameters from REPORT CATEGORY  ASSINGN MENT.
    MY PROBLEM  is if i select one payroll area example z1 it showing all pay roll employees bonus details it is not filter the remaining payroll areas my requirement is what are the payrolls iam  selecting  those pay roll area details only displaying.
    data fetching from  INFOTYPES 0001,0002,0021 AND 9150 FOR BONUS DETAILS and out put is classical report format.
    please kindly give the reply if you knows the solution.
    thanks & regards ,
    mgr.

  • URGENT( PNP LDB SELECTION SCREEN )

    hiiiii,
    can anyone tell about the field PNPDISBD of pnp LDB in sap-hr , and why it is used. Is There any field on selection screen related to this when we use pnp LDB.

    Hi,
    PNPDISBD is nothing but a date.
    Go to SE38 and open the report SAPDBPNP.
    And search for the field PNPDISBD then you will come to know its functionality.

  • Custom infotype will also come in PNP Ldb

    Hi Friends-
    If we create a custom infotype which is starting from 9  eg  9001 , then  if we use PNP LDB   would this Ldb  provide me data for thsi custom infotype also apart from all PA standard infotype ?
    Regards
    Meeta

    Hello Meeta,
    It will not be a part of PA Info types.
    Yes, you will be able to get values of the custom info type in the GET PERNR and END-OF-SELECTION loop as you get values for other standard info types. For this you need to declare the custom info type same as you declare info types for which you want data in your program.
    Hope it helps.
    Thanks,
    Jayant

  • Disabling PNP ldb authorizations

    Hi Experts,
    I am fetching data using pnp LDB ,
    But due to authorization issue I am not able to access certain data.
    Is their any way to disable pnp ldb authorization & get the results.
    Thanks in Advance.
    Regards,
    IFF

    Hi
    Answer is pure assumption
    Pls check the OSS note
    Note 492743 - PNP LDB: Incorrect authorization check
    it may give some idea.
    Pls take opinion from SAP / Basis before implementing the note
    Regards
    Madhan D

  • ABAP-HR, using two LDB ie, PNP and  PCH

    Hi friends,
    How can i use two logical database regarding to master data and organization managemnt.       if i use PNP in Attributes LDB, how can i get tables regarding to organization mangent in reports, so that i can retrieve data from PNP and PCH.
    Effecient answer will be rewarded points....
    Thanks&Regards
    Shiva Prasad

    Hi Amit,
    Thanks for yor valuable answer, i have tried it using 1st mentioned method, but i couldn't get. can u give me sample code.
    i didn't try for the 2nd method.
    i will try.

Maybe you are looking for

  • "A family member has already bought this item" error?

    When I try to purchase the Minecraft- Pocket Edition app, I get the following message: ""A family member has already bought this item. a family member has already purchased this item. To download it again for free, select OK." (I press ok, then the e

  • How to make the entire project in the project server 2013 reschedule؟

    How to make the entire project in the project server 2013 reschedule ? Because item %compelet related to reschedule In this photo it is known there are no items update project

  • Web service for inbound to third party solution

    Hi , I am working with a scenario of posting idocs from ECC into a B2B third party system using SOAP. I have created the service interface for the inbound to the third party and supplied them the WSDL the old fashioned way from the service interface

  • Computer wont recognize Zen Micro...HE

    I got my Zen Micro on 9/2/05..and im already having problems with it. When i first started using it the day that i got it it was working fine. After about 2 days it started freezing. Then yesterday my computer wouldnt recognize it. The confusing thin

  • Resizing windows & curses

    I am writing a program to display a database to the screen(xterm) and want to allow the window resize signal to increase/decrease the amount data that is displayed. I have a signal handler function for catching the SIGWINCH event and calling a functi