‎2012 Jan 25 4:47 PM
Hi All,
I have created the elementay search help for field ZWELS of table LFB!. ZWELS fileds contains values C and CDF for multiple vendor numbers. In search help i have included only ZWELS field. I have attached this search help to selection screen element by using matchcode object. But when i press F4 , repetitive values are displaying.
I dont want to show the repeating values. I want to show only distinct values.
how to do it?
Please give solution for it.
Thanks and regards,
Rakesh
‎2012 Jan 25 4:57 PM
Can you also supply company code and/or the partner number? Alternatively look at the F4IF_INT_TABLE_VALUE_REQUEST function module with which you can create the value list and allow the user to select via that module. There have been numerous postings on the use of that FM, so a search of the forum or of SDN should lead to code samples.
‎2012 Jan 25 11:03 PM
add a search help exit as below along in the search help which you created. what i am doing here is i am deleting the duplicate records comparing the vendor number.
FUNCTION ZF4IF_SHLP_EXIT_LFB.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" 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
*"----------------------------------------------------------------------
DATA : record_tab1 type TABLE OF SEAHLPRES.
IF CALLCONTROL-STEP = 'DISP'.
LOOP AT record_tab.
delete record_tab WHERE string+0(13) = record_tab-string+0(13).
append record_tab to record_tab1.
ENDLOOP.
sort record_tab1 by string ASCENDING.
record_tab[] = record_tab1[].
ENDIF.
ENDFUNCTION.check the code a bit in the debug. adjust the 0(13) if needed for you... 13 because, in lfb1 lifnr field is till 13 characters (3 for mandt and 10 for lifnr)...