cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass data from standard FPM UIBB to custom Webdynpro application?

csayak
Explorer
0 Kudos

Requirement: To add a new 'Additional Info' tab in the Change Maintenance Order FIORI screen. The screen will contain a custom table with the Operation ID & Material number from Operations screen and some other fields.

Steps done:
1. We have created a Custom Webdynpro component and created a table in the main VIew.
2. We have opened the component configuration 'EAMS_WDA_ORDNTF_OIF_CFG' under the application configuration 'EAMS_WDA_ORDNTF_OIF' and enhance it using the option available in the Additional Functions.
3. After enhancing the standard Comp. configuration, we have added a new Main view & a sub view and inside the sub-view, we have added a UIBB where we have defined our custom Webdynpro component. The new webdynpro application is now appearing in the FIORI screen.

We are stuck with the data transfer. The operations screen has a material tab where the material details are stored. We have got the feeder class and we know that we can get the data from the get_data method but we do not know how we can pass the data to our custom webdynpro component so that we can bind it to the table and show it in the screen.

We am unable to use wire, as when we add a new wire and add our custom webdnypro component in the component details it gives an error stating that the key is not valid for wiring.

Further, there will be some user actions on the table after which we would like to save the data on click of the save functionality.

Any help would be much appreciated.

simon.hoeg thomas.jung Hi Experts, any inputs will be a great help.

worker1
Explorer
0 Kudos

To transfer data from the operations screen to your custom Webdynpro component, use context mapping. In your custom component, define a context node that matches the data structure, and in the feeder class, use GET_DATA to fetch the data and map it to your component. For user actions on the table, handle them in your component's controller, and create a custom function for saving data.

csayak
Explorer
0 Kudos

Hi Andrew,
I do get that I need to create a context node in my custom WDC and also that I can fetch the data using the feeder class GET_DATA method but what I am struggling with is how to pass the data after I fetch it. Can you please share some more detail for your statement "and map it to your component.". Any insights would be much appreciated.

J_R
Advisor
Advisor

Hi Sayak,

to transfer data between UIBBs in an FPM application you can, for example, use FPM events which you can enrich with any data. These FPM events will be processed by the UIBBs which are visible on the screen. Another possibiliy would be to use a singleton class to which all UIBBs can have access.

Best regards, Jens

csayak
Explorer
0 Kudos

Hi jens.ruths
Thanks for your feedback. Can you share any example with me please?

csayak
Explorer
0 Kudos
Hi ashish.shah ,

I have read your blog where you can described the concept of using singleton class to pass data between WDA. However, given my scenario, can you please share your views on how I can use the concept here? Any example will be very helpful.

Accepted Solutions (0)

Answers (3)

Answers (3)

nidhisharmabl
Discoverer
0 Kudos

Hi csayak,

I am also facing same issue.Can you tell me how did you solve this?

Thanks & Regards,

Nidhi Sharma

simon_hoeg
Advisor
Advisor
0 Kudos

Hello csayak,

as I mentioned above, this is really no problem. Either you collect the data of the two sender UIBBs in an ABAP singleton, where the receiver UIBB can fetch it.

Or you use the FPM Event Loop, with two FPM Events raised (for instance) in the Feeder method PROCESS_EVENT:

   data:   lo_fpm  type ref to if_fpm,
           lo_event type ref to cl_fpm_event.
           create object lo_event
             exporting
               iv_event_id = <MY_EVENT_ID>.
           lo_event->MO_EVENT_DATA->set_value(
               iv_key   = <MY_KEY>
               iv_value = lv_value).
           lo_fpm = cl_fpm_factory=>get_instance( ).
           lo_fpm->raise_event( io_event = lo_event ).

and then received in IF_FPM_UI_BUILDING_BLOCK methods PROCESS_EVENT or PROCESS_BEFORE_OUTPUT via importing reference IO_EVENT, respectively IO_EVENT->MO_EVENT_DATA

Best regards,

Simon

simon_hoeg
Advisor
Advisor
0 Kudos

Dear csayak,

if the WebDynpro component is implementing the IF_FPM_UI_BUILDING_BLOCK interface, then it takes part in the FPM Event Loop. In this case you can transfer the data via FPM Event.

If the WebDynpro component is not implementing the IF_FPM_UI_BUILDING_BLOCK interface, then you may implement your own infrastructure, for instance a ABAP singleton, or the use of an ABAP Push Channel and /or ABAP Message Channel integration.

Best regards,

Simon

csayak
Explorer
0 Kudos

Hi simon.hoeg
Thank you for replying to my query
Our custom WDC is implementing IF_UI_BUILDING_BLOCK. Can you please give me some examples of how I can use the FPM Events to read the data. The screen from where I want to fetch the data has 2 GUIBBs and they also have a wire connection between them. I want to get data from both these GUIBBs into my Webdynpro. Can you suggest any example of this type so that I can refer?