cancel
Showing results for 
Search instead for 
Did you mean: 

Search Help Exit with own Selection and Dialog to choose a Value returning blank values

pawarsv96
Explorer
0 Kudos
214

Hi,

I created a TMG, choose "new entries", enter something in field Tablename and Fieldname, click enter jump to field VALUE and press F4.

Now my search help exit comes into the game: Here I get searchhelp name based on of the field which I have selected in TMG dynamically through get parameters. Now I'm using this search help to determine (that's not SH for field VALUE!) valid value list for field VALUE, display it and let the user choose a value. Now my problem is when I'm clicking of F4 for the field VALUE, it shows 2 rows(Valid values for the selected field are yes and no) but the values in both the rows are blank. Please refer attached screenshot. Can someone please help in resolving this issue. How can see the list of values when I click on f4. Here is the code I have written in search help exit.

 

IF callcontrol-step = 'SELECT' OR callcontrol-step = 'DISP'.

GET PARAMETER ID 'SHLP' FIELD lv_shlp_name. " Getting SH of the field selected in TMG
IF sy-subrc EQ 0.

ls_shlp-shlpname = lv_shlp_name.
APPEND ls_shlp TO lt_shlp_name.

CALL FUNCTION 'GET_DOMAIN_VALUES'
EXPORTING
domname = ls_shlp-shlpname
text = 'X'
TABLES
values_tab = lt_valuestab
EXCEPTIONS
no_values_found = 1
OTHERS = 2.

IF sy-subrc EQ 0.

CALL FUNCTION 'F4UT_RESULTS_MAP'
EXPORTING
source_structure = lc_src
TABLES
shlp_tab = lt_shlp_name
record_tab = record_tab
source_tab = lt_valuestab
CHANGING
shlp = shlp
callcontrol = callcontrol
EXCEPTIONS
illegal_structure = 1
OTHERS = 2.

IF sy-subrc EQ 0.

LOOP AT lt_valuestab INTO DATA(ls_valtab).
ls_record_tab-string = ls_valtab-ddtext.
INSERT ls_record_tab INTO TABLE record_tab. "Pupulating record_tab manually as above function                                                                                         module returning 2 blank rows in results tab
ENDLOOP.

ENDIF.

ENDIF.

ENDIF.

Sandra_Rossi
Active Contributor
0 Kudos

Please embed the screenshot(s) as below

Sandra_Rossi_0-1718720523368.png

 

Sandra_Rossi
Active Contributor
0 Kudos
Don't use a search help, don't use a search help exit, don't use ABAP code, just enter the domain values in the domain.
0 Kudos
Try the statement - CONDENSE ls_record_tab-string before Insert. LOOP AT lt_valuestab INTO DATA(ls_valtab). ls_record_tab-string = ls_valtab-ddtext. INSERT ls_record_tab INTO TABLE record_tab. "Pupulating record_tab manually as above function Try the statement CONDENSE bef module returning 2 blank rows in results tab ENDLOOP.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Try the statement - CONDENSE ls_record_tab-string before Insert.                                                                                            LOOP AT lt_valuestab INTO DATA(ls_valtab). ls_record_tab-string = ls_valtab-ddtext.    CONDENSE ls_record_tab-string. INSERT ls_record_tab INTO TABLE record_tab. "Pupulating record_tab manually as above function Try the statement CONDENSE bef module returning 2 blank rows in results tab ENDLOOP.