05-14-2014 10:48 AM
hi Good day,
i have a requirement, where i have Region as a SELECT-OPTION.
In Region i have 3 types
1. OLD
2. NEW
3. PR/B
i want to do something like this...
when the user selects i want to give 3 options to choose from
1. OLD
2. NEW
3. PR/B
if he/she selects OLD - I want to display the OLD values
if he/she selects NEW - I want to display the NEW values
if he/she selects PR/B - I want to display the PR/B values
I would like to know if it is possible, if YES can i kindly know how?
thank you,
J.
05-14-2014 11:20 AM
Hi Jacob,
yeah it is possible...
when user clicks search help we have have to show custom screen which contains three radio buttons.
after pressing continue button we may have to show filtered values.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR: MARKERNO-LOW,MARKERNO-HIGH.
call screen 9000.
PERFORM MARKERNO.
form markerno.
if new = 'X'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MARKERNO'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'MARKERNO '
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB_MARKER1
RETURN_TAB = RETVALUE.
elseif old = 'X'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MARKERNO'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'MARKERNO '
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB_MARKER1
RETURN_TAB = RETVALUE.
else.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MARKERNO'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'MARKERNO '
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB_MARKER1
RETURN_TAB = RETVALUE.
endif.
endform.
let me know if you face any difficulties.
Regards,
Thangam.P
05-14-2014 10:54 AM
Hi Jacob ,
i cant understand your requirements.. Please explain me little bit briefly...
05-14-2014 11:03 AM
Thank you for the reply,,
i have Region as select-option - which has a SEARCH HELP.
If the user clicks on the SEARCH HELP, I want to give user three option such as
1. OLD
2. NEW
3. PR/B
if user makes a selection on any of the 3 i want to display that particular Region values in Search Help.
i hope am clear.
thank you,
J.
05-14-2014 11:20 AM
Dear Jacob,
there are two ways to achieve it,
1. You can use search help exit, call the screen with three radio button in this exit and use this input for search help.
2. Search help table should have one field which contain any of these three entry (old/new/PRB), and you can mark this field as import field and not export field, search help should be of type C, when you click on F4, It will ask you to enter any of the three value and based on that value search help will be displayed. Obviously it will not have any radio button but it will have input field.
hope it will solve your purpose.
--
Regards-
Gagan Kumar
05-14-2014 11:14 AM
Hi Jacob,
You create a search help object where the Dialog type should be C or Dialog with value restriction. Similarly give the search help parameter where we will be selecting values from the Region table based on OLD or NEW or PR/B. Then when you press F4 the search help will popup with this selection parameter and there you will be able to give the options OLD or New or PR/B.
Regards,
Abijith
05-14-2014 11:20 AM
Hi Jacob,
yeah it is possible...
when user clicks search help we have have to show custom screen which contains three radio buttons.
after pressing continue button we may have to show filtered values.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR: MARKERNO-LOW,MARKERNO-HIGH.
call screen 9000.
PERFORM MARKERNO.
form markerno.
if new = 'X'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MARKERNO'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'MARKERNO '
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB_MARKER1
RETURN_TAB = RETVALUE.
elseif old = 'X'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MARKERNO'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'MARKERNO '
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB_MARKER1
RETURN_TAB = RETVALUE.
else.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MARKERNO'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'MARKERNO '
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB_MARKER1
RETURN_TAB = RETVALUE.
endif.
endform.
let me know if you face any difficulties.
Regards,
Thangam.P
05-14-2014 11:34 AM
Hi Jacob,
Try the following code block for your requirement.
Just copy+paste and execute.
(I hope materials with material type FERT and RAW exist in your MARA table, If not then change the MTART value in following SELECT query according to your convinience.)
************************************************************************************************
report z_test_sss_f4.
tables mara.
data :begin of gt_matnr occurs 0,
matnr like mara-matnr,
end of gt_matnr.
parameters : p_matnr type mara-matnr,
p_rad1 radiobutton group g1 default 'X' user-command flag,
p_rad2 radiobutton group g1 .
at selection-screen output.
if p_rad1 = 'X'.
select matnr
from mara
into table gt_matnr
where mtart = 'FERT'.
else.
select matnr
from mara
into table gt_matnr
where mtart = 'RAW'.
endif.
at selection-screen on value-request for p_matnr.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'MATNR'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_MATNR'
value_org = 'S'
tables
value_tab = gt_matnr[]
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
************************************************************************************************
Hope this helps.
Regards,
Siddhesh Satghare.
Message was edited by: Siddhesh Satghare
Message was edited by: Siddhesh Satghare