TABLES : pernr.

NODES : peras.

INFOTYPES     : 0001.

FIELD-SYMBOLS : <fs_p0001> TYPE p0001.

CONSTANTS     : c_molga TYPE molga VALUE ‘AE’.

START-OF-SELECTION.

GET peras.
*    Check if molga is a UAE molga
   LOOP AT p0001 ASSIGNING <fs_p0001> WHERE begda <= pnendda
                                       AND  endda >= pnbegda.
     DATA lx_t500p TYPE t500p.
     lx_t500p = cl_hr_t500p=>read( <fs_p0001>werks ).
     IF lx_t500p IS INITIAL.
       RETURN.
     ELSEIF NOT lx_t500pmolga = c_molga.
       RETURN.
     ENDIF.
     EXIT.
   ENDLOOP.
   IF sysubrc <> 0.
     RETURN.
   ENDIF.

END-OF-SELECTION.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply