Skip to Content

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

F Help is not properly working on select-options

Hi All,

I have created search help on select-options

but when i am entering value with help of search help

it shows the error lower limit is greater than uper limit.

but some time it is not showing any problem but based on these value it is not fetching data from ztable.

Please help me as soon as possible

The code i have written for search help is given below

&----


*& Include ZQMR_GARDE_SELECTION_SCREEN

&----


SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS : S_SL_NO FOR ZGRADE_CHEMISTRY-SL_NO OBLIGATORY,

S_GL_GRD FOR ZGRADE_CHEMISTRY-GLS_GRADE ,

S_GRADE FOR ZGRADE_CHEMISTRY-GRADE ,

S_CUST FOR ZGRADE_CHEMISTRY-CUSTOMER ,

S_COLOR FOR ZGRADE_CHEMISTRY-COLOR_CODE ,

s_RANGE FOR ZGRADE_CHEMISTRY-RANGE .

SELECTION-SCREEN END OF BLOCK B1 .

AT SELECTION-SCREEN on VALUE-REQUEST FOR S_SL_NO-low.

select sl_no GLS_GRADE GRADE CUSTOMER COLOR_CODE RANGE FROM ZGRADE_CHEMISTRY

INTO CORRESPONDING FIELDS OF TABLE it_f4 .

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'SL_NO'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'IT_F4'

value_org = 'S'

TABLES

value_tab = it_F4[]

return_tab = return_values

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE .

S_SL_NO = return_values-fieldval.

ENDIF.

ELSE.

MESSAGE E004 .

ENDIF.

AT SELECTION-SCREEN on VALUE-REQUEST FOR S_SL_NO-high.

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'SL_NO'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'IT_F4'

value_org = 'S'

TABLES

value_tab = it_F4[]

return_tab = return_values

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE .

S_SL_NO = return_values-fieldval.

ENDIF.

ELSE.

MESSAGE E004 .

ENDIF.

AT SELECTION-SCREEN on VALUE-REQUEST FOR S_GL_GRD-low.

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'GLS_GRADE'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'IT_F4'

value_org = 'S'

TABLES

value_tab = it_F4[]

return_tab = return_values

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE .

S_GL_GRD = return_values-fieldval.

ENDIF.

ELSE.

MESSAGE E004 .

ENDIF.

AT SELECTION-SCREEN on VALUE-REQUEST FOR S_GL_GRD-high.

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'GLS_GRADE'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'IT_F4'

value_org = 'S'

TABLES

value_tab = it_F4[]

return_tab = return_values

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE .

S_GL_GRD = return_values-fieldval.

ENDIF.

ELSE.

MESSAGE E004 .

ENDIF.

AT SELECTION-SCREEN on VALUE-REQUEST FOR S_GRADE-low.

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'GRADE'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'IT_F4'

value_org = 'S'

TABLES

value_tab = it_F4[]

return_tab = return_values

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE .

S_GRADE = return_values-fieldval.

ENDIF.

ELSE.

MESSAGE E004 .

ENDIF.

AT SELECTION-SCREEN on VALUE-REQUEST FOR S_GRADE-high.

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'GRADE'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'IT_F4'

value_org = 'S'

TABLES

value_tab = it_F4[]

return_tab = return_values

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE .

S_GRADE = return_values-fieldval.

ENDIF.

ELSE.

MESSAGE E004 .

ENDIF.

AT SELECTION-SCREEN on VALUE-REQUEST FOR S_CUST-low.

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'CUSTOMER'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'IT_F4'

value_org = 'S'

TABLES

value_tab = it_F4[]

return_tab = return_values

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE .

S_CUST = return_values-fieldval.

ENDIF.

ELSE.

MESSAGE E004 .

ENDIF.

AT SELECTION-SCREEN on VALUE-REQUEST FOR S_CUST-high.

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'CUSTOMER'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'IT_F4'

value_org = 'S'

TABLES

value_tab = it_F4[]

return_tab = return_values

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE .

S_CUST = return_values-fieldval.

ENDIF.

ELSE.

MESSAGE E004 .

ENDIF.

AT SELECTION-SCREEN on VALUE-REQUEST FOR S_COLOR-low.

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'COLOR_CODE'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'IT_F4'

value_org = 'S'

TABLES

value_tab = it_F4[]

return_tab = return_values

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE .

S_COLOR = return_values-fieldval.

ENDIF.

ELSE.

MESSAGE E004 .

ENDIF.

AT SELECTION-SCREEN on VALUE-REQUEST FOR S_COLOR-high.

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'COLOR_CODE'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'IT_F4'

value_org = 'S'

TABLES

value_tab = it_F4[]

return_tab = return_values

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE .

S_COLOR = return_values-fieldval.

ENDIF.

ELSE.

MESSAGE E004 .

ENDIF.

AT SELECTION-SCREEN on VALUE-REQUEST FOR s_RANGE-low.

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'RANGE'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'IT_F4'

value_org = 'S'

TABLES

value_tab = it_F4[]

return_tab = return_values

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE .

s_RANGE = return_values-fieldval.

ENDIF.

ELSE.

MESSAGE E004 .

ENDIF.

AT SELECTION-SCREEN on VALUE-REQUEST FOR s_RANGE-high.

IF sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'RANGE'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'IT_F4'

value_org = 'S'

TABLES

value_tab = it_F4[]

return_tab = return_values

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE .

s_RANGE = return_values-fieldval.

ENDIF.

ELSE.

MESSAGE E004 .

ENDIF.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question