DROP VIEW LD0VAA0LMEnrollmentOrg
;

CREATE VIEW LD0VAA0LMEnrollmentOrg
 AS SELECT * FROM LD0P0J01 J01 
  WHERE EXISTS(SELECT 'X' FROM LD0V1AJD AJD  WHERE AJD.VYNAMN = 'KARTLÄGGN' AND J01.ORGID = AJD.JFRDTA3
   AND J01.ORGENHNR LIKE AJD.JFRDTA10) AND J01.HANDLORGAM = 1
	  WITH CHECK OPTION 
;

