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

search help for default value

Former Member
0 Likes
757

Hi all..

I doing a dialog program. I need to have a search help in my input field. How can i do it?

I want to have 3 default value in the search help.

example: apple, orange, pear.

How to retrieve it?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
732

hi,

u can make drop down list

declare that field as list box... ( in attribute )

then write this after PAI in screen flow logic...

PROCESS ON VALUE-REQUEST.

FIELD ifmtp-form_type MODULE fm_drop.

MODULE fm_drop INPUT.

CLEAR ifmtp.

REFRESH ifmtp.

ifmtp-form_type = 'C'.

APPEND ifmtp.

ifmtp-form_type = 'F'.

APPEND ifmtp.

ifmtp-form_type = 'H'.

APPEND ifmtp.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'FORM_TYPE'

value_org = 'S'

TABLES

value_tab = ifmtp.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDMODULE. " fm_drop INPUT

here ifmtp-form_type is my field of screen which i have declared as list box...

and u have to declare one internal table with this field in TOP Module...

DATA : BEGIN OF ifmtp OCCURS 0,

form_type LIKE zform_track_mast-form_type,

END OF ifmtp.

reward if usefull....

Edited by: Dhwani shah on Jan 22, 2008 11:58 AM

7 REPLIES 7
Read only

Former Member
0 Likes
733

hi,

u can make drop down list

declare that field as list box... ( in attribute )

then write this after PAI in screen flow logic...

PROCESS ON VALUE-REQUEST.

FIELD ifmtp-form_type MODULE fm_drop.

MODULE fm_drop INPUT.

CLEAR ifmtp.

REFRESH ifmtp.

ifmtp-form_type = 'C'.

APPEND ifmtp.

ifmtp-form_type = 'F'.

APPEND ifmtp.

ifmtp-form_type = 'H'.

APPEND ifmtp.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'FORM_TYPE'

value_org = 'S'

TABLES

value_tab = ifmtp.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDMODULE. " fm_drop INPUT

here ifmtp-form_type is my field of screen which i have declared as list box...

and u have to declare one internal table with this field in TOP Module...

DATA : BEGIN OF ifmtp OCCURS 0,

form_type LIKE zform_track_mast-form_type,

END OF ifmtp.

reward if usefull....

Edited by: Dhwani shah on Jan 22, 2008 11:58 AM

Read only

0 Likes
732

declare that field as list box... ( in attribute )? do i need to do extra code to populate the value out in the dropdown list?

Read only

0 Likes
732

hi,

double click on that I/O field..., Its attribute window will open.. in that third property is there..

DROPDOWN--->LISTBOX

select this.....

Read only

0 Likes
732

thks i will try it tml as i am already offline. Reward if it solve . thk

Read only

0 Likes
732

i try the method. But it since there is no value in the search help. It populate the search help with no value.

What is the cause?

Read only

0 Likes
732

thank i hav solve it .....

Read only

Former Member
0 Likes
732

hi,

go through the

DEMO_DYNPRO_F4_HELP_DYNPRO

prog. it will help you.

thanks

Dharmishta