Search Help Exit Function “F4IF_SHLP_EXIT_EXAMPLE”

테이블을 참조하여 Search Help를 만들때, Exit 로직을 추가하기 위해 사용하는 함수.


 


Exit 함수 추가 방법


1. F4IF_SHLP_EXIT_EXAMPLE Copy


2. 해당 Event에 로직 추가


[#M_Select로직|접기|

  IF callcontrol-step = ‘SELECT’.
    RANGES: lr_job FOR zta0bipc3120-job.
    DATA: lt_3120 TYPE TABLE OF zta0bipc3120 WITH HEADER LINE.


    LOOP AT shlp-selopt INTO ls_selopt.
      CASE ls_selopt-shlpfield.
        WHEN ‘JOB’.
          lr_job-sign   = ls_selopt-sign.
          lr_job-option = ls_selopt-option.
          lr_job-low    = ls_selopt-low.
          lr_job-high   = ls_selopt-high.
          APPEND lr_job.
          CLEAR lr_job.
      ENDCASE.
    ENDLOOP.


    CLEAR: lt_3120, lt_3120[].
    SELECT job job_text FROM zta0bipc3120
      INTO CORRESPONDING FIELDS OF TABLE lt_3120
     WHERE job   IN lr_job
       AND langu EQ sy-langu.


    LOOP AT lt_3120.
      MOVE lt_3120 TO record_tab-string.
      APPEND record_tab.
    ENDLOOP.


    IF sy-subrc = 0.
      callcontrol-step = ‘DISP’.
    ELSE.
      callcontrol-step = ‘EXIT’.
    ENDIF.
    EXIT. “Don’t process STEP DISP additionally in this call.
  ENDIF.

_M#]

 


3.  Search Help에 Exit 함수 추가.


4. 테스트


 


참고자료 : Download


 


 


 

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