Skip to Content

No Filtering while using PNP DB

HI all,

I am using PNP DB to get the HR data...

I m giving the data range in the std selection screen ...

but it is not filtering the data on the basis of data range....

it is giving all the data which are present in the DB...

plz help me in trobleshooting the problemm....

thnx

Rohit

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 17, 2008 at 12:19 PM

    Can you post your code? So we can look and suggest you something .. hmmmm

     
    
    Example 
    
    In your prog attr : PNP 
    
    REPORT  Ypnp.
    tables:pernr.
    
    infotypes:0001,
              0002.
    
    START-OF-SELECTION.
    *reading logical database PNP with pernr node
    
    GET PERNR .
    
    
    * Reading pa0001 using macro
    
      RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
    
      IF PNP-SW-FOUND  = 1. " if found = 1, otheriwse '0'
    
        YOURTAB-FIELD = P0001-PERSK.
    
      ENDIF.
    
    
      RP_PROVIDE_FROM_LAST P0002 SPACE PN-BEGDA PN-ENDDA.
    
      IF PNP-SW-FOUND  = 1. " if found = 1, otheriwse '0'
    
        YOURTAB-FIELD1 = P0002-NACHN.
    
      ENDIF.
    
      APPEND YOURTAB .
    
    END-OF-SELECTION.
    Perform write_output.
    

    ^ Saquib

    .

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Rahul Keshav

      >

      > as shown while debugging...

      >

      > the value which i have entered in selection screen :

      > PN-BEGDA 20080901

      > PN-endda 20080919

      >

      >

      >

      > and in p0002:

      >

      >

      > PERNR INFTY SUBTY OBJPS SPRPS ENDDA BEGDA SEQNR AEDTM

      >

      > 00000010|0002 | | | |99991231|19670522| 000 |

      > 00000010|0002 | | | |99991231|19670522| 000 | 20030

      >

      >

      > there is problem it is taking begda from begining....

      >

      > plz suggest ....

      Hi Rohit

      The records returned by the LDB are absolutely fine, i don't see any issue with them, since the 2 records are valid in the date range given in the selection screen(pn-begda, pn-endda) the LDB returned those 2 records this is the expected behaviour of the system and the macro

      rp_set_data_interval is working as it should be.

      If you want to analyze the macro(rp_set_data_interval), delimit any of the 2 records returned by the LDB such that the enddate of the record is before pn-begda(20080901), now the LDB will not return the delimited record as the enddate of the record does not fall in the interval pn-begda, pn-endda.

      @Krishna Kishore : I totally agree with you, here in the example provided by Rohit as we are using the macro rp_set_data_interval we expect that the LDB should limit the records returned to the date range given in the selection screen(pn-begda, pn-endda) instead of returning all the records of the pernr.

      One more option to totally restrict the records returned by the LDB is to add "MODE N" in the Infotypes declaration

      itself. Please, check the link below

      http://help.sap.com/saphelp_47x200/helpdata/en/4f/d527fb575e11d189270000e8322f96/content.htm

      Regards

      Rajesh.

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2008 at 10:30 AM

    Hi,

    Make sure that, Master Data field is empty or not in Attributes.

    goto attributes, click on 'HR Report category'

    now make sure that, 'Master Data (Infotype)' is empty or not.

    If its value is : ______03, some data retrieval is not done.

    hopefull, it will be helpfull to you.

    Regards

    Sai

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 17, 2008 at 12:25 PM

    pass ur selection screen data like p_begda, p_endda to PN-BEGDA, PN-ENDDA before get pernr event.

    It will restrict get pernr event from fetching all the data.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 17, 2008 at 02:11 PM

    THIS CODE CAN BE USED TO RESTRICT GET PERNR EVENT TO LOOP ONLY FOR PERNR MENTIONED IN SELECT OPTIONS

    TABLES: PERNR.

    SELECT-OPTIONS: R_PERNR FOR PERNR-PERNR.

    START-OF-SELECTION.

    PNPPERNR = R_PERNR.

    GET PERNR.

    WRITE: / PERNR-PERNR.

    END-OF-SELECTION.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 10, 2008 at 10:23 AM

    any expert ......

    😔

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.