2011 Feb 16 4:23 PM
Hello,
I wrote a function Module for own Search Help and I used this CALL FUNCTION to map the Results.
CALL FUNCTION 'F4UT_RESULTS_MAP'
EXPORTING
SOURCE_STRUCTURE =
APPLY_RESTRICTIONS = ' '
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = lt_result "Here is my Table
CHANGING
shlp = shlp
callcontrol = callcontrol
EXCEPTIONS
illegal_structure = 1
OTHERS = 2.
My question is: when i select any value from my F4 Help-Table, I every time become the last value from the F4-Table and not my choosen value.
Thank you 4 ur Help
Moderator message: please do not use SMS speak, but more meaningful subject lines when posting.
Edited by: Thomas Zloch on Feb 16, 2011 5:27 PM
Hello,
I wrote a function Module for own Search Help and I used this CALL FUNCTION to map the Results.
CALL FUNCTION 'F4UT_RESULTS_MAP'
EXPORTING
SOURCE_STRUCTURE =
APPLY_RESTRICTIONS = ' '
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = lt_result "Here is my Table
CHANGING
shlp = shlp
callcontrol = callcontrol
EXCEPTIONS
illegal_structure = 1
OTHERS = 2.
My question is: when i select any value from my F4 Help-Table, I every time become the last value from the F4-Table and not my choosen value.
Thank you 4 ur Help
Moderator message: please do not use SMS speak, but more meaningful subject lines when posting.
Edited by: Thomas Zloch on Feb 16, 2011 5:27 PM
2011 Feb 16 4:58 PM
The function call itself looks OK. Presumably you are doing that in the 'DISP' timepoint? Do you have any code in the 'RETURN' timepoint that would affect the response?
2011 Feb 16 5:01 PM
My Code look so:
FUNCTION Z_test
""Lokale Schnittstelle:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCR_TAB_T
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR_T
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
*"----
TYPES: BEGIN OF ty_result,
variant TYPE variant,
vtext TYPE rvart_vtxt,
END OF ty_result.
DATA: lt_result TYPE TABLE OF ty_result.
SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_result
FROM varid
WHERE report = 'RIEQUI20'.
I have to map the results
CALL FUNCTION 'F4UT_RESULTS_MAP'
EXPORTING
SOURCE_STRUCTURE =
APPLY_RESTRICTIONS = ' '
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = lt_result
CHANGING
shlp = shlp
callcontrol = callcontrol
EXCEPTIONS
illegal_structure = 1
OTHERS = 2
."point
ENDFUNCTION.
2011 Feb 16 5:06 PM
i dont use timepoint DISP. I tryed with timepoint and without. the same result:-(
2011 Feb 16 5:22 PM
i dont use timepoint DISP.
You MUST use timepoint control in a search help exit. How do you know that the RETURN timepoint isn't affecting the data returned? Check the documentation in the help files or for the function itself.
IF CALLCONTROL-STEP = 'DISP'.
* Map the internal table to RECORD_TAB
CALL FUNCTION 'F4UT_RESULTS_MAP'
TABLES
SHLP_TAB = SHLP_TAB
RECORD_TAB = RECORD_TAB
SOURCE_TAB = GT_DOCUMENT
CHANGING
SHLP = SHLP
CALLCONTROL = CALLCONTROL
EXCEPTIONS
ILLEGAL_STRUCTURE = 1
OTHERS = 2.
CALL FUNCTION 'F4UT_OPTIMIZE_COLWIDTH'
TABLES
SHLP_TAB = SHLP_TAB
RECORD_TAB = RECORD_TAB
CHANGING
SHLP = SHLP
CALLCONTROL = CALLCONTROL.
* Refresh the select-options here -- can't do it at PRESEL1
REFRESH SHLP-SELOPT.
ENDIF.
2011 Feb 17 9:26 AM
I solved the Problem:
I should clear my table lt_result if record_tab is not initial.
look at this please:
IF record_tab[] IS NOT INITIAL.
READ TABLE record_tab INDEX 1.
DELETE lt_result WHERE variant NE record_tab-string.
ENDIF.
2011 Feb 17 1:58 PM
That isn't proper search help exit coding. By ignoring timepoints you have introduced the issue. You don't need to clear or refresh anything nor should you be checking record_tab-string values...
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |