Reputation: 49
I created these three radio buttons to define values to the variable TEST
.
The first two work just fine: if I click in p_r1
it assigns B
and if I click p_r2
it assigns A
.
I wanted the third to assign *
to get all status i.e A, B, C.
Why doesn't it work? Isn't *
a special character that means all like %
in SQL?
DATA: TEST TYPE C.
PARAMETERS:
P_R1 RADIOBUTTON GROUP GRP1 DEFAULT 'X',
P_R2 RADIOBUTTON GROUP GRP1,
P_R3 RADIOBUTTON GROUP GRP1.
IF P_R1 = 'X'.
TEST = 'B'.
ELSEIF P_R2 = 'X'.
TEST = 'A'.
ELSEIF P_R3 = 'X'.
TEST = '*'.
ENDIF.
SELECT VBELN,GBSTK
FROM LIKP
WHERE GBSTK = @TEST
INTO TABLE @DATA(IT_FINAL).
CL_DEMO_OUTPUT=>DISPLAY( IT_FINAL ).
Upvotes: 2
Views: 2135
Reputation: 2565
A few things to keep in mind to make your requirement work:
For more details check the SAP help for SELECT - WHERE for your specific version. Here is the one for 752: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapwhere.htm?file=abapwhere.htm
Upvotes: 3