|
For new input fields, standard R/3 value help (F4) is not automatically available.
There are 3 ways to overcome this hurdle:
Using radiobuttons instead of an input field This makes sense if there is a fairly small fixed set of possible input values. Implementation: Instead of your input field definition… InputField (10,1) “Currency” (10,12) Size=“3″ Name=“MyCurrency”
… you use a set of radiobuttons for the same variable: Offset (10,1) You can also set a default value by assigning a value to the variable V[MyCurrency]: Offset (10,1) // Set default “USD” if V[MyCurrrency] is still empty Radiobutton (1,1) “USD American Dollar” Name=“MyCurrency” Value=“USD” Or you can combine the radiobuttons with an input field: Offset (10,1) // Set default “USD” if V[MyCurrrency] is still empty Radiobutton (1,1) “USD American Dollar” Name=“MyCurrency” Value=“USD” Inputfield (5,20) Size=“3″ “-NoLabel“ Name=“OtherCurrency”
In the corresponding InputScript you then need an if-statement for the “other currency” case: // “Other currency” specified?
Defining local value help for a new input field In this case you work with the normal InputField statement: InputField (10,1) “Currency” (10,12) Size=“3″ Name=“MyCurrency” In addition, you assign a domain name to your field in the file domText.E.txt: Currency: WAERS Or, if you don’t want to work with a standard domain name, use domTextScreen.E.txt: SAPMC29C.0584.Currency: MYCURR Here SAPMC29C is the program name, 0584 the screen number, Currency the label of your input field, and MYCURR a domain name that you have invented for your field. You then create the local value help file dom.E.WAERS.txt or dom.E.MYCURR.txt which could look something like the following example: Clicking on the right mouse button the user then gets the currencies entered in the past, together with texts, and followed by a list of all possible currencies.
The local value help is fast, it displays the history together with texts, and it shows the full list of possible values. For details (e.g. generating the local help files from R/3) please see the documentation of InputAssistant.
Defining a link to standard R/3 matchcode In the case of customers, orders, materials,… neither the radiobuttons nor the local value help can be used, since the input field refers to a relatively large and dynamic set of values. If you link your field to the R/3 repository by specifying the technical name of a suitable R/3 data dictionary field, then GuiXT processes the corresponding matchcode automatically: InputField (10,1) “Currency” (10,12) Size=“3″ Name=“MyCurrency” Techname=“BKPF-WAERS”
This works only if you have installed the following R/3 objects in your system:
To create transaction code ZXF4, proceed as follows: Start transaction SE93, enter the new transaction name ZXF4 and press the Create button:
Define it as parameter transaction:
The new transaction is a parameter transaction that invokes ZGUIXTF4. You have to fill in the transaction code SA39 (internal transaction), mark the “Skip initial screen” checkbox, and enter the screen field name RS38M-PROGRAMM with value ZGUIXTF4:
Finally, press the SAVE button and assign a suitable development class, or, if no transport to other R/3 systems is planned, declare it as a local object.
|