smusba
7th February 2011, 13:24
Dear Gurus,

I want to put the if condition in one of the field that if tiitm001.cuni = "BG" then
convqty1 = tdsfl101.qana /conv
|if tiitm001.cuni = "BG" then
|else
if tdsfl101.stqu.f <> convqty1 then
message( " Converted Qty is not correct")
set.input.error("")
endif
|endif

No need to enter the if loop.

mark_h
7th February 2011, 15:41
I don't understand what is wrong with:

if tiitm001.cuni = "BG" then
convqty1 = tdsfl101.qana /conv
else
if tdsfl101.stqu.f <> convqty1 then
message( " Converted Qty is not correct")
set.input.error("")
endif
endif

NPRao
7th February 2011, 22:49
message( " Converted Qty is not correct")
set.input.error("")

function void set.input.error (string mess.or.code [, void arg ...])

Description


This causes the 4GL engine to display the specified error message and to force input again in the same input field. If you specify an empty string, no error message is displayed.


Arguments

string mess.or.code Specifies either the data dictionary code for the message or a literal string. In the latter case, the value of mess.or.code must start with the at sign [@]. Note that using a literal string makes the script language dependent.

[void arg ... ] The literal string or message specified with mess.or.code can contain format characters for parameter substitution. The values which must be substituted are specified in the 2nd, 3rd, ... arguments of the function. The number of these arguments is variable.

For details about formatting a string see the sprintf$().

- Hard coded message in English will not be picked up for language translation.