cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing Wire Model

singhmanishekhar
Explorer
0 Kudos

Theoretically, I know what is wire model. But I need step-by-step example for Implementing wire model for both Free-UIBB and GUIBB.

Thank in advance.....

Accepted Solutions (1)

Accepted Solutions (1)

singhmanishekhar
Explorer
0 Kudos

Lastly, I studied SAP examples. And I had successfully implemented an example by own.

m_aravindan
Active Participant
0 Kudos

Hi Manishekar ,

                      Could please share the step by  step document , how to implement the wire in FPM.

Which would be helpful to learn.

Regards
Aravindan

singhmanishekhar
Explorer
0 Kudos

Step 1. Create transaction handler class, If you want your own transaction handler by implementing  interface "IF_FPM_WIRE_MODEL_TRANSACTION". Implement all method as your requirement. You can skip that step also.

Step 2. Create your connector class by implementing interface "IF_FPM_CONNECTOR"

Step 3. Set namespace in class constructor by setting attribute "sv_namespace" .

method CLASS_CONSTRUCTOR.
      if_fpm_connector
~sv_namespace = 'XYZ_DEMO'.
endmethod.

Step 4. Now in method "Set_input". Write code to store coming value from FPM through parameter "io_input". Here, you will get data send by source component. (Use attribute to store).

METHOD if_fpm_connector_def~set_input.
mo_collection ?= io_input
.
ENDMETHOD.
 

Step 5. Now in method "get_output" Set the parameter "ro_output" to send data to destination component.

METHOD if_fpm_connector_run~get_output.
ro_output
= mo_collection.
ENDMETHOD.

Now mandatory part connector is over. Simply Implement all method inherited. Need to write any code in remaining methods. 

Step 6. Create your source and destination components implement properly. If, it is working fine, then you should implement add wiring support to them. For free uibb, two step required.

    First, implement WD interface "IF_FPM_UIBB_MODEL" on your component. It has only method "GET_MODEL_API". Where you have to set object of FPM model(Singleton) class by setting parameter "ro_feeder_model".

Second, Create FPM model class that adds support for wiring by implementing interface "IF_FPM_ FEEDER_MODEL".

For, GUIBB, same feeder class becomes FPM model class by implementing interface "IF_FPM_ FEEDER_MODEL".

Step 7. Now, specify namespace for FPM model class by method "get_namespace". Specify same namespace as connector in parameter "rv_namespace".

method IF_FPM_FEEDER_MODEL~GET_NAMESPACE.
rv_namespace
= 'XYZ_DEMO'.
endmethod.

Step 8. For getting port key selected for setting connection. Implement method "get_inport_key".

METHOD if_fpm_feeder_model~get_inport_key.
FIELD-SYMBOLS:
<ls_object_key>
TYPE any.

CREATE DATA rr_object_key TYPE c LENGTH 1.
ASSIGN rr_object_key->* TO <ls_object_key>.
<ls_object_key>
= 'A'.

ENDMETHOD.

Step 9. 

Step 10.

singhmanishekhar
Explorer
0 Kudos

Sorry, I pressed enter by mistake..

Step 9. Create Outports for destination for source by "if_fpm_feeder_model=>cs_port_type".

ex. Please refer my earlier code. Search "mt_outport" attribute and see assigning line for port with porttype. in method "SET_UP_PORT".

Step 10. Set Outports to your source component by method "Get_outports" .

method IF_FPM_FEEDER_MODEL~GET_OUTPORTS.
et_outport
= mt_outport.
endmethod.


Step 11. Set connector for your component

method IF_FPM_FEEDER_MODEL~SET_CONNECTOR.
mo_connector
= io_connector.
endmethod.

Step 12. Send data for destination component by method "get_outport_data".

method IF_FPM_FEEDER_MODEL~GET_OUTPORT_DATA.
ro_data
= mo_collection.
endmethod.

Implement remaining methods.

Step 13.  Now go in configuration for FPM Application.

Step 14. Select Wire model and select transaction handler. Here, you find your t-handler also.

Step 15. Add new wire and specify all field. Use F4, you will find all you implemented things. set port and connector class. Test your application.

    Please refer my previous shared code. It is tested one and based on sample example provided by SAP.

Answers (2)

Answers (2)

xiebryant
Employee
Employee
0 Kudos

Hi Manishekhar,

Thanks for your sharing. I face an similar problem.

In your example, is the wire from List UIBB to freestyle UIBB?

For my case that wire from freestyle UIBB(which contains the Webdynpro Component) to Form UIBB, could you please give me some advice?

Thanks in advance.

Former Member
0 Kudos

Hello Manishekhar,

I have a requirement to add a freestyle standard webdynpro component ( For adding Multiple attachments to the Content Server ) to a OVP Model with 3 UIBB's.

I added the WD Component as a 4th UIBB and created the Wire for the same, For Connector Class, I have given the same class which the other 3 UIBB's are using. I am Not sure what to give in the wire model parameter under ( Connector Parameters - First Level Relation Name )

.

I am able to see the same once it is executed, but once I add the attachments and click on the save

button, I don't think the main Component is considering the one which I added. Please suggest

me if I need to write any code to connect the same with the existing 3 UIBB.

Thanks in advance.