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

In module pool program search help problem.

Former Member
0 Likes
796

Dear All,

In event Process on value-request(POV).

I want to create search help for one filed suppose MATNR is this filed .Now when i pressing F4 on that field that time only 541 movements type materials on specific date ,vendor and plant should come into that search help.

In short i want to give some condition for that search help and on that logic values or materials should come into search help after pressing F4.

I did like this ,

SELECT * FROM mkpf

INTO TABLE it_mkpf

WHERE budat = date1.

this date1 is from that screen only but value is not coming in that.

how to take that date while pressing f4 on matnr field.

if sy-subrc = '0'.

SELECT matnr FROM mseg

INTO table values_tab

FOR ALL ENTRIES IN it_mkpf

WHERE mblnr = it_mkpf-mblnr

AND mjahr = it_mkpf-mjahr

AND bwart = '541'

AND werks = '5101'

AND lifnr = '10005'.

endif.

From above select query that material i m taking.

but first select query is not executing bcoz of that date1 value is empty.

please give me the ans to come out from this issue.

Thanks & Regards,

Sanket.

4 REPLIES 4
Read only

Sm1tje
Active Contributor
0 Likes
562

You can create your own search help (SE11). when you do so you can also add a search help exit (Function module). In this function module you can add your own logic for selection.

Look at this link for some additional help on search help (exits):

[search help exit|http://help.sap.com/saphelp_nw70/helpdata/EN/cf/21ee52446011d189700000e8322d00/content.htm]

Read only

Former Member
0 Likes
562

Hi Sansket,

Follow this procedure to resolve your problem.

Process on value request.

module xxxxx.

write the code in the module like this.

datef1 = w_datef1(Screen field)

then write your select queries after this statement.

Read only

0 Likes
562

Hi surya,

I per your suggestion i did like this ,

data : date1 like sy-datum.

types : w_date1 type sy-datum.

date1 = w_date1(ztable-date1). "ztable-date1 - is screen field.

but it is giving error "The field "W_DATE1" is unknown, but there is a field with the similar name "DATE1" . . . ."

actually that value is coming after triggering PBO event but i want that value in at time of calling F4 help at that screen filed

suppose on screen the fields like

date : 30.08.2008.

matnr : ( .............F4 ) '".....on this field when i m pressing F4 that time only that above date materials should come as per my first query see my first thread.

thanks,

Sanket.

Read only

Former Member
0 Likes
562

closed