Skip to Content
avatar image
Former Member

Doc Change Badi

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jan 28, 2007 at 04:35 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 30, 2007 at 02:40 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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