Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Repititive structure HR

Hi ,

I am trying to read the infotype ( 0041) .

 
TABLES : pernr, t548t.

infotypes : 0041,
           0001.



DATA : BEGIN OF datyp,
       dar LIKE p0041-dar01,
       dat LIKE p0041-dat01,
       END OF datyp.


GET pernr.

  rp_provide_from_last p0001 space pn-begda pn-endda.
  rp_provide_from_last p0041 space pn-begda pn-endda.

  IF pnp-sw-found EQ 0.
    REJECT.

  ELSE.

    DO 12 TIMES VARYING datyp FROM p0041-dar01
                              NEXT p0041-dar02.

      IF dtype-dar IS INITIAL.
        EXIT.
      ELSE.
        ...............
      ENDIF.

    ENDDO.

 ENDIF.

I get the following error when I try to compile the Program

P0041-DAR01 and DATYP are type-incompatible.

Can any one tell me where I am going wrong. I have already declared the DATYP

Any help in this regard is appreciated.

Thanks,

Bluesh

Edited by: Bluesh on Apr 17, 2009 1:48 PM

Former Member
Former Member replied

HI,

Try like this..

DO 12 TIMES VARYING datyp-dar FROM p0041-dar01 NEXT p0041-dar02.
           VARYING datyp-dat FROM p0041-dat01 NEXT p0041-dat02.

ENDDO.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question