Introduction : While displaying the details of business partner (CRM transaction BP) from the list of partners from interactive list , after clicking on the required BP , first we get the initial screen of transaction BP. After inserting the required BP number only the details of that business partner displays .
Scenario : Display the details of business partner shown in ALV list with the transaction BP by bypassing the initial screen for the BP.
Step 1 to 4 displays the actual flow of the transaction .
Step 1 : Call the transaction ‘BP’.
Step 2 : Click on the button headed ‘Open BP’ as below.
Step 3 : Put the required BP number in the screen .
Step 4: Get the details for the Person
Step 5 : Below segment of code helps to bypass the initial screen for the transaction BP and displays the details . Insert the below piece of code in interactive list on the user command for calling the transaction ‘BP’.
IF rs_selfield-fieldname = 'EMPLOYEE'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = ls_final-employee
IMPORTING
output = ls_final-employee.
CONSTANTS gc_x TYPE c VALUE 'X'.
DATA:
lv_request TYPE REF TO cl_bupa_navigation_request,
lv_options TYPE REF TO cl_bupa_dialog_joel_options,
lv_partner TYPE bu_partner,
lv_partner_role TYPE bus_roles,
lv_start_tab TYPE bus_navigation-bupa-sub_header_tab,
lv_bupr_main TYPE bus_bupr_maintenance.
* set start-up navigation
lv_partner_role-role = '000000'.
lv_start_tab = 'CVIC01'.
CREATE OBJECT lv_request.
*set partner maintenance
CALL METHOD lv_request->set_maintenance_id
EXPORTING
iv_value = lv_request->gc_maintenance_id_partner.
*set partner number to start with (in case of a guid just use the method
*set_partner_guid)
CALL METHOD lv_request->set_partner_number( ls_final-employee ).
*set the partner role to start with
CALL METHOD lv_request->set_bupa_partner_role( lv_partner_role ).
*set the activity you want the user to start the maintenance with
CALL METHOD lv_request->set_bupa_activity
EXPORTING
iv_value = lv_request->gc_activity_display.
CALL METHOD lv_request->set_bupa_sub_header_tab
EXPORTING
iv_value = lv_start_tab.
*set start-up options---------------------------------------------------
CREATE OBJECT lv_options.
*start the transaction with an invisible locator
CALL METHOD lv_options->set_locator_visible( space ).
*don't allow navigations to other partners
CALL METHOD lv_options->set_navigation_disabled( gc_x ).
CALL METHOD lv_options->set_bupr_create_not_allowed( gc_x ).
lv_bupr_main-create_allowed = gc_x.
lv_bupr_main-change_allowed = gc_x.
lv_bupr_main-delete_allowed = gc_x.
CALL METHOD lv_options->set_bupr_maintenance( lv_bupr_main ).
CALL METHOD lv_options->set_activity_switching_off( space ).
*Call the business partner maintenance----------------------------------
*with those parameters
CALL METHOD cl_bupa_dialog_joel=>start_with_navigation
EXPORTING
iv_request = lv_request
iv_options = lv_options
EXCEPTIONS
OTHERS = 1.
ENDIF.
ENDCASE.
ENDIF.
Result after inserting the above code :
Step 6 : Execute the report to show the list of business partners.
Step 7 : Now click on the BP for which you want the details .
Output :
Step 8 : Get the BP details . Here the initial screen for the inserting the BP number is bypasses and we get the required result .
Summary : Initial screen gets bypass for the transaction BP.