Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

search Help *Suchhilfe*

Former Member
0 Likes
1,024

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

6 REPLIES 6
Read only

brad_bohn
Active Contributor
0 Likes
962

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?

Read only

Former Member
0 Likes
962

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.

Read only

0 Likes
962

i dont use timepoint DISP. I tryed with timepoint and without. the same result:-(

Read only

0 Likes
962

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.

Read only

0 Likes
962

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.

Read only

0 Likes
962

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...