Application Development and Automation 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: 
Read only

Match Codes

Former Member
0 Likes
879

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
810

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

6 REPLIES 6
Read only

Former Member
0 Likes
810

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

Read only

Former Member
0 Likes
811

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

Read only

0 Likes
810

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.

Read only

0 Likes
810

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

Read only

Former Member
0 Likes
810

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.

Read only

0 Likes
810

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