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

F4 help.

Former Member
0 Likes
1,130

***************************************************

  • Declaration of variables *

***************************************************

*For the selection screen block for General Information

DATA: v_frgkz TYPE FRGKZ, "for PR Item release status

v_loekz TYPE ELOEK, "for PR ITEM deletion indicator

v_bsart TYPE EBAN-BSART, "for PR Type

v_badat TYPE BADAT, "for PR Creation date

v_banfn TYPE BANFN, "for PR number

v_bnfpo TYPE BNFPO, "for PR Item number

v_statu TYPE BANST, "for PR Item processing status

v_ernam TYPE ERNAM, "for PR Creator

My code is like below:

*Begin of the block 1

SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS: s_frgkz FOR v_frgkz MATCHCODE OBJECT H_T161S, "PR item release status

S_loekz FOR v_loekz NO INTERVALS NO-EXTENSION DEFAULT c_space, "PR item deletion indicator

s_bsart FOR v_bsart, "PR type

s_badat FOR v_badat, "PR creation date

s_banfn FOR v_banfn, "PR number

s_bnfpo FOR v_bnfpo, "PR Item Number

s_statu FOR v_statu, "PR Item processing status

s_ernam FOR v_ernam. "PR Creator

SELECTION-SCREEN END OF BLOCK BLK1.

How to attach F4 help for s_loekz, s_banfn, s_ernam

Kindly guide.

1 ACCEPTED SOLUTION
Read only

former_member404244
Active Contributor
0 Likes
1,065

Hi,

use this command for the three fields

at selection-screen on value-request for s_loekz.

perform get_loekz.

call the FM 'F4INT_TABLE_VALUE_REQUEST'.

similarly for rest two...

in the form get the data from the table and put it in the internal table and then use the FM for F4 help.

Regards,

Nagaraj

7 REPLIES 7
Read only

Former Member
0 Likes
1,065

Hi,

Create a search help in SE11 on the following fields:

ELOEK, BANFN and ERNAM.

it will automatically apply F4 help for the mentioned fields in the above code.

Regards

Rajesh Kumar

Read only

Former Member
0 Likes
1,065

you can use ...

at selection-screen on value-request for s_loekz.

at selection-screen on value-request for s_banfn.

at selection-screen on value-request for s_ernam.

regards,

Siddarth

Read only

former_member404244
Active Contributor
0 Likes
1,066

Hi,

use this command for the three fields

at selection-screen on value-request for s_loekz.

perform get_loekz.

call the FM 'F4INT_TABLE_VALUE_REQUEST'.

similarly for rest two...

in the form get the data from the table and put it in the internal table and then use the FM for F4 help.

Regards,

Nagaraj

Read only

0 Likes
1,065

HI,

PARAMETERS : P_MATNR TYPE MARA_MATNR.


AT SELECTION-SCREEN ON VALUES-REQUEST FOR P_MATNR/

* SELECT THE DATA FROM MARA into table ITAB

call function 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR '
dynprofield = 'P_MATNR '
dynpprog = sy-REPID
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = ITAB
return_tab = return." chk this return table

Read only

Former Member
0 Likes
1,065

Hi,

Use this function module...

F4IF_INT_TABLE_VALUE_REQUEST

Regards

Kiran

Read only

Former Member
0 Likes
1,065

hi,

in order to provide F4 functionality..for select options..programatically..

at selection-screen on value request for s_loekz-low,

at selection-screen on value request for s_loekz-high, since it is a structure with low and high values..

in order to get f4 for both the ranges.. u should use both...

use f4if_int_table_value_request .. to trigger F4 functionality...

Rgds.,

subash

Read only

Former Member
0 Likes
1,065

Hi,

use FM 'f4if_field_value_request'.

pass table name, fieldname and value

at selection-screen on value-request. call the subroutine having the FM

ex:

CALL FUNCTION u2018F4IF_FIELD_VALUE_REQUESTu2019

EXPORTING

tabname = u2018SFLIGHTu2019

fieldname = u2018CARRIDu2019

  • SEARCHHELP = u2018 u2018

  • SHLPPARAM = u2018 u2018

dynpprog = u2018ZDANY_F4_OWN_CALLu2019

dynpnr = u20180100u2032

dynprofield = u2018SFLIGHT-CARRIDu2019

  • STEPL = 0

value = u2018A*u2019 // limits the possible values starting with 'A' only

  • MULTIPLE_CHOICE = u2018 u2018

  • DISPLAY = u2018 u2018

  • SUPPRESS_RECORDLIST = u2018 u2018

  • CALLBACK_PROGRAM = u2018 u2018

  • CALLBACK_FORM = u2018 u2018

  • TABLES

  • RETURN_TAB =

  • EXCEPTIONS

  • FIELD_NOT_FOUND = 1

  • NO_HELP_FOR_FIELD = 2

  • INCONSISTENT_HELP = 3

  • NO_VALUES_FOUND = 4

  • OTHERS = 5

.

IF sy-subrc 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

To control F4 help in a selection screen use the AT SELECTION-SCREEN ON VALUE-REQUEST FOR event. for ranges both the low and high value of the field must have there own ON VALUE-REQUEST

ex;

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_opt-low.

perform ...

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_opt-high.

perform..

Regards,

Mdi.Deeba