Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Need help on - custom F4 help

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

Tags:
Former Member
replied

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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question