rajeev2012
6th August 2008, 11:35
Hi

We want to disable standard command, based on a condition. Hence, the following code has written (it is a satellite sessions)but it doesn't work.

choice.mark.occur:
after.choice:
if xiext321.altp = xiext.altp.new.model or
xiext321.altp = xiext.altp.collab then
enable.commands(mark.delete)
endif
else
disable.commands(mark.delete)

endif

In debug, we have noticed,

- Though we have marked a single record, the "choice.mark occur" gets executed as many time as the number of records (filled occurrences)
- The line "disable.commands(mark.delete)" gets hit but it the delete option gets enabled.

Please let me know your views, suggestions.

Thanks
Rajeev

NirajKakodkar
6th August 2008, 20:41
Hi Rajeev ,

First thing i noticed in your below code is your if statement , its wrong , howz the code got compiled ?

choice.mark.occur:
after.choice:
if xiext321.altp = xiext.altp.new.model or
xiext321.altp = xiext.altp.collab then
enable.commands(mark.delete)
endif
else
disable.commands(mark.delete)

endif


There is endif before else .
the syntax is

if <condition> then

statement

else

statement

endif

Regards,
Niraj

rajeev2012
7th August 2008, 13:48
Hi Neeraj

Thanks for your reply.

In the actual code, the syntax is correct.

Regards
Rajeev

NirajKakodkar
7th August 2008, 17:13
Hello Rajeev ,

First of all , sorry for the hasty reply ..

Try changing the TIV version , this should help you solve the problem .

or in extreme case , try to use the predefined variables "marked" and "actual.occ" .

This should definitely help you .

Regards,
Niraj

Zakir Hussain
26th September 2018, 06:11
Hello Rajeev,

Can u #include <bic_4gl2> in your script and try again.

Thanks..
zakir