‎2005 Nov 07 9:40 PM
Hi,
I am trying to use a single select option in the report
s_acct FOR bsid-kunnr DEFAULT 9999990000 TO 9999999999.
Also,I have two radio buttons
p_ap RADIOBUTTON GROUP r1,
p_ar RADIOBUTTON GROUP r1,
I AM TRYING TO ACHIEVE:(F4 functionality depending on the radio buttons selected)
If p_ap is selected i am trying to get match codes(F4)
of Vendors(bsik-lifnr) and if p_ar is selected get the match code of Customer(bsid-kunnr).
Please let me know if there is any easy workaround.
Thank You,
Rao
‎2005 Nov 07 10:06 PM
Try using AT SELECTION-SCREEN ON RADIOBUTTON GROUP after assigning radio button groups to ur radio buttons and then calling the search help based on te group selected.
cheers
sharmistha
‎2005 Nov 07 10:01 PM
Yes you can do that using function module F4_SEARCH_HELP in AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_acct. You can check if p_ap is checked then pass vendor search help for above FM else pass Customer search help
Cheers,
Satya
‎2005 Nov 07 10:06 PM
Try using AT SELECTION-SCREEN ON RADIOBUTTON GROUP after assigning radio button groups to ur radio buttons and then calling the search help based on te group selected.
cheers
sharmistha
‎2005 Nov 08 1:31 AM
Hi Folks,
I cannot use F4_SEARCH_HELP.
when i run my report, depending on the radio button selected i should use the select option.
e.g. if i select p_ap , in my report the selection should retrieve vendors and similarly for the other radio button , we should select customers.
I tried using
if p_ap eq 'X'.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = 'BSIK'
FIELDNAME = 'LIFNR'
SEARCHHELP = 'KRED'
this gives me the desired vedor functionality, but i dont want any prompt ..just need to selction vendors or customers based on radio buttons.
‎2005 Nov 08 2:47 AM
Even if you use one select option you will have to do some processing to differentiate in your database selections in report . Why dont you use two select options like this ( Only one will be displayed on screen at a time depending on radibutton and you don't need to code for F4 )
<b>TABLES : LFA1, KNA1.
PARAMETERS : p_ap RADIOBUTTON GROUP r1 USER-COMMAND VEN default 'X',
p_ar RADIOBUTTON GROUP r1.
SELECT-OPTIONS S_VEN FOR LFA1-LIFNR MODIF ID LIF.
SELECT-OPTIONS S_CUS FOR KNA1-KUNNR MODIF ID KUN.
AT SELECTION-SCREEN OUTPUT .
IF P_AP EQ 'X'.
LOOP AT SCREEN.
CHECK SCREEN-GROUP1 EQ 'KUN'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
CHECK SCREEN-GROUP1 EQ 'LIF'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDLOOP.
ENDIF.</b>
Later in the program you can always copy both selction options to another ranges variable which you can use if required.
Cheers.
Sanjay
‎2005 Nov 08 6:19 AM
hi
I think it is not possible to assign match codes or F4 help to a screen field on some condition.
You can do onething
define two fields one with the first search help and the other with the other search help.
For this go to the screen field attributes you can see the search help parameter over there.
Assign the search help you have created to that particular screen field.
then while declaring the select-options declare it as
select-options:so_xxx for table-field modif id abc.
select-options:so_xyz for table-field modif id xyz.
in the program.
loop at screen.
if radiobutton1 EQ 'X' and screen-group1 EQ 'ABC'.
screen-active EQ 0.
ELSE.
screen-active EQ 1.
ENDIF.
modify screen.
endloop.
‎2005 Nov 08 2:59 PM
Hi All,
Thank you all for the feedback.
I have put a request for two selction parameters
and greatly appreciate all your feedback.
Thank You,
Vasu