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

F4 help

Former Member
0 Likes
1,124

Hi All,

I have a Z table which has 3 fields: Document category,document type and output type.when the user clicks on F4 help for output type,it gives all output types.But i want to display only those output types which holds good for the Document category and document type enetred by the user.How can i do this?

Thanks,

Rakesh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,077

Hi,

Create a search help for the field and assign this search help against the field in the custom table.

Regards.

Raju.

11 REPLIES 11
Read only

Former Member
0 Likes
1,078

Hi,

Create a search help for the field and assign this search help against the field in the custom table.

Regards.

Raju.

Read only

Former Member
0 Likes
1,077

If you want this in the program, Go for AT SELECTION-SCREEN ON VALUE-REQUEST <output type>.

If you want this in the TABLE, create a search help.

Read only

Former Member
0 Likes
1,077

Hi

The easiest way would be to create a view (SE11) that shows exactly what you need, and then use this view as source in a self-made search help (also SE11). If this won't work, let us know - then you'd have to write a SHLP-function module yourself.

Stefan

Read only

olivier_segol
Active Participant
0 Likes
1,077

Hello Rakesh,

You can do this with a exit in the search help.

Your module function should have the sameinterface as F4IF_SHLP_EXIT_EXAMPLE. Have a look at the documentation of that FM.

Olivier

Read only

Former Member
0 Likes
1,077
Read only

Former Member
0 Likes
1,077

hi rakesh,

Can you give me the three field names and data element so that i can try and let you know a simple way to do this...

Regards

Karthik D

Read only

0 Likes
1,077

BSTYP

BSART

KSCHL

Read only

0 Likes
1,077

Hi rakesh,

Thanks for providing the Field names and the good news is we can attain your requirement without a single line of coding or a new search help.

I have tried with your fields and got your requirement work.

Follow the steps below while creating the table..

First create the Ztable and give fields as;

Field - Data Element

1) MANDT-MANDT

2) DocCAT-BSTYP

3) DocType-BSART

4) OutType - KSCHL

Now go to the Entry help/check Tab of the table in SE11.

Select the Row DocType and click on the small Button with a Key image on it( to the left of "Search help" button).

It will propose T161 as check table and fields MANDT, DocCat and DocType are also listed in that popup window, just press enter or Copy button.

Now maintain Tech. settings, Enhancement category etc and activate the table.

Now go to se16 and first select a Document category and now press F4 in the Document Type and you can see it restricted to the category you selected in the document category.

Even when you select Document type directly , the corresponding document category will be filled auotmatically in the first field...

And thus no need to write a single line of code....Wherever you use this two fields the same will work....

Hope you understand everything, try it and reply back..

Regards

Karthik D

Read only

Former Member
0 Likes
1,077

Hi,

Try this.

In the AT SELECTION-SCREEN ON VALUE-REQUEST FOR <output type - screen field name>

Fetch the required values to be displayed in the search help from the ztable for doc cat and doc no.

Then use the the function module 'F4_INT_TABLE_VALUE_REQUEST'

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = <ztable-field name>

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = <selection screen field name>

value_org = 'S'

TABLES

value_tab = <internal table>

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

ztable field will be ur output-type

sel. screen field -


> the name given in the selection screen.

internal table-------> the table in which you have populated the values to be displayed.

Sharin.

Read only

Former Member
0 Likes
1,077

hi rakesh,

Please find the code below:

AT SELECTION-SCREEN ON VALUE-REQUEST FOR <output type>.

SELECT <output type>

FROM <dbtable>

INTO TABLE <Internal table>

where Document category = <User entered value>

document type = <User entered value>.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = <Field name >

dynprofield = <Field on Selection-screen in capitals'>

dynpprog = sy-cprog

dynpnr = sy-dynnr

value_org = 'S'

TABLES

value_tab = <itab>

Regards,

Sireesha

Read only

Former Member
0 Likes
1,077

Hi Rakesh,

You need to use the FM 'F4_INT_TABLE_VALUE_REQUEST' for this and create an internal table for the same.

Populate the internal table with the values that are there in your selection screen.

Then use the internal table inside the FM and you will surely get the required Search Help.

Regards,

Amit.

Please Let me know if you still have some doubts.