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

get values from selection screen

Former Member
0 Likes
801

Hi,

For one parameter, I have added 'F4' help. Means when u will press F4 on selection screen for that parameter it will show

values in drop down box. I wrote logic till this.

But my question is, how to store these values in itab for processing. As I want to compare all values in drop down box.

Appreciate your help.

1 ACCEPTED SOLUTION
Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
772

Hi,

Say you have a field matnr for which you have a F4 help.

When you select one value it will be stored into the parameter say p_matnr.

So use:-


  SORT it_matnr BY matnr.
  READ TABLE it_matnr WITH KEY matnr = p_matnr BINARY SEARCH.
  IF sy-subrc NE 0.
    "error message (invalid material, select a naterial using F4 help)
  ENDIF.

Hope this helps you.

Regards,

Tarun

5 REPLIES 5
Read only

former_member194669
Active Contributor
0 Likes
772

Find out the table behind the search help , then select values from that table into an internal table say itab

then


read table itab with key matnr = < your screen field>
if sy-subrc ne 0.
   message e002.  
endif.

a®

Read only

0 Likes
772

Thanks for reply.

Can you please explain how to do

' Find out the table behind the search help , then select values from that table into an internal table say itab'

Thanks.

Read only

0 Likes
772

u goto find out the composite or elementary search help and open the search help in se11 and look for the selection method.... it would be either a view or a database table or a search help exit....

so get data from that tables u might have to write ur own code... or use the same logic as in search help exit in ur code to get the values to ur Itab.

Read only

0 Likes
772

You can find this thru SE11 > select search help and type your search help name> display --> in the defintion tab you can find the table or view behind search help

a®

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
773

Hi,

Say you have a field matnr for which you have a F4 help.

When you select one value it will be stored into the parameter say p_matnr.

So use:-


  SORT it_matnr BY matnr.
  READ TABLE it_matnr WITH KEY matnr = p_matnr BINARY SEARCH.
  IF sy-subrc NE 0.
    "error message (invalid material, select a naterial using F4 help)
  ENDIF.

Hope this helps you.

Regards,

Tarun