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

F4IF_FIELD_VALUE_REQUEST - Search Help

Former Member
0 Likes
1,547

Hi All ;

I used the 'F4IF_FIELD_VALUE_REQUEST' function for add search help to the selection screen.

The problem is that I want to add an if-else condition for the function.Now the function is working for all

selection fields.How can I add a criteria for if-else.

The funtion like below ;

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

  EXPORTING

   tabname                   = 'T023T'

   fieldname                  = 'MATKL'

    SEARCHHELP         = 'Z_MATKL'

** SHLPPARAM                = ' '

*  DYNPPROG                  = sy-repid

*  DYNPNR                    = sy-dynnr

*  DYNPROFIELD               =

** STEPL                     = ''

** VALUE                     = ' '

** MULTIPLE_CHOICE           = ' '

** DISPLAY                   = ' '

** SUPPRESS_RECORDLIST       = ' '

** CALLBACK_PROGRAM          = ' '

** CALLBACK_FORM             = ' ' .

*TABLES

*  RETURN_TAB                = return_f4.

*  EXCEPTIONS

** FIELD_NOT_FOUND           = 1.

** NO_HELP_FOR_FIELD         = 2.

** INCONSISTENT_HELP         = 3.

** NO_VALUES_FOUND           = 4.

** OTHERS                    = 5 .

*

*if return_f4[] is not initial.



Regards

Fırtına


Hi All ;

I used the 'F4IF_FIELD_VALUE_REQUEST' function for add search help to the selection screen.

The problem is that I want to add an if-else condition for the function.Now the function is working for all

selection fields.How can I add a criteria for if-else.

The funtion like below ;

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

  EXPORTING

   tabname                   = 'T023T'

   fieldname                  = 'MATKL'

    SEARCHHELP         = 'Z_MATKL'

** SHLPPARAM                = ' '

*  DYNPPROG                  = sy-repid

*  DYNPNR                    = sy-dynnr

*  DYNPROFIELD               =

** STEPL                     = ''

** VALUE                     = ' '

** MULTIPLE_CHOICE           = ' '

** DISPLAY                   = ' '

** SUPPRESS_RECORDLIST       = ' '

** CALLBACK_PROGRAM          = ' '

** CALLBACK_FORM             = ' ' .

*TABLES

*  RETURN_TAB                = return_f4.

*  EXCEPTIONS

** FIELD_NOT_FOUND           = 1.

** NO_HELP_FOR_FIELD         = 2.

** INCONSISTENT_HELP         = 3.

** NO_VALUES_FOUND           = 4.

** OTHERS                    = 5 .

*

*if return_f4[] is not initial.



Regards

Fırtına


6 REPLIES 6
Read only

atul_mohanty
Active Contributor
0 Likes
1,191

Hi

Please elaborate the issue with the code that you have written.

Read only

VijayaKrishnaG
Active Contributor
0 Likes
1,191

Hi,

You call this Function module in a event AT SELECTION ON VALUE REQUEST FOR <input_field>.

Regards,

Vijay

Read only

former_member185116
Active Participant
0 Likes
1,191

hi,

as vijay said the only way is use evenet AT SELECTION-SCREEN  ON VALUE REQUSET FOR p_field.   (where p_field is ur required field for which u want to set search help)..

regards...

vinay reddy..

Read only

0 Likes
1,191

Hi Vinay ;

I added the code like below but it didnt work. Thanks for your reply,im waiting your another solutions.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR SO_MATK9-LOW.

Regards.

Fırtına.

Read only

Former Member
0 Likes
1,191

Hi YIGIT,

Please make changes in code as shown in below.
 

 

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname
= 'T023T'
fieldname
= 'MATKL'
searchhelp
= 'Z_MATKL'
TABLES
return_tab
= return_f4
EXCEPTIONS
field_not_found
= 1
no_help_for_field
= 2
inconsistent_help
= 3
no_values_found
= 4
others = 5 .

LOOP AT return_f4 INTO wa_return_f4.
MOVE wa_return_tab-fieldval TO so_matk9-low.
ENDLOOP.


Regards,

Pravin

Read only

Former Member
0 Likes
1,191

HI,

End the AT SELECTION-SCREEN event after if-else condition by calling other event ex. start-of-selection or any other event of a report. Otherwise the entire logic following AT SELECTION-SCREEN comes under it.