cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the values in purchasing group drop down list box in SRM portal 5.0

Former Member
0 Kudos

Hi Experts,

We are working on SRM 5.0 classic model.

Requirement is to make change in the purchasing group drop down list.

In Shopping cart portal, currently we are getting the below values in the purchasing group drop down list:

PO1:PG1

PO2:PG1

PO1:PG2

PO2:PG2

Now out of these, PO1:PG1 is the default value in the purchasing group.

Requirement is,

There are 2 company codes, A and B.

When shopping cart is created based on A, then the purchasing group drop down list should only have the below values:

PO1:PG1

PO1:PG2

and the user must be able to select any one out of these two values.

When shopping cart is created based on B, then the purchasing group drop down list should only have the below values:

PO2:PG1

PO2:PG2

and the user must be able to select any one out of these two values.

Kindly advice on how to complete this task.

Thanks,

Deepa

Accepted Solutions (1)

Accepted Solutions (1)

konstantin_anikeev
Active Contributor
0 Kudos

Hi Deepa,

you can change responsibility of purchasing groupd via Transaction PPOMA_BBP so, that certain purchasing groups are responsible for certain company codes.

Alternative (hardcore variant), BADIs BBP_F4_READ_ON_EXIT + BBP_DOC_CHECK_BADI.

Regards

Konstantin

Former Member
0 Kudos

Hi Konstantin,

Thanks for the help!

The BADI BBP_F4_READ_ON_EXIT is not called when we change the company code in the basic data section of the SC portal.

For ex. I have logged in SC with company code A and now the purchasing group shows

PO1:PG1

PO1:PG2 .

Now if I change from company code A to company code B, the purchasing group must show

PO2:PG1

PO2:PG2 .

Problem is when I change the company code in SC, the control is not going to the BADI BBP_F4_READ_ON_EXIT. Also I tried the BADI BBP_PGRP_FIND and the control is not going to either of these 2 BADI's on change of company code. However the control goes to BBP_DOC_CHANGE_BADI. And if i use BBP_DOC_CHANGE_BADI to change the purchasing group, then i am getting dump as below:

The exception 'CX_BBP_PD_ABORT' was raised, but it was not caught anywhere along the call hierarchy. Since exceptions represent error situations and this error was not adequately responded to, the running ABAP program 'SAPLBBP_PDH' has to be terminated.

Can you please help me in understanding how this can be achieved.

Thanks in advance,

Deepa

konstantin_anikeev
Active Contributor
0 Kudos

Hi Deepa,

please try following... (at your own risk, but nothing critical)...

Go to SE80 and open service BBPSC01, navigate to template SAPLBBP_SC_UI_ITS 300.

Do you have following lines there? I'm on SRM 4.0...

<!-- company code  -->

  `TR()` `BBPSC_TD_COMPCODE("GS_SCR_BASIC_I-BE_CO_CODE",

                            "GS_SCR_BASIC_I-BE_CO_CODE_TEXt",

                            "TXT_BASIC_I-BE_CO_CODE",

                             gs_scr_basic_i-logsys_fi,

                             "X",

                             "X",

                             "BBPSCForm_Submit('UI_F4_UPDATE')")`

`TR()` `BBPSC_TD_LOCATION("GS_SCR_BASIC_I-LOCATION_ID",

                            "GS_SCR_BASIC_I-LOCATION_NAME",

                            "TXT_BASIC_I-LOCATION",

                            "FAVO_LOCATION_BASIC",

                            "FAVO_LOCATION_BASIC_TEXT",

                            "X",

                            "X",

                            "BBPSCForm_Submit('UI_F4_UPDATE')")`

  `TR()` `BBPSC_TD_STORAGE("GS_SCR_BASIC_I-BE_STGE_LOC",

                           "GS_SCR_BASIC_I-STORAGE_NAME",

                           "TXT_BASIC_I-BE_STGE_LOC",

                           "FAVO_STORAGE_DETAIL",

                           "FAVO_STORAGE_DETAIL_TEXT")`

<!-- purchasing group  -->

`TR()` `BBPSC_TD_PURCH_GROUP("GS_SCR_BASIC_I-PROC_GROUP",

                               "GS_SCR_BASIC_I-PROC_GROUP_TEXT",

                               "TXT_BASIC_I-BE_PUR_GROUP",

                               "GS_SCR_BASIC_I-NUMBER_INT",

                               "X",

                               "X",

                               "BBPSCForm_Submit('SC_REFRESH')")`

You can try to change code for company code from

"BBPSCForm_Submit('UI_F4_UPDATE')")`

to

"BBPSCForm_Submit('SC_REFRESH')")`

the publish template again, and see it it help.

Could you please provide your code from change BADI for change of purchasing group.

Regards

Konstantin

Former Member
0 Kudos

Hi Konstantin,

Thank you so much for the help.

There was some incorrect data which was flowing in BBP_DOC_CHANGE_BADI. So it was throwing the error. On fixing that, now i am able to set the default value in the listbox of purchasing group field for a company code.

Thanks,

Deepa.D

Answers (0)