Skip to Content
author's profile photo Former Member
Former Member

BBP_DOC_CHANGE_BADI during SHC approval

I have an implementation for BADI BBP_DOC_CHANGE_BADI which changes the delivery date of the Shopping Cart (sets it to system date + lead time if the delivery date is in the past). During approval, when the details of the SHC are displayed (item overview), the dates are adjusted and my BADI works fine.

However, when i try to approve from the approval list (list of items due for approval), my badi is not called.

Should I be using a different BADI to change the delivery dates for approval? I've tried to work with BBP_DOC_SAVE_BADI, but I am having difficulty with the code.

Help would be much appreciated (and rewarded) 😀

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 31, 2006 at 08:55 AM

    I'm looking into running a FM that changes the delivery date of the shopping carts (to be attached to the WF approval task).

    Anybody know of a standard function module I can use (to change dlv dates)?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      BADI only runs after clicking 'Approve' button on overview and detail screen.

      Maybe in Your code is error, because:

      - deliv_date field have component type = EIND (DATS5)

      value of deliv_date will be eg. '02112006'

      - leadtime field have component type = BBP_LEADTIME (CHAR5)

      value of leadtime will be eg. '14'

      - sy-datum field have component SYDATUM (DATS8)

      value of sy-datum will be eg. '20061102' (reverse)

      Regards,

      Marcin Gajewski

  • Posted on Jan 17, 2008 at 05:27 PM

    I would like to re-raise this thread, as it does not appear to be answered.

    Similar to the original post, I would like to manipulate the shopping cart data with BBP_DOC_CHANGE_BADI after approving the shopping cart from the approval overview screen. Once you click on the "approve" button from the approval overview button, the shopping cart first executes the BBP_DOC_CHECK_BADI, which becomes obvious if there are any errors in the shopping cart because a message appears in the approval overview window.

    BUT, if there are no errors, the shopping cart continues to post the approved shopping cart in a background process (BBP_BACKGROUND_APPROVAL). Because it executes in a background process, a normal breakpoint won't stop in these BADIs.

    In order to test if the BBP_DOC_CHANGE_BADI is executed during background approval, I put code in this BADI to write system parameters into a custom table. This code DOES work, because I have verified in the online shopping cart transaction that it is executed. What I have discovered is that BBP_DOC_CHANGE_BADI is NOT executed when approval is executed from the overview window.

    I would like to confirm if others have this experience, or can site experience otherwise.

    We are running SRM server 5.5 SAPKIBKT11.

    Best regards,

    Nicholas Simon

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.