2005 Jan 17 1:03 PM
I want to restrict the selection option of a field.
There will be no intervals to enter.
Only EQ will be available.
Will allow multiple values but no intervals.
when I enter somthing* and than proceed it displays a popup showing which criteria to select and there is only EQ value.
In other circumstances it works as I want. But I do not want the popup.
Please help.
I write the code below.
TABLES:
vbak.
SELECT-OPTIONS:
zvbeln FOR vbak-vbeln
NO INTERVALS
MATCHCODE OBJECT zpyp_posid
OBLIGATORY
.
INITIALIZATION.
PERFORM init_1001.
&----
*& Form init_1001
&----
text
----
FORM init_1001 .
TYPE-POOLS:
sscr.
DATA:
restriction TYPE sscr_restrict,
wa_opt_list TYPE sscr_opt_list,
ls_ass TYPE sscr_ass.
MOVE 'EQ' TO wa_opt_list-name.
MOVE 'X' TO wa_opt_list-options-eq.
APPEND wa_opt_list TO restriction-opt_list_tab.
MOVE: 'S' TO ls_ass-kind,
'I' TO ls_ass-sg_main,
' ' TO ls_ass-sg_addy,
'EQ' TO ls_ass-op_main,
'EQ' TO ls_ass-op_addy,
'ZVBELN' TO ls_ass-name.
APPEND ls_ass TO restriction-ass_tab.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
PROGRAM =
restriction = restriction
DB = ' '
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
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
2005 Jan 17 2:34 PM
Fuat,
i modify your code:
1)
SELECT-OPTIONS:
zvbeln FOR vbak-vbeln
*NO INTERVALS "del
MATCHCODE OBJECT zpyp_posid
OBLIGATORY
2)
MOVE: 'S' TO ls_ass-kind,
'I' TO ls_ass-sg_main,
*' ' TO ls_ass-sg_addy, "del
'EQ' TO ls_ass-op_main,
*'EQ' TO ls_ass-op_addy,"del
'ZVBELN' TO ls_ass-name.
APPEND ls_ass TO restriction-ass_tab.
.. and the 1st popup vanished
Andreas
This is not happening for me. Are you sure that your "cursor" is not on the multiple selection icon when you hit enter?
Regards,
Rich Heilman
2005 Jan 17 1:09 PM
If so is the case, then why provide select-options ?
Use 2 parameters, instead.
Regards,
Subramanian V.
2005 Jan 17 1:16 PM
The input number may differ from 1 to many.
For each input I cannot use a different parameter. As you can see the number of input is variable.
The selection made will be used for multiple copy of database lines. So selection of a range may be dangerous. I also check that the range does not contain any *.
regards
2005 Jan 17 1:31 PM
2005 Jan 17 2:12 PM
When I hit enter it does not happen.
It only happens
when I run the program enter a value with * and push F8.
If I first enter value push enter and then F8 it does not happen.
Message was edited by: Fuat Ulugay
2005 Jan 17 2:34 PM
Fuat,
i modify your code:
1)
SELECT-OPTIONS:
zvbeln FOR vbak-vbeln
*NO INTERVALS "del
MATCHCODE OBJECT zpyp_posid
OBLIGATORY
2)
MOVE: 'S' TO ls_ass-kind,
'I' TO ls_ass-sg_main,
*' ' TO ls_ass-sg_addy, "del
'EQ' TO ls_ass-op_main,
*'EQ' TO ls_ass-op_addy,"del
'ZVBELN' TO ls_ass-name.
APPEND ls_ass TO restriction-ass_tab.
.. and the 1st popup vanished
Andreas
2005 Jan 17 3:01 PM
Hi,
I modified my code as you have suggested.
I write somthing* in zvbeln-low field than press F8 the same popup appeared.
regards
Message was edited by: Fuat Ulugay
2005 Jan 17 3:40 PM
2005 Jan 18 8:41 AM
2005 Jan 18 7:58 AM
Hi Fuat ,
i don't understand ?!
in my example report comes <b>no addtitional popup</b>:
here's the complete test-report:
REPORT z6.
TABLES:
vbak, bkpf.
SELECT-OPTIONS:
zvbeln FOR vbak-vbeln OBLIGATORY DEFAULT '5300000000'.
INITIALIZATION.
PERFORM init_1001.
START-OF-SELECTION.
SELECT belnr FROM bkpf INTO bkpf-belnr
WHERE bukrs = '0001'
AND belnr IN zvbeln
AND gjahr = sy-datum(4).
WRITE: / bkpf-belnr.
ENDSELECT.
IF sy-subrc <> 0.
WRITE: / 'no entry found!'.
ENDIF.
&----
*& Form init_1001
&----
FORM init_1001 .
TYPE-POOLS:
sscr.
DATA:
restriction TYPE sscr_restrict,
wa_opt_list TYPE sscr_opt_list,
ls_ass TYPE sscr_ass.
MOVE 'EQ' TO wa_opt_list-name.
MOVE 'X' TO wa_opt_list-options-eq.
APPEND wa_opt_list TO restriction-opt_list_tab.
MOVE: 'S' TO ls_ass-kind,
'I' TO ls_ass-sg_main,
'EQ' TO ls_ass-op_main,
'ZVBELN' TO ls_ass-name.
APPEND ls_ass TO restriction-ass_tab.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = restriction.
ENDFORM.
regards Andreas
2005 Jan 18 8:42 AM
Hi Andreas Mann ,
You use here a default value. In my case there is no default value.
Try your code without any default value and you will see the popup. Thanks.
2005 Jan 18 9:40 AM
Hi Fuat,
there comes no pop up - I've del the default value !
(Rel. 4.6C , SAPKB46C30)
-> but i'll guess , we talk at cross-purposes
regards Andreas
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |