03-10-2008 10:07 AM
Dear experts,
I'm very new to abap and am struggling with a few basics just wondering if anybody can help me.
I am creating a screen with two pik lists/listboxes. One pick list is dependant on another (like a parent-child relationship or in this case category and sub category).
So what I need to do is when a Parent Category is selected I want the SubCategory to be filtered by the parent selection, is there any way of doing this??? (the two check tables the values are coming from are related by a foreign key to each other and I have tried to use a search help but I'm not sure if I am implementing it correctly as its not working on the screen itself although on a selection screen it works okay).
Some other info that might help is that the screen is populated by a structure which has FK's to the two pik lists (not sure if that will be helpful). I though that the screen may just work like the selection screen but it doesn't.
Thanks in advance.
03-10-2008 10:54 AM
03-10-2008 11:23 AM
Thank you for that,
I'm a real beginner so don't yet fully understand all the ins and out of abap. Can you tell me what your doing as it looks like your working on a selection screen, I need to do this on a dynpro screen will it work as the search help didn't.
03-10-2008 11:34 AM
No worries... I generally code examples as reports because it's quicker and easier but please keep in mind that when you compile a report program it actually creates a dynpro for you automagically (screen 1000 typically) so almost everything you can do in a report screen you can do in your own dynpros.
So in your own dynpro, you would code two fields (as per the sample) and define each as having a listbox... for each field define a function code that is triggered when you change the screen value (as in the report example). You can prefill the listboxes during the PBO logic for the dynpro, and in the PAI you can pick up which user command has been selected and allow the flow logic to go back round to the PBO and change the second listbox list depending on the value chosen in the first field.
Jonathan
03-18-2008 9:02 AM
Thank you very much for your, your assistance and this example
DEMO_DYNPRO_F4_HELP_MODULE
allowed me to solve the problem...
03-18-2008 10:33 AM
Glad to hear it's solved... can you close this thread now then?
ta
Jonathan
03-18-2008 10:35 AM
03-18-2008 10:35 AM
03-18-2008 10:37 AM