Skip to Content
0
Former Member
Nov 09, 2007 at 02:50 PM

Problem in giving F4 help for a field on a screen

114 Views

Hi Experts,

I have a problem in giving F4 help for a field on a screen.

I am using the FM 'F4IF_INT_TABLE_VALUE_REQUEST' in POV.

The problem is when calling the F4, the F4 dialog box is not called immediately.but it passesthrough all the other opened sap screens. I have to suppress this and the dialog box has to be called immediately.

Here with I am pasting my code.

Please suggest what will be the problem.

TYPES : BEGIN OF t_dokar,

dokar TYPE dokar,

description TYPE dartxt,

END OF t_dokar.

DATA : li_dokar TYPE STANDARD TABLE OF t_dokar,

li_fields_tab TYPE STANDARD TABLE OF dfies,

lw_repid TYPE sy-repid,

lw_dynnr TYPE sy-dynnr,

ls_fields_tab TYPE dfies,

ls_dokar TYPE t_dokar.

lw_repid = sy-cprog.

lw_dynnr = sy-dynnr.

SELECT dokar

dartxt

FROM tdwat

INTO TABLE li_dokar

WHERE cvlang EQ sy-langu

AND dokar IN (k_wse, k_wsm).

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'DOKAR'

dynpprog = lw_repid

dynpnr = lw_dynnr

value_org = 'S'

TABLES

value_tab = li_dokar

return_tab = gi_return_tab.

IF NOT gi_return_tab[] IS INITIAL.

LOOP AT gi_return_tab INTO gs_return_tab

WHERE fieldname = k_f0001.

gw_dokar = gs_return_tab-fieldval.

ENDLOOP.

ENDIF.

SELECT doknr

dokar

FROM draw

INTO TABLE gi_draw

WHERE dokar = gw_dokar.

IF sy-dbcnt NE 0.

SORT gi_draw BY doknr dokar.

SELECT doknr

dokar

dktxt FROM drat INTO TABLE gi_draw_f4

FOR ALL ENTRIES IN gi_draw

WHERE doknr = gi_draw-doknr

AND dokar = gi_draw-dokar

AND langu = sy-langu.

IF sy-dbcnt NE 0.

SORT gi_draw_f4 BY doknr dokar.

CLEAR gi_return_tab[].

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'DOKNR'

dynpprog = lw_repid

dynpnr = lw_dynnr

dynprofield = 'GW_VALUE_WS_NO'

value_org = k_s

TABLES

value_tab = gi_draw_f4

return_tab = gi_return_tab.

IF NOT gi_return_tab[] IS INITIAL.

LOOP AT gi_return_tab INTO gs_return_tab

WHERE fieldname = k_f0001.

gs_ws_header-worksheet = gs_return_tab-fieldval.

ENDLOOP.

ENDIF.

ENDIF.

ENDIF.

Thanks in advance