on 01-28-2007 4:11 PM
Guys
Does anyone know if it is possible to update the Shopping Cart in the document change BADI and have the ITS Shopping Cart screens automatically refresh on returning from the BADI.
Currently we are updating fields in the shopping cart using the Doc Change BADI however it takes the user to click on 'Refresh' or 'Check' to update the screen with the new values.
Thanks
Nishad.
Hi Marcin,
Thanks for the reply.
I know how to use the Doc Change BADI and don't have any issues on this count.
The question was - Once you have made any changes to the Shopping Cart within the Doc Change BADI you need to click on Refresh or Check buttons in the Shopping Cart transaction to make the screen fields change to the new values you have set in the BADI.
I was wanting to know if there was a way to automate this Refreshing of screen fields.
Thanks
Nishad.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nishad,
Yes, you are correct. In some instances, the system needs Refresh or Check so as to update the fields. We had an instance where we need to perform an action based on Total Value of Shopping cart. And this would not occur correctly until a Refresh or Check happens.
We did a debug and find the Total value field is not updated immediately, but only after a refresh. So we had to calculate the Total price inside the Badi code using price and quantity field.
This is just a finding. I dont think all fields fail to update, but some.
So it would be better to debug within Badi of the incoming field values and come to conclusion.
I dont think u can do automation of Refresh within Badi as The Badi only does changing of Document data.
Thanks
Nandalal
Hi Marcin & Nandlal A
Go to transaction SE18 and look for BBP_DOC_CHANGE_BADI
Then select the Implementation and check whther there exists any custom implementation name.
Incase the BADI is implemented in your system in customer name range, pls paste the code here and will try to resolove your problems asap.
Regards
- Atul
Hi,
First, You must create a implementation of BBP_DOC_CHANGE_BADI definition. Create a Z implementation and add filter on object BUS2121 (Schopping Cart). Go to tab Interface and method BBP_SC_CHANGE.
This method contains parameters for changing shopping carts.
For more information, see the Documentation on method BBP_SC_CHANGE.
When you order or hold a shopping cart, the BAdI is called up twice :
-with the first call-up, the system fills all import data.
-with the second call-up, for performance reasons, the system fills only the import parameters IS_HEADER and IT_ITEM.
<b>For method BBP_SC_CHANGE, ensure that you FILL ALL export parameters, even if you only wish to change one parameter. Once the BAdI has been called up, the system can only continue to work with the data existing in the export interface.</b>
It's very important. Define local tables and loop at import parameters appending export tables.
Example code:
...
* accounting data
loop at it_account into ls_account_import.
move-corresponding ls_account_import to ls_account.
append ls_account to lt_account.
endloop.
* partner data
loop at it_partner into ls_partner.
append ls_partner to lt_partner.
endloop.
* organisation data
loop at it_orgdata into ls_orgdata.
append ls_orgdata to lt_orgdata.
endloop.
* fill export data
* Programm will go one with values of the export structure/tables
* all data from import structure are not used anymore
es_header = ls_header.
et_item[] = lt_item[].
et_account[] = lt_account[].
et_partner[] = lt_partner[].
et_orgdata[] = lt_orgdata[].
Regards,
Marcin Gajewski
please reward points for helpful answer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.