Skip to Content
0
Former Member
Mar 23, 2009 at 10:36 AM

F4 Help on one field should populate data on another field

3954 Views

Dear All....

I am using the FM - F4IF_INT_TABLE_VALUE_REQUEST for F4 help on one field of the selection screen. Based on the selected value, a values corresponding to it should appear on another field.

My Code -

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_svn.

SELECT qmnum serialnr

INTO TABLE t_qmel

FROM qmel

WHERE qmart = 'ZD'.

SORT t_qmel BY qmnum.

  • Display the f4 Help Values for SVN

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'QMNUM'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'P_SVN'

window_title = text-015

value_org = 'S'

TABLES

value_tab = t_qmel

return_tab = t_retval.

READ TABLE t_retval INTO w_retval_wa INDEX 1.

IF sy-subrc = 0.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = w_retval_wa-fieldval

IMPORTING

output = w_qmel_wa-qmnum.

w_retval_wa-fieldval = w_qmel_wa-qmnum.

READ TABLE t_qmel INTO w_qmel_wa WITH KEY qmnum = w_retval_wa-fieldval

BINARY SEARCH.

IF sy-subrc = 0.

p_esn = w_qmel_wa-serialnr.

ENDIF.

ENDIF.

But this is however not working.

Please let me know where I am going wrong.

I have serached SDN thoroghly but could not get my solution.

Please guide me....

Regards,

Pankaj Agarwal.