Logical Database PNP couldn't work

Hi all, I have the following code but it didn't work.
TABLES: pernr.
INFOTYPES: 0002. "Personal Data
data i_personaldata like p0002 OCCURS 0 WITH HEADER LINE.
SELECT-OPTIONS: language FOR p0002-sprsl.
*-- Selection screen
*-- Processing
GET PERNR.
  rp_provide_from_last p0002 space pn-begda pn-endda.
  IF pnp-sw-found EQ 0.
    WRITE: 'no record found'.
  ELSE.
    CHECK language.
    WRITE: / p0002-pernr,
    sy-vline,
    pernr-ename,
    sy-vline,
    p0002-sprsl,
    sy-vline,
    p0002-gbdat.
  ENDIF.
When I try to compile the program, the program is syntatically correct and the selection screen of the logical database works. But when I press execute, the program won't generate any result and the screen won't change.
I tried to debug the program. But the program couldn't get into the Get PERNR event.
My friend tried to run this program in another system and it works.
Anybody knows what could be the problem?

The event sequence in your program is incorrect. The correct sequence is
INFOTYPES: ...
START-OF-SELECTION.
"processing before fetching data
GET PERNR.
"process fetched data
END-OF-SELECTION. " mandatory
"process all the fetched data and display

Similar Messages

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

Maybe you are looking for

  • Upgrade Plug-ins Error, Cannot Open

    I am unable to open a file I have worked on on my computer previously. I'm using CS4 6.0.6. When trying to open the file I get the error in the image below.

  • TOMTOM through car stereo

    Hi All, I have trauled forums and still dont have an answer. Here is my query. I have an iPhone 4s all is fine, just installed the tomtom app, again great app however I want the nav instructions to speal thorugh my car stereo. (VW GOLF Mk6) now my is

  • Why is safari 7 deleting my bookmarked websites?

    why is safari 7 deleting my bookmarked websites? I keep adding them in and they go to my favorites bar, but once the window closes, more often than not the bookmark is gone from the favorites bar.

  • IE stops working when trying to open a PDF on the web.

    I have checked the add-ons and Adobe Reader is enabled. I have the file AcroIEHelperShim.dll installed. When I try to open a PDF from a web page, IE stops working. What to do?

  • ISQLplus login

    I am using iSQLplus on iAS in Windows NT I can log in using full connect identifier: (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=www.oracle.com) (PORT=1521)))(CONNECT_DATA=(SID=orashop))) but am unable to log in using tns alias tnsnames.o