cancel
Showing results for 
Search instead for 
Did you mean: 

How To determince PGRP based on Plant

Kloud_Nilesh
Participant
0 Kudos

Hi ,

We need to determine purchasing group based on plant in SC item details tab.

Which badi we can use for the same.?

Regards,

Nilesh

View Entire Topic
Kloud_Nilesh
Participant
0 Kudos

Problem resolved,

We can get any item data field in badi input parameters itself.

Just enhance structure by that field at 2 palces and 1 implicite enhancement to pass it to badi.

Structures : BBPS_RESP_ITEM_DATA_BADI

ashish_shah
Contributor
0 Kudos

Hi Nilesh,

Did you use BBP_PGRP_FIND to achieve this?

Can you please suggest where did you apply this implicit enhancement?

Regards,

ashish

Kloud_Nilesh
Participant
0 Kudos

Hi Ashish,

Try to trace back where BADI call happens.. As I remember we need to add plant field at 2 structures then at one place put implicit enhancement to move plant to relevant badi import parameter.

-Nilesh

ashish_shah
Contributor
0 Kudos

Hi Nilesh,

Sorry for the late response.

You are right, i enhanced following two structures

  1. BBPS_RESP_ITEM_DATA_BADI
  2. bbps_om_resp_item_data

And enhanced following program to populate the values in one of this structure.

LBBP_OMF03

Structure BBPS_RESP_ITEM_DATA_BADI is being used by BADI BBP_PGRP_FIND.

By adding two new fields in this structure Plant and Item GUID and populating the values in program LBBP_OMF03; i managed to set default Purchasing group based on plant.

When user changes the plant at the line item level; the re determination of Purchasing group from plant was done in BBP_DOC_CHANGE BADI.

Regards,
Ashish Shah