cancel
Showing results for 
Search instead for 
Did you mean: 

How detect in feeder class the UIBB (Tab Page) wich is being executing

former_member425121
Participant
0 Kudos

Hi experts

I made some changes to WDA standard aplication wich uses FPM framework.

I added two tab pages (main views) to application using the FPM configuration editor , the component is PIQ_MBSS_OIF and i created (added) in my Z configuration these two tabpages each one with one FPM_LIST_UIBB table ,because the tabpages shows a records list.

I have the feeder class used by tables (FPM_LIST_UIBB) , with this feeder class i can manage the records to be showed in each tab page , i just enhanced this class adding some test code and it works.

Now i need to determine in my feeder class wich one of the tab pages is being calling in order to i can filter (change) the records to show in each tab page:

TabPage1 (original) -> call feeder class X -> shows 4 records

TabPage2 (new) -> call the same feeder class X -> show same 4 records

TabPage3 (new)-> call the same feeder class X -> show same 4 records

How can i detect in feeder class X wich tab page is being executing ? (i hope i explained right)

Thanks & Regards

Frank

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Frank,

This is a complex process. i am not sure if you can solve this with the instruction given here in this forum.

One of the solution might be defining a parameter list in the

1) if_fpm_guibb~get_parameter_list method.

data ls_parameter_descr type fpmgb_s_param_descr.

ls_parameter_descr-name = 'TAB_ID'.

ls_parameter_descr-type = 'Define your own DDIC domain with values like TAB_1,TAB_2'.

append ls_parameter_descr to rt_parameter_descr.

2) in the if_fpm_guibb~initialize. method read this parameter and set to the global attribute in the feeder class.

  • get parameter

read table it_parameter into ls_parameter with key name = 'TAB_ID'.

if sy-subrc <> 0.

gv_TAB_ID = 'TAB_1'. "default

else.

assign ls_parameter-value->* to <lv_value> casting.

gv_TAB_ID = <lv_value>.

endif.

3) you can use this gv_tab_id in the other methods like get_data to control the logic.

4)When you configuring the feeder class, you can press the edit parameter button. Here you can choose the value

from the dropdown for that configuration. for.ex TAB_1 .

Answers (1)

Answers (1)

former_member425121
Participant
0 Kudos

Please let me explain more:

TabPage1(original) -> containing UIBB table list (FPM_LIST_UIBB), configuration Original, Feeder Class X -> shows 4 records

TabPage2(new) -> containing UIBB table list (FPM_LIST_UIBB), configuration Z2, same Feeder Class X -> show same 4 records

TabPage3(new)-> containing UIBB table list (FPM_LIST_UIBB), configuration Z3, same Feeder Class X -> show same 4 records

The feeder class is executing for same component (FPM_LIST_UIBB) but with different configurations , what i need to do is in feeder class detect wich TabPage is being executing for show differents records in each tab page.

Is there any way to detect in feeder class wich TapPage is being executing (or wich configuration is being executing) ?

I know i can change the feeder class for each UIBB table list by changing configurations Z2 and Z3 , but then i have to create two Z copy classes and duplicate the code in these, so i need to know is is there any way to do changes in only one (original) class.

Any help will be usefull.

Thanks & Regards

Frank

Former Member
0 Kudos

It is clear to me about your requirement, my earlier suggestion is what i think closer to realize this.

You set the parameter per configuration. according to the parameter you execute the logic.

former_member425121
Participant
0 Kudos

Thanks Baskaran

I was writing my explanation when your answer came , so i have not seen this . I'm going to explore your tip.

Best Regards

Frank

former_member425121
Participant
0 Kudos

Hi Baskaran

I have been reading about your tip and it is why i need and i am going to implement it.

(Also i was hard trying to find some attribute in runtime to detect the tabpage/configuration being executing, and i found it but it is in some private instance attribute from CL_FPM class that i can not access , i could have to enhance this class to save the attribute in memory for read it in my feeder class, but i will not touch this generic class.)

So i'm going to add parameter in UIBB configuration, add this parameter to IF_FPM_GUIBB~GET_PARAMETER_LIST, read it in INITIALIZE and set this value in some class attribute for access it in other methods.

Because i'm going to add parameters to class and because my requirement needs to be able to test both original application and modified aplication in same time, i'm not going to enhance the original class, but i will create copy Z class .

My doubt is next: The feeder class used in UIBBs has not the GET_PARAMETER_LIST and INITIALIZE methods, these methods are in my feeder class's superclass :

UIBB1 uses MYFEEDERCLASS

UIBB2 uses MYFEEDERCLASS

UIBB3 uses MYFEEDERCLASS

SUPERCLASS_A : it has the methods GET_PARAMETER_LIST and INITIALIZE

sublcass: MYFEEDERCLASS it has the method X wich manipulate the records to be showed

Then i have to copy to Z both feeder class and superclass , am i right ? But then how can i implement GET_PARAMETER_LIST and INITIALIZE methods and read the new parameter in MYFEEDERCLASS method x ?

I know maybe these are basic (concept) doubts about OO Inheritance and methods . Please give some 'light' with this, any help will be usefull.

Best Regards

Frank

Former Member
0 Kudos

Indeed it is OO concept. Child classes are having access to the parent class methods. You can redefine the super class method in your child class (specilalization ).

To make it short. You need not have to copy the super class. Your zclass can very well inherit from the same super class.

former_member425121
Participant
0 Kudos

Thanks Baskaran

With that short explanation i got the general idea , i'm going to work with this.

Best Regards

Frank

former_member425121
Participant
0 Kudos

Hi Baskaran

I had forgotten update trade, i implemented the enhancements with your tips and these works so good , in my class i receive wich tab page is executing so i manage records to show with some method , so my application changes are solved.

This Floor Plan Manager tool worked ok for my requirement .

Now my only doubt is about how create translations for the titles of the new tab pages i created and how to transport the new Z configuration to next environment, but i will investigate about this in other trade.

Thanks & Regards

Frank.