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

How to read dta from infotypes

Hi Experts,

How to read data from infotypes

points will be rewarded.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 28, 2007 at 06:08 AM

    Hi,

    We generally use PROVIDE * .... END PROVIDE. to read data from infotypes..

    Example :

    TABLES: PERNR.

    INFOTYPES: 0001.

    GET PERNR.

    PROVIDE * FROM P0001 BETWEEN PN-BEGDA AND PN-ENDDA.

    WRITE: / P0001-PERNR,

    P0001-STELL,

    P0001-BEGDA,

    P0001-ENDDA.

    ENDPROVIDE.

    So many macros,function modules are also there to read data from infotypes... like RP-READ-INFOTYPE.

    RP_PROVIDE_FROM_LAST Pnnnn SPACE PN-BEGDA PN-ENDDA.

    or

    RP_PROVIDE_FROM_FIRST Pnnnn SPACE PN-BEGDA PN-ENDDA.

    These statements make the most recent or earliest record in the PN/BEGDA to PN/ENDDA data selection period available in the structure Pnnnn for infotype nnnn .

    regards,

    sai ramesh

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Also, Infotypes with the time constraints, 1 or 2, may be processed with a

      PROVIDE-ENDPROVIDE loop. Time constraint 1 or 2 like addresses.

      For time constraint 3 its is good to use loop-endloop or select endselect.

      Also one more advantage of using provide endprovide is If the infotype to be maintained has subtypes, it must be processed with the

      subtype. This is brought about by the WHERE condition in the PROVIDE

      statement. In the above example, the processing of the infotype, Addresses (0006),

      is restricted to the subtype, 1 Permanent Address. This prevents the intervals from

      overlapping. This is required as the PROVIDE processing occurs correctly only

      for the infotype records with the periods that do not overlap. e.g.:

      TABLESA PERNR.

      INFOTYPE : 0002, "Personal data

      0015, " Additinal payments

      .....

      GET PERNR.

      CHECK LINES ( P0015 ) GT 0.

      PROVIDE * FROM P0002 BN PN-BEGDA AND PN-ENDDA.

      WRITE....

      ENDPROVIDE.

      Hope this helps you,

      Rgds,

      Swapnil...!

      PS : points rewarded will be appreciated.

  • author's profile photo Former Member
    Former Member
    Posted on May 28, 2007 at 06:09 AM

    Hi rakesh,

    You can also use the FM 'HR_READ_INfOTYPE' to do so.

    Rgds,

    Swapnil

    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.