Skip to Content
avatar image
Former Member

rp_read_infotype macro wid LDB PNPCE ( Strange results )

Hi Guys,

I’m working on LDB PNPCE. I was writing a report my requirement is to read all the records from 0001 and 0008, I used the macro rp_read_infotype

Well Here is the sample code what I’m trying to do ..

start-of-selection.

get peras.

lc_pernr = peras-pernr.

rp_read_infotype lc_pernr 0001 t_0001 '20000601' '99991231'.

rp_read_infotype lc_pernr 0008 t_0008 '20000601' '99991231'.

write:/ 'WHy?'.

Now the funny thing with above code is that, if I’m passing the same parameter like I’m passing for ‘0008’. It just getting 1 result, ( as it has 4 records in pa0001 ) ,

But in IT0008 its giving the all of 6 records .

Then I change the code , because if you select today on PNPCE selection screen it always take today’s date no matter what you are passing . But its only behaving like that

for IT0001.

Then I change the code like

lc_pernr = peras-pernr.

rp_read_infotype lc_pernr 0001 t_0001 pn-begda pn-enda.

rp_read_infotype lc_pernr 0008 t_0008 '20000601' '99991231'.

Its working fine for both in this case , but just notice my macro for it0008 is still the same . its still giving the same records , Even I select ‘ALL’ , DAY or period on selection screen .

My understanding is that for IT0001 it always retrieves current record where as for other infotypes it reads all records and considers passing parameters like I am doing for IT0008.

Now this is very wired behavior for this macro for PNPCE. I have checked the OSS notes , There’re few OSS note which talks about this . But we are on SAPKE47052 support pack .

That OSS notes are already in placed . Is any body out there also facing the same problem if no try to code in this way and see are you also facing the same problem . Then I should better post OSS message .

Thanks a lot!!

Saquib Khan

"Knowledge comes but wisdom lingers!!"

"Some are wise and some are otherwise"

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    May 08, 2006 at 02:23 PM

    Hellooo!!! Any body !!

    Thanks

    SK

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Saquib,

      I get the exact same results even with the macro.

      report  zp_pnpce.
      tables: pernr.
      nodes: peras.
      infotypes: 0001,0008.
      start-of-selection.
      get peras.
        clear: p0001,p0001[],p0008,p0008[].
        rp_read_infotype pernr-pernr 0001 p0001 pn-begda pn-endda.
        loop at p0001.
          exit.
        endloop.
        loop at p0008.
          exit.
        endloop.
      end-of-selection.
      

      Regards,

      Suresh Datti

  • avatar image
    Former Member
    May 19, 2006 at 06:35 PM

    Did you try with this combination :

    lc_pernr = peras-pernr.

    rp_read_infotype lc_pernr 0001 t_0001 '20000601' '99991231'.

    rp_read_infotype lc_pernr 0008 t_0008 '20000601' '99991231'

    AND

    lc_pernr = peras-pernr.

    rp_read_infotype lc_pernr 0001 t_0001 pn-begda pn-enda.

    rp_read_infotype lc_pernr 0008 t_0008 '20000601' '99991231'

    Ok let me execute the way you did it. Thanks for the input !!

    Thanks

    SK

    Add comment
    10|10000 characters needed characters exceeded