brunch

You can make anything
by writing

C.S.Lewis

by 동네아밥 Jun 29. 2022

CTS Request F4 help 생성

스탠다드에서 훔쳐옴

아래와 같이 본인 ID에 종속된 CTS 리스트를 불러오는 F4help를 생성한다.




parameters: p_trkorr type trkorr obligatory.


at selection-screen on value-request for p_trkorr.
   perform show_own_orders.



 *&---------------------------------------------------------------------*
 *& Form show_own_orders
 *&---------------------------------------------------------------------*
 *& text
 *&---------------------------------------------------------------------*
 *& -->  p1        text
 *& <--  p2        text
 *&---------------------------------------------------------------------*
 form show_own_orders .
 
   data: ls_selection         type trwbo_selection,
         ls_new_request_props type trwbo_new_req_props,
         lv_organizer         type trwbo_calling_organizer,
         ls_request_header    type trwbo_request_header,
         ls_task_header       type trwbo_request_header,
         lv_title             type trwbo_title,
         w_order              like ls_request_header-trkorr,
         w_trkorr             like ls_task_header-trkorr.
 
 * parameters for request selection
   "workbench request
   ls_selection-client        = sy-mandt.
   ls_selection-tarsystem     = 'EQA'.
   ls_selection-taskfunctions = 'RSX'.
   lv_organizer               = 'W'.
 
   ls_selection-reqfunctions  = 'K'.
   ls_selection-reqstatus     = 'DL'.
   ls_selection-taskstatus    = 'DL'.
   ls_selection-connect_req_task_conditions = 'X'.
 
   if ' '  >< space.
     ls_selection-attribute         = 'SAP_CTS_PROJECT'.
     ls_selection-reference         = ' '.
   endif.
 
 *  IF gv_current_repo >< space.
 *    ls_selection-repoid = gv_current_repo.
 *  ENDIF.
 
 * parameters for new request
   perform get_new_req_props changing ls_new_request_props.
 
   lv_title = 'Workbench'.
 
   call function 'TR_PRESENT_REQUESTS_SEL_POPUP'
     exporting
       iv_organizer_type    = lv_organizer
       iv_username          = sy-uname
       is_selection         = ls_selection
       iv_title             = lv_title
       is_new_request_props = ls_new_request_props
       iv_prog_top_of_page  = 'SAPLSTRD'
       iv_form_top_of_page  = 'WRITE_REASON_FOR_REQUEST_TYPE'
     importing
       es_selected_request  = ls_request_header
       es_selected_task     = ls_task_header.
   w_order  = ls_request_header-trkorr.
   w_trkorr = ls_task_header-trkorr.
 
   if      w_order  <> space.
     p_trkorr = w_order.
   elseif  w_trkorr <> space.
     p_trkorr = w_trkorr .
   endif.
 
   clear sy-ucomm.
 
 endform.
 *&---------------------------------------------------------------------*
 *& Form get_new_req_props
 *&---------------------------------------------------------------------*
 *& text
 *&---------------------------------------------------------------------*
 *&      <-- LS_NEW_REQUEST_PROPS
 *&---------------------------------------------------------------------*
 form get_new_req_props   changing ps_props type trwbo_new_req_props.
 
   ps_props-trfunctions = 'K'.
   ps_props-tarsystem   = 'EQA'.
 
 * task type
   ps_props-taskfunc = 'S'.
 
 * source client
   ps_props-client        = '710'.
 
 * project relation
 *  IF gv_current_project  >< space.
 *    ps_props-attribute = 'SAP_CTS_PROJECT'.
 *    ps_props-reference = ' '.
 *  ENDIF.
 endform.

                    

작가의 이전글 똥컴 SAPGUI 세팅에 대해

작품 선택

키워드 선택 0 / 3 0

댓글여부

afliean
브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari