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

Accepted Solutions (0)

Answers (3)

Answers (3)

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

ricardo_cavedini
Active Contributor
0 Kudos

Hello,

Check badi BBP_PGRP_ASSIGN_BADI, which is the responsible for assigning purchasing group depending on your own criteria.

Regards,

Ricardo

Kloud_Nilesh
Participant
0 Kudos

Thanks Jay & Ricardo ,

But as per BBP_PGRP_ASSIGN_BADI documentation this BADI will be trigered at the end , i.e. when user clicked on order, when follow on documents are created.

We need this shoud be triggred when user changes plant on item details tab.

And PGRP drop down should have values only which is allowed from z table as per plant selected or changed.

Please correct , If anything wrong.

Thanks again.

Nilesh

Former Member
0 Kudos

Try to implement the logic for BADI BBP_DOC_CHANGE_BADI / BBP_SC_CHANGE method.

Kloud_Nilesh
Participant
0 Kudos

Jay,

BBP_DOC_CHANGE_BADI BADI will pass only one PGRP at a time ? right?

And not a list of PGRPs as per custom z tables.

Regards,

Nilesh