The post is about displaying a LIST UIBB of Billing related fields and on selecting the billing document number it should display the billing document in VF03 transaction.
The highlighted fields of VBRK table that is going to be displayed on the FPM List UIBB.
Create a structure and a table type.
Create a class in SE24 and implement the interfaces.
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.
Go to SE80 and create a component configuration for the list UIBB.
The below screen appears.
Provide a name and click on create.
Provide description, package and then provide the feeder class.
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.
Provide a name and click on New button.
Then click on button Assign Configuration name.
Provide the name and ok.
Save and click on the appl configuration link.
The below screen appears.
provide title and add list component.
Add the list UIBB configuration name and Save.
test the OVP Application configuration.
Here the list displaying the billing document list. Now the task is when billing document is selected then it should open the billing doc in VFo3 transaction.
Go to the process_event method of the feeder class.
Put the below code.
-------------------------------------------------------------------------------------------------------------------
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( ).
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_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_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’.
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’.
CALL METHOD lr_navigate->launch_transaction
EXPORTING
is_transaction_fields = ls_trans_fields
is_additional_parameters = ls_add_params.
ENDIF.
EXPORTING
is_transaction_fields = ls_trans_fields
is_additional_parameters = ls_add_params.
ENDIF.
WHEN OTHERS.
ENDCASE.
ENDMETHOD.
-------------------------------------------------------------------------------------------------------------------------ENDCASE.
ENDMETHOD.
Now test the application and it displays the billing doc in VF03 transaction.
--------------------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment