SAP ABAP Selection-Screen on value-request 이벤트내 Standard Search Help 함수 이용하기

Selection-Screen 파라미터에 Search Help를 스탠다드 함수를 이용하여 추가할 수 있습니다.
 
1. 기존화면
 
 
 
2. 변경화면
 
 
 
 
 
3. 관련 소스코드1
*internal table made to populate the value of werks when pressing f4
DATA: BEGIN OF IT_FINAL OCCURS 0,
      WERKS TYPE MARC-WERKS,
      END OF IT_FINAL.
DATA: IT_RETURN LIKE DDSHRETVAL OCCURS 0 WITH HEADER LINE.
PARAMETERS: P_WERKS(10) TYPE C.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_WERKS.
  SELECT  WERKS FROM MARC
  INTO TABLE IT_FINAL.
  CALL FUNCTION ‘F4IF_INT_TABLE_VALUE_REQUEST’
    EXPORTING
*   DDIC_STRUCTURE         = ‘ ‘
      RETFIELD               = ‘WERKS’   “field of internal table
     VALUE_ORG              = ‘S’ <—- 선언된 it_final의 필드가 dictionary로 선언되어 있어야 함.
    TABLES
      VALUE_TAB              = IT_FINAL
*   FIELD_TAB              =
     RETURN_TAB             = IT_RETURN
            .
  WRITE IT_RETURN-FIELDVAL TO P_WERKS.
  REFRESH IT_FINAL.
 
 
 

4. 관련소스2

FORM search_aufnr .
  DATA: help_infos TYPE help_info.
  DATA: selection TYPE string.
  DATA: select_value  LIKE  help_info-fldvalue.
  DATA: rsmdy_ret LIKE  rsmdy.
  DATA: dynpselect  LIKE  dselc OCCURS 0 WITH HEADER LINE.
  DATA: dynpvaluetab  LIKE  dval OCCURS 0 WITH HEADER LINE.

  help_infos-call = ‘M’.
  help_infos-object = ‘F’.
  help_infos-program = sy-repid.
  help_infos-dynpro = sy-dynnr.
  help_infos-tabname = ‘RESB’.
  help_infos-fieldname = ‘AUFNR’.
  help_infos-fieldtype = ‘CHAR’.
  help_infos-keyword = ‘오더’.
  help_infos-fieldlng = ’12’.
  help_infos-mcobj = ‘ORDE’.
  help_infos-spras = ‘KO’.
  help_infos-menufunct = ‘HC’.
  help_infos-title = ‘생산 오더 조회 : 초기 화면’.
  help_infos-dynprofld = ‘S2_AUFNR-LOW’.
  help_infos-checktable = ‘AUFK’.
  help_infos-checkfield = ‘AUFNR’.
  help_infos-tcode = ‘ZMMOC0060’.
  help_infos-pfkey = ‘AAUF’.
  help_infos-docuid = ‘FE’.
  help_infos-pov = ‘N’.
  help_infos-curow = ‘4’.
  help_infos-cucol = ’22’.
  help_infos-dynpprog = ‘ZMMOC0060’.
  help_infos-selectart = ‘F’.

  CALL FUNCTION ‘DD_SHLP_CALL_FROM_DYNP’
    EXPORTING
      help_infos   = help_infos
    IMPORTING
      selection    = selection
      select_value = select_value
      rsmdy_ret    = rsmdy_ret
    TABLES
      dynpselect   = dynpselect
      dynpvaluetab = dynpvaluetab
    EXCEPTIONS
      OTHERS       = 1.

ENDFORM.                    ” search_aufnr

 

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments