Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

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 <= pn-endda
                                       AND  endda >= pn-begda.
     DATA lx_t500p TYPE t500p.
     lx_t500p = cl_hr_t500p=>read( <fs_p0001>-werks ).
     IF lx_t500p IS INITIAL.
       RETURN.
     ELSEIF NOT lx_t500p-molga = c_molga.
       RETURN.
     ENDIF.
     EXIT.
   ENDLOOP.
   IF sy-subrc <> 0.
     RETURN.
   ENDIF.

END-OF-SELECTION.