Skip to Content
author's profile photo Former Member
Former Member

help needed please.

Can anyone help me with this please, I'm using LDB PNP, I need to select all active employees from infotype 0000 and get employee's name from info type 0001.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 08:02 AM

    refer code below

    tables: pernr.
    
    infotypes: 0000,
               0001,
               0002.
    
    constants: c_1(1)       type c               value '1'   ,
               c_3(1)       type c               value '3'   ,
               c_i(1)       type c               value 'I'   ,
               c_x(1)       type c               value 'X'   ,
               c_eq(2)      type c               value 'EQ'  ,
               c_pl03       like p0001-werks     value 'PL03'.
    
    
    Initialization.
    * Initialize Selection-Screen values
      perform init_selction_screen.
    
    
    Start-of-selection.
    
    get pernr.
    
      clear t_output.
    
    * Read Infotype 0
      rp-provide-from-last p0000 space pn-begda pn-endda.
      check pnp-sw-found eq c_1.
    * Check if employee is active
      check p0000-stat2 in pnpstat2.      "pernr Active
    
    * Read Infotype 1
      rp-provide-from-last p0001 space pn-begda pn-endda.
      check pnp-sw-found eq c_1.
    
    * Read Infotype 2
      rp-provide-from-last p0002 space pn-begda pn-endda.
      check pnp-sw-found eq c_1.
    
    *****ur processing Steps******
    
    
    
    *&---------------------------------------------------------------------*
    *&      Form  init_selction_screen
    *&---------------------------------------------------------------------*
    *Description:
    *----------------------------------------------------------------------*
    FORM init_selction_screen .
    
      refresh: pnppersg,
               pnpstat2.
      clear:   pnppersg,
               pnpstat2.
    
    
      pnppersg-sign   = c_i.
      pnppersg-option = c_EQ.
      pnppersg-low    = c_1.
      append pnppersg.
    
      pnpstat2-sign   = c_i.
      pnpstat2-option = c_EQ.
      pnpstat2-low    = c_3.
      append pnpstat2.
    
    
    ENDFORM.                    " init_selction_screen
    
    

    reward if useful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 08:06 AM

    Hi,

    On the selection screen give the pernr range.

    in the get pernr event read p0000 with stat2 as active

    and get the name for that pernr from infotype pa0002.

    Regards,

    GSR.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 01, 2007 at 07:41 AM
    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.