cancel
Showing results for 
Search instead for 
Did you mean: 

Determine if BBP_SC_CHANGE has been called from 'Start Manual Assignment'

Former Member
0 Kudos

I am using BBP_DOC_CHANGE_BADI~BBP_SC_CHANGE to do a custom determination of the Purchasing Group. I do want this to take effect for new Carts and times when automatic assingment of Purchasing Group is wanted(in our custom solution) e.g. changing Company Code in Go Shopping>Check Status ... but NOT when Start Manual Assignment has been clicked in 'Redistibution of Workload' (Auto Assignment dosn't seem to use this BADI).

How can I tell what caused the BADI to be called? It is called in a new Task so SY-TCODE/UCOMM/CPROG are blank/no use. Are there Exits where I can store SY-UCOMM to memory?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Matt,

with don't you add a "if sy-tcode ne 'BBPWLRA01' <Redistibution of Workload TCODE>" in your BADI arround Purch Group change ?

Then your custom determination is not called in this case.

PS: there is a specific BADI for purch group determination in SC: BBP_PGRP_FIND, instead of BBP_DOC_CHANGE_BADI.

Rgds

Christophe

Former Member
0 Kudos

Thanks for the reply, but SY-TCODE is blank as this BADI is called using CALL FUNCTION ... STARTING NEW TASK (it does work in most BADIs though).

I'll see if BBP_PGRP_FIND is either not called for Manual Determination or gives me some data to determine Manual Determination, and move the BBP_SC_CHANGE code over. However, I think this won't get called when the Company Code is changed in Go Shopping>Check Status: I'll report back.

Thanks,

Matt.

Former Member
0 Kudos

Perfect,

then use the reverse: "if not sy-tcode is initial", so the custom determination in your BADI is called only in dialog mode (with a real T-CODE), and not when called in a new task, i.e. during workload reassignment.

Could there be other cases where SC are updated in starting new task ? I don't think so.

Rgds

Christophe

Answers (0)