Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Search help with Radio buttons

former_member317781
Active Participant
0 Kudos

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.

1 ACCEPTED SOLUTION

thangam_perumal
Contributor
0 Kudos

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

6 REPLIES 6

thangam_perumal
Contributor
0 Kudos

Hi Jacob ,

             i cant understand your requirements.. Please explain me little bit briefly...

0 Kudos

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.

0 Kudos

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

former_member196651
Contributor
0 Kudos

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

thangam_perumal
Contributor
0 Kudos

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

0 Kudos

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