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

Same Feeder Class for 2 GUIBBs

Bhaskar_Tripath
Participant
0 Likes
1,696

Hi All,

I have created one feeder class for 2 GUIBBs (List UIBB and Form UIBB) by implementing respective interfaces for them. These GUIBBs have been included in the same user screen. I have also setup parameter for this feeder class (No meaningful purpose, but just to try out). Here are my questions:

1. I was expecting a single instance of this class when user enters the screen which would then become basis for sharing data between these UIBBs. However, I noticed that 2 instance were created for each UIBB. Is it the normal behaviour? I also tried giving same value or no value to feeder class parameter but for no help.

2. To get rid of above problem, I declared feeder class attributes that were part of sharing as static attributes. But now the problem was, my Form data was dependent on List data. So I wanted that GET_DATA method of List UIBB should be called before GET_DATA method of Form UIBB. However, Form method is getting called first. Since it always happen, I wanted to know how the system decides on the sequence of calls and is there any way to program /change that sequence.

Thanks!

Bhaskar

Hi All,

I have created one feeder class for 2 GUIBBs (List UIBB and Form UIBB) by implementing respective interfaces for them. These GUIBBs have been included in the same user screen. I have also setup parameter for this feeder class (No meaningful purpose, but just to try out). Here are my questions:

1. I was expecting a single instance of this class when user enters the screen which would then become basis for sharing data between these UIBBs. However, I noticed that 2 instance were created for each UIBB. Is it the normal behaviour? I also tried giving same value or no value to feeder class parameter but for no help.

2. To get rid of above problem, I declared feeder class attributes that were part of sharing as static attributes. But now the problem was, my Form data was dependent on List data. So I wanted that GET_DATA method of List UIBB should be called before GET_DATA method of Form UIBB. However, Form method is getting called first. Since it always happen, I wanted to know how the system decides on the sequence of calls and is there any way to program /change that sequence.

Thanks!

Bhaskar

6 REPLIES 6
Read only

Bhaskar_Tripath
Participant
0 Likes
1,524

Guys.....any idea please...

Tagging the experts to get their attention

Read only

0 Likes
1,524

Sorry...can't be much help at the moment....not in front of  system to try some of this out..But to answer you....

1. "I was expecting"....well there's your first mistake when it comes to anything SAP does. haha To "force" the behavior you want/expect, you will need to put some checking in the class constructor to insure that only one instance is create. This is done in other things like workflow so you should be able to find some examples and/or code. Look for examples on creating SINGLETON class objects.

2. Fix #1 and then this one won't be a problem. I would not use all static attributes/methods as those are really "global" and not instance specific unless you are merely using them as blackbox-ish functions/variables.

Hope this helps!

Read only

Former Member
0 Likes
1,524

moved to

Read only

0 Likes
1,524

This message was moderated.

Read only

0 Likes
1,524

So this is what I am trying to do:

When the user enter Pernr and hit 'Search',

- all the related records should get updated in the list.

- Details section should get updated with the 1st index record

- On selection of other records from list, the related data should get update in details section.

Now the problem is, as I mentioned, the GET_DATA method of Form UIBB is getting called before List UIBB. Due to this, there is a lag in the details section data update. As earlier noted, I am using the same class for both UIBBs.

Advice please.

Best Regards,

Bhaskar

Read only

siva_kumar_vemula
Product and Topic Expert
Product and Topic Expert
0 Likes
1,524

Hi Bhaskar,

Please don't use Same feeder class for both Form and List, You definitely need two different feeder class. In your scenario try implementing WIRING concept to share data between these two feeder classes.

Have a look at 

Cheers,
Siva Kumar.