SAP BP 精确跳转

CONSTANTS:
  gc_activity_create  TYPE bu_aktyp VALUE '01',
  gc_activity_change  TYPE bu_aktyp VALUE '02',
  gc_activity_display TYPE bu_aktyp VALUE '03'.

PARAMETERS: p_bp TYPE bu_partner.
PARAMETERS: p_cc TYPE bukrs.

START-OF-SELECTION.
  PERFORM open_bp USING p_bp p_cc gc_activity_change.

FORM open_bp
  USING
    iv_bp TYPE bu_partner
    iv_cc TYPE bukrs
    iv_activity TYPE bu_aktyp.

  DATA:
    ls_role TYPE bus_roles.

  " need to set it as a parameter
  " so that it's read in the Company Code subscreen
  SET PARAMETER ID 'BUK' FIELD iv_cc.

  " create new request
  DATA(lo_request) = NEW cl_bupa_navigation_request( ).
  " open request with selected partner number
  lo_request->set_partner_number( iv_bp ).
  " set the activity you want the user to start the maintenance with
  lo_request->set_bupa_activity( iv_activity ). " 01 - Create, 02 - Change, 03 - Display

  " change the role of the BP to the desired one
  " together with the sub header id
  ls_role-role = 'FS0000'.
  lo_request->set_bupa_partner_role( ls_role ).
  lo_request->set_bupa_sub_header_id( 'FS0001' ).

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

  " 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.
ENDFORM.
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值