3

Is there any FO function or AJO function, to get mandatory fields that are declared in screen editor?

P4JS
  • 63
  • 4

2 Answers2

2

As far as I know there is no such function in FO. I needed this information myself some time ago and I grepped the info from the xml screen description file.

Mandatory fields look like

<erpfield dimX="20" mandatory="yes" s3Name="0:ymyvar"/>

Your FOP should look something like that:

.type text xtmask xtsys xtmandatory
.file -TEMPNAME U|xtmandatory
.formula U|xtmask = "screens/screen_" + 'G|evtmaske' + "/" + G|evtmaskprio' + "/*"
.formula U|xtsys  = "grep -ri " + G|dblquote + "mandatory=\" + G|dblquote + "yes\" + G|dblquote + G|dblquote + " " + 'U|xtmask' + " > " + 'U|xtmandatory'
.system 'U|xtsys'

Now you could iterate through every line of the file in xtmandatory and extract the variable name of the mandatory fields.

Alexander Baltasar
  • 1,044
  • 1
  • 12
  • 25
0

The underlying EDProtocol does not support such an information. See request code GFV.

So it is very likely that abas ERP does not support such an feature at all, neither in FOP nor in AJO.

You should also take into account that abas ERP still uses old mask descriptions. That means that Alexander Baltasars trick will not work in all cases.

And you should consider that "feldaustritt" (field leave) and/or "masken prüfung" (mask check) may overwrite any "mandatory"-flags.

So the "mandatory"-flag seems to me somewhat useless.

stefan bachert
  • 9,413
  • 4
  • 33
  • 40