Application Development 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: 

Restricted F4 help required

Former Member
0 Kudos
724

Hi,

I have a field AUFK-AUFNR (Order) in my dialog program.

I wanted the F4 help for this field based on the order type(AUART).Means when user press F4 help it should display orders for order type 'PP01'(Just Example).

Please let me know how can I get it.

Thanks

12 REPLIES 12

Vinod_Chandran
Active Contributor
0 Kudos
383

You can do this by using search help exit. Goto the search help of this field in SE11 and you can find a field for exit. You can get all the documentation of this by pressing F1 on that field.

Thanks

Vinod

athavanraja
Active Contributor
0 Kudos
383

on value request you can code your own custom logic to get F4 using FM <b>F4_IF_FIELD_VALUE_REQUEST</b>

check out the links below

Regards

Raja

0 Kudos
383

But I need help from the select statement.

Select aufnr from AUFK where AUART = 'PP01'.

i want the output of the above list in the drop down.

0 Kudos
383

the internal which you pass it to the fuction, just pass the filtered values, fro which you have to write a select stt. like what you have specified

Select aufnr from AUFK into table <itab> where AUART = 'PP01'.

<itab> is the internal table with just aufnr as a field.

is my understanding of your question right, or am i missing something

Regards

Raja

Former Member
0 Kudos
383

Hi,

did u check this FM:

F4IF_INT_TABLE_VALUE_REQUEST -

Display internal table as search help.

http://www.sapdevelopment.co.uk/dictionary/shelp/shelphome.htm

Also check out:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap faqs.faq#q-9

Regards,

Anjali

Message was edited by: Anjali Devi

Former Member
0 Kudos
383

Hi,

create a search help with exit and add your piece of code according to your requirements to restrict those values. This will definitely help u to achieve.

Regs,

Venkat

Former Member
0 Kudos
383

Hi Amandeep,

As Raja said, use the FM 'F4IF_FIELD_VALUE_REQUEST' in POV event. Fill the internal table with the values of orders based on the order types and pass it to the parameter 'RETURN_TAB' of the same FM.

Hope it will work.

Regards,

Phani

Former Member
0 Kudos
383

Hey Aman,

What happened. Did u check for search help with user exit ??

Regs,

Venkat

0 Kudos
383

Hi Amandeep,

If your question is answered, close the thread .

Former Member
0 Kudos
383

Hi,

In flow logic of POH

Herewith i am sending a psudo logic

Just Declare one internal table with the field(aufnr) that you want to show in F4help

write select statement to extract the order numbers where order type = 'PP01'.

check whether internal table has values or not

if internal table has records then call below function module as follows

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'AUFNR'

DYNPPROG = sy-repid

DYNPNR = sy-dynnr

DYNPROFIELD = 'AUFNR'

VALUE_ORG = 'S'

TABLES

RETURN_TAB = TL_RETURN_TAB

VALUE_TAB = Extracted data.

if find it is useful, Kindly reward me points.

Former Member
0 Kudos
383

Hey,

Create a elementary search help and attach that search help to the table field. It will work fine.

Regs,

Venkat

Former Member
0 Kudos
383

Hi,

With respect to my above latest answer, while creating the search help create it with user exit and write that query in that user exit. It will solve ur problem.

Regs,

Venkat