on 10-03-2007 8:29 PM
Hello,
Having an input field on the screen, and an attribute in the context which has a value list linked in some way (check table, search help, or other).
Pressing F4 will bring this value list for selection. But I can enter any value manually on the field, and it could not be on that list. How can that be enforced as in normal dynpros?
The method CL_WDR_CONTEXT_NODE_INFO->SET_ATTRIBUTE_VALUE_SET does what I want, but it receives an internal table. I'd like instead to have that behaviour based on the context attribute input help list alone (because that possible value set could be comprised of an entire table which obviously I won't select into an internal table to pass to the set_attribute_value_set method).
Can this be done? Or is the only option to check manually upon user action?
Many thanks.
Hi,
first of all is that attribute in a structure?
if so, add the checktable to the structure on that attribute and the framework will
check the value against the list
you only need to define the context attribute as structure-attributename
grtz,
Koen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You mean a dictionary structure? If so, the answer is: it may be, it may be not.
Let me give you an example:
Having this tables:
ZTABLE_A
PKEYA DataElement: Z_DE_PKEYA <- Primary Key
SOMEFIELD
ZTABLE_B
PKEYB DataElement: Z_DE_PKEYB <- Primary Key
FKEYFIELD DataElement: Z_DE_PKEYA <- Foreign Key to ZTABLE_A-PKEYA
Creating a context node based on ZTABLE_B, choosing the attribute ZTABLE_B-FKEYFIELD and selecting automatic input help, causes that on F4 press over an inputfield bound to this attribute, possible list displays all the values from ZTABLE_A. But if I enter some value manually, it doesn't check that value exists in ZTABLE_A. I want to enforce that check.
Many thanks Koen
Hi Thomas,
You're right. I don't know why but I was sure that in normal module pools the check was automatically done. I did a test and confirmed there's no automatic existance check.
So basically, the idea would be to react on user action and manually check that the entered value is valid? (for example using a <i>is_valid_value()</i> method on an underlying "model" class, which would check for value existance on the check table).
Would this be the normal approach?
What I don't get is the structure / foreign key part. Why would I need a structure for this? As only tables can have foreign keys...
Thank you!
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.