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

matchocodes

Former Member
0 Likes
534

can i create matchcodes in a textbox in the dynpro screen?

thanks.

donna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
513

Den,

Hello! Musta na? You can create a search help object in SE11 (data dictionary). Or you can do it programatically by invoking FM 'F4IF_INT_TABLE_VALUE_REQUEST' under POV (Process on value request).

For Example:

1. On your screen flow logic(the main source code of your screen), insert this line of code:

PROCESS ON VALUE-REQUEST.

Field txt_field module help_text_field.

2. In your module code help_text_field, insert the following code:

module help_text_field input.

perform help_text_field using sy-repid sy-dynnr.

end module.

3. In the routine help_text_field, insert the following code:

a. declare internal table for l_doc_types(your value table):

Data: begin of l_doc_types occurs 0,

auart like vbak-auart,

bezei like tvakt-bezei,

end of l_doc_types.

b. declare internal table for return_tab (your return table):

Data: return_tab type table of ddshretval.

Data: wa_return_tab type ddshretval.

b. use this FM:

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = <string, value for your return field. e.g. 'V_MATNR'>

dynpprog = <your current program>

dynpnr = <your current screen>

dynprofield = <value for you screen field

e.g. 'MARA-MATNR', 'V_MATNR'>

value_org = 'S'

multiple_choice = <' ' or 'X'>

tables

value_tab = l_doc_types

return_tab = return_tab

exceptions

parameter_error = 1

no_values_found = 2

others = 3.

    • to get the value

Loop at return_tab into wa_return_tab.

<variable> = wa_return_tab-fieldval.

endloop.

Happy Coding!

4 REPLIES 4
Read only

Former Member
0 Likes
513

Hi

Matchcodes can be created in SE11 for dictonary tables.

Now matchcodes are replaced by search helps.

You can create search help in SE11 and then attach it to an input / output field in screen attribute PARAM Id.

However you cannot attach it to Text fields. texts fields are kind of static and will have the value which is passed by the ABAP program in the variable of same name.

Cheers.

Read only

Former Member
0 Likes
514

Den,

Hello! Musta na? You can create a search help object in SE11 (data dictionary). Or you can do it programatically by invoking FM 'F4IF_INT_TABLE_VALUE_REQUEST' under POV (Process on value request).

For Example:

1. On your screen flow logic(the main source code of your screen), insert this line of code:

PROCESS ON VALUE-REQUEST.

Field txt_field module help_text_field.

2. In your module code help_text_field, insert the following code:

module help_text_field input.

perform help_text_field using sy-repid sy-dynnr.

end module.

3. In the routine help_text_field, insert the following code:

a. declare internal table for l_doc_types(your value table):

Data: begin of l_doc_types occurs 0,

auart like vbak-auart,

bezei like tvakt-bezei,

end of l_doc_types.

b. declare internal table for return_tab (your return table):

Data: return_tab type table of ddshretval.

Data: wa_return_tab type ddshretval.

b. use this FM:

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = <string, value for your return field. e.g. 'V_MATNR'>

dynpprog = <your current program>

dynpnr = <your current screen>

dynprofield = <value for you screen field

e.g. 'MARA-MATNR', 'V_MATNR'>

value_org = 'S'

multiple_choice = <' ' or 'X'>

tables

value_tab = l_doc_types

return_tab = return_tab

exceptions

parameter_error = 1

no_values_found = 2

others = 3.

    • to get the value

Loop at return_tab into wa_return_tab.

<variable> = wa_return_tab-fieldval.

endloop.

Happy Coding!

Read only

0 Likes
513

jeff,

can i ask for a sample code for perform help_text_field using sy-repid sy-dynnr.

thanks.

Read only

0 Likes
513

Hi Donna,

Jeff already gave you the code. If you read his post, he asked you to write the routine code as explained in step 3.

Srinivas