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: 

Need help on - custom F4 help

Former Member
0 Kudos

Requirement :

Suppose I have 3 I/O screen fields :

<b>FIle_name</b> <b>Description</b> <b>File_Grp </b>

The custom F4 help is provided only on <b>File_name</b> using 'F4IF_INT_TABLE_VALUE_REQUEST'. The F4 pops up as required which again has some additional fields with file_name.

The F4 help looks likw this

<b> Sr No File_name Description File_Grp Default</b>

1 AAA AAA-Desc A1 X

2 BBB BBB-Desc B1

Now if i select the 2nd row, the screen fields should fill up like this

<b>FIle_name</b> : BBB <b>Description</b> : BBB-Desc <b>File_Grp</b> :B1

Thanks

SMS

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Check this sample code

the custom F4 help provided, returns the material group of the material selected to the selection screen parameter <b>P_MATKL</b>

REPORT ZYH284_TEST1.

parameters:

p_matnr type mara-matnr,

p_matKl type mara-matkl.

data:

begin of itab occurs 0,

matnr type mara-matnr,

matkl type mara-matkl,

end of itab,

t_ret_tab LIKE STANDARD TABLE OF DDSHRETVAL,

t_dyn_map LIKE STANDARD TABLE OF DSELC,

fs_ret_tab TYPE DDSHRETVAL,

fs_dyn_map TYPE DSELC,

w_repid type sy-repid,

w_dynnr TYPE sy-dynnr.

at selection-screen on value-request for p_matnr.

select matnr

matkl

from mara

into table itab

up to 10 rows.

fs_dyn_map-fldname = 'F0002'.

fs_dyn_map-dyfldname = 'P_MATKL'.

APPEND fs_dyn_map TO t_dyn_map.

w_repid = sy-repid.

w_dynnr = sy-dynnr.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'MATNR'

  • PVALKEY = ' '

DYNPPROG = w_repid

DYNPNR = w_dynnr

DYNPROFIELD = 'P_MATNR'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

tables

value_tab = itab

  • FIELD_TAB =

RETURN_TAB = t_ret_tab

DYNPFLD_MAPPING = t_dyn_map

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

4 REPLIES 4

Former Member
0 Kudos

Hi Sabu,

U need to create a search help for such a thing.

Go to se11 and create the search help.

thank you.

Former Member
0 Kudos

u can use the parameter <b>DYNPFLD_MAPPING</b> of the FM F4IF_INT_TABLE_VALUE_REQUEST to achieve ur requirement

Former Member
0 Kudos

Hi Sabu,

You should press the ENTER key.

SAP has PARAM ID which is a global variable.

You need to input some data in it (by pressing the ENTER button), so that you can get it in the search help.

Have you tried ticking the "Get Parameter" in the dialog? This should solve your problem.

If you want the search help will automatically get the data without pressing the ENTER button, it is a different story.

Hope this helps.

Benedict.

Message was edited by:

benedict choa

Former Member
0 Kudos

Check this sample code

the custom F4 help provided, returns the material group of the material selected to the selection screen parameter <b>P_MATKL</b>

REPORT ZYH284_TEST1.

parameters:

p_matnr type mara-matnr,

p_matKl type mara-matkl.

data:

begin of itab occurs 0,

matnr type mara-matnr,

matkl type mara-matkl,

end of itab,

t_ret_tab LIKE STANDARD TABLE OF DDSHRETVAL,

t_dyn_map LIKE STANDARD TABLE OF DSELC,

fs_ret_tab TYPE DDSHRETVAL,

fs_dyn_map TYPE DSELC,

w_repid type sy-repid,

w_dynnr TYPE sy-dynnr.

at selection-screen on value-request for p_matnr.

select matnr

matkl

from mara

into table itab

up to 10 rows.

fs_dyn_map-fldname = 'F0002'.

fs_dyn_map-dyfldname = 'P_MATKL'.

APPEND fs_dyn_map TO t_dyn_map.

w_repid = sy-repid.

w_dynnr = sy-dynnr.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'MATNR'

  • PVALKEY = ' '

DYNPPROG = w_repid

DYNPNR = w_dynnr

DYNPROFIELD = 'P_MATNR'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

tables

value_tab = itab

  • FIELD_TAB =

RETURN_TAB = t_ret_tab

DYNPFLD_MAPPING = t_dyn_map

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