Skip to Content
0
Jun 12, 2008 at 07:30 AM

F4 help through internal table.

1716 Views

Hi Experts,

I have a small doubt regarding F4 help through internal table.

I am not getting the value of P_MATNR-LOW on the selection screen. Can anyone please let me know what wrong when passing ITAB_SELECTED_MATNR-FIELDVAL to P_MATNR.

When debugging it I get value for ITAB_SELECTED_MATNR-FIELDVAL and also it in P_MATNR-LOW, but wen the screen appears it shows blank value for P_MATNR-LOW.

select-options p_matnr FOR ZZZ_STOCKTYPE-STOCKTYP .

data : BEGIN OF GT_VALUETAB OCCURS 0,

F1 type char30,

END OF GT_VALUETAB.

DATA: ITAB_SELECTED_MATNR TYPE DDSHRETVAL OCCURS 0 WITH HEADER LINE.

initialization.

do 20 times.

move sy-index to GT_VALUETAB.

append GT_VALUETAB.

enddo.

at selection-screen on value-request for p_matnr-LOW.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'F1'

value_org = 'S'

TABLES

VALUE_TAB = GT_VALUETAB

return_tab = ITAB_SELECTED_MATNR

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

IF SY-SUBRC eq 0.

READ TABLE ITAB_SELECTED_MATNR INDEX 1.

MOVE ITAB_SELECTED_MATNR-FIELDVAL TO P_MATNR-LOW .

ENDIF.