Restricting dropdown lists dynamically
In the configuration of a single screen transaction, you can specify the values to be included in a dropdown list. For some applications this static approach is not sufficient, since you want to display different dropdown lists depending on other user input values.
Here "101 Poor quality" is adequate for returns and "004 Customer recommendation" is an adequate option for normal orders.
If you enter a static list of order reasons in th genreation options, e.g.
this results in the following dropdown:
With this approach, you can create two single screen transactions, one for normal orders and one for returns. One advantage is that this allows you to change further details of the user interface, for example, you can use the label "Reason for returns" instead of "Order reason". The disadvantage is that you have to maintain separate sets of scripts for the two variants.
We now descibe the approach of changing the dropdown list dynamically, based on the order type.
1. Add the following lines in "ui_va01_ddlgen_augru.txt":
we join the check table "TVAU" and the text table "TVAUT"
Set V[ui_condition] ""
// Enhhancement AUGRU
2. Add the following 2 lines in "ui_va01_texts.txt":
3, Add the process= option in the DropDownlist
command for the
order type. This is done in the main file "ui_va01.E.txt":