In my Search Help, I have KNVP-KUNN2 and KNA1-KUNNR being returned. In their default form, when the search help is run, for both of these fields the column header comes back as CUSTOMER.
This will not work. I need to indicate what each of these are in something better to the end user. I want KUNN2 to be displayed as Partner_Number
(or something similar).
For the search help I am telling it to use a search help exit. Here is the code in the function module. I get no errors when activating. It seems happy but does not update the column headers (REPTEXT).
Can someone tell me why?
Code:
FUNCTION Z_ZDEBIP.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCT
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR
*" VALUE(CALLCONTROL) TYPE DDSHF4CTRL
*"----------------------------------------------------------------------
data wa_fielddescr TYPE DFIES.
CASE callcontrol-step.
WHEN 'DISP'.
LOOP AT SHLP_TAB-fielddescr INTO wa_fielddescr.
CASE wa_fielddescr-fieldname.
WHEN 'KUNN2'.
wa_fielddescr-REPTEXT = 'MYWords'.
MODIFY SHLP_TAB-fielddescr FROM wa_fielddescr INDEX sy-tabix TRANSPORTING REPTEXT.
ENDCASE.
ENDLOOP.
ENDCASE.
ENDFUNCTION.