Skip to Content

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

select-options

Hi all,

the following code is for Parameters on selection screen i need to make it for

select options...

DATA:BEGIN OF itab OCCURS 0,

ltx LIKE t247-ltx,

END OF itab.

SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS : p_month TYPE d obligatory."char10 OBLIGATORY.

PARAMETERS:p_year TYPE char4 OBLIGATORY.

SELECTION-SCREEN:END OF BLOCK b1.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_month.

SELECT * FROM t247 INTO CORRESPONDING FIELDS OF TABLE itab WHERE spras = 'EN'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'P_MONTH'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'P_MONTH'

value_org = 'S'

display = 'F'

TABLES

value_tab = itab

Regards

Suprith

Tags:
Former Member
Former Member replied

DATA:BEGIN OF itab OCCURS 0,

ltx LIKE t247-ltx,

END OF itab.

SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

select-options : s_month TYPE d obligatory."char10 OBLIGATORY.

PARAMETERS:p_year TYPE char4 OBLIGATORY.

SELECTION-SCREEN:END OF BLOCK b1.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_month-low.

SELECT * FROM t247 INTO CORRESPONDING FIELDS OF TABLE itab WHERE spras = 'EN'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 's_MONTH-low'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 's_MONTH-low'

value_org = 'S'

display = 'F'

TABLES

value_tab = itab

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_month-high.

SELECT * FROM t247 INTO CORRESPONDING FIELDS OF TABLE itab WHERE spras = 'EN'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 's_MONTH-high'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 's_MONTH-high'

value_org = 'S'

display = 'F'

TABLES

value_tab = itab

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question