on 02-06-2013 4:27 PM
I have a textEdit element which is tied to a searchHelp.
The user can select a valid value from the searchHelp.
They can also just type in a value rather than selecting one.
Is there a single method/fm that will tell me if the value selected could have been returned by the SH.
(I'm not worried about what inputs the user may have entered on the SH, just could the value have been returned?)
Simple Example.
Custom SearchHelp : ZSHCURR1 returns a list of selectable currencies
The user can select one from the searchhelp.
Let's say USD is in the list and GBP is not.
I'm looking for a fm/method. like is_value_allowable below, that will return a boolean
is_value_allowable( 'ZSHCURR1' , 'USD' ) returns TRUE
is_value_allowable( 'ZSHCURR1' , 'GNP' ) returns FALSE
Does anyone know of a simple, existing, piece of wrapped functionality for doing this?
Thanks...
...Mike
Hi Mike,
Search helps can pull their values from a database table or view and may also have an exit which alters the records returned by the search help. So I don't know of any function module or method that performs a check as cleanly as you've described.
You could write your own procedure to do this though using something like function module F4_FIELD_ON_VALUE_REQUEST. It is possible to call this function module and receive a table of all possible results. You could then read the table for the proposed value to see if it is a legal value.
CALL FUNCTION 'F4_FIELD_ON_VALUE_REQUEST'
EXPORTING
tabname = space
fieldname = space
searchhelp = 'ZSHCURR1'
suppress_recordlist = abap_true
TABLES
return_tab = return_tab
EXCEPTIONS
OTHERS = 5.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i don't know any FM but you can achieve using search help import and export parameter
go through below link
http://scn.sap.com/docs/DOC-32686
create one more attribute and set it when you choose from search help. you can use this attribute in your logic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.