Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error in search help button at selection-screen

Former Member
0 Likes
311

hi all,

i have a small issue.

i have created a seach help button in selection screen .

my code is as bellow.

TYPES: BEGIN OF ty_ZSD_SNID,

KUNNR TYPE KUNNR,

BAREA TYPE WERKS_D,

END OF ty_ZSD_SNID.

DATA : it_z TYPE STANDARD TABLE OF ty_ZSD_SNID.

selection-screen : begin of block b with frame title text-000.

select-options : skunnr for zsd_snid-kunnr.

parameters : pbarea like zsd_snid-barea obligatory.

selection-screen : end of block b.

INITIALIZATION.

SELECT KUNNR BAREA FROM ZSD_SNID INTO TABLE it_z.

SORT it_z BY BAREA KUNNR.

DELETE ADJACENT DUPLICATES FROM it_z COMPARING BAREA KUNNR.

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

IF it_z[] IS NOT INITIAL.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'KUNNR' " data base table field name

  • PVALKEY = ' '

dynpprog = sy-repid " program name

dynpnr = sy-dynnr "screen name

dynprofield = 'SKUNNR-LOW' " layot field name

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

value_org = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

value_tab = it_z[] " internal talble name

  • FIELD_TAB =

  • RETURN_TAB =

  • DYNPFLD_MAPPING =

  • 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.

ENDIF.

ELSE.

MESSAGE E000(zsdsn).

ENDIF.

***********************************

my issue is , its working properly if records are there in my z table.

if no records are there in the table then if i do comment the last message statement then its working.

if i do uncomment like the above code, then its dumming.

what i should i do ??

kind regards

1 REPLY 1
Read only

Former Member
0 Likes
271

closed because of no answer.