‎2008 Aug 27 8:59 AM
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.
‎2008 Aug 27 9:05 AM
Hi,
Create a search help for the field and assign this search help against the field in the custom table.
Regards.
Raju.
‎2008 Aug 27 9:05 AM
Hi,
Create a search help for the field and assign this search help against the field in the custom table.
Regards.
Raju.
‎2008 Aug 27 9:05 AM
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.
‎2008 Aug 27 9:06 AM
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
‎2008 Aug 27 9:07 AM
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
‎2008 Aug 27 9:26 AM
Hi,
U can do so with the help of the following link
Regards,
Manish
‎2008 Aug 27 9:31 AM
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
‎2008 Aug 27 11:03 AM
‎2008 Aug 27 12:23 PM
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
‎2008 Aug 27 9:46 AM
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.
‎2008 Aug 27 9:55 AM
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
‎2008 Aug 27 11:40 AM
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.