Skip to Content
0
Former Member
Mar 04, 2009 at 06:34 AM

Search Help Exit - how to pass field text

1025 Views

Hi,

I created a search help with 2 parameters, using a function module exit to retrieve data to be displayed in the 2 parameters. The first parameter is a characteristic value while the second one is the short description the characteristic value. How can I pass the short text to the second parameter? Below is my code

FUNCTION yfifm_00037.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES
*"      SHLP_TAB TYPE  SHLP_DESCT
*"      RECORD_TAB STRUCTURE  SEAHLPRES
*"  CHANGING
*"     REFERENCE(SHLP) TYPE  SHLP_DESCR
*"     REFERENCE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL
*"----------------------------------------------------------------------
  DATA: gt_list TYPE STANDARD TABLE OF bapi1161_characteristic,
        gs_list TYPE bapi1161_characteristic.

  IF callcontrol-step = 'SELECT'.
    CALL FUNCTION 'BAPI_OPCONCERN_GETCHARACTS'
      EXPORTING
        operatingconcern        = 'Z001'
      TABLES
        copacharacteristic_list = gt_list.

    IF gt_list[] IS NOT INITIAL.
      CLEAR gs_list.
      LOOP AT gt_list INTO gs_list.
        record_tab-string = gs_list-characteristic.
        APPEND record_tab.
        CLEAR gs_list.
      ENDLOOP.

      callcontrol-step = 'DISP'.
    ELSE.
      callcontrol-step = 'EXIT'.
    ENDIF.
    EXIT.
  ENDIF.
ENDFUNCTION.

Edited by: Marc Ng on Mar 4, 2009 7:35 AM

Edited by: Marc Ng on Mar 4, 2009 7:35 AM