Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

call transaction BP

Former Member
0 Likes
14,445

Hello,

I am trying to call transaction BP, I want to pass the BP number as parameter and ideally enter directly the BP details screen. I have tried many things, including setting the parameter BPA but this does not do anything.

Calling the transaction with a BDC table is not good either:

if I use mode 'A' it shows the OK-code to the user, I don't want this.

if I use mode 'N' well the user does not see the transaction BP!!

Who has the solution to this? Thanks a lot!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
8,284

You can not use transaction BP with BDC. It is an Enjoy type of

transaction. Instead of use BAPIs:

'BAPI_BUPA_CREATE_FROM_DATA',

'BAPI_BUPA_CENTRAL_CHANGE' and so on.

Regards,

If anyone else is trying to do this, I eventually found the answer:


  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 = <fs_row>-kunnr.
  lv_partner_role-role = 'ISM003'.
  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( lv_partner ).

*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.

8 REPLIES 8
Read only

Former Member
0 Likes
8,284

hi

hope it will help you.

<REMOVED BY MODERATOR>

Scenario

In this example the scenario is:

In transaction BP – Business Partner, the user should not be able to create a new person.

In transaction BP – Business Partner, the user should not have access to the Payment tab.

Recording a Transaction Variant

Transactions variant are recorded through transaction SHD0

3.

2.

1.

Enter the transaction code you want to record – here BP, and press enter

Enter a name for your transaction variant – here Z_BP_NO_PERSON. Please notice that the naming convention for transaction variant requires that it starts with Z or Y.

Push Create

1.

You have now called transaction BP in recording mode.

When you push the exit button you will get the following popup

3.

2.

Enter a name for the screen variant – e.g. Z_BP_NO_PERSON,

Press the deactivate menu function, and you get the following popup.

In this Popup you can deactivate menu functions.

Open the Menu Bar à Business Partner à Create

2.

1.

Position the cursor on “SCREEN_1000_CRE_PERS Person”

And push the deactivate button

3.

Push enter

4.

And “Exit and Save”

5.

Save the Transaction Variant.

Test

You can now test your transaction variant by pushing the test button

4.

As you see the Person button is grayed out, and if you go to the menu Business partner à Create, you can see that you’re not allowed to create a person for the menu either.

Removing the tab “Payment Transactions”

In order to modify your transaction variant, you go to transaction SHD0

1.

Press change with processing to enter the screen

2.

Press exit,

You will now get a popup for each sub screen.

3.

Enter a name for these all of these sub screens e.g. the screen name with a Z as prefix

When you reach Sub screen 1100_MAIN_ARE

flag the Payment transaction as invisible and push Exit and Save

5.

4.

Now save the transaction variant with “Exit and Save”. Notice that you’ll get a popup with a transport request for each screen.

6.

Now save the variant and go back to transaction SHD0 again.

When you now test the transaction variant, you can see that the tab strip “Payment transactions” has been removed.

Assigning the transaction Variant

You can assign your newly created transaction variant to a transaction code by:

Assigning it as a standard variant for the transaction (here BP).

Create a new transaction code for the transaction variant.

Assign it as a standard variant for the transaction BP

If you want the transaction BP to start with the transaction variant, you can set this variant as the standard variant. This is done in SHD0 under the Tab “Standard Variants”

Here you enter your transaction variant, and activate it. If you now call transaction BP you will see that it’s started with your transaction Variant.

Please Notice that this activation isn’t transported. You need to activate the transaction Variant on all receiving system.

Create a new transaction code for the transaction variant.

You also have the opportunity to create a new transaction for your transaction variant. By doing this you will end up with two transactions, one BP for the original version of transaction BP and one for your screen variant.

In order to create a new transaction code, choose from the menu Goto à Create Variant Transaction. You will now get the following popup:

Enter a new Transaction code e.g. Z_BP_NO_PERSON, and a short text for this new transaction code, and press enter.

In the next screen flag “Inherit GUI Attributes”

Save and test your new transaction code.

Edited by: Alvaro Tejada Galindo on Feb 29, 2008 3:16 PM

Read only

Former Member
0 Likes
8,285

You can not use transaction BP with BDC. It is an Enjoy type of

transaction. Instead of use BAPIs:

'BAPI_BUPA_CREATE_FROM_DATA',

'BAPI_BUPA_CENTRAL_CHANGE' and so on.

Regards,

Read only

Former Member
0 Likes
8,284

You can use the parameter BPA and

call transaction BP skip first screen..

It should work..

Read only

Former Member
8,284

If anyone else is trying to do this, I eventually found the answer:


  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 = <fs_row>-kunnr.
  lv_partner_role-role = 'ISM003'.
  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( lv_partner ).

*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.

Read only

0 Likes
8,284

thanks !!! it run as I need...

Lionello

Read only

vonglan
Active Participant
8,284

I streamlined the code of "former member". For me, the following works:

    DATA(request) = NEW cl_bupa_navigation_request( ).
request->set_partner_number( i_bp ). " import your BP number here
DATA(options) = NEW cl_bupa_dialog_joel_options( ).
options->set_navigation_disabled( abap_true ).
cl_bupa_dialog_joel=>start_with_navigation( iv_request = request
iv_options = options ).
Read only

0 Likes
4,315

This answer was helpful, it worked for me - thanks for sharing.

Read only

PeterK
Participant
0 Likes
3,706

This worked for me:

DATA: lt_bdcdata TYPE TABLE OF bdcdata,
      ls_bdcdata TYPE bdcdata,
      lt_messages TYPE TABLE OF bdcmsgcoll.

APPEND VALUE #( program = 'SAPLBUS_LOCATOR' dynpro = '0100' dynbegin = 'X' ) TO lt_bdcdata.
APPEND VALUE #( fnam = 'BUS_JOEL_SEARCH-PARTNER_NUMBER' fval = '123456' ) TO lt_bdcdata. 

CALL TRANSACTION 'BP' USING lt_bdcdata MODE 'A' MESSAGES INTO lt_messages.