Logical Databases PNP

I am working with logical databases for the first time.
Could someone please explain the following concepts :
1) why do we need to write :
     Tables : pernr
pernr is a structure... but the syntax of GET event is : GET <table> ...
so is pernr a structure or a table?
also if data gets flled from PAnnn into the internal tables Pnnnn why do we actually need the table pernr?
could some1 plz explain the concep of the pernr structure/table and the GET event.
results will be awarded.

Hi soumali ganguly ,
  1> Yes , a structure of "pernr" will be created with the help of TABLES statement .
  2> We write "TABLES" statement in the report program , so that the components of the
  "pernr" can be accessed .
  3> Keep in mind that Logical DataBase(LDB) is another program attached to a report program .
  4> You write GET statement in the report program . There is corresponding PUT
       statement in the LDB program .
  5> Now understand the flow of execution :
            a> On the encounter of "GET pernr" statement in the report program ,
            the control will move to the form "PUT_PERNR" . This form is in the LDB .
             b> So , now control is in LDB . On the encounter of "PUT pernr" statement in the  
           "PUT_PERNR" form in LDB , the system will now execute the statements
            written in the GET block .
            c> Generally in the GET block , we access the components of "pernr" .
      d> After the GET block has finished execution , the control will now again move to
           statement after "PUT pernr" statement , in the LDB .
            e> If the "PUT pernr" statement in LDB form "PUT_PERNR" is inside a loop ,
          as generally is the case , this "GET-PUT" cycle is repeated several times .
     In short , keep in mind PUT puts the data (one line at a time) in the "pernr"and
     GET allows to access the data in "permr" , placed by PUT .
      Please do let me know in case of any discrepancies .
Regards ,
Dhera Kamlesh H. R.

Similar Messages

  • Logical Database PNP. HR and Unicode

    Hi,
    currently we are checking all programs to make them unicode compliant. Using the logical database PNP a lot of macros is loaded automatically. One of them is
    rp_provide_from_last (or rp_provide_from_frst) to get the last record in a specifed time-interval. The existance is stated in varaible named pnp-sw-found, it is 0 if no record was found and 1 if there is one in existance.
    Checking the program (normal syntach check and extended syntax check) leads to the warning that varaibale names with a hyphen are no longer allowed in unicode programs if its not a structure (and pnp-sw-found is not). The program is doing well, and transaction UCCHECK does not mention this error/warning at all. Has someone experience with that issue and perhaps a solution?
    cu
      Rainer

    Thanks for the answers so far. Using PNPCE does not resolve my problem, cause we have a lot of own written reports and i just want to avoid to change them all.
    And using PNPCE idoes not solve the problem, that i have to use pnp-sw-found, this one is still in existance and gives still the warning that thois is not unicode compliant.
    Switching off the unicode flag is no good idea if we wanna go for unicode.
    Anyone else with experience in unicode in the HR Area?

  • Logical Database - PNP, PCH, PNPCE

    Hi Experts,
    Im New to ABAP HR,
    I would like to know about the logical databases we are using .
    Logical Database - PNP, PCH, PNPCE, basic principles
    If any body cud let me know about the differences , requiremnts , associated with these Logical databses will be much helpful for me.
    Thanks
    Rohini Devi
    [email protected]

    Hi Rohini...
    Global Employee Programming
    Thanks
    Message was edited by:
            Aslam Riaz

  • ABAP Report Program Logical Database PNP

    I have a ABAP program using the logical database PNP. The report is config to run on MSS using EP. I have added code to capture the Org Unit when it is pass to the program from MSS.  My issue is how do i capture the org unit value that is passed to the program.   I have added code to capture field pnporgeh  in the START OF SELECTION event.   This works great if you are running the program from R3, but none of my edit checking against field pnporgeh works.

    Hi John,
    I am also having same trouble where in i have added a new custom(Z) report in the MSS ->My Staff -> Reporting under report category -> Time Management (MSS). I am not able to find how the value of org unit which is selected on portal screen is passed to report in R/3 which is using PNP logical db.
    I tested in debugging but selection screen parameter PNPORGEH contains nothing.
    Many Thanks in advance for the help.
    Edited by: Ankit Kashyap on Nov 17, 2010 12:40 PM

  • Logical Database PNP

    Hi,
    im using standard logical database PNP. After the user filles the selection screen, i want to manipulate some of the selection fields, but evrything i tried out til now does not change the amount of data i got by GET PERNR. How can i manipulate the selection fields to get results according to the new settings?
    cu
      Rainer

    e.g.the user entered start date 01.01.2005 and enddate 30.11.2005.
    The report shouls always take end of year so i want to manipulate the user entered 30.11.2005 to 31.12.2005.
    Manipulating pn-endda does have no effect.
    So which structers or fields i have to change?

  • Logical database PNP not retrieving data for custom infotypes.

    Hi all,
    I am using logical database PNP in a program. I have declared infotypes as follows:
    INFOTYPES: 0001, 0002, 0041, 9801, 9840.
    The problem is that the logical database is retrieving data for the standard infotypes but not for the custom infotypes. Any explanation as to why data for custom infotypes is not being retireved and how this can be solved will be greatly appreciated.
    regards,
    Hamza

    solved

  • Logical Database PNP cannot fetch correct data?

    I use logical database PNP fetch HR master data.
    PA0001 has records with company code = 0960 .
    But can not fetch data using GET PERNR.
    however
    PA0001 has not records with company code = 0770 .
    But it got so many data using GET PERNR.
    WHY..............
    person originally transferd from 0770 to 0960, It is OK.

    I belive this is not concurent employment why we need to use
    PNPCE
    Please be specific about your question
    Regards

  • Selection screen for logical database PNP..

    hi all,
    I am having a requirement to produce a HR Report where i need to use logical database PNP. Now the issue is i need to supress some of the elements of standard selection screen of PNP and add a couple of fields of mine.
    i have been looking all around and i got few of the below methods.
    its good to use a report category.
    somewhere it says include it in ur program using selection screen block..
    can you please guide me which is the best way and what would be a perfect solution?
    thanks in advance,
    Reena

    Hi reeena,
    1. simple
    2. u want to
      a) add ur own fields
      b) suppress some fields
    3. a) is simple, just add your parameters,
       in your program, and they will appear
       b) use SCREEN logic
    4. just copy paste to get a taste of it
      (it will HIDE the PAYROLL AREA field)
      and add MATNR field
    5.
    report abc.
    TABLES : PERNR.
    PARAMETERS : MATNR LIKE MARA-MATNR.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF SCREEN-NAME CS 'ABKRS'.
          SCREEN-INVISIBLE = '1'.
          SCREEN-INPUT = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    regards,
    amit m.

  • Selection screen and logical database PNP

    hi all,
    I am having a requirement to produce a HR Report where i need to use logical database PNP. Now the issue is i need to supress some of the elements of standard selection screen of PNP and add a couple of fields of mine.
    i have been looking all around and i got few of the below methods.
    its good to use a report category.
    somewhere it says include it in ur program using selection screen block..
    can you please guide me which is the best way and what would be a perfect solution?
    thanks in advance,
    Reena

    In the Program Attributes, click on the pushbutton 'HR Report Category'.Click on the 'Create' icon in the pop-up  window that comes up. You will get a list of all the available Report Categories. Go through the list & if you don't find one that suits you, select one that is closest & click on the 'Copy As' icon in the menu bar..
    Now, you can remove the unwanted fields & add yours for selection. save it & and attach it to report in the attributes.
    ~Suresh

  • Logical database PNP (Suppress message)

    Hi,
          we are having 1 report which is using logical database PNP
          this is being shown in ALV
          when the user runs the report the output is shown and after pressing BACK button the below lines are being shown
    Personnel numbers skipped by the database driver
    Reason 1: insufficient authorization, no. skipped personnel nos.:
    this is being done by logical databse program SAPDBPNP
    is there any way to supress this mesasge
    thanking you in advance
    regards
    Sai easwar

    I belive this is not concurent employment why we need to use
    PNPCE
    Please be specific about your question
    Regards

  • Selection screen for HR report with logical database PNP

    Hi All,
       I am writing a HR report. And I use the logical database PNP. Also I create a HR report category for this report. In the report category, I can define the selection screen field. But all these fields are selection option format. My question is How can I add parameters, radiobutton group and checkbox in the selection screen. Thanks.
    Alex

    Hi Alex,
    Sorry for replying so late. Please try this tutorial:
    w w w. s a p t e c h n i c a l. c o m -> tutorials -> ABAP-HR -> Creating HR Report category in PNP logical database
    Sorry, I put it like this, because direct link doens't let me post the answer. Don't know why.
    It can also be something with your custom code in selection screen. Though it works fine for, try to remove COMMENTs and observe the result. Maybe parameters are overlapping somehow. First try this:
    SELECTION-SCREEN begin of BLOCK blk2 WITH FRAME TITLE text-002.
    PARAMETERS RefDate type DATS.
    parameter BFlag type c RADIOBUTTON GROUP grp1.
    PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
    parameters days type i.
    PARAMETERS spvsr like PA0001-MSTBR.
    selection-SCREEN end of BLOCK blk2.
    If that works together with the report category, try to extend it with adding a selection-screen comment, but do this in reversed order (comment goes first and FOR FIELD addition is supplied) like this:
    SELECTION-SCREEN begin of BLOCK blk2 WITH FRAME TITLE text-002.
    PARAMETERS RefDate type DATS.
    SELECTION-SCREEN begin of line.
    SELECTION-SCREEN COMMENT 3(10) text-003 for field bflag.  "FOR FIELD, and goes first
    parameter BFlag type c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN COMMENT 16(10) text-004 for FIELD fflag.  "here two
    PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN end of line.
    parameters days type i.
    PARAMETERS spvsr like PA0001-MSTBR.
    selection-SCREEN end of BLOCK blk2.
    If still not working, see if text-003 and text-004 are not too long (you expect them to be 10 chars), This may somehow affect selection screen.
    You may also try with setting cursor position explicity by:
    SELECTION-SCREEN begin of line.
    SELECTION-SCREEN POSITION 3.
    SELECTION-SCREEN COMMENT (10) text-003 for field bflag. 
    parameter BFlag type c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN POSITION 16.
    SELECTION-SCREEN COMMENT (10) text-004 for FIELD fflag.  "here two
    PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN end of line.
    It is really hard to identify where can be a bug as it is working fine for me. Keep trying with different variations, it should finally run with some.
    Regards
    Marcin

  • How does works default parameters in a program with logical database PNP?

    Hi Friends,
      I have a basic program, i need to filter info with period parameters in a program that uses logical database PNP, but it doesn't work.
      If i use "person selection period" that it's suposed to filter info according to infotype 0001 (as the sap help says), it doesn't work, i use: PNPBEGPS = today and PNPENDPS = today, and the result it's a lot of registers that doesn't meet that criteria.
      Also i tried with: data selection period, today, up to day, current month. And the result it's with the same problem.
      How does works period parameters in a program with logical database PNP?
    This it's the program example, i use the default category.
    REPORT  ZRPHRTEST.
    tables: pernr.
    infotypes: 0001.
    start-of-selection.
    get pernr.
      write: pernr-pernr, p0001-begda, p0001-endda.
    end-of-selection.
    write 'fin'.

    Hi,
    Define pernr table under tables statement then and use GET PERNR event.This get event is followed by End-Of-Selection.
    Syntax: Tables pernr.
                Get pernr.
    Try, activate and test. This should solve your problem.
    Regards,
    Abhijeet

  • How to hide selection fields when using logical database PNP

    hi.
    i m using a logical database PNP and report catagory 1PY_DEF in my program.
    but when i execute it , it shows to selection box. one name is period and second is selections.
    but i just want to show only period box selection fields , not the selection box fields.
    how it iz possible.

    HI,
    In my case i haved used the PNP logical database..in the selection box i don't wnat to display Contorling area,Cost Center & Organizational Unit. i have written this code to hide those fields..
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name CS 'PNPKOKRS' OR
           screen-name CS 'PNPKOSTL' OR
           screen-name CS 'PNPORGEH'.
          screen-active = '0'.
          screen-invisible = '1'.
          MODIFY SCREEN.
          CLEAR screen.
        ENDIF.
      ENDLOOP.
    Try modify hide the total block instead of individual fields in that block.

  • 'PERSON is not a node of logical database PNP'

    Hi All,
               We are upgrading from 4.6 to ECC6.00.Previously we used the include RPCIPE0D with PNP database in one of the programs and had no errors.Now in ECC6.0,there is a huge change in the code of RPCIPE0D when compared to 4.6C.
               When i use this include in one of my programs with PNP database it throws an error as "'PERSON is not a node of logical database PNP'".Do i have to use PNPCE?If so,plz explain why.

    Hi Shruthi,
              Main Program RPCIPE00 of your include program RPCIPE0D is built with the Logical Database PNPCE which has the node PERSON. When you try to activate your custom program with your program as main program, Since the include  has the following code in it.
    NODES: person, group.
    this node will be checked against the LDB provided in your Custom Program.
    Regards
    S. Balasubramanian

  • Problem with using Logical Database PNP

    Hello everybody!
    When I use the logical database PNP in my program,a warning message appeared during the syntax check with Unicode checks actived.The message looks like below:
    <b>Include DBPNPCOM.
    In Unicode programs,the "-" character cannot appear in names,as it does here in the name "PNP-SW-FOUND".
    Include DBPNPCOM.
    In Unicode programs,the "-" character cannot appear in names,as it does here in the name "PNP-SY-TABIX".</b>
    Anybody know how to deal with this problem?
    Regards
    Brian Liu

    Hi,
    You can either ignore the warnings or uncheck the 'Unicode checks Active' checkbox in the program attributes. In fact you get the same warnings off most standard SAP HR Reports.
    Good luck,
    Suresh Datti

  • To use logical database PNP in class builder

    Hi
    Inside the class builder (SE24), i have a created a method.
    Now while implementing that method, that is between method and endmethod
    statement can i implement logical database PNP or PNPCE.
      If 'yes' how to use it.
      if 'no' what is the other way to implement authorization.
    Pls help me

    Hello,
    assume that the routines GET_ITnnnn are written by yourself. For reading infotypes ABAP Objects provides us with same very helpful classes as shown below:
    * define data
      DATA:
        gif_employee      type ref to if_pt_employee,
        go_employee       type ref to cl_pt_employee,
        gt_infotypes      TYPE tim_tmw_itlist_tab,
        go_control        TYPE REF TO if_pt_td_control,
        go_data           TYPE REF TO if_pt_td_base,
        go_pnnnn          TYPE REF TO if_pt_td_itnnnn,
        gt_p0001          TYPE TIM_P0001_TAB,
        gt_p0002          TYPE TIM_P0002_TAB,
        gt_p0003          TYPE TIM_P0003_TAB.
    start-of-selection.
    GET pernr.
    <b>* Create employee instance</b>
      gif_employee = cl_pt_employee=>get_employee( pernr ).
      go_employee ?= gif_employee.
    <b>* Get master infotypes (0001, 0002)</b>
      CALL METHOD go_employee->get_master_data
        EXPORTING
          im_begda = id_fromdate
          im_endda = id_todate
        IMPORTING
    *      EX_I0000 =
          EX_I0001 = gt_p0001
          EX_I0002 = gt_p0002
    *      EX_I0007 =
    *      EX_I0008 =
    <b>* Append all other required infotypes to itab</b>
      APPEND '0003' TO gt_infotypes.
      CALL METHOD go_employee->get_infotypes
        EXPORTING
          i_itlist      = gt_infotypes
          i_fromdate    = id_fromdate  " start date
          i_todate      = id_todate    " end date
    *      I_FILTER      =
          i_noauthcheck = 'X'
        IMPORTING
          e_result      = gt_infty_request
          e_retcd       = gd_retcd.
    * Please see documentation of parameter e_retcd...
      LOOP AT gt_infty_request INTO go_control.
        go_data = go_control->data.  <b>" get data object</b>
    *   Casting
        TRY.
            go_pnnnn ?= go_data.
          CATCH cx_sy_move_cast_error.
            CONTINUE.
        ENDTRY.
    <b>*   Convert infotype (semi-transparent -> transparent)</b>
        CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
          EXPORTING
            prelp = lo_pnnnn->prelp
          IMPORTING
            pnnnn = gs_p0003.
        APPEND gs_p0027 TO gt_p0003.
      ENDLOOP.
    The class CL_PT_EMPLOYEE provides us already with very easy access to so-called master infotypes (000, 0001, 0002, 0007 and 0008). All other infotypes can be read using method GET_INFOTYPES.
    Using these classes we have a very convenient and standardized way of accessing all kinds of infotypes.
    Vasanth

Maybe you are looking for