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 Problem, cant get the selected value

Former Member
0 Likes
2,509

Hi,

I create a search help exit, it working ok, the only problem its when I double click on the value I choosed from the return list, this value is not displayed in the field.

I guess I didnt set wich of all the colums od the return table its the value to write in the field.

How do I do that?

Thanks!

Hi,

I create a search help exit, it working ok, the only problem its when I double click on the value I choosed from the return list, this value is not displayed in the field.

I guess I didnt set wich of all the colums od the return table its the value to write in the field.

How do I do that?

Thanks!

2 REPLIES 2
Read only

Former Member
0 Likes
1,424

Hello,

Give the dialog type as 'Display value immediately' and the sample code is,

IF callcontrol-step = 'SELECT'.

  • get values of default

LOOP AT shlp_tab.

LOOP AT shlp_tab-fieldprop INTO lv_wa_fieldprop.

IF lv_wa_fieldprop-fieldname = 'SRCSTRUCT'.

lv_tabname = lv_wa_fieldprop-defaultval.

REPLACE ALL OCCURRENCES OF '''' IN lv_tabname WITH space.

CONDENSE lv_tabname.

ENDIF.

ENDLOOP. "INTERFACE

ENDLOOP. "SHLP_TAB

  • get fields of structure from DDIC

CALL FUNCTION 'DDIF_TABL_GET'

EXPORTING

name = lv_tabname

state = 'A'

langu = sy-langu

TABLES

dd03p_tab = lt_dd03p

EXCEPTIONS

OTHERS = 1.

IF sy-subrc = 0.

  • flow control: go directly to last step

callcontrol-step = 'DISP'.

  • put selected entries into internal table for returning

REFRESH record_tab.

LOOP AT lt_dd03p WHERE fieldname NA '.'.

  • RECORD_TAB-STRING = LV_TABNAME.

record_tab-string(30) = lt_dd03p-fieldname.

record_tab-string+30(60) = lt_dd03p-ddtext.

APPEND record_tab.

ENDLOOP.

ELSE.

  • exit if no valid entries are found

callcontrol-step = 'EXIT'.

ENDIF.

ENDIF.

Thanks.

Ramya.

Read only

prince_isaac
Active Participant
0 Likes
1,424

Hi Nicolas

You need to use the function module to insert all the fields that you are to return to the search help. Also check also if the field you want to pass to screen field is specified under definition of search help as an exporting parameter.


    CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
      EXPORTING
        parameter   = 'LIFNR'   
        fieldname   = 'LIFNR'   
      TABLES
        shlp_tab    = shlp_tab        
        record_tab  = record_tab
        source_tab  = lt_data01
      CHANGING
        shlp        = shlp
        callcontrol = callcontrol.

regards

PrinceIsaac