Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

* restrictia unui select-options prin functie - begin TABLES: mara. * Include type pool SSCR TYPE-POOLS sscr.

* Define the object to be passed to the RESTRICTION parameter DATA restrict TYPE sscr_restrict. * Auxiliary objects for filling RESTRICT DATA opt_list TYPE sscr_opt_list. DATA ass TYPE sscr_ass.

SELECT-OPTIONS: s_matnr FOR mara-matnr NO INTERVALS.

INITIALIZATION. * JUST_EQ: Only EQ allowed CLEAR opt_list. MOVE 'JUST_EQ' TO opt_list-name. MOVE 'X' TO opt_list-options-eq. APPEND opt_list TO restrict-opt_list_tab. * KIND = 'S': applies to SELECT-OPTION s_matnr CLEAR ass. MOVE: 'S' TO ass-kind, 'S_MATNR' TO ass-name, * Only Include is permitted in main window 'I' TO ass-sg_main, * In multiple window, the same thing as in main * is permitted (Only include) ' ' TO ass-sg_addy, 'JUST_EQ' TO ass-op_main. APPEND ass TO restrict-ass_tab. * Call function module CALL FUNCTION 'SELECT_OPTIONS_RESTRICT' EXPORTING restriction = restrict EXCEPTIONS too_late = 1 repeated = 2 not_during_submit = 3 db_call_after_report_call = 4 selopt_without_options = 5 selopt_without_signs = 6 invalid_sign = 7 report_call_after_db_error = 8 empty_option_list = 9 invalid_kind = 10 repeated_kind_a = 11 OTHERS = 12. * Exception handling IF sy-subrc NE 0. ENDIF. * restrictia unui select-options prin functie - end

You might also like