I don't know if anybody knows it already, but it is possible to write a loop with different constants.
My issue was, that there are two fields CHECK_PLANING and CHECK_BOOKING. I have to call a component with different items (parameter), when calling for CHECK_PLANING I have to call MUST_I ("KAEMM") and when checking for CHECK_BOOKING I have to call MUST_I("GBH"):
- Code: Select all
#for item = (PLANING, BOOKING)
if (CHECK_<art>.ENTITY = "Y")
activate "CHECK".MUST_I("<<item>>")
endif
#endfor
In the Defines-Trigger I have defined as follows:
- Code: Select all
#define PLANING = KAEMM
#define BOOKING = GBH
In the Codelisting Uniface compiled:
- Code: Select all
if (CHECK_PLANING.ENTITY = "Y")
activate "CHECK".MUST_I("KAEMM")
endif
if (CHECK_BOOKING.ENTITY = "Y")
activate "CHECK".MUST_I("GBH")
endif
In the original code there is more to do, but I cut it. It works with Uniface 8 and I hope it will work with Uniface 9 either.
Have a nice day
Jörg
