Tuesday, 26 August 2025

SAP ABAP - CALL BP TCODE From ABAP

REPORT ycall_bp.

PARAMETERS: p_bpnum TYPE but000-partner.
DATA: lo_request TYPE REF TO cl_bupa_navigation_request,
      lo_options TYPE REF TO cl_bupa_dialog_joel_options.
* Create request and options objects
CREATE OBJECT lo_request.
CREATE OBJECT lo_options.
* Set Business Partner number (example)
lo_request->set_partner_number( p_bpnum ). " your BP number
* Set activity (e.g., '03' for display)
lo_request->set_bupa_activity( '03' ).
* Optional: Set a specific sub-header tab (e.g., 'CVIC01' for Commercial View)
lo_request->set_bupa_sub_header_id( 'CVIC01' ).
* Optional: Hide the locator (search) area
lo_options->set_locator_visible( space ).
* Call the BP transaction with navigation
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  " Open in a new internal mode
  EXCEPTIONS
    already_started         = 1
    not_allowed             = 2
    OTHERS                  = 3.







No comments:

Post a Comment

ABAP CDS View Part 10 : Authorization & DCL untuk ABAP CDS

Authorization & DCL di ABAP CDS | Panduan Lengkap (PFCG, @AccessControl, DCL) Authorization & DCL untuk ABAP CDS — Pandua...