Sap FPM Application Examples
Sap FPM Application Examples
________________________________________________________________________
________
Step1. Go to Tcode- SE80.
Step2. Provide a web dynpro component name and hit the key board Enter button and
from the Pop up click on the Yes button to continue with the creation process.
Step3. Provide a description. Automatically the system suggests the window and view
name. If u want change the name and continue by clicking on the Yes button.
Step35. Provide a description. Automatically the system suggests the window and view
name. If u want change the name and continue by clicking on the Yes button.
Step36. Save as Local Object.
Step37. The status is inactive. click on the Activate button .
Step38. Click on Yes button.
Step39. The web dynpro component is active.
Step40. In order to a web dynpro component participate in the FPM application it has to
implement the interface 'IF_FPM_UI_BUILDING_BLOCK' . So Click on the Implemented
interface tab and provide the interface name as 'IF_FPM_UI_BUILDING_BLOCK' and hit the
Enter button from key board. Enter the Re implementation button to implement the
interface.
Step41. The status turns into green.
Step42. From the left hand tree, double click on the window 'first_window'. The window
embeds the view.
Step43. Double click on the view 'FIRST_VIEW' from the left hand tree.
Step44. Right click on the node 'ROOTUIELEMENTCONTAINER' and select the option Insert
Element.
Step45. Provide any ID name and select type as TextView and click on the Continue
button.
Step46. The ID property provides some properties in the right hand side.
Step47. Provide some text in the Text tab and hit the Enter key from key board. The
Entered text appears on the View.
Step48. Right click on the View Option ion the Left hand tree and select create option to
create a new view.
Step49. Provide the View name and description and click on the Continue button.
Step50. The View Appears.
Step51. Right click on the node 'ROOTUIELEMENTCONTAINER' and select the option Insert
Element.
Step52. Provide any ID name and select type as TextView and click on the Continue
button.
Step53. The ID property provides some properties in the right hand side.
Step54. Provide some text in the Text tab and hit the Enter key from key board. The
Entered text appears on the View.
Step55. Right Click on the Windows option from the left hand tree under Web dynpro
component and click on Create option.
Step56. Provide the Window name and short description and click on Continue button.
Step57. Expand the window & right click on the Window name and select Embed View
option.
Step67. We are going to create an OIF - FPM Instance. So open the standard FPM
Component- 'FPM_OIF_COMPONENT'.
Step68. Go to the Web Dynpro Application option Under the component and right click on
it and click on Create option.
Step69. Provide a application name and Description and Click on the Continue button.
Step70. The status is New. Click on Save button.
Step71. Save as Local Object.
Step72. Expand the Web Dynpro Application Option i n the left hand tree and select the
above created application.
Step73. Navigate down to locate our application.
Step74. Now our OIF application is present.
Step75. Right Click on the Application and select the Create/Change configuration option.
Step111. Again go to the Configuration. This time we will be add up a new Main View.
Under the Object instance Schema, click on the Main View button.
Step112. The below input fields comes up.
Step113. Provide the Main View Name. Provide our WEB dynpro component- 2 name
under the component column in the UIBB line. Click on F4 button under the Window
column. Select the First_Window.
Step114. Provide the Sub View name and then click on the Sub View button to add a new
sub view Under the Main view2.
Step115. A new input line is inserted in our Configuration.
Step116. Provide the Web Dynpro component-2 name and click on the F4 button under
the Window column. Select the Second Window.
Step117. Provide the Sub view name and Save the configuration.
Step118. Again go to the OIF application and Test the Configuration ID. Two main tabs
appear in the output.
Step119. Click on the sub view 2 under main view1.
Part1: FPM :Integarting Search UIBB and List UIBB into FPM OVP Application
Here we have the FPM OVP search and display application. One more functionality we
need like the Billing Document number should be displayed as a LINK( hot spot in ABAP)
and upon selection it should display the billing document in the transaction VF03.
To achieve this functionality we need to enable below points:
1. Define an action
2. Enable the link for the billing document
3. Binding the action to the link
4. Handling the action to display the billing doc in VF03 transaction.
Step2. Go to the feeder class of the LIST UIBB. In the method GET_DEFINITION .
Step7. In the PROCESS_EVENT method of the list feeder class add the below high lighted
code.
-------------------------------------------------------------------------------------------------------------------
----------------------
METHOD if_fpm_guibb_list~process_event.
ls_trans-tcode = 'VF03'.
ls_trans-gui_type = 'WEB_GUI'.
ls_para-key = 'VBELN'.
ls_para-value = <fs_ui_billing_doc>-vbeln. " billing dcoument number
INSERT ls_para INTO TABLE ls_trans-parameter.
ls_tr_param-navigation_mode = 'EXTERNAL'.
ls_tr_param-skip_init_screen_if_possible = abap_true.
lr_fpm = cl_fpm_factory=>get_instance( ).
lr_navigate = lr_fpm->get_navigate_to( ).
WHEN if_fpm_guibb_list~gc_event_list_filter.
* Get fpm parameters
io_event->mo_event_data->get_value(
EXPORTING iv_key = 'SEL_TAB'
IMPORTING ev_value = lt_fpm_search_criteria ).
io_event->mo_event_data->get_value(
EXPORTING iv_key = 'MAX_NUM'
IMPORTING ev_value = lv_max_number ).
WHEN OTHERS.
ENDCASE.
ENDMETHOD.
-------------------------------------------------------------------------------------------------------------------
----------------------
The method ZCL_TEST_BILL_FEEDER_LIST-PROCESS_EVENT having an exporting
parameter ET_MESSAGES which should be filled to display any message on UI.
Jan
21
Part4 : FPM OVP Application -Integrating
Search UIBB and List UIBB: Displaying
POPUP Screen
-------------------------------------------------------------------------------------------------------------------
-------------------
Step1. In our search and display list screen, need to enable the link for the billing type
field and on click on certain billing type, its relevant customizing value should be
displayed in the pop up fpm screen in different sections.
Step2. Go to Tx- SPRO. Open billing types.
Step5. Here we have the set up for the bill type F2.
Step6. This information are stored in TVFK table. Some of the filed info we need in our
FPM pop up screen. Just marked which we need.
Step7. For the pop up screen we need a feeder class. Go to Tcode- SE24 and create a class
and implement the below two interfaces.
Step8. Implement and active each method. FOr our popup screen design Go to the
method GET_DEFINITION.
Step9. Provide below code. Activate the method and feeder class.
Step10. Go to Tx- SE80 . Our popup screen would be a FORM UIBB. So open the below
webdynpro component & right click on the Componnnet configuration. Create.
Step11. The below screen appears.
Provide a component configuration name and click on New button to create it.
Define the below global structure in the form feeder class attribute.
Step44. Run the application. Click on one billing type.
Step45. So here we have the pop up screen.
Step46. test for a different billing type.
Aug
25
The tree UIBB displays the flight data from SCARR & SPFLI table. The SCARR data
displayed as the header(root) and SPFLI data as child.
FPM OVP Application -Integrating Header LIST UIBB and ITEM List UIBB &
Dynamically hiding ITEM LIST UIBB.
Select the first UIBB and click on the toolbar Schema. Here the rendering
type should be WITH Panel.
Click on Edit button.
We have to code in the feeder class of the first UIBB. Select the first UIBB
and select the Configure UIBB button.
Expand the general Settings section and click on the feeder class button.
Test the application and click on the Display button which displays the
desired message.
FPM OVP Application: Adding a Button on
the UIBB Panel Area
The below link provides how to create a header list UIBB and an item list
UIBB.
FPM OVP Application -Integrating Header LIST UIBB and ITEM List UIBB &
Dynamically hiding ITEM LIST UIBB.
Select the first UIBB and click on the toolbar Schema. Here the rendering
type should be WITH Panel.
Click on Edit button.
We have to code in the feeder class of the first UIBB. Select the first UIBB
and select the Configure UIBB button.
Expand the general Settings section and click on the feeder class button.
Test the application and click on the Display button which displays the
desired message.
FPM OVP Application: Dynamically
Creating Buttons on UIBB Panel Area
The below link provides how to create a header list UIBB and an item list
UIBB.
FPM OVP Application -Integrating Header LIST UIBB and ITEM List UIBB.
The FPM application looks like as below and dynamically we have to add
some buttons on the marked area i.e the UIBB panel area.
Go to the method GET_DEFINITION of the feeder class of the UIBB.
Add the below code [ add one row to the ET_ACTION_DEFINITION TABLE].
Go to the application configuration and select the first UIBB configuration
and here Rendering type should be with Panel. Select the Toolbar Schema
button.
Select the first UIBB toolbar and here Capture action should be selected.
Execute the application.
Now the dynamically create action button appears on the screen UIBB
panel area.
Now task is to respond to the button click. Go to the process_event
method of the feeder class. Put the below code.
In this below post we will see how to enable and disable some buttons.
The current UI looks like as below. Now very first we will hide the EDIT
option and once CREATE button is clicked, EDIT option should appear.
Go to the GET_DAT method of the feeder class and put the code from 46 to
55 so that EDIT option will not appear when the application is launched.
test the application.
The application screen looks like this. Now we have to hide the MANDT
column from the header UIBB.
Go to the GET_DATA method of the feeder class of the UIBB.
Feb
23
In this below post we will see how to enable and disable some
buttons. The current UI looks like as below. Now very first we will
hide the EDIT option and once CREATE button is clicked, EDIT option
should appear.
Go to the GET_DAT method of the feeder class and put the code from
46 to 55 so that EDIT option will not appear when the application is
launched.
test the application.
So the EDIT option is invisible.
To make the EDIT button enable when CREATE option is clicked, put
the below code from line 54 to 60 in the GET_DATA method of the
feeder class.
Now test the application again.
FPM OVP Application-Adding buttons on
the Global toolbar of the FPM Application
The link: FPM OVP Application -Integrating Header LIST UIBB and
ITEMListUIBB provides steps to display list UIBBs.
Now we have to add some button on the global toolbar (area marked in
red color).
Select the application configuration and click on Display configuration
button.
Now test the application and here the buttons available in the global
toolbar area of the application.
Next task is to respond to the button click(s). Now figure out the
application controller class.
The application screen looks like as below. Now the task is very first when
the application is launched CANCEL button should be invisible and once
EDIT button is clicked then only CANCEL button would be visible.
Go to the application controller class. Open the OVERRIDE_EVENT_OVP
method.
put the below code.
Now test the application again. Now the CANCEL button is hidden now.
once Edit button is clicked, the CANCEL button again appears.
------------------------------------------------------------------------------------------------------
--------------------
Go to the IF_FPM_APP_CONTROLLER~AFTER_PROCESS_BEFORE_OUTPUT
method of the application controller class.
Activate all the methods. Put the code in the GET_DEFINITION method.
Here we are passing the table type and creating an action.
Declare an attribute.
Put the below code in GET_DATA method.
Add all the fields as the list column and change VBELN field display type as
LINK TO ACTION. Provide FPM EVENT ID as BILL_DISP.Save it.
Create an OVP application.
Create OVP Application configuration.
METHOD if_fpm_guibb_list~process_event.
DATA: lv_index TYPE sy–tabix,
ls_bill_list LIKE LINE OF gt_bill_list,
lr_navigate TYPE REF TO if_fpm_navigate_to,
lr_fpm TYPE REF TO if_fpm,
ls_trans_fields TYPE fpm_s_launch_transaction,
ls_add_params TYPE apb_lpd_s_add_trans_parameters,
lt_param TYPE apb_lpd_t_params,
ls_param TYPE LINE OF apb_lpd_t_params.
CASE io_event->mv_event_id.
WHEN ‘BILL_DISP’.
CALL METHOD io_event->mo_event_data->get_value(
EXPORTING
iv_key = if_fpm_guibb_list=>gc_event_par_row
IMPORTING
ev_value = lv_index ).
READ TABLE gt_bill_list INTO ls_bill_list INDEX lv_index.
IF sy–subrc IS INITIAL.
lr_fpm = cl_fpm_factory=>get_instance( ).
lr_navigate = lr_fpm->get_navigate_to( ).
ls_param–key = ‘VBRK-VBELN’.
ls_param–value = ls_bill_list–vbeln.
APPEND ls_param TO lt_param.
ls_trans_fields–gui_type = ‘WIN_GUI’.
ls_trans_fields–system_alias = ‘SAP_Localsystem’.
ls_trans_fields–parameter = LT_PARAM.
ls_trans_fields–tcode = ‘VF03’.
ls_add_params–skip_init_screen_if_possible = abap_true.
ls_add_params–parameter_forwarding = ‘P’.
ls_add_params–batch_input_program = ‘SAPMV60A’.
ls_add_params–batch_input_dynnr = ‘0101’.
ls_add_params–batch_input_ok_code = ‘/00’.
WHEN OTHERS.
ENDCASE.
ENDMETHOD.
---------------------------------------------------------------------------------------------------------------------
----
Now test the application and it displays the billing doc in VF03
transaction.