Question:
MAny ideas
1. in your code
MOVE: 'KEY' TO itab_fields-field1,
'VALUE' TO itab_fields-field2.
APPEND itab_values.
append must be to ITAB_FIELDS.
2. I don't see you passing itab_fields in FM
3. try parameter VALUE_ORG = 'S' (not default)
4. itab_values declared as table (with header line by default)
and maybe, instead of value_tab = itab_values, put
itab_values[]
Answer:
Thanks for your reply.
I have removed itab_fields from the FM, and tried what you proposed to pass
value_tab = itab_values[].
But at value-request, I get a popup Xith the correct name, and in the header it says '3 entries found' - but are not displayed!?
What could be wrong here?
Answer:
Ok got it!
FORM get_input_help USING ret_val CHANGING s_status_value.
DATA: BEGIN OF itab_values OCCURS 0,
key TYPE tdhyphenat,
value TYPE tdobject,
END OF itab_values.
MOVE: 'a' TO itab_values-key,
'Drive' TO itab_values-value.
APPEND itab_values.
MOVE: 'b' TO itab_values-key,
'Stop' TO itab_values-value.
APPEND itab_values.
MOVE: 'c' TO itab_values-key,
'Accelarate' TO itab_values-value.
APPEND itab_values.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = ret_val
value_org = 'S'
TABLES
value_tab = itab_values
return_tab = itab_return.
IF sy-subrc = 0.
READ TABLE itab_return INDEX 1.
READ TABLE itab_values WITH KEY value = itab_return-fieldval.
s_status_value = itab_values-key.
ENDIF.
CLEAR itab_values.
REFRESH itab_values.
ENDFORM. " get_input_help
The secret was in declaring itab_values fields with a type to a dd field rather that direct typing!
Cheers!
Answer:
This really works,
if you need more than one value exported from search help than in itab_values you will have a data structure containing all data from selected line.
btw return table should be declared as:
Data: return_table TYPE STANDARD TABLE OF DDSHRETVAL WITH HEADER LINE.
otherwise you gonna get error.
_________________
please, no more gun fire.... dance 4 life!