cancel
Showing results for 
Search instead for 
Did you mean: 

How to call BP transaction directly to the commercial view

Nahuel-Gil
Discoverer
0 Kudos
398

Hello experts!

I am using the following code to access the BP transaction using a customer number that has been clicked by the user:

 

  METHOD hotspot_click.

    CASE e_column_id-fieldname.
      WHEN 'KUNNR'.

        DATA: lt_return TYPE STANDARD TABLE OF bapiret2,
              ls_role   TYPE bus_roles.

        DATA(ls_output)  = gt_output[ e_row_id-index ].
        DATA(lo_request) = NEW cl_bupa_navigation_request( ).

        lo_request->set_partner_number( ls_output-kunnr ).
        lo_request->set_bupa_activity( '03' ). " Display

        ls_role-role = 'ZC001'. " Clients/Debtors
        lo_request->set_bupa_partner_role( ls_role ).
        lo_request->set_bupa_sub_header_id( 'ZC001' ).

        " Display general data by default
        lo_request->set_maintenance_id( 'B' ).

        " Set start-up options
        DATA(lo_options) = NEW cl_bupa_dialog_joel_options( ).

        " Start the transaction with an invisible locator
        lo_options->set_locator_visible( space ).

        " Open New BDT Instance for display of selected partner
        CALL METHOD cl_bupa_dialog_joel=>start_with_navigation
          EXPORTING
            iv_request              = lo_request
            iv_options              = lo_options
            iv_in_new_internal_mode = abap_true
          EXCEPTIONS
            already_started         = 1
            not_allowed             = 2
            OTHERS                  = 3.

      WHEN OTHERS.
    ENDCASE.

  ENDMETHOD.

 

The code works perfectly and allows me to display the general customer data in the BP transaction.

However, I want to modify this code to navigate directly to the customer's business data.

I have seen that by modifying the maintenance_id parameter it navigates to the customer information within the BP transaction, but I have not found any value for this parameter that allows me to display the ‘Commercial’ tab.

Isidro_2-1726041754802.png

Does anyone know where I can see the available values for maintenance_id or if there is an alternative?

Thanks in advance!

View Entire Topic
Nahuel-Gil
Discoverer
0 Kudos

Solution found!

In my case, I was incorrectly filling in the parameters of the cl_bupa_navigation_request class.

To call the BP transaction via the start_with_navigation method and display the business view directly, we must add the following line to the code above:

lo_request->set_bupa_sub_header_id( 'CVIC01' ).   " Customer: General data


In case you want to start the transaction with another view, you can check in table TBZ3A which is the correct parameter for your view.

Also, following the same procedure you can select the sub-tab of the view, using the following method:

lo_request->set_bupa_sub_header_tab( ' ' ).