cancel
Showing results for 
Search instead for 
Did you mean: 

Setting a particular value as default for the Grouping Range at BP Creation

Former Member
0 Kudos

Hi,

I am trying to set certain default for the Grouping Range when I create a new Bp using Tcode BP. For this i have changed the PBC fucntion for the view BUP020 ( TCode : BUS3). The Z function module attached is Z_FBSBP_SET_DEFAULT_GROUPING

FUNCTION z_fbsbp_set_default_grouping.

*"----


""Local interface:

*" IMPORTING

*" REFERENCE(IV_ACTION) LIKE BUS000FLDS-CHAR1

*" REFERENCE(IV_SICHT) TYPE BU_SICHT

*"----


DATA: lv_bu_group TYPE bu_group VALUE 'GR01'.

  • Set the Grouping Range with a default value for all roles, each time

  • when transaction BP is called

SET PARAMETER ID 'BPP' FIELD lv_bu_group.

  • Call the standard PBC fucntion module for BP Creation

CALL FUNCTION 'BUP_BUPA_PBC_MISC'

EXPORTING

i_action = iv_action

i_sicht = iv_sicht.

ENDFUNCTION.

As per my notion this fucntion module should get triggered once I open the transaction BP and try to create a new BP, but such a thing is not happening.

Can someone help me in this?

Regards

Priyanka

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can try this if you have permissions to change own parameters of your user.

Follow path from any screen: System->UserProfile->Own Data

In the "Parameters" tab of maintain user profile screen, enter "BPP" in parameter ID and 'GR01' in Parameter value colums. When you launch BP transaction the 'GR01' will be the default value in the grouping field.

As you know this works only for your own user only.

Regards,

Surendra

Special Note:

The approach mentioned by you(i agree it is not working) is valid for all the user. So other users may face some problems. You should be careful about your approach. JUst a caution.

Former Member
0 Kudos

Hi Surendra,

Thanks for the reply, but I cannot go ahead with this solution as this is not generic ..

Regards

Priyanka

Former Member
0 Kudos

Priyanka,

Did you finally find a solution? I have the same problem.

Thanks,

Paul F

Former Member
0 Kudos

Yes we did,

But its not a very good solution though it serves the purpose.

See what I did was:

1. Read the authorization object's values for the logged on user using SUSR_USER_AUTH_FOR_OBJ_GET. From here I retrieve the Grouping Range required for the user.

2. Keep this value in a variable say gv_grouping_range.

3. SET PARAMETER ID 'BPP' FIELD gv_grouping_range.

4. CALL TRANSACTION 'BP'.

The four steps above have been enclosed in a report which has been attached to a new transaction code. We from now on allow user an access to this new transaction and not the standard BP transaction(which of course calls for a major change in roles).

Secondly, the first three steps which have been enclosed in a subroutine set_default_grouping are also called from the BDT view BUP050, where the PBO has been changed to ZBUP_BUPA_PBO_MISC

FUNCTION zbup_bupa_pbo_misc .

*"----


""Local interface:

*" IMPORTING

*" VALUE(I_SICHT) TYPE BU_SICHT

*"----


PERFORM get_set_def_grouping IN PROGRAM zrpbsbp_create_businesspartner.

CALL FUNCTION 'BUP_BUPA_PBO_MISC'

EXPORTING

i_sicht = i_sicht.

ENDFUNCTION.

Hope this helps.

Regards

Priyanka