Application Development 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: 

input help required for parameter on the selection screen

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

try to remove field name from the quotes or even if you use then the value parameter name should be in CAPS.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'empname'

  • PVALKEY = ' '

DYNPPROG = sy-repid

DYNPNR = sy-dynnr

DYNPROFIELD = P_EMPNAM

reward points if helpful

6 REPLIES 6

Former Member
0 Kudos

just create search help in se11 and attach search help in data element level.

Former Member
0 Kudos

Hi,

you have to do two things..Call then function module DYNP_VALUES_READ to get the parameter value..

Then give the parameter name in caps..

Changes marked in bold..

At selection-screen on value-request for p_empnam.

<b>************

    • Call the function module DYNP_VALUES_READ FM to get the value of the

    • parameter P_DEPTNO

************</b>

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 = <b>'P_EMPNAM'</b>

Thanks,

Naren

Former Member
0 Kudos

hi

good

i could not able to understand why you have been used the F4IF_INT_TABLE_VALUE_REQUEST here,bcz below is the description of the function module and i dont thing it suits for your requirement.

Plz check the requ again and develop the report,its not much tough to do and you can do it.

F4IF_INT_TABLE_VALUE_REQUEST

This function module displays a value list that you created in an ABAP program. The value list is passed to the function module as the table parameter VALUE_TAB. If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the user’s selection is returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.

thanks

mrutyun^

Former Member
0 Kudos

Hi Sanjeev,

If you input any deptno and you should get all the empname corresponding then first you need to use CALL FUNCTION 'DYNP_VALUES_READ'.

EXPORTING

DYNAME = sy-repid

DYNUMB = sy-dynnr

  • TRANSLATE_TO_UPPER = ' '

REQUEST = 'A'

  • PERFORM_CONVERSION_EXITS = ' '

  • PERFORM_INPUT_CONVERSION = ' '

  • DETERMINE_LOOP_INDEX = ' '

TABLES

DYNPFIELDS = gt_dynp

declare: DATA : gt_dynp LIKE dynpread OCCURS 0.

loop at gt_dynp into wt_dynp where fieldname = 'P_SUPRID-LOW'.

lv_low = wt_dynp-fieldvalue.

endloop.

Then while selecting use this p_superid-low instead of p_deptno.

Then :

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

After this funtion module:

write:

IF sy-subrc = 0.

READ TABLE itab

INDEX 1.

'p_empnam' = return_tab-fieldval.

Declare return_tab as:

DATA: return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.

Thanks,

Shweta

ENDIF.

Former Member
0 Kudos

try to remove field name from the quotes or even if you use then the value parameter name should be in CAPS.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'empname'

  • PVALKEY = ' '

DYNPPROG = sy-repid

DYNPNR = sy-dynnr

DYNPROFIELD = P_EMPNAM

reward points if helpful

Former Member
0 Kudos

Hi Sanjeev,

Try removing the where condition from you select statement and Use your table in exporting paratmeter - <b>DDIC_structure</b> in the Call function. Also Make sure that all the field value you mentioned is in CAPS.

Reward points if this helps you.

Thanks!.

Regards,

Ram