Skip to Content

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

selection - screen

Hi,

I have two list boxes(drop down fields) on the selection-screen.

Based on the input given in the first field, the input help for the 2nd field has to be changed. (Without pressing any other key)

How it is done.

Tags:
replied

Hi Charan,

Here is the sample :

PARAMETERS : p_carrid TYPE spfli-carrid

AS LISTBOX VISIBLE LENGTH 20 USER-COMMAND onli .

PARAMETERS : p_connid TYPE spfli-connid

AS LISTBOX VISIBLE LENGTH 20 .

data : begin of itab occurs 0,

connid type spfli-connid,

end of itab.

data : i_dynp type table of DYNPREAD with header line.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_connid.

i_dynp-fieldname = 'P_CARRID'.

APPEND i_dynp.

CLEAR i_dynp.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = sy-repid

dynumb = sy-dynnr

TABLES

dynpfields = i_dynp.

READ TABLE i_dynp WITH KEY fieldname = 'P_CARRID'.

IF sy-subrc IS INITIAL.

MOVE : i_dynp-fieldvalue TO p_carrid.

ENDIF.

SELECT connid

FROM spfli

INTO TABLE itab

WHERE carrid EQ p_carrid.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'CONNID'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'P_CONNID'

value_org = 'S'

TABLES

value_tab = itab.

Try it out, It will work.

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