2009 Aug 04 8:48 PM
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.
2009 Aug 04 8:55 PM
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
2009 Aug 04 8:51 PM
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®
2009 Aug 04 9:50 PM
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.
2009 Aug 04 9:55 PM
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.
2009 Aug 04 10:08 PM
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®
2009 Aug 04 8:55 PM
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