cancel
Showing results for 
Search instead for 
Did you mean: 

BBP_DOC_CHANGE_BADI, method BBP_PO_CHANGE - behaviour change

former_member186444
Participant
0 Kudos

We used to use the BBP_PO_CHANGE method in the BBP_DOC_CHANGE_BADI BAdi in order to pass some data from the Shopping Cart to the PO. This was done on the basis that on save of the Shopping Cart (and subsequent creation of the PO), it would enter this method 3 times: once where IV_MODE = C (create) and twice where IV_MODE = U (Update).

It's been brought to my attention that this functionality no longer works since our systems were patched. Upon debugging, I can see that it longer comes into this method 3 times. Now it only comes in the once, which is the reason our code does not work in the BAdi.

Has anyone else encountered this and can point me to the reason for it? Is there, for example, new customising around this area or a note that suggests new functionality? I can find nothing on my searches so far.

thanks,

Malcolm.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Malcom,

It may have changed due to the patch upgrade. It changed for us also with respect to implementing note 1878426. Note clearly explains how the bbp_doc_change_badi call changes with respect to contract.

Hope this helps.

Regards,

Naveen

former_member186444
Participant
0 Kudos

Hi Naveen,

that does help because we are patching again right at this moment and I believe that OSS Note will come within scope. So, the process will have changed again! I've asked our BA's to re-check today with the patches on, so I'll see what they say afterwards. No doubt I will be back to debugging again soon.

Malcolm.

former_member186444
Participant
0 Kudos

Well I found that I can change ECS_PO_OUT_BADI so that it populates the required data from the shopping cart. That then changes it in R3 when it creates the PO there.

The problem now is that an earlier calling program passes that data in as read only, so though I've already changed the data in R3, it's shown in SRM as the original data.

Life is never easy with SAP.

Answers (1)

Answers (1)

konstantin_anikeev
Active Contributor
0 Kudos

Hi Malcolm,

you may need to change your implementation. What is the process difference for you between create and update mode?

Regards

Konstantin

former_member186444
Participant
0 Kudos

Hi Konstantin,

I didn't write the original code but the comments in the code describe it very well.....

* For some reason, even if the currency in es_header is changed during
* the first call to this method (IV_MODE = C), it reverts back to the PO currency in
* the second and third calls (IV_MODE = U).  It will only stay at the cart currency
* if it is changed during calls 2 + 3. We cannot access the actual PO
* on the crmd_orderadm_h/i tables at any point, as it does not get
* created on the database until step 3 finishes... so, instead we
* export the cart currency to memory in the first call here, then
* access that memory in the 2nd and 3rd calls.

Malcolm.

konstantin_anikeev
Active Contributor
0 Kudos

Hi Malcolm,

I suppose you try to overwrite SAP Standard behaviour, described in

http://service.sap.com/sap/support/notes/1862453

According to this Note CHANGE_BADI must work, if it does not - try to raise an OSS message.

Or recheck your implementation.

If you want to have all your documents in with the same currency - may be you'll need to update the master data of your vendors with your currency. Or it's not acceptable for the process?

Regards

Konstantin

former_member186444
Participant
0 Kudos

Hi Konstantin,

you are right - that works against our processes. We want this to override the currency of the Vendor.

Anyway, we have already raised a message with OSS, so we'll see what comes of that.

thanks,

Malcolm