Skip to Content
0
Former Member
Jun 11, 2007 at 04:14 AM

input help required for parameter on the selection screen

289 Views

hi all,

i have created two parameters on the selection screen.

1. deptno

2.empname

so my requirement is if i input any deptno then i should get all

the empname corresponding to that deptno in the parameter empname

ie for deptno 10 there should be f4 help for empname.

here i am pasting my code plz check where i am doing wrong--

&----


*& Report ZTEST10

*&

&----


*& Developer

*& Date: &DATE

&----


REPORT ZTEST10.

tables: zemployee1.

parameters: p_deptno like zemployee1-deptno,

p_empnam like zemployee1-empname.

Data: begin of itab occurs 0,

deptno like zemployee1-deptno,

empname like zemployee1-empname,

empno like zemployee1-empno,

end of itab.

At selection-screen on value-request for p_empnam.

select empname

from zemployee1

into corresponding fields of table itab

where deptno = p_deptno.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'empname'

  • PVALKEY = ' '

DYNPPROG = sy-repid

DYNPNR = sy-dynnr

DYNPROFIELD = 'p_empnam'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

  • VALUE_ORG = 'C'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

tables

value_tab = itab

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

I will award ur efforts.

Thanks

sanjeev