on 05-23-2006 1:22 PM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.