Hi Friends,
I am facing a problem while doing an HR object. I took an LDB with Selection screen '100'. i got the company code select-option in it. But i need to avoid multiple selection button so that i have to take only a single company code to print the ALV heading as the company Text. Please tell me quickly, how can i do it.
Regards,
Santosh.
You may have to do something like below where S_BUKRS is your company code select option of the LDB.
REPORT zakstest1 NO STANDARD PAGE HEADING. TABLES t001. TYPE-POOLS: sscr. SELECT-OPTIONS s_bukrs FOR t001-bukrs. *-------------- INITIALIZATION. *-------------- *-- Remove the the ranges option PERFORM remove_ranges_for_sel_options. *&---------------------------------------------------------------------* *& Form remove_ranges_for_sel_options *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM remove_ranges_for_sel_options. DATA: optlist TYPE sscr_opt_list, restrict TYPE sscr_restrict, ass TYPE sscr_ass. *-- Allow EQ only CLEAR optlist. optlist-name = 'EQ_ONLY'. optlist-options-eq = 'X'. APPEND optlist TO restrict-opt_list_tab. CLEAR ass. ass-kind = 'S'. ass-sg_main = 'I'. ass-sg_addy = 'N'. *-- Make S_BUKRS range to have only EQ ass-name = 'S_BUKRS'. ass-op_main = 'EQ_ONLY'. APPEND ass TO restrict-ass_tab. CALL FUNCTION 'SELECT_OPTIONS_RESTRICT' EXPORTING restriction = restrict EXCEPTIONS too_late = 1 repeated = 2 selopt_without_options = 3 selopt_without_signs = 4 invalid_sign = 5 empty_option_list = 6 invalid_kind = 7 repeated_kind_a = 8 OTHERS = 9. ENDFORM. " rem_ranges
Hi,
Please use fm LDB_PROCESS
Note: Check the fm documentation have with example
aRs
Points are always welcome
If you want to allow 'Greater than' or 'Less than' option, you can consider using:
Select-option: S_BUKRS like t001-bukrs No intervals no-extension.
This will restrict the user to entry of a single value for the selection option, but with the possibility of also choosing single value options like 'Greater than' or 'Less than or equal'.
If you do not want the value option to be allowed, then follow with the function module <b>SELECT_OPTIONS_RESTRICT</b> in the initialization routine.
<b><i>Please reward points for helpful answer.</i></b>
Minami
Dear santhosh,
This is the easy way to hide "Multiple selection" from LDB select Option.
*To hide multiple selection
LOOP AT SCREEN.
IF screen-name CS'%_PNPBUKRS_%_APP_%-VALU_PUSH'.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Regard,
Pappu Kumar.
Add a comment