FPM Wiring- Passing data from List UIBB to Form UIBB

 


The post describes, to display a list uibb and a form uibb on an FPM OVP application. The list UIBB displays the billing data and on each row selection, the billing data are displayed in the form UIBB with the help of wiring.

For the list uibb, the table type is used.

1

First point is to design the list uibb. So create a class and implement the interfaces as shown below.

2

Create a table attribute.

6

Go to the GET_DEFINITION method.

3

Put the below code.

4

Go to the GET_DATA method.

5

select data from VBRK table and put the shown code.

7

Now we have to create the LIST UIBB configuration and assign the created feeder class-ZCL_BILLING_DOC_LIST

8

Provide a configuration name as- ZCC_LIST_BILLING_DOC and click on New button.

9

Provide the feeder class and click on edit parameters.

10

In general settings, choose visible row count, scroll mode as paging, selection mode as single selection, enable event as selection raises as FPM event.

12

Under List UIBB schema, add few fields as shown or as per requirement. Save the configuration. So we have completed the creation of list uibb configuration.

13

Next task is to create – OVP application and embedding list uibb configuration in this. So execute Tx- FPM_WB

14

Select Wizard for creating empty FPM application.

15

Provide a application name, floorplan as Overview page and automatically application configuration name and floorplan configuration name appears. Click on Next button.

16

Save this.

17

Click on Edit Configuration(FLUID)

18

Provide the title, from UIBB, select List UIBB.

19

Provide the lsit uibb configuration name created before ZCC_LIST_BILLING_DOC. Save it.

20

Test the applciation.

21

So we have the list uibb displaying the billing records.

22

Next task is to create a form UIBB and embedding to the above created OVP application.

So create a feeder class and implement the relevant interfaces as shown below.

23

Go to the GET_DEFINITION method.

24

Put the below code.

25

So the feeder class is ready ( remember though we use some methods, never forget to activate all the methods).

Now create a FORM UIBB configuration.

26

Provide a name as- ZCC_FORM_BILLING_DOC and click on the new button.

27

It asks for the feeder class.

28

Provide the above created feeder class-ZCL_BILLING_DOC_FORM.

29

Under Form Uibb Schema, select add elements at current level.

30

Select some fields and make display type as text view. Now go to the Preview section as we have to rearrange the display of the fields.

31

In preview all selected fields are displayed like this.

32

Rearrange the fields as needed. Save the form UIBB configuration.

33

Now go to the OVP floorplan configuration. Already the list uibb configuration is added and add the form component.

34

It asks for the form configuration name.

35

Provide the name as ZCC_FORM_BILLING_DOC which was created above and save it.

36

Test the application and now we have the list and form uibb displayed as desired. Now the next task is to when any row is selected in the  list uibb that information should be displayed in the form uibb by wiring technique.

37


 

For wiring we need two different classes .

  1. Container class – which stores that data when row is selected from list uibb.
  2. Connector class- which takes the container data and supplies to the FORM uibb feeder class, so that the list row data can be displayed on the FORM uibb.

 

So created a class- ZCL_BILL_CONTAINER_LIST_FORM and add an attribute. Here the attribute type as VBRK as we need to transfer one single row.

 

38

Create a connector class namely- ZCL_BILL_CONNECTOR_LIST_FORM and add the interface – IF_FPM_CONNECTOR.

39

Add one attribute which is a reference to the container class.

40

 

Now for wiring, add the interface – IF_FPM_FEEDER_MODEL in the list feeder class.

41

Add one attribute which is a reference to the container class in the list feeder class.

42

In the list feeder class, go to the marked method.

43

Here create an instance of the container class.

44

In the list feeder class, go to the marked method.

45

Well, read the selected line form the list uibb and put back the value into the container object attribute which later can be accessed by the connector class and will be passed to the form feeder class.

46

In the list feeder class, go to the marked method.

47

Provide a name space. This name space has to be unique in the list feeder class->connector class->form feeder class

48

In the list feeder class, go to the marked method.

49

Bind the container data to more generic so that it can be accessed by the connector class.

50

In the list feeder class, go to the marked method.

51

Put the below code, as we work on lead selection, so the port type should be LS. This code help us while creating a wiring and defining port type in OVP floor plan configuration.

52

Now go to the connector class. We have an name space attribute.

55

Go  the methods tab and add class constructor method.

53

Go to class constructor method.

54

Provide the same name space as provided  the list feeder class.

56

In the connector class, go to the marked method.

57

We receive the input from the list uibb and assign the data to the object of the container reference.

58

A snap shot that tell how the data passed form list feeder class to connector class.

60


In the connector class, go to the method GET_OUTPUT.

61

Assign  the container instance to the more generic reference so that the data can be accessed by the form feeder class.

79.jpg


Now in the form feeder class, add the interface – IF_FPM_FEEDER_MODEL.

62

Declare an attribute which is the reference to the connector class.

63

Go to the highlighted method in the form uibb feeder class.

64

set the name space.

65

Go to the highlighted method in the form uibb feeder class.

66

assign the connector class instance.

67

Go to the highlighted method in the form uibb feeder class.

68

Assign the container instance attribute which is nothing but the billing record information.

69

Now we finished the coding part and have to do the wiring.

Go to the OVP Application, go to the Wire Schema. Click on Create Wire icon.

70

provide the component which is nothing but the target component and its configuration name as ZCC_FORM_BILLING_DOC. provide the container class.

71

Set connector class name as – ZCL_BILL_CONNECTOR_LIST_FORM and port type as LS( Lead Selection ). Now we have to pass the source component and its configuration name.

72

provide the list configuration name as- ZCC_LIST_BILLING_DOC and for port identifier click on F4 option. Select the port identifier from pop up screen.

73

Save the wiring configurtaion.

75

Now test the application.

76

Select a row and the data displayed in the form UIBB.

77

78


 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s