*----------------------------------------------------------------------* * DECLARATIONS * *----------------------------------------------------------------------* TABLES: pa0001, sscrfields. DATA: gv_plvar TYPE plvar. *----------------------------------------------------------------------* * LAYOUT * *----------------------------------------------------------------------* SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001. SELECT-OPTIONS: so_orgeh FOR pa0001-orgeh. SELECTION-SCREEN: BEGIN OF LINE, PUSHBUTTON 33(47) pb_orgmc USER-COMMAND comm01, END OF LINE. SELECTION-SCREEN END OF BLOCK b1. *----------------------------------------------------------------------* * EVENTS * *----------------------------------------------------------------------* AT SELECTION-SCREEN. DATA: lt_sel_hrobject TYPE TABLE OF hrobject, ls_sel_hrobject TYPE hrobject. IF gv_plvar IS INITIAL. CALL FUNCTION 'RH_GET_PLVAR' IMPORTING plvar = gv_plvar. ENDIF. CASE sscrfields-ucomm. WHEN 'COMM01'. CALL FUNCTION 'RH_OBJID_REQUEST' EXPORTING plvar = gv_plvar otype = 'O' seark_begda = sy-datum seark_endda = sy-datum set_mode = 'X' TABLES sel_hrobject_tab = lt_sel_hrobject EXCEPTIONS cancelled = 1 wrong_condition = 2 nothing_found = 3 illegal_mode = 4 internal_error = 5 OTHERS = 6. IF sy-subrc = 0. so_orgeh-sign = 'I'. so_orgeh-option = 'EQ'. LOOP AT lt_sel_hrobject INTO ls_sel_hrobject. so_orgeh-low = ls_sel_hrobject-objid. APPEND so_orgeh. ENDLOOP. ENDIF. ENDCASE. *----------------------------------------------------------------------* * INIT * *----------------------------------------------------------------------* INITIALIZATION. pb_orgmc = 'Selezione multipla UO'. *----------------------------------------------------------------------*
mercoledì 14 dicembre 2016
Selezione multipla di Unità Organizzative
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento