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: 

adding f4-help to selection screen parameter field

Former Member
0 Kudos

Hi all.

I need to add search help to a parameter field on selection screen:

PARAMETERS:

p_reciv LIKE soos7-recnam.

What is the easiest way?

tia, regards

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

goto SE11

1.give youe new searchhelp name "ant_name" and Enter.

2.select the radio button elementary search help

3.give short description

4.In defenition tab -->data collection --> click the button search for data base /views tables ,.. for eg take MARA.

5.no below parameters..

1st row press F4--> matnr check the IMP EXP and give the number1 in Lpos

2 --> netweight --> chech IMP, EXP and give number 2...

Save.

Then

PARAMETERS:

p_reciv LIKE soos7-recnam matchcode object "Search_help".

Thanks.

Reward If Helpful.

6 REPLIES 6

Former Member
0 Kudos

Hi,

goto SE11

1.give youe new searchhelp name "ant_name" and Enter.

2.select the radio button elementary search help

3.give short description

4.In defenition tab -->data collection --> click the button search for data base /views tables ,.. for eg take MARA.

5.no below parameters..

1st row press F4--> matnr check the IMP EXP and give the number1 in Lpos

2 --> netweight --> chech IMP, EXP and give number 2...

Save.

Then

PARAMETERS:

p_reciv LIKE soos7-recnam matchcode object "Search_help".

Thanks.

Reward If Helpful.

Former Member
0 Kudos

HI,

do like this.

PARAMETERS:i_matnr type mara-matnr.

data:BEGIN OF itab OCCURS 0,

matnr type mara-matnr,

END OF itab.

AT SELECTION-SCREEN on VALUE-REQUEST FOR i_matnr.

refresh itab.

SELECT * from mara into CORRESPONDING FIELDS OF TABLE itab.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'MATNR'

DYNPROFIELD = 'I_MATNR'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = itab.

rgds,

bharat.

Former Member
0 Kudos

Hi,

You can provide F4 help for the parameter, by including the following statements

in the AT SELECTION-SCREEN event :-

AT SELECTION-SCREEN ON VALUE-REQUEST FOR (screen-parameter).

PERFORM F4help.

-


-


Form F4Help.

*Call the FM - F4IF_INT_TABLE_VALUE_REQUEST

*pass the foll parameters in FM :-

*EXPORT

*retfield = (field that is supposed to get populated on screen).

*dynpprog =sy-repid

*dynpnr = sy-dynnr

*dynprofield = screen-fieldname

*stepl = 0

*value_org = 'S'

*callback_program = sy-repid

*TABLES

value_tab = ( an internal table containing the values to appear on F4 help ).

This should make your F4 help.

endform.

Former Member
0 Kudos

declare as below,

parameters : p_recnam type SO_ESCAPE.

Regards,

Ramakrishna kotha.

Former Member
0 Kudos

You can give F4 help by two ways:

1. Using internal table

2. Refering db table field.

Following are e.gs:

F4 help – using internal table example:

DATA: BEGIN OF LI_FABGRP OCCURS 0,

FABGRP LIKE ZAPO_FABGRP-FABGRP,

BEGDA LIKE ZAPO_FABGRP-BEGDA,

END OF LI_FABGRP.

DATA : T_RETURN TYPE STANDARD TABLE OF DDSHRETVAL WITH HEADER LINE,

L_RETFIELD TYPE DFIES-FIELDNAME.

parameters : S_FABGR like ZAPO_FABGRP-FABGRP.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_FABGR.

SELECT FABGRP BEGDA FROM ZAPO_FABGRP INTO table LI_FABGRP.

SORT LI_FABGRP BY FABGRP ASCENDING BEGDA DESCENDING.

  • Henter de mulige fabriksgrupper med nyeste BEGDA *indenfor hver

DELETE ADJACENT DUPLICATES FROM LI_FABGRP COMPARING FABGRP.

L_RETFIELD = 'FABGRP'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = L_RETFIELD

DYNPPROG = SY-REPID

DYNPNR = '1000'

DYNPROFIELD = 'S_FABGR'

VALUE_ORG = 'S'

MULTIPLE_CHOICE = ' '

TABLES

VALUE_TAB = LI_FABGRP

RETURN_TAB = T_RETURN

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

F4 help – using field example:

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_FABGR.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = mara

fieldname = matnr

  • SEARCHHELP = ' '

  • SHLPPARAM = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • VALUE = ' '

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • SUPPRESS_RECORDLIST = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • SELECTION_SCREEN = ' '

  • IMPORTING

  • USER_RESET =

  • TABLES

  • RETURN_TAB =

  • EXCEPTIONS

  • FIELD_NOT_FOUND = 1

  • NO_HELP_FOR_FIELD = 2

  • INCONSISTENT_HELP = 3

  • NO_VALUES_FOUND = 4

  • OTHERS = 5

.

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

Select-options: s_rcode FOR g_grund . "Reason code

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

  • Validation for Reasoncode

PERFORM sub_get_F4_rcodehelp .

FORM sub_get_f4_rcodehelp .

  • STRUCTURES Declarations

TYPES: BEGIN OF ty_rcode ,

grund TYPE mb_grbew,

grtxt TYPE grtxt,

END OF ty_rcode.

*Internal Table declaration

DATA : li_rcode TYPE STANDARD TABLE OF ty_rcode WITH HEADER LINE.

SELECT grund grtxt

INTO TABLE li_rcode

FROM t157e

WHERE spras = sy-langu .

*Help functions for external use

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'fieldname'

dynpprog = 'programname

dynpnr = '1000'

dynprofield = 'S_PCODE'

value_org = 'S'

TABLES

value_tab = li_rcode

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.

ENDFORM. " sub_get_F4_rcodehelp

Former Member
0 Kudos

Hi

you can do like this , with this you can control the F4 help what ever values you want

TYPES : BEGIN OF ST_OBJID_SH,

OTYPE TYPE HRP1000-OTYPE,

OBJID TYPE HRP1000-OBJID,

END OF ST_OBJID_SH.

DATA : IT_OBJID_SH TYPE STANDARD TABLE OF ST_OBJID_SH.

DATA : WA_OBJID_SH TYPE ST_OBJID_SH.

***********SELECTION SCREEN DESIGN***********************

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

*SELECT-OPTIONS : S_OTYPE FOR HRP1001-OTYPE NO INTERVALS .

SELECT-OPTIONS : S_OBJID FOR HRP1001-OBJID NO INTERVALS .

SELECT-OPTIONS : DATE FOR SY-DATUM NO-EXTENSION OBLIGATORY.

SELECTION-SCREEN END OF BLOCK B1.

**********END OF SELECTION SCREEN DESIGN*****************

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

  • IF S_OBJID IS NOT INITIAL.

SELECT OTYPE OBJID FROM HRP1000

INTO TABLE IT_OBJID_SH

WHERE OTYPE = 'D'.

IF SY-SUBRC EQ 0.

  • SEARCH HELP FOR QUALIFICATION.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

RETFIELD = 'OBJID'

  • PVALKEY = ' '

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'S_OBJID'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

VALUE_TAB = IT_OBJID_SH

  • FIELD_TAB =

  • RETURN_TAB = RETURN_TAB

  • DYNPFLD_MAPPING =

  • 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.

ENDIF.

.

<b>Reward if usefull</b>