Skip to Content

Maximum time it is needed that FPM application uses multiple component. But you have to share the data between that components. This document shows the example how we can share data between two component using IF_FPM_SHARED_DATA without any coding.

First create a webdynpro component Suppose component name is ZSHARE which is implement IF_FPM_SHARED_DATA interface in interface implemented interface tab.

/wp-content/uploads/2012/04/1_90658.jpg

In that component create a context of SCARR with CARRID and CARRNAME attribute. And make the SCARR as interface node.

/wp-content/uploads/2012/04/2_90662.jpg

Activate the component.

Now create another component suppose ZTEST1. Then make the previous component ZSHARE as a used component.

/wp-content/uploads/2012/04/4_90663.jpg

And in implemented interfaces implement IF_FPM_UI_BUILDING_BLOCK interface.

/wp-content/uploads/2012/04/6_90664.jpg

In used controllers of component controller you add ZSHARE component.

/wp-content/uploads/2012/04/7_90665.jpg

Then in the component controller context you drag and drop node in the component controller context from ZSHARE.INTERFACECONTROLLER

/wp-content/uploads/2012/04/10_90666.jpg

Then in the view context you drag and drop node in the view context from component controller context

/wp-content/uploads/2012/04/17_90671.jpg

Then in the layout add the node as a input field.

/wp-content/uploads/2012/04/18_90672.jpg

Now create another component suppose ZTEST2. Then make the previous component ZSHARE as a used component.

/wp-content/uploads/2012/04/19_90673.jpg

And in implemented interfaces implement IF_FPM_UI_BUILDING_BLOCK interface.

/wp-content/uploads/2012/04/20_90674.jpg

In used controllers of component controller you add ZSHARE component.

/wp-content/uploads/2012/04/22_90675.jpg

Then in the component controller context you drag and drop node in the component controller context from ZSHARE.INTERFACECONTROLLER

/wp-content/uploads/2012/04/24_90677.jpg

Then in the view context you drag and drop node in the view context from component controller context

/wp-content/uploads/2012/04/99_91368.jpg

Then in the layout add the node as a textedit field.

/wp-content/uploads/2012/04/28_90679.jpg

Now take a GAF FPM component. Add the ZTEST1 component as 1 step component. And add the ZTEST2 as 2 step component.

The run the FPM application . Give Airline and Name in input screen.

/wp-content/uploads/2012/04/29_90680.jpg

Then click on Next . You will see it is automatically showing in second screen though it is refer to different component.

/wp-content/uploads/2012/04/90_90681.jpg

To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

  1. Tom Van Doorslaer

    Hi,

    Thanks for the practical example. In the standard SAP FPM training (NET313), the shared data component is missing. This article shows a good example of how to use the technique. Will make a nice addition to future FPM trainings.

    Can you just rework your article a bit to make it a bit more readable? Ask someone to proofread it and correct the typo’s. Then it will become even better.

    cheers!

    (0) 
  2. Leandro Coutinho

    I stopped in this part: “Now take a GAF FPM component. Add the ZTEST1 component as 1 step component. And add the ZTEST2 as 2 step component.”

    How to do this?

    Thank you.

    (0) 
    1. Ramakrishnan Murugan

      Hi Leandro,

      Follow the below steps.

      1. Create a Webdynpro application with component – FPM_GAF_COMPONENT, Interface View – FPM_WINDOW.

      2. Create and assign an application configuration to the created WD Application. Later create a Configuration Name for the application configuration.

      3. Thatz it:) Now you can add the Component(ZTEST1) and Window Name to it.

      4. You can add multiple steps using ‘Main Step’ button and assign the required component.

      With Regards,

      RAM.

      (0) 
      1. Valerie Lee

        Hi Ramakrishnan,

        Is there any extra code or I must do something wrong since the value from ZTEST1 does not transfer to ZTEST2 in my test.

        Does ZSHARE have view and window?  In your example, you did not mention the name of view and window of ZSHARE.  I created with a view and window as default v_main and w_main but there is nothing in the view v_main and window w_main.  In ZTEST1 I have window w_test1 and view v_test1.  In ZTEST2 I have window w_test2 and view v_test2

        I embedded view v_test1 to window w_test1 and view v_test2 in window w_test2.

        Can you explain how data in ZTEST1 flow to ZTEST2.  Thanks

        Step1.PNG

        Step2.PNG

        (0) 

Leave a Reply